├── .gitattributes ├── .gitignore ├── AdvancedDataGridView.sln ├── AdvancedDataGridView ├── AdvancedDataGridView.cs ├── AdvancedDataGridView.csproj ├── AdvancedDataGridViewSearchToolBar.cs ├── AdvancedDataGridViewSearchToolBar.designer.cs ├── AdvancedDataGridViewSearchToolBar.resx ├── ColumnHeaderCell.cs ├── FormCustomFilter.Designer.cs ├── FormCustomFilter.cs ├── FormCustomFilter.resx ├── MenuStrip.cs ├── MenuStrip.designer.cs ├── Properties │ ├── Resources.Designer.cs │ └── Resources.resx ├── Resources │ └── Images │ │ ├── AdvancedDataGridView_logo.png │ │ ├── ColumnHeader_Filtered.png │ │ ├── ColumnHeader_FilteredAndOrderedASC.png │ │ ├── ColumnHeader_FilteredAndOrderedDESC.png │ │ ├── ColumnHeader_OrderedASC.png │ │ ├── ColumnHeader_OrderedDESC.png │ │ ├── ColumnHeader_SavedFilters.png │ │ ├── ColumnHeader_UnFiltered.png │ │ ├── MenuStrip_OrderASCbool.png │ │ ├── MenuStrip_OrderASCnum.png │ │ ├── MenuStrip_OrderASCtxt.png │ │ ├── MenuStrip_OrderDESCbool.png │ │ ├── MenuStrip_OrderDESCnum.png │ │ ├── MenuStrip_OrderDESCtxt.png │ │ ├── MenuStrip_ResizeGrip.png │ │ ├── SearchToolBar_ButtonCaseSensitive.png │ │ ├── SearchToolBar_ButtonClose.png │ │ ├── SearchToolBar_ButtonFromBegin.png │ │ ├── SearchToolBar_ButtonSearch.png │ │ └── SearchToolBar_ButtonWholeWord.png └── TreeNodeItemSelector.cs ├── AdvancedDataGridViewSample ├── AdvancedDataGridViewSample.csproj ├── App.config ├── FormMain.Designer.cs ├── FormMain.cs ├── FormMain.resx ├── Program.cs ├── Properties │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── flag-green_24.png ├── flag-red_24.png ├── lang.json ├── lang_cs-CZ.json ├── lang_es-AR.json ├── lang_it-IT.json ├── lang_nl-NL.json └── lang_pt-BR.json ├── License ├── LICENSE └── Third-Party.txt ├── README.md └── _DevTools ├── AutoBuilder.config.ps1 ├── DEVELOPER.md ├── Tools ├── 7-zip │ ├── 7-zip.chm │ ├── 7za.exe │ ├── copying.txt │ ├── license.txt │ └── readme.txt ├── AutoBuilder │ ├── AutoBuilder.ps1 │ └── LICENSE └── PSake │ ├── private │ ├── CleanupEnvironment.ps1 │ ├── ConfigureBuildEnvironment.ps1 │ ├── CreateConfigurationForNewContext.ps1 │ ├── ExecuteInBuildFileScope.ps1 │ ├── FormatErrorMessage.ps1 │ ├── Get-DefaultBuildFile.ps1 │ ├── GetCurrentConfigurationOrDefault.ps1 │ ├── GetTasksFromContext.ps1 │ ├── LoadConfiguration.ps1 │ ├── LoadModules.ps1 │ ├── ResolveError.ps1 │ ├── SelectObjectWithDefault.ps1 │ ├── Test-ModuleVersion.ps1 │ ├── WriteColoredOutput.ps1 │ ├── WriteDocumentation.ps1 │ └── WriteTaskTimeSummary.ps1 │ ├── psake │ ├── psake-config.ps1 │ ├── psake.cmd │ ├── psake.ps1 │ ├── psake.psd1 │ ├── psake.psm1 │ └── public │ ├── Assert.ps1 │ ├── BuildSetup.ps1 │ ├── BuildTearDown.ps1 │ ├── Exec.ps1 │ ├── FormatTaskName.ps1 │ ├── Framework.ps1 │ ├── Get-PSakeScriptTasks.ps1 │ ├── Include.ps1 │ ├── Invoke-Task.ps1 │ ├── Invoke-psake.ps1 │ ├── Properties.ps1 │ ├── Task.ps1 │ ├── TaskSetup.ps1 │ └── TaskTearDown.ps1 ├── run-build.bat ├── run-builddebugandrelease.bat ├── run-clean.bat ├── run-cleanfolders.bat ├── run-cleanworking.bat ├── run-devinit.bat ├── run-releasebin.bat ├── run-releasebinsrcclean.bat ├── run-releasebinsrccleanrebuild.bat ├── run-releasebinsrccleanrebuildexit.bat ├── run-releasesrc.bat ├── run-unittests.bat └── run-updateversion.bat /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | .vs/ 10 | 11 | # User-specific files (MonoDevelop/Xamarin Studio) 12 | *.userprefs 13 | 14 | # Build results 15 | [Dd]ebug/ 16 | [Dd]ebugPublic/ 17 | [Rr]elease/ 18 | [Rr]eleases/ 19 | [Xx]64/ 20 | [Xx]86/ 21 | [Bb]uild/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | 26 | # Visual Studio 2015 cache/options directory 27 | .vs/ 28 | # Uncomment if you have tasks that create the project's static files in wwwroot 29 | #wwwroot/ 30 | 31 | # MSTest test Results 32 | [Tt]est[Rr]esult*/ 33 | [Bb]uild[Ll]og.* 34 | 35 | # NUNIT 36 | *.VisualState.xml 37 | TestResult.xml 38 | 39 | # Build Results of an ATL Project 40 | [Dd]ebugPS/ 41 | [Rr]eleasePS/ 42 | dlldata.c 43 | 44 | # DNX 45 | project.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | 86 | # Visual Studio profiler 87 | *.psess 88 | *.vsp 89 | *.vspx 90 | *.sap 91 | 92 | # TFS 2012 Local Workspace 93 | $tf/ 94 | 95 | # Guidance Automation Toolkit 96 | *.gpState 97 | 98 | # ReSharper is a .NET coding add-in 99 | _ReSharper*/ 100 | *.[Rr]e[Ss]harper 101 | *.DotSettings.user 102 | 103 | # JustCode is a .NET coding add-in 104 | .JustCode 105 | 106 | # TeamCity is a build add-in 107 | _TeamCity* 108 | 109 | # DotCover is a Code Coverage Tool 110 | *.dotCover 111 | 112 | # NCrunch 113 | _NCrunch_* 114 | .*crunch*.local.xml 115 | nCrunchTemp_* 116 | 117 | # MightyMoose 118 | *.mm.* 119 | AutoTest.Net/ 120 | 121 | # Web workbench (sass) 122 | .sass-cache/ 123 | 124 | # Installshield output folder 125 | [Ee]xpress/ 126 | 127 | # DocProject is a documentation generator add-in 128 | DocProject/buildhelp/ 129 | DocProject/Help/*.HxT 130 | DocProject/Help/*.HxC 131 | DocProject/Help/*.hhc 132 | DocProject/Help/*.hhk 133 | DocProject/Help/*.hhp 134 | DocProject/Help/Html2 135 | DocProject/Help/html 136 | 137 | # Click-Once directory 138 | publish/ 139 | 140 | # Publish Web Output 141 | *.[Pp]ublish.xml 142 | *.azurePubxml 143 | 144 | # TODO: Un-comment the next line if you do not want to checkin 145 | # your web deploy settings because they may include unencrypted 146 | # passwords 147 | #*.pubxml 148 | *.publishproj 149 | 150 | # NuGet Packages 151 | *.nupkg 152 | # The packages folder can be ignored because of Package Restore 153 | **/packages/* 154 | # except build/, which is used as an MSBuild target. 155 | !**/packages/build/ 156 | # Uncomment if necessary however generally it will be regenerated when needed 157 | #!**/packages/repositories.config 158 | # NuGet v3's project.json files produces more ignoreable files 159 | *.nuget.props 160 | *.nuget.targets 161 | 162 | # Microsoft Azure Build Output 163 | csx/ 164 | *.build.csdef 165 | 166 | # Microsoft Azure Emulator 167 | ecf/ 168 | rcf/ 169 | 170 | # Microsoft Azure ApplicationInsights config file 171 | ApplicationInsights.config 172 | 173 | # Windows Store app package directory 174 | AppPackages/ 175 | BundleArtifacts/ 176 | 177 | # Visual Studio cache files 178 | # files ending in .cache can be ignored 179 | *.[Cc]ache 180 | # but keep track of directories ending in .cache 181 | !*.[Cc]ache/ 182 | 183 | # Others 184 | ClientBin/ 185 | [Ss]tyle[Cc]op.* 186 | ~$* 187 | *~ 188 | *.dbmdl 189 | *.dbproj.schemaview 190 | *.pfx 191 | *.publishsettings 192 | node_modules/ 193 | orleans.codegen.cs 194 | 195 | # RIA/Silverlight projects 196 | Generated_Code/ 197 | 198 | # Backup & report files from converting an old project file 199 | # to a newer Visual Studio version. Backup files are not needed, 200 | # because we have git ;-) 201 | _UpgradeReport_Files/ 202 | Backup*/ 203 | UpgradeLog*.XML 204 | UpgradeLog*.htm 205 | 206 | # SQL Server files 207 | *.mdf 208 | *.ldf 209 | 210 | # Business Intelligence projects 211 | *.rdl.data 212 | *.bim.layout 213 | *.bim_*.settings 214 | 215 | # Microsoft Fakes 216 | FakesAssemblies/ 217 | 218 | # GhostDoc plugin setting file 219 | *.GhostDoc.xml 220 | 221 | # Node.js Tools for Visual Studio 222 | .ntvs_analysis.dat 223 | 224 | # Visual Studio 6 build log 225 | *.plg 226 | 227 | # Visual Studio 6 workspace options file 228 | *.opt 229 | 230 | # Visual Studio LightSwitch build output 231 | **/*.HTMLClient/GeneratedArtifacts 232 | **/*.DesktopClient/GeneratedArtifacts 233 | **/*.DesktopClient/ModelManifest.xml 234 | **/*.Server/GeneratedArtifacts 235 | **/*.Server/ModelManifest.xml 236 | _Pvt_Extensions 237 | 238 | # LightSwitch generated files 239 | GeneratedArtifacts/ 240 | ModelManifest.xml 241 | 242 | # Paket dependency manager 243 | .paket/paket.exe 244 | 245 | # FAKE - F# Make 246 | .fake/ 247 | 248 | # packages Ext 249 | !packages/Ext/ 250 | 251 | # _DevTools 252 | _DevTools/out.txt 253 | _DevTools/TestResult.xml 254 | 255 | # App.config 256 | App.*.config 257 | -------------------------------------------------------------------------------- /AdvancedDataGridView.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.12.35527.113 d17.12 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedDataGridView", "AdvancedDataGridView\AdvancedDataGridView.csproj", "{6EBA0A55-B390-4479-A564-58D46094998D}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedDataGridViewSample", "AdvancedDataGridViewSample\AdvancedDataGridViewSample.csproj", "{FB1EC6B4-8A98-4FC4-9092-3F86E6B32D7C}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Debug|Mixed Platforms = Debug|Mixed Platforms 14 | Debug|x86 = Debug|x86 15 | Release|Any CPU = Release|Any CPU 16 | Release|Mixed Platforms = Release|Mixed Platforms 17 | Release|x86 = Release|x86 18 | EndGlobalSection 19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 20 | {6EBA0A55-B390-4479-A564-58D46094998D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {6EBA0A55-B390-4479-A564-58D46094998D}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {6EBA0A55-B390-4479-A564-58D46094998D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 23 | {6EBA0A55-B390-4479-A564-58D46094998D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 24 | {6EBA0A55-B390-4479-A564-58D46094998D}.Debug|x86.ActiveCfg = Debug|Any CPU 25 | {6EBA0A55-B390-4479-A564-58D46094998D}.Release|Any CPU.ActiveCfg = Release|Any CPU 26 | {6EBA0A55-B390-4479-A564-58D46094998D}.Release|Any CPU.Build.0 = Release|Any CPU 27 | {6EBA0A55-B390-4479-A564-58D46094998D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 28 | {6EBA0A55-B390-4479-A564-58D46094998D}.Release|Mixed Platforms.Build.0 = Release|Any CPU 29 | {6EBA0A55-B390-4479-A564-58D46094998D}.Release|x86.ActiveCfg = Release|Any CPU 30 | {FB1EC6B4-8A98-4FC4-9092-3F86E6B32D7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 31 | {FB1EC6B4-8A98-4FC4-9092-3F86E6B32D7C}.Debug|Any CPU.Build.0 = Debug|Any CPU 32 | {FB1EC6B4-8A98-4FC4-9092-3F86E6B32D7C}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU 33 | {FB1EC6B4-8A98-4FC4-9092-3F86E6B32D7C}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU 34 | {FB1EC6B4-8A98-4FC4-9092-3F86E6B32D7C}.Debug|x86.ActiveCfg = Debug|Any CPU 35 | {FB1EC6B4-8A98-4FC4-9092-3F86E6B32D7C}.Release|Any CPU.ActiveCfg = Release|Any CPU 36 | {FB1EC6B4-8A98-4FC4-9092-3F86E6B32D7C}.Release|Any CPU.Build.0 = Release|Any CPU 37 | {FB1EC6B4-8A98-4FC4-9092-3F86E6B32D7C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU 38 | {FB1EC6B4-8A98-4FC4-9092-3F86E6B32D7C}.Release|Mixed Platforms.Build.0 = Release|Any CPU 39 | {FB1EC6B4-8A98-4FC4-9092-3F86E6B32D7C}.Release|x86.ActiveCfg = Release|Any CPU 40 | EndGlobalSection 41 | GlobalSection(SolutionProperties) = preSolution 42 | HideSolutionNode = FALSE 43 | EndGlobalSection 44 | GlobalSection(ExtensibilityGlobals) = postSolution 45 | SolutionGuid = {6D67CDBD-A6CC-46AD-9E92-44CA837AB603} 46 | EndGlobalSection 47 | EndGlobal 48 | -------------------------------------------------------------------------------- /AdvancedDataGridView/AdvancedDataGridView.csproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/AdvancedDataGridView.csproj -------------------------------------------------------------------------------- /AdvancedDataGridView/AdvancedDataGridViewSearchToolBar.designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Zuby.ADGV 3 | { 4 | partial class AdvancedDataGridViewSearchToolBar 5 | { 6 | /// 7 | /// Required designer variable. 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | /// Clean up any resources being used. 13 | /// 14 | /// true if managed resources should be disposed; otherwise, false. 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Windows Form Designer generated code 25 | 26 | /// 27 | /// Required method for Designer support - do not modify 28 | /// the contents of this method with the code editor. 29 | /// 30 | private void InitializeComponent() 31 | { 32 | this.button_close = new System.Windows.Forms.ToolStripButton(); 33 | this.label_search = new System.Windows.Forms.ToolStripLabel(); 34 | this.comboBox_columns = new System.Windows.Forms.ToolStripComboBox(); 35 | this.textBox_search = new System.Windows.Forms.ToolStripTextBox(); 36 | this.button_frombegin = new System.Windows.Forms.ToolStripButton(); 37 | this.button_casesensitive = new System.Windows.Forms.ToolStripButton(); 38 | this.button_search = new System.Windows.Forms.ToolStripButton(); 39 | this.button_wholeword = new System.Windows.Forms.ToolStripButton(); 40 | this.separator_search = new System.Windows.Forms.ToolStripSeparator(); 41 | this.SuspendLayout(); 42 | // 43 | // button_close 44 | // 45 | this.button_close.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 46 | this.button_close.Image = global::Zuby.Properties.Resources.SearchToolBar_ButtonCaseSensitive; 47 | this.button_close.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; 48 | this.button_close.ImageTransparentColor = System.Drawing.Color.Magenta; 49 | this.button_close.Name = "button_close"; 50 | this.button_close.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; 51 | this.button_close.Size = new System.Drawing.Size(23, 24); 52 | this.button_close.Click += new System.EventHandler(this.button_close_Click); 53 | // 54 | // label_search 55 | // 56 | this.label_search.Name = "label_search"; 57 | this.label_search.Size = new System.Drawing.Size(45, 15); 58 | 59 | // 60 | // comboBox_columns 61 | // 62 | this.comboBox_columns.AutoSize = false; 63 | this.comboBox_columns.AutoToolTip = true; 64 | this.comboBox_columns.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 65 | this.comboBox_columns.FlatStyle = System.Windows.Forms.FlatStyle.Standard; 66 | this.comboBox_columns.IntegralHeight = false; 67 | this.comboBox_columns.Margin = new System.Windows.Forms.Padding(0, 2, 8, 2); 68 | this.comboBox_columns.MaxDropDownItems = 12; 69 | this.comboBox_columns.Name = "comboBox_columns"; 70 | this.comboBox_columns.Size = new System.Drawing.Size(150, 23); 71 | // 72 | // textBox_search 73 | // 74 | this.textBox_search.AutoSize = false; 75 | this.textBox_search.ForeColor = System.Drawing.Color.LightGray; 76 | this.textBox_search.Margin = new System.Windows.Forms.Padding(0, 2, 8, 2); 77 | this.textBox_search.Name = "textBox_search"; 78 | this.textBox_search.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; 79 | this.textBox_search.Size = new System.Drawing.Size(100, 23); 80 | this.textBox_search.Enter += new System.EventHandler(this.textBox_search_Enter); 81 | this.textBox_search.Leave += new System.EventHandler(this.textBox_search_Leave); 82 | this.textBox_search.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox_search_KeyDown); 83 | this.textBox_search.TextChanged += new System.EventHandler(this.textBox_search_TextChanged); 84 | // 85 | // button_frombegin 86 | // 87 | this.button_frombegin.CheckOnClick = true; 88 | this.button_frombegin.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 89 | this.button_frombegin.Image = global::Zuby.Properties.Resources.SearchToolBar_ButtonFromBegin; 90 | this.button_frombegin.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; 91 | this.button_frombegin.ImageTransparentColor = System.Drawing.Color.Magenta; 92 | this.button_frombegin.Name = "button_frombegin"; 93 | this.button_frombegin.Size = new System.Drawing.Size(23, 20); 94 | // 95 | // button_casesensitive 96 | // 97 | this.button_casesensitive.CheckOnClick = true; 98 | this.button_casesensitive.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 99 | this.button_casesensitive.Image = global::Zuby.Properties.Resources.SearchToolBar_ButtonCaseSensitive; 100 | this.button_casesensitive.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; 101 | this.button_casesensitive.ImageTransparentColor = System.Drawing.Color.Magenta; 102 | this.button_casesensitive.Name = "button_casesensitive"; 103 | this.button_casesensitive.Size = new System.Drawing.Size(23, 20); 104 | // 105 | // button_search 106 | // 107 | this.button_search.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 108 | this.button_search.Image = global::Zuby.Properties.Resources.SearchToolBar_ButtonSearch; 109 | this.button_search.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; 110 | this.button_search.ImageTransparentColor = System.Drawing.Color.Magenta; 111 | this.button_search.Name = "button_search"; 112 | this.button_search.Overflow = System.Windows.Forms.ToolStripItemOverflow.Never; 113 | this.button_search.Size = new System.Drawing.Size(23, 24); 114 | this.button_search.Click += new System.EventHandler(this.button_search_Click); 115 | // 116 | // button_wholeword 117 | // 118 | this.button_wholeword.CheckOnClick = true; 119 | this.button_wholeword.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; 120 | this.button_wholeword.Image = global::Zuby.Properties.Resources.SearchToolBar_ButtonWholeWord; 121 | this.button_wholeword.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; 122 | this.button_wholeword.ImageTransparentColor = System.Drawing.Color.Magenta; 123 | this.button_wholeword.Margin = new System.Windows.Forms.Padding(1, 1, 1, 2); 124 | this.button_wholeword.Name = "button_wholeword"; 125 | this.button_wholeword.Size = new System.Drawing.Size(23, 20); 126 | // 127 | // separator_search 128 | // 129 | this.separator_search.AutoSize = false; 130 | this.separator_search.Name = "separator_search"; 131 | this.separator_search.Size = new System.Drawing.Size(10, 25); 132 | // 133 | // AdvancedDataGridViewSearchToolBar 134 | // 135 | this.AllowMerge = false; 136 | this.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; 137 | this.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 138 | this.button_close, 139 | this.label_search, 140 | this.comboBox_columns, 141 | this.textBox_search, 142 | this.button_frombegin, 143 | this.button_wholeword, 144 | this.button_casesensitive, 145 | this.separator_search, 146 | this.button_search}); 147 | this.MaximumSize = new System.Drawing.Size(0, 27); 148 | this.MinimumSize = new System.Drawing.Size(0, 27); 149 | this.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; 150 | this.Size = new System.Drawing.Size(0, 27); 151 | this.Resize += new System.EventHandler(this.ResizeMe); 152 | this.ResumeLayout(false); 153 | this.PerformLayout(); 154 | 155 | } 156 | 157 | #endregion 158 | 159 | private System.Windows.Forms.ToolStripButton button_close; 160 | private System.Windows.Forms.ToolStripLabel label_search; 161 | private System.Windows.Forms.ToolStripComboBox comboBox_columns; 162 | private System.Windows.Forms.ToolStripTextBox textBox_search; 163 | private System.Windows.Forms.ToolStripButton button_frombegin; 164 | private System.Windows.Forms.ToolStripButton button_casesensitive; 165 | private System.Windows.Forms.ToolStripButton button_search; 166 | private System.Windows.Forms.ToolStripButton button_wholeword; 167 | private System.Windows.Forms.ToolStripSeparator separator_search; 168 | } 169 | } 170 | -------------------------------------------------------------------------------- /AdvancedDataGridView/AdvancedDataGridViewSearchToolBar.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | False 122 | 123 | -------------------------------------------------------------------------------- /AdvancedDataGridView/FormCustomFilter.Designer.cs: -------------------------------------------------------------------------------- 1 |  2 | namespace Zuby.ADGV 3 | { 4 | partial class FormCustomFilter 5 | { 6 | /// 7 | /// Required designer variable. 8 | /// 9 | private System.ComponentModel.IContainer components = null; 10 | 11 | /// 12 | /// Clean up any resources being used. 13 | /// 14 | /// true if managed resources should be disposed; otherwise, false. 15 | protected override void Dispose(bool disposing) 16 | { 17 | if (disposing && (components != null)) 18 | { 19 | components.Dispose(); 20 | } 21 | base.Dispose(disposing); 22 | } 23 | 24 | #region Windows Form Designer generated code 25 | 26 | /// 27 | /// Required method for Designer support - do not modify 28 | /// the contents of this method with the code editor. 29 | /// 30 | private void InitializeComponent() 31 | { 32 | this.components = new System.ComponentModel.Container(); 33 | this.button_ok = new System.Windows.Forms.Button(); 34 | this.button_cancel = new System.Windows.Forms.Button(); 35 | this.label_columnName = new System.Windows.Forms.Label(); 36 | this.comboBox_filterType = new System.Windows.Forms.ComboBox(); 37 | this.label_and = new System.Windows.Forms.Label(); 38 | this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); 39 | ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 40 | this.SuspendLayout(); 41 | // 42 | // button_ok 43 | // 44 | this.button_ok.DialogResult = System.Windows.Forms.DialogResult.OK; 45 | this.button_ok.Location = new System.Drawing.Point(40, 139); 46 | this.button_ok.Name = "button_ok"; 47 | this.button_ok.Size = new System.Drawing.Size(75, 23); 48 | this.button_ok.TabIndex = 0; 49 | this.button_ok.Text = "OK"; 50 | this.button_ok.UseVisualStyleBackColor = true; 51 | this.button_ok.Click += new System.EventHandler(this.button_ok_Click); 52 | // 53 | // button_cancel 54 | // 55 | this.button_cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 56 | this.button_cancel.Location = new System.Drawing.Point(121, 139); 57 | this.button_cancel.Name = "button_cancel"; 58 | this.button_cancel.Size = new System.Drawing.Size(75, 23); 59 | this.button_cancel.TabIndex = 1; 60 | this.button_cancel.Text = "Cancel"; 61 | this.button_cancel.UseVisualStyleBackColor = true; 62 | this.button_cancel.Click += new System.EventHandler(this.button_cancel_Click); 63 | // 64 | // label_columnName 65 | // 66 | this.label_columnName.AutoSize = true; 67 | this.label_columnName.Location = new System.Drawing.Point(4, 9); 68 | this.label_columnName.Name = "label_columnName"; 69 | this.label_columnName.Size = new System.Drawing.Size(120, 13); 70 | this.label_columnName.TabIndex = 2; 71 | this.label_columnName.Text = "Show rows where value"; 72 | // 73 | // comboBox_filterType 74 | // 75 | this.comboBox_filterType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; 76 | this.comboBox_filterType.FormattingEnabled = true; 77 | this.comboBox_filterType.Location = new System.Drawing.Point(7, 25); 78 | this.comboBox_filterType.Name = "comboBox_filterType"; 79 | this.comboBox_filterType.Size = new System.Drawing.Size(189, 21); 80 | this.comboBox_filterType.TabIndex = 3; 81 | this.comboBox_filterType.SelectedIndexChanged += new System.EventHandler(this.comboBox_filterType_SelectedIndexChanged); 82 | // 83 | // label_and 84 | // 85 | this.label_and.AutoSize = true; 86 | this.label_and.Location = new System.Drawing.Point(7, 89); 87 | this.label_and.Name = "label_and"; 88 | this.label_and.Size = new System.Drawing.Size(26, 13); 89 | this.label_and.TabIndex = 6; 90 | this.label_and.Text = "And"; 91 | this.label_and.Visible = false; 92 | // 93 | // errorProvider 94 | // 95 | this.errorProvider.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink; 96 | this.errorProvider.ContainerControl = this; 97 | // 98 | // FormCustomFilter 99 | // 100 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 101 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 102 | this.CancelButton = this.button_cancel; 103 | this.ClientSize = new System.Drawing.Size(205, 169); 104 | this.Controls.Add(this.label_and); 105 | this.Controls.Add(this.label_columnName); 106 | this.Controls.Add(this.comboBox_filterType); 107 | this.Controls.Add(this.button_cancel); 108 | this.Controls.Add(this.button_ok); 109 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 110 | this.MaximizeBox = false; 111 | this.MinimizeBox = false; 112 | this.Name = "FormCustomFilter"; 113 | this.ShowIcon = false; 114 | this.ShowInTaskbar = false; 115 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 116 | this.Text = "Custom Filter"; 117 | this.TopMost = true; 118 | this.Load += new System.EventHandler(this.FormCustomFilter_Load); 119 | ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 120 | this.ResumeLayout(false); 121 | this.PerformLayout(); 122 | 123 | } 124 | 125 | #endregion 126 | 127 | private System.Windows.Forms.Button button_ok; 128 | private System.Windows.Forms.Button button_cancel; 129 | private System.Windows.Forms.Label label_columnName; 130 | private System.Windows.Forms.ComboBox comboBox_filterType; 131 | private System.Windows.Forms.Label label_and; 132 | private System.Windows.Forms.ErrorProvider errorProvider; 133 | } 134 | } -------------------------------------------------------------------------------- /AdvancedDataGridView/FormCustomFilter.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | -------------------------------------------------------------------------------- /AdvancedDataGridView/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18444 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Zuby.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Zuby.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// Looks up a localized resource of type System.Drawing.Bitmap. 65 | /// 66 | internal static System.Drawing.Bitmap ColumnHeader_Filtered { 67 | get { 68 | object obj = ResourceManager.GetObject("ColumnHeader_Filtered", resourceCulture); 69 | return ((System.Drawing.Bitmap)(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Bitmap. 75 | /// 76 | internal static System.Drawing.Bitmap ColumnHeader_FilteredAndOrderedASC { 77 | get { 78 | object obj = ResourceManager.GetObject("ColumnHeader_FilteredAndOrderedASC", resourceCulture); 79 | return ((System.Drawing.Bitmap)(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Looks up a localized resource of type System.Drawing.Bitmap. 85 | /// 86 | internal static System.Drawing.Bitmap ColumnHeader_FilteredAndOrderedDESC { 87 | get { 88 | object obj = ResourceManager.GetObject("ColumnHeader_FilteredAndOrderedDESC", resourceCulture); 89 | return ((System.Drawing.Bitmap)(obj)); 90 | } 91 | } 92 | 93 | /// 94 | /// Looks up a localized resource of type System.Drawing.Bitmap. 95 | /// 96 | internal static System.Drawing.Bitmap ColumnHeader_OrderedASC { 97 | get { 98 | object obj = ResourceManager.GetObject("ColumnHeader_OrderedASC", resourceCulture); 99 | return ((System.Drawing.Bitmap)(obj)); 100 | } 101 | } 102 | 103 | /// 104 | /// Looks up a localized resource of type System.Drawing.Bitmap. 105 | /// 106 | internal static System.Drawing.Bitmap ColumnHeader_OrderedDESC { 107 | get { 108 | object obj = ResourceManager.GetObject("ColumnHeader_OrderedDESC", resourceCulture); 109 | return ((System.Drawing.Bitmap)(obj)); 110 | } 111 | } 112 | 113 | /// 114 | /// Looks up a localized resource of type System.Drawing.Bitmap. 115 | /// 116 | internal static System.Drawing.Bitmap ColumnHeader_SavedFilters { 117 | get { 118 | object obj = ResourceManager.GetObject("ColumnHeader_SavedFilters", resourceCulture); 119 | return ((System.Drawing.Bitmap)(obj)); 120 | } 121 | } 122 | 123 | /// 124 | /// Looks up a localized resource of type System.Drawing.Bitmap. 125 | /// 126 | internal static System.Drawing.Bitmap ColumnHeader_UnFiltered { 127 | get { 128 | object obj = ResourceManager.GetObject("ColumnHeader_UnFiltered", resourceCulture); 129 | return ((System.Drawing.Bitmap)(obj)); 130 | } 131 | } 132 | 133 | /// 134 | /// Looks up a localized resource of type System.Drawing.Bitmap. 135 | /// 136 | internal static System.Drawing.Bitmap MenuStrip_OrderASCbool { 137 | get { 138 | object obj = ResourceManager.GetObject("MenuStrip_OrderASCbool", resourceCulture); 139 | return ((System.Drawing.Bitmap)(obj)); 140 | } 141 | } 142 | 143 | /// 144 | /// Looks up a localized resource of type System.Drawing.Bitmap. 145 | /// 146 | internal static System.Drawing.Bitmap MenuStrip_OrderASCnum { 147 | get { 148 | object obj = ResourceManager.GetObject("MenuStrip_OrderASCnum", resourceCulture); 149 | return ((System.Drawing.Bitmap)(obj)); 150 | } 151 | } 152 | 153 | /// 154 | /// Looks up a localized resource of type System.Drawing.Bitmap. 155 | /// 156 | internal static System.Drawing.Bitmap MenuStrip_OrderASCtxt { 157 | get { 158 | object obj = ResourceManager.GetObject("MenuStrip_OrderASCtxt", resourceCulture); 159 | return ((System.Drawing.Bitmap)(obj)); 160 | } 161 | } 162 | 163 | /// 164 | /// Looks up a localized resource of type System.Drawing.Bitmap. 165 | /// 166 | internal static System.Drawing.Bitmap MenuStrip_OrderDESCbool { 167 | get { 168 | object obj = ResourceManager.GetObject("MenuStrip_OrderDESCbool", resourceCulture); 169 | return ((System.Drawing.Bitmap)(obj)); 170 | } 171 | } 172 | 173 | /// 174 | /// Looks up a localized resource of type System.Drawing.Bitmap. 175 | /// 176 | internal static System.Drawing.Bitmap MenuStrip_OrderDESCnum { 177 | get { 178 | object obj = ResourceManager.GetObject("MenuStrip_OrderDESCnum", resourceCulture); 179 | return ((System.Drawing.Bitmap)(obj)); 180 | } 181 | } 182 | 183 | /// 184 | /// Looks up a localized resource of type System.Drawing.Bitmap. 185 | /// 186 | internal static System.Drawing.Bitmap MenuStrip_OrderDESCtxt { 187 | get { 188 | object obj = ResourceManager.GetObject("MenuStrip_OrderDESCtxt", resourceCulture); 189 | return ((System.Drawing.Bitmap)(obj)); 190 | } 191 | } 192 | 193 | /// 194 | /// Looks up a localized resource of type System.Drawing.Bitmap. 195 | /// 196 | internal static System.Drawing.Bitmap MenuStrip_ResizeGrip { 197 | get { 198 | object obj = ResourceManager.GetObject("MenuStrip_ResizeGrip", resourceCulture); 199 | return ((System.Drawing.Bitmap)(obj)); 200 | } 201 | } 202 | 203 | /// 204 | /// Looks up a localized resource of type System.Drawing.Bitmap. 205 | /// 206 | internal static System.Drawing.Bitmap SearchToolBar_ButtonCaseSensitive { 207 | get { 208 | object obj = ResourceManager.GetObject("SearchToolBar_ButtonCaseSensitive", resourceCulture); 209 | return ((System.Drawing.Bitmap)(obj)); 210 | } 211 | } 212 | 213 | /// 214 | /// Looks up a localized resource of type System.Drawing.Bitmap. 215 | /// 216 | internal static System.Drawing.Bitmap SearchToolBar_ButtonClose { 217 | get { 218 | object obj = ResourceManager.GetObject("SearchToolBar_ButtonClose", resourceCulture); 219 | return ((System.Drawing.Bitmap)(obj)); 220 | } 221 | } 222 | 223 | /// 224 | /// Looks up a localized resource of type System.Drawing.Bitmap. 225 | /// 226 | internal static System.Drawing.Bitmap SearchToolBar_ButtonFromBegin { 227 | get { 228 | object obj = ResourceManager.GetObject("SearchToolBar_ButtonFromBegin", resourceCulture); 229 | return ((System.Drawing.Bitmap)(obj)); 230 | } 231 | } 232 | 233 | /// 234 | /// Looks up a localized resource of type System.Drawing.Bitmap. 235 | /// 236 | internal static System.Drawing.Bitmap SearchToolBar_ButtonSearch { 237 | get { 238 | object obj = ResourceManager.GetObject("SearchToolBar_ButtonSearch", resourceCulture); 239 | return ((System.Drawing.Bitmap)(obj)); 240 | } 241 | } 242 | 243 | /// 244 | /// Looks up a localized resource of type System.Drawing.Bitmap. 245 | /// 246 | internal static System.Drawing.Bitmap SearchToolBar_ButtonWholeWord { 247 | get { 248 | object obj = ResourceManager.GetObject("SearchToolBar_ButtonWholeWord", resourceCulture); 249 | return ((System.Drawing.Bitmap)(obj)); 250 | } 251 | } 252 | } 253 | } 254 | -------------------------------------------------------------------------------- /AdvancedDataGridView/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 122 | ..\Resources\Images\MenuStrip_ResizeGrip.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Resources\Images\ColumnHeader_UnFiltered.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Resources\Images\ColumnHeader_Filtered.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | 131 | ..\Resources\Images\ColumnHeader_FilteredAndOrderedDESC.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 132 | 133 | 134 | ..\Resources\Images\ColumnHeader_FilteredAndOrderedASC.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 135 | 136 | 137 | ..\Resources\Images\ColumnHeader_OrderedDESC.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 138 | 139 | 140 | ..\Resources\Images\MenuStrip_OrderASCbool.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 141 | 142 | 143 | ..\Resources\Images\MenuStrip_OrderASCnum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 144 | 145 | 146 | ..\Resources\Images\MenuStrip_OrderASCtxt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 147 | 148 | 149 | ..\Resources\Images\ColumnHeader_OrderedASC.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 150 | 151 | 152 | ..\Resources\Images\MenuStrip_OrderDESCbool.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 153 | 154 | 155 | ..\Resources\Images\MenuStrip_OrderDESCnum.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 156 | 157 | 158 | ..\Resources\Images\MenuStrip_OrderDESCtxt.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 159 | 160 | 161 | ..\Resources\Images\ColumnHeader_SavedFilters.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 162 | 163 | 164 | ..\Resources\Images\SearchToolBar_ButtonCaseSensitive.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 165 | 166 | 167 | ..\Resources\Images\SearchToolBar_ButtonClose.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 168 | 169 | 170 | ..\Resources\Images\SearchToolBar_ButtonFromBegin.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 171 | 172 | 173 | ..\Resources\Images\SearchToolBar_ButtonSearch.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 174 | 175 | 176 | ..\Resources\Images\SearchToolBar_ButtonWholeWord.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 177 | 178 | -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/AdvancedDataGridView_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/AdvancedDataGridView_logo.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/ColumnHeader_Filtered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/ColumnHeader_Filtered.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/ColumnHeader_FilteredAndOrderedASC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/ColumnHeader_FilteredAndOrderedASC.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/ColumnHeader_FilteredAndOrderedDESC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/ColumnHeader_FilteredAndOrderedDESC.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/ColumnHeader_OrderedASC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/ColumnHeader_OrderedASC.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/ColumnHeader_OrderedDESC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/ColumnHeader_OrderedDESC.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/ColumnHeader_SavedFilters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/ColumnHeader_SavedFilters.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/ColumnHeader_UnFiltered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/ColumnHeader_UnFiltered.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/MenuStrip_OrderASCbool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/MenuStrip_OrderASCbool.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/MenuStrip_OrderASCnum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/MenuStrip_OrderASCnum.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/MenuStrip_OrderASCtxt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/MenuStrip_OrderASCtxt.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/MenuStrip_OrderDESCbool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/MenuStrip_OrderDESCbool.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/MenuStrip_OrderDESCnum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/MenuStrip_OrderDESCnum.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/MenuStrip_OrderDESCtxt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/MenuStrip_OrderDESCtxt.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/MenuStrip_ResizeGrip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/MenuStrip_ResizeGrip.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/SearchToolBar_ButtonCaseSensitive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/SearchToolBar_ButtonCaseSensitive.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/SearchToolBar_ButtonClose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/SearchToolBar_ButtonClose.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/SearchToolBar_ButtonFromBegin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/SearchToolBar_ButtonFromBegin.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/SearchToolBar_ButtonSearch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/SearchToolBar_ButtonSearch.png -------------------------------------------------------------------------------- /AdvancedDataGridView/Resources/Images/SearchToolBar_ButtonWholeWord.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridView/Resources/Images/SearchToolBar_ButtonWholeWord.png -------------------------------------------------------------------------------- /AdvancedDataGridView/TreeNodeItemSelector.cs: -------------------------------------------------------------------------------- 1 | #region License 2 | // Advanced DataGridView 3 | // 4 | // Copyright (c), 2014 Davide Gironi 5 | // Original work Copyright (c), 2013 Zuby 6 | // 7 | // Please refer to LICENSE file for licensing information. 8 | #endregion 9 | 10 | using System; 11 | using System.Windows.Forms; 12 | 13 | namespace Zuby.ADGV 14 | { 15 | [System.ComponentModel.DesignerCategory("")] 16 | internal class TreeNodeItemSelector : TreeNode 17 | { 18 | 19 | #region public enum 20 | 21 | public enum CustomNodeType : byte 22 | { 23 | Default, 24 | SelectAll, 25 | SelectEmpty, 26 | DateTimeNode 27 | } 28 | 29 | #endregion 30 | 31 | 32 | #region class properties 33 | 34 | private CheckState _checkState = CheckState.Unchecked; 35 | private TreeNodeItemSelector _parent; 36 | 37 | #endregion 38 | 39 | 40 | #region constructor 41 | 42 | /// 43 | /// TreeNodeItemSelector constructor 44 | /// 45 | /// 46 | /// 47 | /// 48 | /// 49 | private TreeNodeItemSelector(String text, object value, CheckState state, CustomNodeType nodeType) 50 | : base(text) 51 | { 52 | CheckState = state; 53 | NodeType = nodeType; 54 | Value = value; 55 | } 56 | 57 | #endregion 58 | 59 | 60 | #region public clone method 61 | 62 | /// 63 | /// Clone a Node 64 | /// 65 | /// 66 | public new TreeNodeItemSelector Clone() 67 | { 68 | TreeNodeItemSelector n = new TreeNodeItemSelector(Text, Value, _checkState, NodeType) 69 | { 70 | NodeFont = NodeFont 71 | }; 72 | 73 | if (GetNodeCount(false) > 0) 74 | { 75 | foreach (TreeNodeItemSelector child in Nodes) 76 | n.AddChild(child.Clone()); 77 | } 78 | 79 | return n; 80 | } 81 | 82 | #endregion 83 | 84 | 85 | #region public getters / setters 86 | 87 | /// 88 | /// Get Node NodeType 89 | /// 90 | public CustomNodeType NodeType { get; private set; } 91 | 92 | /// 93 | /// Get Node value 94 | /// 95 | public object Value { get; private set; } 96 | 97 | /// 98 | /// Get Node parent 99 | /// 100 | new public TreeNodeItemSelector Parent 101 | { 102 | get 103 | { 104 | if (_parent is TreeNodeItemSelector) 105 | return _parent; 106 | else 107 | return null; 108 | } 109 | set 110 | { 111 | _parent = value; 112 | } 113 | } 114 | 115 | /// 116 | /// Node is Checked 117 | /// 118 | new public bool Checked 119 | { 120 | get 121 | { 122 | return _checkState == CheckState.Checked; 123 | } 124 | set 125 | { 126 | CheckState = (value == true ? CheckState.Checked : CheckState.Unchecked); 127 | } 128 | } 129 | 130 | /// 131 | /// Get or Set the current Node CheckState 132 | /// 133 | public CheckState CheckState 134 | { 135 | get 136 | { 137 | return _checkState; 138 | } 139 | set 140 | { 141 | _checkState = value; 142 | switch (_checkState) 143 | { 144 | case CheckState.Checked: 145 | StateImageIndex = 1; 146 | break; 147 | 148 | case CheckState.Indeterminate: 149 | StateImageIndex = 2; 150 | break; 151 | 152 | default: 153 | StateImageIndex = 0; 154 | break; 155 | } 156 | } 157 | } 158 | 159 | #endregion 160 | 161 | 162 | #region public create nodes methods 163 | 164 | /// 165 | /// Create a Node 166 | /// 167 | /// 168 | /// 169 | /// 170 | /// 171 | /// 172 | public static TreeNodeItemSelector CreateNode(string text, object value, CheckState state, CustomNodeType type) 173 | { 174 | return new TreeNodeItemSelector(text, value, state, type); 175 | } 176 | 177 | /// 178 | /// Create a child Node 179 | /// 180 | /// 181 | /// 182 | /// 183 | /// 184 | public TreeNodeItemSelector CreateChildNode(string text, object value, CheckState state) 185 | { 186 | TreeNodeItemSelector n = null; 187 | 188 | //specific method for datetimenode 189 | if (NodeType == CustomNodeType.DateTimeNode) 190 | { 191 | n = new TreeNodeItemSelector(text, value, state, CustomNodeType.DateTimeNode); 192 | } 193 | 194 | if (n != null) 195 | AddChild(n); 196 | 197 | return n; 198 | } 199 | public TreeNodeItemSelector CreateChildNode(string text, object value) 200 | { 201 | return CreateChildNode(text, value, _checkState); 202 | } 203 | 204 | /// 205 | /// Add a child Node to this Node 206 | /// 207 | /// 208 | protected void AddChild(TreeNodeItemSelector child) 209 | { 210 | child.Parent = this; 211 | Nodes.Add(child); 212 | } 213 | 214 | #endregion 215 | 216 | } 217 | } -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/AdvancedDataGridViewSample.csproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridViewSample/AdvancedDataGridViewSample.csproj -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/FormMain.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 180, 17 122 | 123 | 124 | 17, 17 125 | 126 | 127 | 468, 17 128 | 129 | -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Configuration; 3 | using System.Windows.Forms; 4 | 5 | namespace AdvancedDataGridViewSample 6 | { 7 | static class Program 8 | { 9 | /// 10 | /// Enable high DPI 11 | /// 12 | static readonly bool HighDPIEnabled = true; 13 | 14 | /// 15 | /// Load for high DPI 16 | /// 17 | /// 18 | [System.Runtime.InteropServices.DllImport("user32.dll")] 19 | private static extern bool SetProcessDPIAware(); 20 | 21 | /// 22 | /// The main entry point for the application. 23 | /// 24 | [STAThread] 25 | static void Main() 26 | { 27 | if (HighDPIEnabled && Environment.OSVersion.Version.Major >= 6) 28 | SetProcessDPIAware(); 29 | 30 | Application.EnableVisualStyles(); 31 | Application.SetCompatibleTextRenderingDefault(false); 32 | 33 | if (!String.IsNullOrEmpty(ConfigurationManager.AppSettings["culture"])) 34 | { 35 | System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(ConfigurationManager.AppSettings["culture"]); 36 | System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(ConfigurationManager.AppSettings["culture"]); 37 | } 38 | 39 | FormMain formMain = new FormMain(); 40 | if (HighDPIEnabled) 41 | formMain.AutoScaleMode = AutoScaleMode.Dpi; 42 | Application.Run(formMain); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18444 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace AdvancedDataGridViewSample.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AdvancedDataGridViewSample.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.18444 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace AdvancedDataGridViewSample.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/flag-green_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridViewSample/flag-green_24.png -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/flag-red_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/AdvancedDataGridViewSample/flag-red_24.png -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/lang.json: -------------------------------------------------------------------------------- 1 | { 2 | "ADGVSortDateTimeASC": "Sort Oldest to Newest", 3 | "ADGVSortDateTimeDESC": "Sort Newest to Oldest", 4 | "ADGVSortBoolASC": "Sort by False/True", 5 | "ADGVSortBoolDESC": "Sort by True/False", 6 | "ADGVSortNumASC": "Sort Smallest to Largest", 7 | "ADGVSortNumDESC": "Sort Largest to Smallest", 8 | "ADGVSortTextASC": "Sort А to Z", 9 | "ADGVSortTextDESC": "Sort Z to A", 10 | "ADGVAddCustomFilter": "Add a Custom Filter", 11 | "ADGVCustomFilter": "Custom Filter", 12 | "ADGVClearFilter": "Clear Filter", 13 | "ADGVClearSort": "Clear Sort", 14 | "ADGVButtonFilter": "Filter", 15 | "ADGVButtonUndofilter": "Cancel", 16 | "ADGVNodeSelectAll": "(Select All)", 17 | "ADGVNodeSelectEmpty": "(Blanks)", 18 | "ADGVNodeSelectTrue": "True", 19 | "ADGVNodeSelectFalse": "False", 20 | "ADGVFilterChecklistDisable": "Filter list is disabled", 21 | "ADGVEquals": "equals", 22 | "ADGVDoesNotEqual": "does not equal", 23 | "ADGVEarlierThan": "earlier than", 24 | "ADGVEarlierThanOrEqualTo": "earlier than or equal to", 25 | "ADGVLaterThan": "later than", 26 | "ADGVLaterThanOrEqualTo": "later than or equal to", 27 | "ADGVBetween": "between", 28 | "ADGVGreaterThan": "greater than", 29 | "ADGVGreaterThanOrEqualTo": "greater than or equal to", 30 | "ADGVLessThan": "less than", 31 | "ADGVLessThanOrEqualTo": "less than or equal to", 32 | "ADGVBeginsWith": "begins with", 33 | "ADGVDoesNotBeginWith": "does not begin with", 34 | "ADGVEndsWith": "ends with", 35 | "ADGVDoesNotEndWith": "does not end with", 36 | "ADGVContains": "contains", 37 | "ADGVDoesNotContain": "does not contain", 38 | "ADGVIncludeNullValues": "include empty strings", 39 | "ADGVInvalidValue": "Invalid Value", 40 | "ADGVFilterStringDescription": "Show rows where value {0} \"{1}\"", 41 | "ADGVFormTitle": "Custom Filter", 42 | "ADGVLabelColumnNameText": "Show rows where value", 43 | "ADGVLabelAnd": "And", 44 | "ADGVButtonOk": "OK", 45 | "ADGVButtonCancel": "Cancel", 46 | "ADGVSTBLabelSearch": "Search:", 47 | "ADGVSTBButtonFromBegin": "From Begin", 48 | "ADGVSTBButtonCaseSensitiveToolTip": "Case Sensitivity", 49 | "ADGVSTBButtonSearchToolTip": "Find Next", 50 | "ADGVSTBButtonCloseToolTip": "Hide", 51 | "ADGVSTBButtonWholeWordToolTip": "Search only Whole Word", 52 | "ADGVSTBComboBoxColumnsAll": "(All Columns)", 53 | "ADGVSTBTextBoxSearchToolTip": "Value for Search" 54 | } 55 | -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/lang_cs-CZ.json: -------------------------------------------------------------------------------- 1 | { 2 | "ADGVSortDateTimeASC": "Seřadit od nejstaršího k nejnovějšímu", 3 | "ADGVSortDateTimeDESC": "Seřadit od nejnovějšího k nejstaršímu", 4 | "ADGVSortBoolASC": "Seřadit od nepravda k pravda", 5 | "ADGVSortBoolDESC": "Seřadit od pravda k nepravda", 6 | "ADGVSortNumASC": "Seřadit od nejmenšího k největšímu", 7 | "ADGVSortNumDESC": "Seřadit od největšího k nejmenšímu", 8 | "ADGVSortTextASC": "Seřadit od А to Z", 9 | "ADGVSortTextDESC": "Seřadit od Z to A", 10 | "ADGVAddCustomFilter": "Přidat uživatelský filtr", 11 | "ADGVCustomFilter": "Uživatelský filtr", 12 | "ADGVClearFilter": "Zrušit filtr", 13 | "ADGVClearSort": "Zrušit řazení", 14 | "ADGVButtonFilter": "Filtr", 15 | "ADGVButtonUndofilter": "Zpět", 16 | "ADGVNodeSelectAll": "(Vybrat vše)", 17 | "ADGVNodeSelectEmpty": "(Prázdné)", 18 | "ADGVNodeSelectTrue": "Pravda", 19 | "ADGVNodeSelectFalse": "Nepravda", 20 | "ADGVFilterChecklistDisable": "Seznam pro filtrování je zakázán", 21 | "ADGVEquals": "rovná se", 22 | "ADGVDoesNotEqual": "nerovná se", 23 | "ADGVEarlierThan": "dříve než", 24 | "ADGVEarlierThanOrEqualTo": "dříve než nebo rovná se", 25 | "ADGVLaterThan": "později než", 26 | "ADGVLaterThanOrEqualTo": "později než nebo rovná se", 27 | "ADGVBetween": "mezi", 28 | "ADGVGreaterThan": "větší než", 29 | "ADGVGreaterThanOrEqualTo": "větší než nebo rovná se", 30 | "ADGVLessThan": "menší než", 31 | "ADGVLessThanOrEqualTo": "menší než nebo rovná se", 32 | "ADGVBeginsWith": "začíná", 33 | "ADGVDoesNotBeginWith": "nezačíná", 34 | "ADGVEndsWith": "končí", 35 | "ADGVDoesNotEndWith": "nekončí", 36 | "ADGVContains": "obsahuje", 37 | "ADGVDoesNotContain": "neobsahuje", 38 | "ADGVIncludeNullValues": "obsahovat prázdné řetězce", 39 | "ADGVInvalidValue": "Nesprávná hodnota", 40 | "ADGVFilterStringDescription": "Zobrazit řady, kde hodnota {0} \"{1}\"", 41 | "ADGVFormTitle": "Uživatelský filtr", 42 | "ADGVLabelColumnNameText": "Zobrazit řady, kde hodnota", 43 | "ADGVLabelAnd": "a", 44 | "ADGVButtonOk": "OK", 45 | "ADGVButtonCancel": "Zpět", 46 | "ADGVSTBLabelSearch": "Hledat:", 47 | "ADGVSTBButtonFromBegin": "Od začátku", 48 | "ADGVSTBButtonCaseSensitiveToolTip": "Zohlednit velikost pímen", 49 | "ADGVSTBButtonSearchToolTip": "Najít další", 50 | "ADGVSTBButtonCloseToolTip": "Skrýt", 51 | "ADGVSTBButtonWholeWordToolTip": "Pouze celá slova", 52 | "ADGVSTBComboBoxColumnsAll": "(Všechny sloupce)", 53 | "ADGVSTBTextBoxSearchToolTip": "Hodnota pro hledání" 54 | } 55 | -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/lang_es-AR.json: -------------------------------------------------------------------------------- 1 | { 2 | "ADGVSortDateTimeASC": "Ordenar de más antiguo a más reciente", 3 | "ADGVSortDateTimeDESC": "Ordenar de más reciente a más antiguo", 4 | "ADGVSortBoolASC": "Ordenar por Falso/Verdadero", 5 | "ADGVSortBoolDESC": "Ordenar por Verdadero/Falso", 6 | "ADGVSortNumASC": "Ordenar de menor a mayor", 7 | "ADGVSortNumDESC": "Ordenar de mayor a menor", 8 | "ADGVSortTextASC": "Ordenar de la А a la Z", 9 | "ADGVSortTextDESC": "Ordenar de la Z a la A", 10 | "ADGVAddCustomFilter": "Añadir un filtro personalizado", 11 | "ADGVCustomFilter": "Filtro personalizado", 12 | "ADGVClearFilter": "Quitar filtro", 13 | "ADGVClearSort": "Quitar ordenamiento", 14 | "ADGVButtonFilter": "Filtro", 15 | "ADGVButtonUndofilter": "Cancelar", 16 | "ADGVNodeSelectAll": "(Seleccionar todos)", 17 | "ADGVNodeSelectEmpty": "(Campos en blanco)", 18 | "ADGVNodeSelectTrue": "Verdadero", 19 | "ADGVNodeSelectFalse": "Falso", 20 | "ADGVFilterChecklistDisable": "La lista de filtros está desactivada", 21 | "ADGVEquals": "es igual a", 22 | "ADGVDoesNotEqual": "no es igual a", 23 | "ADGVEarlierThan": "es anterior al", 24 | "ADGVEarlierThanOrEqualTo": "es anterior al o igual al", 25 | "ADGVLaterThan": "es posterior al", 26 | "ADGVLaterThanOrEqualTo": "es posterior al o igual al", 27 | "ADGVBetween": "esta entre", 28 | "ADGVGreaterThan": "es mayor que", 29 | "ADGVGreaterThanOrEqualTo": "es mayor que o igual a", 30 | "ADGVLessThan": "es menor que", 31 | "ADGVLessThanOrEqualTo": "es menor que o igual a", 32 | "ADGVBeginsWith": "empieza con", 33 | "ADGVDoesNotBeginWith": "no empieza con", 34 | "ADGVEndsWith": "termina con", 35 | "ADGVDoesNotEndWith": "no termina con", 36 | "ADGVContains": "contiene", 37 | "ADGVDoesNotContain": "no contiene", 38 | "ADGVIncludeNullValues": "incluir cadenas vacías", 39 | "ADGVInvalidValue": "Valor no válido", 40 | "ADGVFilterStringDescription": "Mostrar filas donde el valor {0} \"{1}\"", 41 | "ADGVFormTitle": "Filtro personalizado", 42 | "ADGVLabelColumnNameText": "Mostrar filas donde el valor", 43 | "ADGVLabelAnd": "Y", 44 | "ADGVButtonOk": "OK", 45 | "ADGVButtonCancel": "Cancelar", 46 | "ADGVSTBLabelSearch": "Buscar:", 47 | "ADGVSTBButtonFromBegin": "Desde el principio", 48 | "ADGVSTBButtonCaseSensitiveToolTip": "Distinguir mayúsculas y minúsculas", 49 | "ADGVSTBButtonSearchToolTip": "Encontrar siguiente", 50 | "ADGVSTBButtonCloseToolTip": "Ocultar", 51 | "ADGVSTBButtonWholeWordToolTip": "Buscar sólo la palabra completa", 52 | "ADGVSTBComboBoxColumnsAll": "(Todas las columnas)", 53 | "ADGVSTBTextBoxSearchToolTip": "Valor para la búsqueda" 54 | } 55 | -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/lang_it-IT.json: -------------------------------------------------------------------------------- 1 | { 2 | "ADGVSortDateTimeASC": "Ordina dal Meno Recente al Più Recente", 3 | "ADGVSortDateTimeDESC": "Ordina dal Più Recente al Menu Recente", 4 | "ADGVSortBoolASC": "Ordina per Falso/Vero", 5 | "ADGVSortBoolDESC": "Ordina per Vero/Falso", 6 | "ADGVSortNumASC": "Ordina dal più Piccolo al più Grande", 7 | "ADGVSortNumDESC": "Ordina dal più Grande al più Piccolo", 8 | "ADGVSortTextASC": "Ordina dalla А alla Z", 9 | "ADGVSortTextDESC": "Ordina dalla Z alla A", 10 | "ADGVAddCustomFilter": "Aggiungi un Filtro Personalizzato", 11 | "ADGVCustomFilter": "Filtro Personalizzato", 12 | "ADGVClearFilter": "Cancella il Filtro", 13 | "ADGVClearSort": "Cancella l\u0027Ordinamento", 14 | "ADGVButtonFilter": "Filtra", 15 | "ADGVButtonUndofilter": "Cancella", 16 | "ADGVNodeSelectAll": "(Seleziona Tutti)", 17 | "ADGVNodeSelectEmpty": "(Vuoti)", 18 | "ADGVNodeSelectTrue": "Vero", 19 | "ADGVNodeSelectFalse": "Falso", 20 | "ADGVFilterChecklistDisable": "La Lista Filtri è disabilitata", 21 | "ADGVEquals": "uguale", 22 | "ADGVDoesNotEqual": "differente", 23 | "ADGVEarlierThan": "precedente a", 24 | "ADGVEarlierThanOrEqualTo": "precedente o uguale a", 25 | "ADGVLaterThan": "successivo a", 26 | "ADGVLaterThanOrEqualTo": "successivo o uguale a", 27 | "ADGVBetween": "tra", 28 | "ADGVGreaterThan": "più grande di", 29 | "ADGVGreaterThanOrEqualTo": "più grande o uguale a", 30 | "ADGVLessThan": "più piccolo di", 31 | "ADGVLessThanOrEqualTo": "più piccolo o uguale a", 32 | "ADGVBeginsWith": "inizia con", 33 | "ADGVDoesNotBeginWith": "non inizia con", 34 | "ADGVEndsWith": "finisce con", 35 | "ADGVDoesNotEndWith": "non finisce con", 36 | "ADGVContains": "contiene", 37 | "ADGVDoesNotContain": "non contiene", 38 | "ADGVIncludeNullValues": "includi stringhe vuote", 39 | "ADGVInvalidValue": "Valore Non Valido", 40 | "ADGVFilterStringDescription": "Visualizza le righe con valore {0} \"{1}\"", 41 | "ADGVFormTitle": "Filtro Personalizzato", 42 | "ADGVLabelColumnNameText": "Visualizza le righe con valore", 43 | "ADGVLabelAnd": "E", 44 | "ADGVButtonOk": "OK", 45 | "ADGVButtonCancel": "Cancella", 46 | "ADGVSTBLabelSearch": "Cerca:", 47 | "ADGVSTBButtonFromBegin": "Dall\u0027Inizio", 48 | "ADGVSTBButtonCaseSensitiveToolTip": "Riconosci Maiuscole e Minuscole", 49 | "ADGVSTBButtonSearchToolTip": "Trova il Prossimo", 50 | "ADGVSTBButtonCloseToolTip": "Nascondi", 51 | "ADGVSTBButtonWholeWordToolTip": "Cerca solo Parole Intere", 52 | "ADGVSTBComboBoxColumnsAll": "(Tutte le Colonne)", 53 | "ADGVSTBTextBoxSearchToolTip": "Valore di Ricerca" 54 | } 55 | -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/lang_nl-NL.json: -------------------------------------------------------------------------------- 1 | { 2 | "ADGVSortDateTimeASC": "Sorteer van Oud naar Nieuw", 3 | "ADGVSortDateTimeDESC": "Sorteer van Nieuw naar Oud", 4 | "ADGVSortBoolASC": "Sorteer op Vals/Waar", 5 | "ADGVSortBoolDESC": "Sorteer op Waar/Vals", 6 | "ADGVSortNumASC": "Sorteer van Laag naar Hoog", 7 | "ADGVSortNumDESC": "Sorteer van Hoog naar Laag", 8 | "ADGVSortTextASC": "Sorteer van А tot Z", 9 | "ADGVSortTextDESC": "Sorteer van Z tot A", 10 | "ADGVAddCustomFilter": "Voeg een Aangepaste Filter toe", 11 | "ADGVCustomFilter": "Aangepaste Filter", 12 | "ADGVClearFilter": "Verwijder Filter", 13 | "ADGVClearSort": "Verwijder Sorteren", 14 | "ADGVButtonFilter": "Filter", 15 | "ADGVButtonUndofilter": "Annuleer", 16 | "ADGVNodeSelectAll": "(Selecteer Allemaal)", 17 | "ADGVNodeSelectEmpty": "(Leeg)", 18 | "ADGVNodeSelectTrue": "Waar", 19 | "ADGVNodeSelectFalse": "Vals", 20 | "ADGVFilterChecklistDisable": "Filter lijst is uitgeschakeld", 21 | "ADGVEquals": "gelijk", 22 | "ADGVDoesNotEqual": "is niet gelijk aan", 23 | "ADGVEarlierThan": "vroeger dan", 24 | "ADGVEarlierThanOrEqualTo": "vroeger dan of gelijk aan", 25 | "ADGVLaterThan": "later dan", 26 | "ADGVLaterThanOrEqualTo": "later dan of gelijk aan", 27 | "ADGVBetween": "tussen", 28 | "ADGVGreaterThan": "groter dan", 29 | "ADGVGreaterThanOrEqualTo": "groter dan of gelijk aan", 30 | "ADGVLessThan": "kleiner dan", 31 | "ADGVLessThanOrEqualTo": "kleiner dan of gelijk aan", 32 | "ADGVBeginsWith": "begint met", 33 | "ADGVDoesNotBeginWith": "begint niet met", 34 | "ADGVEndsWith": "eindigt op", 35 | "ADGVDoesNotEndWith": "eindigt niet op", 36 | "ADGVContains": "bevat", 37 | "ADGVDoesNotContain": "bevat niet", 38 | "ADGVIncludeNullValues": "lege tekenreeksen bevatten", 39 | "ADGVInvalidValue": "Ongeldige Waarde", 40 | "ADGVFilterStringDescription": "Toont rijen waar de waarde {0} \"{1}\"", 41 | "ADGVFormTitle": "Aangepaste Filter", 42 | "ADGVLabelColumnNameText": "Toont rijen waar de waarde", 43 | "ADGVLabelAnd": "En", 44 | "ADGVButtonOk": "OK", 45 | "ADGVButtonCancel": "Annuleer", 46 | "ADGVSTBLabelSearch": "Zoek:", 47 | "ADGVSTBButtonFromBegin": "Vanaf Start", 48 | "ADGVSTBButtonCaseSensitiveToolTip": "Hoofdlettergevoelig", 49 | "ADGVSTBButtonSearchToolTip": "Vind volgende", 50 | "ADGVSTBButtonCloseToolTip": "Verberg", 51 | "ADGVSTBButtonWholeWordToolTip": "Zoek enkel Volledige Woorden", 52 | "ADGVSTBComboBoxColumnsAll": "(Alle Kolommen)", 53 | "ADGVSTBTextBoxSearchToolTip": "Waarde om te Zoeken" 54 | } 55 | -------------------------------------------------------------------------------- /AdvancedDataGridViewSample/lang_pt-BR.json: -------------------------------------------------------------------------------- 1 | { 2 | "ADGVSortDateTimeASC": "Classificar do mais antigo para o mais recente", 3 | "ADGVSortDateTimeDESC": "Classificar do mais recente para o mais antigo", 4 | "ADGVSortBoolASC": "Classificar por Falso/Verdadeiro", 5 | "ADGVSortBoolDESC": "Classificar por Verdadeiro/Falso", 6 | "ADGVSortNumASC": "Classificar do menor para o maior", 7 | "ADGVSortNumDESC": "Classificar do maior para o menor", 8 | "ADGVSortTextASC": "Classificar de A a Z", 9 | "ADGVSortTextDESC": "Classificar de Z a A", 10 | "ADGVAddCustomFilter": "Adicionar um filtro personalizado", 11 | "ADGVCustomFilter": "Filtro personalizado", 12 | "ADGVClearFilter": "Limpar filtro", 13 | "ADGVClearSort": "Limpar classificação", 14 | "ADGVButtonFilter": "Filtro", 15 | "ADGVButtonUndofilter": "Cancelar", 16 | "ADGVNodeSelectAll": "(Selecionar Tudo)", 17 | "ADGVNodeSelectEmpty": "(Vazios)", 18 | "ADGVNodeSelectTrue": "Verdadeiro", 19 | "ADGVNodeSelectFalse": "Falso", 20 | "ADGVFilterChecklistDisable": "A lista de filtros está desativada", 21 | "ADGVEquals": "é igual a", 22 | "ADGVDoesNotEqual": "não é igual", 23 | "ADGVEarlierThan": "antes de", 24 | "ADGVEarlierThanOrEqualTo": "anterior ou igual a", 25 | "ADGVLaterThan": "mais tarde que", 26 | "ADGVLaterThanOrEqualTo": "posterior ou igual a", 27 | "ADGVBetween": "entre", 28 | "ADGVGreaterThan": "maior que", 29 | "ADGVGreaterThanOrEqualTo": "maior que ou igual a", 30 | "ADGVLessThan": "menor que", 31 | "ADGVLessThanOrEqualTo": "menor que ou igual a", 32 | "ADGVBeginsWith": "inicia com", 33 | "ADGVDoesNotBeginWith": "não inicia com", 34 | "ADGVEndsWith": "termina com", 35 | "ADGVDoesNotEndWith": "não termina com", 36 | "ADGVContains": "contém", 37 | "ADGVDoesNotContain": "não contém", 38 | "ADGVIncludeNullValues": "incluir strings vazias", 39 | "ADGVInvalidValue": "Valor inválido", 40 | "ADGVFilterStringDescription": "Mostrar linhas com valor {0} \"{1}\"", 41 | "ADGVFormTitle": "Filtro personalizado", 42 | "ADGVLabelColumnNameText": "Mostrar linhas com valor", 43 | "ADGVLabelAnd": "E", 44 | "ADGVButtonOk": "OK", 45 | "ADGVButtonCancel": "Cancelar", 46 | "ADGVSTBLabelSearch": "Procurar:", 47 | "ADGVSTBButtonFromBegin": "Inicio", 48 | "ADGVSTBButtonCaseSensitiveToolTip": "Case Sensitivity", 49 | "ADGVSTBButtonSearchToolTip": "Procurar próximo", 50 | "ADGVSTBButtonCloseToolTip": "Ocultar", 51 | "ADGVSTBButtonWholeWordToolTip": "Pesquisar apenas a palavra inteira", 52 | "ADGVSTBComboBoxColumnsAll": "(Todas as colunas)", 53 | "ADGVSTBTextBoxSearchToolTip": "Valor para pesquisa" 54 | } 55 | -------------------------------------------------------------------------------- /License/LICENSE: -------------------------------------------------------------------------------- 1 | Microsoft Public License (Ms-PL) 2 | 3 | This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. 4 | 5 | 1. Definitions 6 | 7 | The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. 8 | 9 | A "contribution" is the original software, or any additions or changes to the software. 10 | 11 | A "contributor" is any person that distributes its contribution under this license. 12 | 13 | "Licensed patents" are a contributor's patent claims that read directly on its contribution. 14 | 15 | 2. Grant of Rights 16 | 17 | (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. 18 | 19 | (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 20 | 21 | 3. Conditions and Limitations 22 | 23 | (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. 24 | 25 | (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. 26 | 27 | (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. 28 | 29 | (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. 30 | 31 | (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. -------------------------------------------------------------------------------- /License/Third-Party.txt: -------------------------------------------------------------------------------- 1 | Third-Party folder contains documentation for third-party Software. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | About 2 | === 3 | 4 | **[Advanced DataGridView](https://github.com/davidegironi/advanceddatagridview)** is a .NET WinForms **DataGridView with advanced Filtering and Sorting** capabilities. 5 | 6 | ## Download 7 | 8 | + **[NuGet](https://www.nuget.org/packages/DG.AdvancedDataGridView)** 9 | + **[Latest Release](../../releases/latest)** 10 | 11 | ## Requirements 12 | 13 | * Microsoft Windows with .NET Framework 4, .NET Core 3.1, .NET 5 or later 14 | 15 | ## FAQ 16 | 17 | * Filter & Sort does not work. How can i solve this? 18 | * https://github.com/davidegironi/advanceddatagridview/issues/16#issuecomment-353157080 19 | * https://stackoverflow.com/a/10074142/1361842 20 | * How can i use a list of objects instead of a DataTable as DataSource? 21 | * https://github.com/davidegironi/advanceddatagridview/issues/24 22 | 23 | ## Development 24 | 25 | If you want to contribute, or you found a bug, please send an e-mail to the software author. 26 | 27 | ## License 28 | 29 | Copyright (c) Davide Gironi, 2015 30 | Advanced DataGridView is an open source software licensed under the [Microsoft Public License (Ms-PL) license](http://opensource.org/licenses/MS-PL) 31 | Original work Copyright (c), 2013 Zuby http://adgv.codeplex.com -------------------------------------------------------------------------------- /_DevTools/AutoBuilder.config.ps1: -------------------------------------------------------------------------------- 1 | 2 | #solution name to build 3 | $solutionName = "AdvancedDataGridView" 4 | 5 | #set version 6 | $versionMajor = "1" 7 | $versionMinor = "2" 8 | $versionBuild = GetVersionBuild 9 | $versionRevision = "18" 10 | #build version number 11 | $version = GetVersion $versionMajor $versionMinor $versionBuild $versionRevision 12 | 13 | #base folder for of the solution 14 | $baseDir = Resolve-Path .\..\ 15 | 16 | #release folder for of the solution 17 | $releaseDir = Resolve-Path .\..\..\Release 18 | 19 | #builder parameters 20 | $buildDebugAndRelease = $false 21 | $treatWarningsAsErrors = $true 22 | $releaseDebugFiles = $false 23 | 24 | #remove elder release builds for the actual version 25 | $removeElderReleaseWithSameVersion = $true 26 | 27 | #folders and files to exclude from the packaged release Source 28 | $releaseSrcExcludeFolders = @('"_DevTools"', '".git"'); 29 | $releaseSrcExcludeFiles = @('".git*"'); 30 | 31 | #builds array 32 | #include here all the solutions file to build 33 | $builds = @( 34 | @{ 35 | #solutions filename (.sln) 36 | Name = "AdvancedDataGridView"; 37 | #msbuild optionals constants 38 | Constants = ""; 39 | #projects to exclude from the release binary package 40 | ReleaseBinExcludeProjects = @(); 41 | #files to include in the release binary package 42 | ReleaseBinIncludeFiles = @( 43 | @{ 44 | Name = "AdvancedDataGridView"; 45 | Files = @( 46 | @{ 47 | FileNameFrom = "..\License"; 48 | FileNameTo = "." 49 | }, 50 | @{ 51 | FileNameFrom = "..\README.md"; 52 | FileNameTo = "README.md" 53 | } 54 | ) 55 | } 56 | ); 57 | #unit tests to run 58 | Tests = @(); 59 | #commands to run before packaging of the release source 60 | ReleaseSrcCmd = @(); 61 | #commands to run before packaging of the release binary 62 | ReleaseBinCmd = @(); 63 | }; 64 | ) -------------------------------------------------------------------------------- /_DevTools/DEVELOPER.md: -------------------------------------------------------------------------------- 1 | Developer documentation 2 | === 3 | 4 | ## _DevTools 5 | 6 | **_DevTools** folder is where you can find all the automation building scripts. 7 | 8 | ## Git and configuration files 9 | 10 | Do not write *personal* settings in files being commited. Instead use **Config Transformation**, add custom trasformation config files to override the main application config file. 11 | 12 | ## Questions 13 | 14 | If you have questions please send a email the to the software author. -------------------------------------------------------------------------------- /_DevTools/Tools/7-zip/7-zip.chm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/_DevTools/Tools/7-zip/7-zip.chm -------------------------------------------------------------------------------- /_DevTools/Tools/7-zip/7za.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/davidegironi/advanceddatagridview/f651a6ec2026c4ff46c1956d21f9f8a9f83c54cb/_DevTools/Tools/7-zip/7za.exe -------------------------------------------------------------------------------- /_DevTools/Tools/7-zip/license.txt: -------------------------------------------------------------------------------- 1 | 7-Zip Command line version 2 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 3 | License for use and distribution 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5 | 6 | 7-Zip Copyright (C) 1999-2009 Igor Pavlov. 7 | 8 | 7za.exe is distributed under the GNU LGPL license 9 | 10 | Notes: 11 | You can use 7-Zip on any computer, including a computer in a commercial 12 | organization. You don't need to register or pay for 7-Zip. 13 | 14 | 15 | GNU LGPL information 16 | -------------------- 17 | 18 | This library is free software; you can redistribute it and/or 19 | modify it under the terms of the GNU Lesser General Public 20 | License as published by the Free Software Foundation; either 21 | version 2.1 of the License, or (at your option) any later version. 22 | 23 | This library is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 26 | Lesser General Public License for more details. 27 | 28 | You should have received a copy of the GNU Lesser General Public 29 | License along with this library; if not, write to the Free Software 30 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 31 | -------------------------------------------------------------------------------- /_DevTools/Tools/7-zip/readme.txt: -------------------------------------------------------------------------------- 1 | 7-Zip Command line version 4.65 2 | ------------------------------- 3 | 4 | 7-Zip is a file archiver with high compression ratio. 5 | 7za.exe is a standalone command line version of 7-Zip. 6 | 7 | 7-Zip Copyright (C) 1999-2009 Igor Pavlov. 8 | 9 | Features of 7za.exe: 10 | - High compression ratio in new 7z format 11 | - Supported formats: 12 | - Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR 13 | - Unpacking only: Z 14 | - Highest compression ratio for ZIP and GZIP formats. 15 | - Fast compression and decompression 16 | - Strong AES-256 encryption in 7z and ZIP formats. 17 | 18 | 7za.exe is a free software distributed under the GNU LGPL. 19 | Read license.txt for more information. 20 | 21 | Source code of 7za.exe and 7-Zip can be found at 22 | http://www.7-zip.org/ 23 | 24 | 7za.exe can work in Windows 95/98/ME/NT/2000/XP/2003/Vista. 25 | 26 | There is also port of 7za.exe for POSIX systems like Unix (Linux, Solaris, OpenBSD, 27 | FreeBSD, Cygwin, AIX, ...), MacOS X and BeOS: 28 | 29 | http://p7zip.sourceforge.net/ 30 | 31 | 32 | This distributive packet contains the following files: 33 | 34 | 7za.exe - 7-Zip standalone command line version. 35 | readme.txt - This file. 36 | copying.txt - GNU LGPL license. 37 | license.txt - License information. 38 | 7-zip.chm - User's Manual in HTML Help format. 39 | 40 | 41 | --- 42 | End of document 43 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/CleanupEnvironment.ps1: -------------------------------------------------------------------------------- 1 | function CleanupEnvironment { 2 | if ($psake.context.Count -gt 0) { 3 | $currentContext = $psake.context.Peek() 4 | [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')] 5 | $env:PATH = $currentContext.originalEnvPath 6 | Set-Location $currentContext.originalDirectory 7 | $global:ErrorActionPreference = $currentContext.originalErrorActionPreference 8 | $psake.LoadedTaskModules = @{} 9 | $psake.ReferenceTasks = @{} 10 | [void] $psake.context.Pop() 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/ConfigureBuildEnvironment.ps1: -------------------------------------------------------------------------------- 1 | 2 | function ConfigureBuildEnvironment { 3 | if (!(Test-Path Variable:\IsWindows) -or $IsWindows) { 4 | $framework = $psake.context.peek().config.framework 5 | if ($framework -cmatch '^((?:\d+\.\d+)(?:\.\d+){0,1})(x86|x64){0,1}$') { 6 | $versionPart = $matches[1] 7 | $bitnessPart = $matches[2] 8 | } 9 | else { 10 | throw ($msgs.error_invalid_framework -f $framework) 11 | } 12 | $versions = $null 13 | $buildToolsVersions = $null 14 | switch ($versionPart) { 15 | '1.0' { 16 | $versions = @('v1.0.3705') 17 | } 18 | '1.1' { 19 | $versions = @('v1.1.4322') 20 | } 21 | '1.1.0' { 22 | $versions = @() 23 | } 24 | '2.0' { 25 | $versions = @('v2.0.50727') 26 | } 27 | '2.0.0' { 28 | $versions = @() 29 | } 30 | '3.0' { 31 | $versions = @('v2.0.50727') 32 | } 33 | '3.5' { 34 | $versions = @('v3.5', 'v2.0.50727') 35 | } 36 | '4.0' { 37 | $versions = @('v4.0.30319') 38 | } 39 | {($_ -eq '4.5') -or ($_ -eq '4.5.1') -or ($_ -eq '4.5.2')} { 40 | $versions = @('v4.0.30319') 41 | $buildToolsVersions = @('17.0', '16.0', '15.0', '14.0', '12.0') 42 | } 43 | {($_ -eq '4.6') -or ($_ -eq '4.6.1') -or ($_ -eq '4.6.2')} { 44 | $versions = @('v4.0.30319') 45 | $buildToolsVersions = @('17.0', '16.0', '15.0', '14.0') 46 | } 47 | {($_ -eq '4.7') -or ($_ -eq '4.7.1') -or ($_ -eq '4.7.2')} { 48 | $versions = @('v4.0.30319') 49 | $buildToolsVersions = @('17.0', '16.0', '15.0') 50 | } 51 | {($_ -eq '4.8') -or ($_ -eq '4.8.1')} { 52 | $versions = @('v4.0.30319') 53 | $buildToolsVersions = @('17.0', '16.0') 54 | } 55 | 56 | default { 57 | throw ($msgs.error_unknown_framework -f $versionPart, $framework) 58 | } 59 | } 60 | 61 | $bitness = 'Framework' 62 | if ($versionPart -ne '1.0' -and $versionPart -ne '1.1') { 63 | switch ($bitnessPart) { 64 | 'x86' { 65 | $bitness = 'Framework' 66 | $buildToolsKey = 'MSBuildToolsPath32' 67 | } 68 | 'x64' { 69 | $bitness = 'Framework64' 70 | $buildToolsKey = 'MSBuildToolsPath' 71 | } 72 | { [string]::IsNullOrEmpty($_) } { 73 | $ptrSize = [System.IntPtr]::Size 74 | switch ($ptrSize) { 75 | 4 { 76 | $bitness = 'Framework' 77 | $buildToolsKey = 'MSBuildToolsPath32' 78 | } 79 | 8 { 80 | $bitness = 'Framework64' 81 | $buildToolsKey = 'MSBuildToolsPath' 82 | } 83 | default { 84 | throw ($msgs.error_unknown_pointersize -f $ptrSize) 85 | } 86 | } 87 | } 88 | default { 89 | throw ($msgs.error_unknown_bitnesspart -f $bitnessPart, $framework) 90 | } 91 | } 92 | } 93 | 94 | $frameworkDirs = @() 95 | if ($null -ne $buildToolsVersions) { 96 | foreach($ver in $buildToolsVersions) { 97 | if ($ver -eq "15.0") { 98 | if ($null -eq (Get-Module -Name VSSetup)) { 99 | if ($null -eq (Get-Module -Name VSSetup -ListAvailable)) { 100 | WriteColoredOutput ($msgs.warning_missing_vsssetup_module -f $ver) -foregroundcolor Yellow 101 | continue 102 | } 103 | 104 | Import-Module VSSetup 105 | } 106 | 107 | # borrowed from nightroman https://github.com/nightroman/Invoke-Build 108 | if ($vsInstances = Get-VSSetupInstance) { 109 | $vs = @($vsInstances | Select-VSSetupInstance -Version '[15.0, 16.0)' -Require Microsoft.Component.MSBuild) 110 | if ($vs) { 111 | if ($buildToolsKey -eq 'MSBuildToolsPath32') { 112 | $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin 113 | } 114 | else { 115 | $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin\amd64 116 | } 117 | } 118 | 119 | $vs = @($vsInstances | Select-VSSetupInstance -Version '[15.0, 16.0)' -Product Microsoft.VisualStudio.Product.BuildTools) 120 | if ($vs) { 121 | if ($buildToolsKey -eq 'MSBuildToolsPath32') { 122 | $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin 123 | } 124 | else { 125 | $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\15.0\Bin\amd64 126 | } 127 | } 128 | } 129 | else { 130 | if (!($root = ${env:ProgramFiles(x86)})) {$root = $env:ProgramFiles} 131 | if (Test-Path -LiteralPath "$root\Microsoft Visual Studio\2017") { 132 | if ($buildToolsKey -eq 'MSBuildToolsPath32') { 133 | $rp = @(Resolve-Path "$root\Microsoft Visual Studio\2017\*\MSBuild\15.0\Bin" -ErrorAction SilentlyContinue) 134 | } 135 | else { 136 | $rp = @(Resolve-Path "$root\Microsoft Visual Studio\2017\*\MSBuild\15.0\Bin\amd64" -ErrorAction SilentlyContinue) 137 | } 138 | 139 | if ($rp) { 140 | $frameworkDirs += $rp[-1].ProviderPath 141 | } 142 | } 143 | } 144 | } 145 | elseif ($ver -eq "16.0") { 146 | if ($null -eq (Get-Module -Name VSSetup)) { 147 | if ($null -eq (Get-Module -Name VSSetup -ListAvailable)) { 148 | WriteColoredOutput ($msgs.warning_missing_vsssetup_module -f $ver) -foregroundcolor Yellow 149 | continue 150 | } 151 | 152 | Import-Module VSSetup 153 | } 154 | 155 | # borrowed from nightroman https://github.com/nightroman/Invoke-Build 156 | if ($vsInstances = Get-VSSetupInstance) { 157 | $vs = @($vsInstances | Select-VSSetupInstance -Version '[16.0, 17.0)' -Require Microsoft.Component.MSBuild) 158 | if ($vs) { 159 | $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\Current\Bin 160 | } 161 | 162 | $vs = @($vsInstances | Select-VSSetupInstance -Version '[16.0, 17.0)' -Product Microsoft.VisualStudio.Product.BuildTools) 163 | if ($vs) { 164 | $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\Current\Bin 165 | } 166 | } 167 | else { 168 | if (!($root = ${env:ProgramFiles(x86)})) {$root = $env:ProgramFiles} 169 | if (Test-Path -LiteralPath "$root\Microsoft Visual Studio\2019") { 170 | $rp = @(Resolve-Path "$root\Microsoft Visual Studio\2019\*\MSBuild\Current\Bin" -ErrorAction SilentlyContinue) 171 | if ($rp) { 172 | $frameworkDirs += $rp[-1].ProviderPath 173 | } 174 | } 175 | } 176 | } 177 | elseif ($ver -eq "17.0") { 178 | if ($null -eq (Get-Module -Name VSSetup)) { 179 | if ($null -eq (Get-Module -Name VSSetup -ListAvailable)) { 180 | WriteColoredOutput ($msgs.warning_missing_vsssetup_module -f $ver) -foregroundcolor Yellow 181 | continue 182 | } 183 | 184 | Import-Module VSSetup 185 | } 186 | 187 | # borrowed from nightroman https://github.com/nightroman/Invoke-Build 188 | if ($vsInstances = Get-VSSetupInstance) { 189 | $vs = @($vsInstances | Select-VSSetupInstance -Version '[17.0,)' -Require Microsoft.Component.MSBuild) 190 | if ($vs) { 191 | $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\Current\Bin 192 | } 193 | 194 | $vs = @($vsInstances | Select-VSSetupInstance -Version '[17.0,)' -Product Microsoft.VisualStudio.Product.BuildTools) 195 | if ($vs) { 196 | $frameworkDirs += Join-Path ($vs[0].InstallationPath) MSBuild\Current\Bin 197 | } 198 | } 199 | else { 200 | if (!($root = ${env:ProgramFiles(x86)})) {$root = $env:ProgramFiles} 201 | if (Test-Path -LiteralPath "$root\Microsoft Visual Studio\2022") { 202 | $rp = @(Resolve-Path "$root\Microsoft Visual Studio\2022\*\MSBuild\Current\Bin" -ErrorAction SilentlyContinue) 203 | if ($rp) { 204 | $frameworkDirs += $rp[-1].ProviderPath 205 | } 206 | } 207 | } 208 | } 209 | elseif (Test-Path "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\$ver") { 210 | $frameworkDirs += (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\MSBuild\ToolsVersions\$ver" -Name $buildToolsKey).$buildToolsKey 211 | } 212 | } 213 | } 214 | 215 | $frameworkDirs = $frameworkDirs + @($versions | ForEach-Object { "$env:windir\Microsoft.NET\$bitness\$_\" }) 216 | for ($i = 0; $i -lt $frameworkDirs.Count; $i++) { 217 | $dir = $frameworkDirs[$i] 218 | if ($dir -Match "\$\(Registry:HKEY_LOCAL_MACHINE(.*?)@(.*)\)") { 219 | $key = "HKLM:" + $matches[1] 220 | $name = $matches[2] 221 | $dir = (Get-ItemProperty -Path $key -Name $name).$name 222 | $frameworkDirs[$i] = $dir 223 | } 224 | } 225 | 226 | $frameworkDirs | ForEach-Object { Assert (test-path $_ -pathType Container) ($msgs.error_no_framework_install_dir_found -f $_)} 227 | 228 | $env:PATH = ($frameworkDirs -join ";") + ";$env:PATH" 229 | } 230 | 231 | # if any error occurs in a PS function then "stop" processing immediately 232 | # this does not effect any external programs that return a non-zero exit code 233 | $global:ErrorActionPreference = "Stop" 234 | } -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/CreateConfigurationForNewContext.ps1: -------------------------------------------------------------------------------- 1 | function CreateConfigurationForNewContext { 2 | param( 3 | [string] $buildFile, 4 | [string] $framework 5 | ) 6 | 7 | $previousConfig = GetCurrentConfigurationOrDefault 8 | 9 | $config = new-object psobject -property @{ 10 | buildFileName = $previousConfig.buildFileName; 11 | framework = $previousConfig.framework; 12 | taskNameFormat = $previousConfig.taskNameFormat; 13 | verboseError = $previousConfig.verboseError; 14 | coloredOutput = $previousConfig.coloredOutput; 15 | modules = $previousConfig.modules; 16 | moduleScope = $previousConfig.moduleScope; 17 | } 18 | 19 | if ($framework) { 20 | $config.framework = $framework; 21 | } 22 | 23 | if ($buildFile) { 24 | $config.buildFileName = $buildFile; 25 | } 26 | 27 | return $config 28 | } 29 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/ExecuteInBuildFileScope.ps1: -------------------------------------------------------------------------------- 1 | function ExecuteInBuildFileScope { 2 | param([string]$buildFile, $module, [scriptblock]$sb) 3 | 4 | # Execute the build file to set up the tasks and defaults 5 | Assert (test-path $buildFile -pathType Leaf) ($msgs.error_build_file_not_found -f $buildFile) 6 | 7 | $psake.build_script_file = get-item $buildFile 8 | $psake.build_script_dir = $psake.build_script_file.DirectoryName 9 | $psake.build_success = $false 10 | 11 | # Create a new psake context 12 | $psake.context.push( 13 | @{ 14 | "buildSetupScriptBlock" = {} 15 | "buildTearDownScriptBlock" = {} 16 | "taskSetupScriptBlock" = {} 17 | "taskTearDownScriptBlock" = {} 18 | "executedTasks" = new-object System.Collections.Stack 19 | "callStack" = new-object System.Collections.Stack 20 | "originalEnvPath" = $env:PATH 21 | "originalDirectory" = get-location 22 | "originalErrorActionPreference" = $global:ErrorActionPreference 23 | "tasks" = @{} 24 | "aliases" = @{} 25 | "properties" = new-object System.Collections.Stack 26 | "includes" = new-object System.Collections.Queue 27 | "config" = CreateConfigurationForNewContext $buildFile $framework 28 | } 29 | ) 30 | 31 | # Load in the psake configuration (or default) 32 | LoadConfiguration $psake.build_script_dir 33 | 34 | set-location $psake.build_script_dir 35 | 36 | # Import any modules declared in the build script 37 | LoadModules 38 | 39 | $frameworkOldValue = $framework 40 | 41 | . $psake.build_script_file.FullName 42 | 43 | $currentContext = $psake.context.Peek() 44 | 45 | if ($framework -ne $frameworkOldValue) { 46 | writecoloredoutput $msgs.warning_deprecated_framework_variable -foregroundcolor Yellow 47 | $currentContext.config.framework = $framework 48 | } 49 | 50 | ConfigureBuildEnvironment 51 | 52 | while ($currentContext.includes.Count -gt 0) { 53 | $includeFilename = $currentContext.includes.Dequeue() 54 | . $includeFilename 55 | } 56 | 57 | & $sb $currentContext $module 58 | } 59 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/FormatErrorMessage.ps1: -------------------------------------------------------------------------------- 1 | function FormatErrorMessage 2 | { 3 | [CmdletBinding()] 4 | param( 5 | [Parameter(ValueFromPipeline=$true)] 6 | $ErrorRecord = $Error[0] 7 | ) 8 | 9 | $currentConfig = GetCurrentConfigurationOrDefault 10 | if ($currentConfig.verboseError) { 11 | $error_message = "{0}: An Error Occurred. See Error Details Below: $($script:nl)" -f (Get-Date) 12 | $error_message += ("-" * 70) + $script:nl 13 | $error_message += "Error: {0}$($script:nl)" -f (ResolveError $ErrorRecord -Short) 14 | $error_message += ("-" * 70) + $script:nl 15 | $error_message += ResolveError $ErrorRecord 16 | $error_message += ("-" * 70) + $script:nl 17 | $error_message += "Script Variables" + $script:nl 18 | $error_message += ("-" * 70) + $script:nl 19 | $error_message += get-variable -scope script | format-table | out-string 20 | } else { 21 | # ($_ | Out-String) gets error messages with source information included. 22 | $error_message = "Error: {0}: $($script:nl){1}" -f (Get-Date), (ResolveError $ErrorRecord -Short) 23 | } 24 | 25 | $error_message 26 | } 27 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/Get-DefaultBuildFile.ps1: -------------------------------------------------------------------------------- 1 | # Attempt to find the default build file given the config_default of 2 | # buildFileName and legacyBuildFileName. If neither exist optionally 3 | # return the buildFileName or $null 4 | function Get-DefaultBuildFile { 5 | param( 6 | [boolean] $UseDefaultIfNoneExist = $true 7 | ) 8 | 9 | if (test-path $psake.config_default.buildFileName -pathType Leaf) { 10 | Write-Output $psake.config_default.buildFileName 11 | } elseif (test-path $psake.config_default.legacyBuildFileName -pathType Leaf) { 12 | Write-Warning "The default configuration file of default.ps1 is deprecated. Please use psakefile.ps1" 13 | Write-Output $psake.config_default.legacyBuildFileName 14 | } elseif ($UseDefaultIfNoneExist) { 15 | Write-Output $psake.config_default.buildFileName 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/GetCurrentConfigurationOrDefault.ps1: -------------------------------------------------------------------------------- 1 | function GetCurrentConfigurationOrDefault() { 2 | if ($psake.context.count -gt 0) { 3 | return $psake.context.peek().config 4 | } else { 5 | return $psake.config_default 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/GetTasksFromContext.ps1: -------------------------------------------------------------------------------- 1 | function GetTasksFromContext($currentContext) { 2 | 3 | $docs = $currentContext.tasks.Keys | foreach-object { 4 | 5 | $task = $currentContext.tasks.$_ 6 | new-object PSObject -property @{ 7 | Name = $task.Name; 8 | Alias = $task.Alias; 9 | Description = $task.Description; 10 | DependsOn = $task.DependsOn; 11 | } 12 | } 13 | 14 | return $docs 15 | } 16 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/LoadConfiguration.ps1: -------------------------------------------------------------------------------- 1 | function LoadConfiguration { 2 | <# 3 | .SYNOPSIS 4 | Load psake-config.ps1 file 5 | .DESCRIPTION 6 | Load psake-config.ps1 if present in the directory of the current build script. 7 | If that file doesn't exist, load the default psake-config.ps1 file from the module directory. 8 | #> 9 | param( 10 | [string]$configdir = (Split-Path -Path $PSScriptRoot -Parent) 11 | ) 12 | 13 | $configFilePath = Join-Path -Path $configdir -ChildPath $script:psakeConfigFile 14 | $defaultConfigFilePath = Join-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -ChildPath $script:psakeConfigFile 15 | 16 | if (Test-Path -LiteralPath $configFilePath -PathType Leaf) { 17 | $configFileToLoad = $configFilePath 18 | } elseIf (Test-Path -LiteralPath $defaultConfigFilePath -PathType Leaf) { 19 | $configFileToLoad = $defaultConfigFilePath 20 | } else { 21 | throw 'Cannot find psake-config.ps1' 22 | } 23 | 24 | try { 25 | [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseDeclaredVarsMoreThanAssigments', '')] 26 | $config = GetCurrentConfigurationOrDefault 27 | . $configFileToLoad 28 | } catch { 29 | throw 'Error Loading Configuration from {0}: {1}' -f $configFileToLoad, $_ 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/LoadModules.ps1: -------------------------------------------------------------------------------- 1 | function LoadModules { 2 | $currentConfig = $psake.context.peek().config 3 | if ($currentConfig.modules) { 4 | 5 | $scope = $currentConfig.moduleScope 6 | 7 | $global = [string]::Equals($scope, "global", [StringComparison]::CurrentCultureIgnoreCase) 8 | 9 | $currentConfig.modules | ForEach-Object { 10 | resolve-path $_ | ForEach-Object { 11 | "Loading module: $_" 12 | $module = Import-Module $_ -passthru -DisableNameChecking -global:$global 13 | if (!$module) { 14 | throw ($msgs.error_loading_module -f $_.Name) 15 | } 16 | } 17 | } 18 | 19 | "" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/ResolveError.ps1: -------------------------------------------------------------------------------- 1 | # borrowed from Jeffrey Snover http://blogs.msdn.com/powershell/archive/2006/12/07/resolve-error.aspx 2 | # modified to better handle SQL errors 3 | function ResolveError 4 | { 5 | [CmdletBinding()] 6 | param( 7 | [Parameter(ValueFromPipeline=$true)] 8 | $ErrorRecord=$Error[0], 9 | [Switch] 10 | $Short 11 | ) 12 | 13 | process { 14 | if ($_ -eq $null) { $_ = $ErrorRecord } 15 | $ex = $_.Exception 16 | 17 | if (-not $Short) { 18 | $error_message = "$($script:nl)ErrorRecord:{0}ErrorRecord.InvocationInfo:{1}Exception:$($script:nl){2}" 19 | $formatted_errorRecord = $_ | format-list * -force | out-string 20 | $formatted_invocationInfo = $_.InvocationInfo | format-list * -force | out-string 21 | $formatted_exception = '' 22 | 23 | $i = 0 24 | while ($null -ne $ex) { 25 | $i++ 26 | $formatted_exception += ("$i" * 70) + $script:nl + 27 | ($ex | format-list * -force | out-string) + $script:nl 28 | $ex = $ex | SelectObjectWithDefault -Name 'InnerException' -Value $null 29 | } 30 | 31 | return $error_message -f $formatted_errorRecord, $formatted_invocationInfo, $formatted_exception 32 | } 33 | 34 | $lastException = @() 35 | while ($null -ne $ex) { 36 | $lastMessage = $ex | SelectObjectWithDefault -Name 'Message' -Value '' 37 | $lastException += ($lastMessage -replace $script:nl, '') 38 | if ($ex -is [Data.SqlClient.SqlException]) { 39 | $lastException += "(Line [$($ex.LineNumber)] " + 40 | "Procedure [$($ex.Procedure)] Class [$($ex.Class)] " + 41 | " Number [$($ex.Number)] State [$($ex.State)] )" 42 | } 43 | $ex = $ex | SelectObjectWithDefault -Name 'InnerException' -Value $null 44 | } 45 | $shortException = $lastException -join ' --> ' 46 | 47 | $header = $null 48 | $header = (($_.InvocationInfo | 49 | SelectObjectWithDefault -Name 'PositionMessage' -Value '') -replace $script:nl, ' '), 50 | ($_ | SelectObjectWithDefault -Name 'Message' -Value ''), 51 | ($_ | SelectObjectWithDefault -Name 'Exception' -Value '') | 52 | Where-Object { -not [String]::IsNullOrEmpty($_) } | 53 | Select-Object -First 1 54 | 55 | $delimiter = '' 56 | if ((-not [String]::IsNullOrEmpty($header)) -and 57 | (-not [String]::IsNullOrEmpty($shortException))) 58 | { $delimiter = ' [<<==>>] ' } 59 | 60 | return "$($header)$($delimiter)Exception: $($shortException)" 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/SelectObjectWithDefault.ps1: -------------------------------------------------------------------------------- 1 | function SelectObjectWithDefault 2 | { 3 | [CmdletBinding()] 4 | param( 5 | [Parameter(ValueFromPipeline=$true)] 6 | [PSObject] 7 | $InputObject, 8 | [string] 9 | $Name, 10 | $Value 11 | ) 12 | 13 | process { 14 | if ($_ -eq $null) { $Value } 15 | elseif ($_ | Get-Member -Name $Name) { 16 | $_.$Name 17 | } 18 | elseif (($_ -is [Hashtable]) -and ($_.Keys -contains $Name)) { 19 | $_.$Name 20 | } 21 | else { $Value } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/Test-ModuleVersion.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | .SYNOPSIS 3 | Validate that the version of a module passed in via the $currentVersion 4 | parameter is valid based on the criteria specified by the following 5 | parameters. 6 | .DESCRIPTION 7 | This function is used to determine whether or not a given module is within 8 | the version bounds specified by the parameters passed in. Psake will use 9 | this information to determine if the module it has found will contain the 10 | proper version of the shared task it has been asked to import. 11 | 12 | This function should allow bounds that are only on the lower limit, only on 13 | the upper, within a range, or if no bounds are supplied, the current module 14 | will be accepted without question. 15 | .PARAMETER currentVersion 16 | The version of the module in the current session to be subjected to comparison 17 | .PARAMETER minimumVersion 18 | The lower bound of the version that will be accepted. This comparison should 19 | be inclusive, meaning an input version greater than or equal to this version 20 | should be accepted. 21 | .PARAMETER maximumVersion 22 | The upper bound of the version that will be accepted. This comparison should 23 | be inclusive, meaning an input version less than or equal to this version 24 | should be accepted. 25 | .PARAMETER lessThanVersion 26 | The upper bound of the version that will be accepted. This comparison should 27 | be exlusive. Meaning an input version that is less than only, not equal to 28 | this version, will be accepted. 29 | .INPUTS 30 | A $currentVersion of type [System.Version] or a convertable string. 31 | A set of version criteria, each of type [System.Version] or a convertable string. 32 | .OUTPUTS 33 | boolean - Pass/Fail 34 | #> 35 | function Test-ModuleVersion { 36 | [CmdletBinding()] 37 | param ( 38 | [string]$currentVersion, 39 | [string]$minimumVersion, 40 | [string]$maximumVersion, 41 | [string]$lessThanVersion 42 | ) 43 | 44 | begin { 45 | } 46 | 47 | process { 48 | $result = $true 49 | 50 | # If no version is specified simply return true and allow the module to pass. 51 | if("$minimumVersion$maximumVersion$lessthanVersion" -eq ''){ 52 | return $true 53 | } 54 | 55 | # Single integer values cannot be converted to type system.version. 56 | # We convert to a string, and if there is a single character we know that 57 | # we need to add a '.0' to the integer to make it convertable to a version. 58 | if(![string]::IsNullOrEmpty($currentVersion)) { 59 | if($currentVersion.ToString().Length -eq 1) { 60 | [version]$currentVersion = "$currentVersion.0" 61 | } else { 62 | [version]$currentVersion = $currentVersion 63 | } 64 | } 65 | 66 | if(![string]::IsNullOrEmpty($minimumVersion)) { 67 | if($minimumVersion.ToString().Length -eq 1){ 68 | [version]$minimumVersion = "$minimumVersion.0" 69 | } else { 70 | [version]$minimumVersion = $minimumVersion 71 | } 72 | 73 | if($currentVersion.CompareTo($minimumVersion) -lt 0){ 74 | $result = $false 75 | } 76 | } 77 | 78 | if(![string]::IsNullOrEmpty($maximumVersion)) { 79 | if($maximumVersion.ToString().Length -eq 1) { 80 | [version]$maximumVersion = "$maximumVersion.0" 81 | } else { 82 | [version]$maximumVersion = $maximumVersion 83 | } 84 | 85 | if ($currentVersion.CompareTo($maximumVersion) -gt 0) { 86 | $result = $false 87 | } 88 | } 89 | 90 | if(![string]::IsNullOrEmpty($lessThanVersion)) { 91 | if($lessThanVersion.ToString().Length -eq 1) { 92 | [version]$lessThanVersion = "$lessThanVersion.0" 93 | } else { 94 | [version]$lessThanVersion = $lessThanVersion 95 | } 96 | 97 | if($currentVersion.CompareTo($lessThanVersion) -ge 0) { 98 | $result = $false 99 | } 100 | } 101 | 102 | Write-Output $result 103 | } 104 | 105 | end { 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/WriteColoredOutput.ps1: -------------------------------------------------------------------------------- 1 | function WriteColoredOutput { 2 | param( 3 | [string] $message, 4 | [System.ConsoleColor] $foregroundcolor 5 | ) 6 | 7 | $currentConfig = GetCurrentConfigurationOrDefault 8 | if ($currentConfig.coloredOutput -eq $true) { 9 | if (($null -ne $Host.UI) -and ($null -ne $Host.UI.RawUI) -and ($null -ne $Host.UI.RawUI.ForegroundColor)) { 10 | $previousColor = $Host.UI.RawUI.ForegroundColor 11 | $Host.UI.RawUI.ForegroundColor = $foregroundcolor 12 | } 13 | } 14 | 15 | $message 16 | 17 | if ($null -ne $previousColor) { 18 | $Host.UI.RawUI.ForegroundColor = $previousColor 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/WriteDocumentation.ps1: -------------------------------------------------------------------------------- 1 | function WriteDocumentation($showDetailed) { 2 | 3 | $currentContext = $psake.context.Peek() 4 | 5 | if ($currentContext.tasks.default) { 6 | $defaultTaskDependencies = $currentContext.tasks.default.DependsOn 7 | } else { 8 | $defaultTaskDependencies = @() 9 | } 10 | 11 | $docs = GetTasksFromContext $currentContext | 12 | Where-Object {$_.Name -ne 'default'} | 13 | ForEach-Object { 14 | $isDefault = $null 15 | if ($defaultTaskDependencies -contains $_.Name) { 16 | $isDefault = $true 17 | } 18 | return Add-Member -InputObject $_ 'Default' $isDefault -PassThru 19 | } 20 | 21 | if ($showDetailed) { 22 | $docs | Sort-Object 'Name' | format-list -property Name,Alias,Description,@{Label="Depends On";Expression={$_.DependsOn -join ', '}},Default 23 | } else { 24 | $docs | Sort-Object 'Name' | format-table -autoSize -wrap -property Name,Alias,@{Label="Depends On";Expression={$_.DependsOn -join ', '}},Default,Description 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/private/WriteTaskTimeSummary.ps1: -------------------------------------------------------------------------------- 1 | function WriteTaskTimeSummary($invokePsakeDuration) { 2 | if ($psake.context.count -gt 0) { 3 | $currentContext = $psake.context.Peek() 4 | if ($currentContext.config.taskNameFormat -is [ScriptBlock]) { 5 | & $currentContext.config.taskNameFormat "Build Time Report" 6 | } elseif ($currentContext.config.taskNameFormat -ne "Executing {0}") { 7 | $currentContext.config.taskNameFormat -f "Build Time Report" 8 | } 9 | else { 10 | "-" * 70 11 | "Build Time Report" 12 | "-" * 70 13 | } 14 | $list = @() 15 | while ($currentContext.executedTasks.Count -gt 0) { 16 | $taskKey = $currentContext.executedTasks.Pop() 17 | $task = $currentContext.tasks.$taskKey 18 | if ($taskKey -eq "default") { 19 | continue 20 | } 21 | $list += new-object PSObject -property @{ 22 | Name = $task.Name; 23 | Duration = $task.Duration.ToString("hh\:mm\:ss\.fff") 24 | } 25 | } 26 | [Array]::Reverse($list) 27 | $list += new-object PSObject -property @{ 28 | Name = "Total:"; 29 | Duration = $invokePsakeDuration.ToString("hh\:mm\:ss\.fff") 30 | } 31 | # using "out-string | where-object" to filter out the blank line that format-table prepends 32 | $list | format-table -autoSize -property Name,Duration | out-string -stream | where-object { $_ } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/psake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | # Use greadlink on macOS. 4 | if [ "$(uname)" = "Darwin" ]; then 5 | which greadlink > /dev/null || { 6 | printf 'GNU readlink not found\n' 7 | exit 1 8 | } 9 | alias readlink="greadlink" 10 | fi 11 | 12 | pwsh -NoProfile -Command "& $(dirname "$(readlink -f -- "$0")")/psake.ps1 $@" 13 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/psake-config.ps1: -------------------------------------------------------------------------------- 1 | <# 2 | ------------------------------------------------------------------- 3 | Defaults 4 | ------------------------------------------------------------------- 5 | $config.buildFileName="psakefile.ps1" 6 | $config.legacyBuildFileName="default.ps1" 7 | $config.framework = "4.0" 8 | $config.taskNameFormat="Executing {0}" 9 | $config.verboseError=$false 10 | $config.coloredOutput = $true 11 | $config.modules=$null 12 | 13 | ------------------------------------------------------------------- 14 | Load modules from .\modules folder and from file my_module.psm1 15 | ------------------------------------------------------------------- 16 | $config.modules=(".\modules\*.psm1",".\my_module.psm1") 17 | 18 | ------------------------------------------------------------------- 19 | Use scriptblock for taskNameFormat 20 | ------------------------------------------------------------------- 21 | $config.taskNameFormat= { param($taskName) "Executing $taskName at $(get-date)" } 22 | #> 23 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/psake.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem Helper script for those who want to run psake from cmd.exe 3 | rem Example run from cmd.exe: 4 | rem psake "psakefile.ps1" "BuildHelloWord" "4.0" 5 | 6 | if '%1'=='/?' goto help 7 | if '%1'=='-help' goto help 8 | if '%1'=='-h' goto help 9 | 10 | powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\psake.ps1' %*" 11 | exit /B %errorlevel% 12 | 13 | :help 14 | powershell -NoProfile -ExecutionPolicy Bypass -Command "& '%~dp0\psake.ps1' -help" 15 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/psake.ps1: -------------------------------------------------------------------------------- 1 | # Helper script for those who want to run psake without importing the module. 2 | # Example run from PowerShell: 3 | # .\psake.ps1 "psakefile.ps1" "BuildHelloWord" "4.0" 4 | 5 | # Must match parameter definitions for psake.psm1/invoke-psake 6 | # otherwise named parameter binding fails 7 | [cmdletbinding()] 8 | param( 9 | [Parameter(Position = 0, Mandatory = $false)] 10 | [string]$buildFile, 11 | 12 | [Parameter(Position = 1, Mandatory = $false)] 13 | [string[]]$taskList = @(), 14 | 15 | [Parameter(Position = 2, Mandatory = $false)] 16 | [string]$framework, 17 | 18 | [Parameter(Position = 3, Mandatory = $false)] 19 | [switch]$docs = $false, 20 | 21 | [Parameter(Position = 4, Mandatory = $false)] 22 | [System.Collections.Hashtable]$parameters = @{}, 23 | 24 | [Parameter(Position = 5, Mandatory = $false)] 25 | [System.Collections.Hashtable]$properties = @{}, 26 | 27 | [Parameter(Position = 6, Mandatory = $false)] 28 | [alias("init")] 29 | [scriptblock]$initialization = {}, 30 | 31 | [Parameter(Position = 7, Mandatory = $false)] 32 | [switch]$nologo = $false, 33 | 34 | [Parameter(Position = 8, Mandatory = $false)] 35 | [switch]$help = $false, 36 | 37 | [Parameter(Position = 9, Mandatory = $false)] 38 | [string]$scriptPath, 39 | 40 | [Parameter(Position = 10, Mandatory = $false)] 41 | [switch]$detailedDocs = $false, 42 | 43 | [Parameter(Position = 11, Mandatory = $false)] 44 | [switch]$notr = $false 45 | ) 46 | 47 | # setting $scriptPath here, not as default argument, to support calling as "powershell -File psake.ps1" 48 | if (-not $scriptPath) { 49 | $scriptPath = $(Split-Path -Path $MyInvocation.MyCommand.path -Parent) 50 | } 51 | 52 | # '[p]sake' is the same as 'psake' but $Error is not polluted 53 | Remove-Module -Name [p]sake -Verbose:$false 54 | Import-Module -Name (Join-Path -Path $scriptPath -ChildPath 'psake.psd1') -Verbose:$false 55 | if ($help) { 56 | Get-Help -Name Invoke-psake -Full 57 | return 58 | } 59 | 60 | if ($buildFile -and (-not (Test-Path -Path $buildFile))) { 61 | $absoluteBuildFile = (Join-Path -Path $scriptPath -ChildPath $buildFile) 62 | if (Test-path -Path $absoluteBuildFile) { 63 | $buildFile = $absoluteBuildFile 64 | } 65 | } 66 | 67 | Invoke-psake $buildFile $taskList $framework $docs $parameters $properties $initialization $nologo $detailedDocs $notr 68 | 69 | if (!$psake.build_success) { 70 | exit 1 71 | } 72 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/psake.psd1: -------------------------------------------------------------------------------- 1 | @{ 2 | RootModule = 'psake.psm1' 3 | ModuleVersion = '4.9.0' 4 | GUID = 'cfb53216-072f-4a46-8975-ff7e6bda05a5' 5 | Author = 'James Kovacs' 6 | Copyright = 'Copyright (c) 2010-18 James Kovacs, Damian Hickey, Brandon Olin, and Contributors' 7 | PowerShellVersion = '3.0' 8 | Description = 'psake is a build automation tool written in PowerShell.' 9 | FunctionsToExport = @( 10 | 'Invoke-psake' 11 | 'Invoke-Task' 12 | 'Get-PSakeScriptTasks' 13 | 'Task' 14 | 'Properties' 15 | 'Include' 16 | 'FormatTaskName' 17 | 'TaskSetup' 18 | 'TaskTearDown' 19 | 'Framework' 20 | 'Assert' 21 | 'Exec' 22 | ) 23 | VariablesToExport = 'psake' 24 | PrivateData = @{ 25 | PSData = @{ 26 | ReleaseNotes = 'https://raw.githubusercontent.com/psake/psake/master/CHANGELOG.md' 27 | LicenseUri = 'https://raw.githubusercontent.com/psake/psake/master/license.txt' 28 | ProjectUri = 'https://github.com/psake/psake' 29 | Tags = @('Build', 'Task') 30 | IconUri = 'https://raw.githubusercontent.com/psake/graphics/master/png/psake-single-icon-teal-bg-256x256.png' 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/psake.psm1: -------------------------------------------------------------------------------- 1 | # psake 2 | # Copyright (c) 2012 James Kovacs 3 | # Permission is hereby granted, free of charge, to any person obtaining a copy 4 | # of this software and associated documentation files (the "Software"), to deal 5 | # in the Software without restriction, including without limitation the rights 6 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | # copies of the Software, and to permit persons to whom the Software is 8 | # furnished to do so, subject to the following conditions: 9 | # 10 | # The above copyright notice and this permission notice shall be included in 11 | # all copies or substantial portions of the Software. 12 | # 13 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | # THE SOFTWARE. 20 | 21 | #Requires -Version 2.0 22 | 23 | if ($PSVersionTable.PSVersion.Major -ge 3) { 24 | $script:IgnoreError = 'Ignore' 25 | } else { 26 | $script:IgnoreError = 'SilentlyContinue' 27 | } 28 | 29 | $script:nl = [System.Environment]::NewLine 30 | 31 | # Dot source public/private functions 32 | $dotSourceParams = @{ 33 | Filter = '*.ps1' 34 | Recurse = $true 35 | ErrorAction = 'Stop' 36 | } 37 | $public = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -ChildPath 'public') @dotSourceParams ) 38 | $private = @(Get-ChildItem -Path (Join-Path -Path $PSScriptRoot -ChildPath 'private/*.ps1') @dotSourceParams) 39 | foreach ($import in @($public + $private)) { 40 | try { 41 | . $import.FullName 42 | } catch { 43 | throw "Unable to dot source [$($import.FullName)]" 44 | } 45 | } 46 | 47 | DATA msgs { 48 | convertfrom-stringdata @' 49 | error_invalid_task_name = Task name should not be null or empty string. 50 | error_task_name_does_not_exist = Task {0} does not exist. 51 | error_circular_reference = Circular reference found for task {0}. 52 | error_missing_action_parameter = Action parameter must be specified when using PreAction or PostAction parameters for task {0}. 53 | error_corrupt_callstack = Call stack was corrupt. Expected {0}, but got {1}. 54 | error_invalid_framework = Invalid .NET Framework version, {0} specified. 55 | error_unknown_framework = Unknown .NET Framework version, {0} specified in {1}. 56 | error_unknown_pointersize = Unknown pointer size ({0}) returned from System.IntPtr. 57 | error_unknown_bitnesspart = Unknown .NET Framework bitness, {0}, specified in {1}. 58 | error_unknown_module = Unable to find module [{0}]. 59 | error_no_framework_install_dir_found = No .NET Framework installation directory found at {0}. 60 | error_bad_command = Error executing command {0}. 61 | error_default_task_cannot_have_action = 'default' task cannot specify an action. 62 | error_shared_task_cannot_have_action = '{0} references a shared task from module {1} and cannot have an action. 63 | error_duplicate_task_name = Task {0} has already been defined. 64 | error_duplicate_alias_name = Alias {0} has already been defined. 65 | error_invalid_include_path = Unable to include {0}. File not found. 66 | error_build_file_not_found = Could not find the build file {0}. 67 | error_no_default_task = 'default' task required. 68 | error_loading_module = Error loading module {0}. 69 | warning_deprecated_framework_variable = Warning: Using global variable $framework to set .NET framework version used is deprecated. Instead use Framework function or configuration file psake-config.ps1. 70 | warning_missing_vsssetup_module = Warning: Cannot find build tools version {0} without the module VSSetup. You can install this module with the command: Install-Module VSSetup -Scope CurrentUser 71 | required_variable_not_set = Variable {0} must be set to run task {1}. 72 | postcondition_failed = Postcondition failed for task {0}. 73 | precondition_was_false = Precondition was false, not executing task {0}. 74 | continue_on_error = Error in task {0}. {1} 75 | psake_success = psake succeeded executing {0} 76 | '@ 77 | } 78 | 79 | Import-LocalizedData -BindingVariable msgs -FileName messages.psd1 -ErrorAction $script:IgnoreError 80 | 81 | $scriptDir = Split-Path $MyInvocation.MyCommand.Path 82 | $manifestPath = Join-Path $scriptDir psake.psd1 83 | $manifest = Test-ModuleManifest -Path $manifestPath -WarningAction SilentlyContinue 84 | 85 | $script:psakeConfigFile = 'psake-config.ps1' 86 | 87 | $script:psake = @{} 88 | 89 | $psake.version = $manifest.Version.ToString() 90 | $psake.context = new-object system.collections.stack # holds onto the current state of all variables 91 | $psake.run_by_psake_build_tester = $false # indicates that build is being run by psake-BuildTester 92 | $psake.LoadedTaskModules = @{} 93 | $psake.ReferenceTasks = @{} 94 | $psake.config_default = new-object psobject -property @{ 95 | buildFileName = "psakefile.ps1" 96 | legacyBuildFileName = "default.ps1" 97 | framework = "4.0" 98 | taskNameFormat = "Executing {0}" 99 | verboseError = $false 100 | coloredOutput = $true 101 | modules = $null 102 | moduleScope = "" 103 | } # contains default configuration, can be overridden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script 104 | 105 | $psake.build_success = $false # indicates that the current build was successful 106 | $psake.build_script_file = $null # contains a System.IO.FileInfo for the current build script 107 | $psake.build_script_dir = "" # contains a string with fully-qualified path to current build script 108 | $psake.error_message = $null # contains the error message which caused the script to fail 109 | 110 | LoadConfiguration 111 | 112 | export-modulemember -function $public.BaseName -variable psake 113 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/public/Assert.ps1: -------------------------------------------------------------------------------- 1 | function Assert { 2 | <# 3 | .SYNOPSIS 4 | Helper function for "Design by Contract" assertion checking. 5 | 6 | .DESCRIPTION 7 | This is a helper function that makes the code less noisy by eliminating many of the "if" statements that are normally required to verify assumptions in the code. 8 | 9 | .PARAMETER conditionToCheck 10 | The boolean condition to evaluate 11 | 12 | .PARAMETER failureMessage 13 | The error message used for the exception if the conditionToCheck parameter is false 14 | 15 | .EXAMPLE 16 | C:\PS>Assert $false "This always throws an exception" 17 | 18 | Example of an assertion that will always fail. 19 | 20 | .EXAMPLE 21 | C:\PS>Assert ( ($i % 2) -eq 0 ) "$i is not an even number" 22 | 23 | This exmaple may throw an exception if $i is not an even number 24 | 25 | Note: 26 | It might be necessary to wrap the condition with paranthesis to force PS to evaluate the condition 27 | so that a boolean value is calculated and passed into the 'conditionToCheck' parameter. 28 | 29 | Example: 30 | Assert 1 -eq 2 "1 doesn't equal 2" 31 | 32 | PS will pass 1 into the condtionToCheck variable and PS will look for a parameter called "eq" and 33 | throw an exception with the following message "A parameter cannot be found that matches parameter name 'eq'" 34 | 35 | The solution is to wrap the condition in () so that PS will evaluate it first. 36 | 37 | Assert (1 -eq 2) "1 doesn't equal 2" 38 | .LINK 39 | Exec 40 | .LINK 41 | FormatTaskName 42 | .LINK 43 | Framework 44 | .LINK 45 | Get-PSakeScriptTasks 46 | .LINK 47 | Include 48 | .LINK 49 | Invoke-psake 50 | .LINK 51 | Properties 52 | .LINK 53 | Task 54 | .LINK 55 | TaskSetup 56 | .LINK 57 | TaskTearDown 58 | #> 59 | [CmdletBinding()] 60 | param( 61 | [Parameter(Mandatory = $true)] 62 | $conditionToCheck, 63 | 64 | [Parameter(Mandatory = $true)] 65 | [string]$failureMessage 66 | ) 67 | 68 | if (-not $conditionToCheck) { 69 | throw ('Assert: {0}' -f $failureMessage) 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/public/BuildSetup.ps1: -------------------------------------------------------------------------------- 1 | function BuildSetup { 2 | <# 3 | .SYNOPSIS 4 | Adds a scriptblock that will be executed once at the beginning of the build 5 | .DESCRIPTION 6 | This function will accept a scriptblock that will be executed once at the beginning of the build. 7 | .PARAMETER setup 8 | A scriptblock to execute 9 | .EXAMPLE 10 | A sample build script is shown below: 11 | Task default -depends Test 12 | Task Test -depends Compile, Clean { 13 | } 14 | Task Compile -depends Clean { 15 | } 16 | Task Clean { 17 | } 18 | BuildSetup { 19 | "Running 'BuildSetup'" 20 | } 21 | The script above produces the following output: 22 | Running 'BuildSetup' 23 | Executing task, Clean... 24 | Executing task, Compile... 25 | Executing task, Test... 26 | Build Succeeded 27 | .LINK 28 | Assert 29 | .LINK 30 | Exec 31 | .LINK 32 | FormatTaskName 33 | .LINK 34 | Framework 35 | .LINK 36 | Invoke-psake 37 | .LINK 38 | Properties 39 | .LINK 40 | Task 41 | .LINK 42 | BuildTearDown 43 | .LINK 44 | TaskSetup 45 | .LINK 46 | TaskTearDown 47 | #> 48 | [CmdletBinding()] 49 | param( 50 | [Parameter(Mandatory = $true)] 51 | [scriptblock]$setup 52 | ) 53 | 54 | $psake.context.Peek().buildSetupScriptBlock = $setup 55 | } -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/public/BuildTearDown.ps1: -------------------------------------------------------------------------------- 1 | function BuildTearDown { 2 | <# 3 | .SYNOPSIS 4 | Adds a scriptblock that will be executed once at the end of the build 5 | .DESCRIPTION 6 | This function will accept a scriptblock that will be executed once at the end of the build, regardless of success or failure 7 | .PARAMETER setup 8 | A scriptblock to execute 9 | .EXAMPLE 10 | A sample build script is shown below: 11 | Task default -depends Test 12 | Task Test -depends Compile, Clean { 13 | } 14 | Task Compile -depends Clean { 15 | } 16 | Task Clean { 17 | } 18 | BuildTearDown { 19 | "Running 'BuildTearDown'" 20 | } 21 | The script above produces the following output: 22 | Executing task, Clean... 23 | Executing task, Compile... 24 | Executing task, Test... 25 | Running 'BuildTearDown' 26 | Build Succeeded 27 | .EXAMPLE 28 | A failing build script is shown below: 29 | Task default -depends Test 30 | Task Test -depends Compile, Clean { 31 | throw "forced error" 32 | } 33 | Task Compile -depends Clean { 34 | } 35 | Task Clean { 36 | } 37 | BuildTearDown { 38 | "Running 'BuildTearDown'" 39 | } 40 | The script above produces the following output: 41 | Executing task, Clean... 42 | Executing task, Compile... 43 | Executing task, Test... 44 | Running 'BuildTearDown' 45 | forced error 46 | At line:x char:x ... 47 | .LINK 48 | Assert 49 | .LINK 50 | Exec 51 | .LINK 52 | FormatTaskName 53 | .LINK 54 | Framework 55 | .LINK 56 | Invoke-psake 57 | .LINK 58 | Properties 59 | .LINK 60 | Task 61 | .LINK 62 | BuildSetup 63 | .LINK 64 | TaskSetup 65 | .LINK 66 | TaskTearDown 67 | #> 68 | [CmdletBinding()] 69 | param( 70 | [Parameter(Mandatory = $true)] 71 | [scriptblock]$setup 72 | ) 73 | 74 | $psake.context.Peek().buildTearDownScriptBlock = $setup 75 | } -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/public/Exec.ps1: -------------------------------------------------------------------------------- 1 | function Exec { 2 | <# 3 | .SYNOPSIS 4 | Helper function for executing command-line programs. 5 | 6 | .DESCRIPTION 7 | This is a helper function that runs a scriptblock and checks the PS variable $lastexitcode to see if an error occcured. 8 | If an error is detected then an exception is thrown. 9 | This function allows you to run command-line programs without having to explicitly check fthe $lastexitcode variable. 10 | 11 | .PARAMETER cmd 12 | The scriptblock to execute. This scriptblock will typically contain the command-line invocation. 13 | 14 | .PARAMETER errorMessage 15 | The error message to display if the external command returned a non-zero exit code. 16 | 17 | .PARAMETER maxRetries 18 | The maximum number of times to retry the command before failing. 19 | 20 | .PARAMETER retryTriggerErrorPattern 21 | If the external command raises an exception, match the exception against this regex to determine if the command can be retried. 22 | If a match is found, the command will be retried provided [maxRetries] has not been reached. 23 | 24 | .PARAMETER workingDirectory 25 | The working directory to set before running the external command. 26 | 27 | .EXAMPLE 28 | exec { svn info $repository_trunk } "Error executing SVN. Please verify SVN command-line client is installed" 29 | 30 | This example calls the svn command-line client. 31 | .LINK 32 | Assert 33 | .LINK 34 | FormatTaskName 35 | .LINK 36 | Framework 37 | .LINK 38 | Get-PSakeScriptTasks 39 | .LINK 40 | Include 41 | .LINK 42 | Invoke-psake 43 | .LINK 44 | Properties 45 | .LINK 46 | Task 47 | .LINK 48 | TaskSetup 49 | .LINK 50 | TaskTearDown 51 | .LINK 52 | Properties 53 | #> 54 | [CmdletBinding()] 55 | param( 56 | [Parameter(Mandatory = $true)] 57 | [scriptblock]$cmd, 58 | 59 | [string]$errorMessage = ($msgs.error_bad_command -f $cmd), 60 | 61 | [int]$maxRetries = 0, 62 | 63 | [string]$retryTriggerErrorPattern = $null, 64 | 65 | [string]$workingDirectory = $null 66 | ) 67 | 68 | $tryCount = 1 69 | 70 | do { 71 | try { 72 | 73 | if ($workingDirectory) { 74 | Push-Location -Path $workingDirectory 75 | } 76 | 77 | $global:lastexitcode = 0 78 | & $cmd 79 | if ($global:lastexitcode -ne 0) { 80 | throw "Exec: $errorMessage" 81 | } 82 | break 83 | } 84 | catch [Exception] { 85 | if ($tryCount -gt $maxRetries) { 86 | throw $_ 87 | } 88 | 89 | if ($retryTriggerErrorPattern -ne $null) { 90 | $isMatch = [regex]::IsMatch($_.Exception.Message, $retryTriggerErrorPattern) 91 | 92 | if ($isMatch -eq $false) { 93 | throw $_ 94 | } 95 | } 96 | 97 | "Try $tryCount failed, retrying again in 1 second..." 98 | 99 | $tryCount++ 100 | 101 | [System.Threading.Thread]::Sleep([System.TimeSpan]::FromSeconds(1)) 102 | } 103 | finally { 104 | if ($workingDirectory) { 105 | Pop-Location 106 | } 107 | } 108 | } 109 | while ($true) 110 | } 111 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/public/FormatTaskName.ps1: -------------------------------------------------------------------------------- 1 | function FormatTaskName { 2 | <# 3 | .SYNOPSIS 4 | This function allows you to change how psake renders the task name during a build. 5 | 6 | .DESCRIPTION 7 | This function takes either a string which represents a format string (formats using the -f format operator see "help about_operators") or it can accept a script block that has a single parameter that is the name of the task that will be executed. 8 | 9 | .PARAMETER format 10 | A format string or a scriptblock to execute 11 | 12 | .EXAMPLE 13 | A sample build script that uses a format string is shown below: 14 | 15 | Task default -depends TaskA, TaskB, TaskC 16 | 17 | FormatTaskName "-------- {0} --------" 18 | 19 | Task TaskA { 20 | "TaskA is executing" 21 | } 22 | 23 | Task TaskB { 24 | "TaskB is executing" 25 | } 26 | 27 | Task TaskC { 28 | "TaskC is executing" 29 | 30 | ----------- 31 | The script above produces the following output: 32 | 33 | -------- TaskA -------- 34 | TaskA is executing 35 | -------- TaskB -------- 36 | TaskB is executing 37 | -------- TaskC -------- 38 | TaskC is executing 39 | 40 | Build Succeeded! 41 | .EXAMPLE 42 | A sample build script that uses a ScriptBlock is shown below: 43 | 44 | Task default -depends TaskA, TaskB, TaskC 45 | 46 | FormatTaskName { 47 | param($taskName) 48 | write-host "Executing Task: $taskName" -foregroundcolor blue 49 | } 50 | 51 | Task TaskA { 52 | "TaskA is executing" 53 | } 54 | 55 | Task TaskB { 56 | "TaskB is executing" 57 | } 58 | 59 | Task TaskC { 60 | "TaskC is executing" 61 | } 62 | 63 | ----------- 64 | The above example uses the scriptblock parameter to the FormatTaskName function to render each task name in the color blue. 65 | 66 | Note: the $taskName parameter is arbitrary, it could be named anything. 67 | .LINK 68 | Assert 69 | .LINK 70 | Exec 71 | .LINK 72 | Framework 73 | .LINK 74 | Get-PSakeScriptTasks 75 | .LINK 76 | Include 77 | .LINK 78 | Invoke-psake 79 | .LINK 80 | Properties 81 | .LINK 82 | Task 83 | .LINK 84 | TaskSetup 85 | .LINK 86 | TaskTearDown 87 | #> 88 | [CmdletBinding()] 89 | param( 90 | [Parameter(Mandatory = $true)] 91 | $format 92 | ) 93 | 94 | $psake.context.Peek().config.taskNameFormat = $format 95 | } 96 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/public/Framework.ps1: -------------------------------------------------------------------------------- 1 | function Framework { 2 | <# 3 | .SYNOPSIS 4 | Sets the version of the .NET framework you want to use during build. 5 | 6 | .DESCRIPTION 7 | This function will accept a string containing version of the .NET framework to use during build. 8 | Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x64', '4.5', '4.5x86', '4.5x64', '4.5.1', '4.5.1x86', '4.5.1x64'. 9 | Default is '3.5*', where x86 or x64 will be detected based on the bitness of the PowerShell process. 10 | 11 | .PARAMETER framework 12 | Version of the .NET framework to use during build. 13 | 14 | .EXAMPLE 15 | Framework "4.0" 16 | 17 | Task default -depends Compile 18 | 19 | Task Compile -depends Clean { 20 | msbuild /version 21 | } 22 | 23 | ----------- 24 | The script above will output detailed version of msbuid v4 25 | .LINK 26 | Assert 27 | .LINK 28 | Exec 29 | .LINK 30 | FormatTaskName 31 | .LINK 32 | Get-PSakeScriptTasks 33 | .LINK 34 | Include 35 | .LINK 36 | Invoke-psake 37 | .LINK 38 | Properties 39 | .LINK 40 | Task 41 | .LINK 42 | TaskSetup 43 | .LINK 44 | TaskTearDown 45 | #> 46 | [CmdletBinding()] 47 | param( 48 | [Parameter(Mandatory = $true)] 49 | [string]$framework 50 | ) 51 | 52 | $psake.context.Peek().config.framework = $framework 53 | 54 | ConfigureBuildEnvironment 55 | } 56 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/public/Get-PSakeScriptTasks.ps1: -------------------------------------------------------------------------------- 1 | function Get-PSakeScriptTasks { 2 | <# 3 | .SYNOPSIS 4 | Returns meta data about all the tasks defined in the provided psake script. 5 | 6 | .DESCRIPTION 7 | Returns meta data about all the tasks defined in the provided psake script. 8 | 9 | .PARAMETER buildFile 10 | The path to the psake build script to read the tasks from. 11 | 12 | .EXAMPLE 13 | PS C:\>Get-PSakeScriptTasks -buildFile '.\build.ps1' 14 | 15 | DependsOn Alias Name Description 16 | --------- ----- ---- ----------- 17 | {} Compile 18 | {} Clean 19 | {Test} Default 20 | {Clean, Compile} Test 21 | 22 | Gets the psake tasks contained in the 'build.ps1' file. 23 | 24 | .LINK 25 | Invoke-psake 26 | #> 27 | [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseSingularNouns', '')] 28 | [CmdletBinding()] 29 | param( 30 | [string]$buildFile 31 | ) 32 | 33 | if (-not $buildFile) { 34 | $buildFile = $psake.config_default.buildFileName 35 | } 36 | 37 | try { 38 | ExecuteInBuildFileScope $buildFile $MyInvocation.MyCommand.Module { 39 | param($currentContext, $module) 40 | return GetTasksFromContext $currentContext 41 | } 42 | } finally { 43 | CleanupEnvironment 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/public/Include.ps1: -------------------------------------------------------------------------------- 1 | function Include { 2 | <# 3 | .SYNOPSIS 4 | Include the functions or code of another powershell script file into the current build script's scope 5 | 6 | .DESCRIPTION 7 | A build script may declare an "includes" function which allows you to define a file containing powershell code to be included 8 | and added to the scope of the currently running build script. Code from such file will be executed after code from build script. 9 | 10 | .PARAMETER fileNamePathToInclude 11 | A string containing the path and name of the powershell file to include 12 | 13 | .EXAMPLE 14 | A sample build script is shown below: 15 | 16 | Include ".\build_utils.ps1" 17 | 18 | Task default -depends Test 19 | 20 | Task Test -depends Compile, Clean { 21 | } 22 | 23 | Task Compile -depends Clean { 24 | } 25 | 26 | Task Clean { 27 | } 28 | 29 | ----------- 30 | The script above includes all the functions and variables defined in the ".\build_utils.ps1" script into the current build script's scope 31 | 32 | Note: You can have more than 1 "Include" function defined in the build script. 33 | 34 | .LINK 35 | Assert 36 | .LINK 37 | Exec 38 | .LINK 39 | FormatTaskName 40 | .LINK 41 | Framework 42 | .LINK 43 | Get-PSakeScriptTasks 44 | .LINK 45 | Invoke-psake 46 | .LINK 47 | Properties 48 | .LINK 49 | Task 50 | .LINK 51 | TaskSetup 52 | .LINK 53 | TaskTearDown 54 | #> 55 | [CmdletBinding()] 56 | param( 57 | [Parameter(Mandatory = $true)] 58 | [string]$fileNamePathToInclude 59 | ) 60 | 61 | Assert (test-path $fileNamePathToInclude -pathType Leaf) ($msgs.error_invalid_include_path -f $fileNamePathToInclude) 62 | 63 | $psake.context.Peek().includes.Enqueue((Resolve-Path $fileNamePathToInclude)); 64 | } 65 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/public/Invoke-Task.ps1: -------------------------------------------------------------------------------- 1 | function Invoke-Task { 2 | <# 3 | .SYNOPSIS 4 | Executes another task in the current build script. 5 | 6 | .DESCRIPTION 7 | This is a function that will allow you to invoke a Task from within another Task in the current build script. 8 | 9 | .PARAMETER taskName 10 | The name of the task to execute. 11 | 12 | .EXAMPLE 13 | Invoke-Task "Compile" 14 | 15 | This example calls the "Compile" task. 16 | 17 | .LINK 18 | Assert 19 | .LINK 20 | Exec 21 | .LINK 22 | FormatTaskName 23 | .LINK 24 | Framework 25 | .LINK 26 | Get-PSakeScriptTasks 27 | .LINK 28 | Include 29 | .LINK 30 | Invoke-psake 31 | .LINK 32 | Properties 33 | .LINK 34 | Task 35 | .LINK 36 | TaskSetup 37 | .LINK 38 | TaskTearDown 39 | #> 40 | [CmdletBinding()] 41 | param( 42 | [Parameter(Mandatory = $true)] 43 | [string]$taskName 44 | ) 45 | 46 | Assert $taskName ($msgs.error_invalid_task_name) 47 | 48 | $taskKey = $taskName.ToLower() 49 | 50 | $currentContext = $psake.context.Peek() 51 | 52 | if ($currentContext.aliases.Contains($taskKey)) { 53 | $taskName = $currentContext.aliases.$taskKey.Name 54 | $taskKey = $taskName.ToLower() 55 | } 56 | 57 | Assert ($currentContext.tasks.Contains($taskKey)) ($msgs.error_task_name_does_not_exist -f $taskName) 58 | 59 | if ($currentContext.executedTasks.Contains($taskKey)) { return } 60 | 61 | Assert (!$currentContext.callStack.Contains($taskKey)) ($msgs.error_circular_reference -f $taskName) 62 | 63 | $currentContext.callStack.Push($taskKey) 64 | 65 | $task = $currentContext.tasks.$taskKey 66 | 67 | $precondition_is_valid = & $task.Precondition 68 | 69 | if (!$precondition_is_valid) { 70 | WriteColoredOutput ($msgs.precondition_was_false -f $taskName) -foregroundcolor Cyan 71 | } else { 72 | if ($taskKey -ne 'default') { 73 | 74 | if ($task.PreAction -or $task.PostAction) { 75 | Assert ($null -ne $task.Action) ($msgs.error_missing_action_parameter -f $taskName) 76 | } 77 | 78 | if ($task.Action) { 79 | 80 | $stopwatch = new-object System.Diagnostics.Stopwatch 81 | 82 | try { 83 | foreach($childTask in $task.DependsOn) { 84 | Invoke-Task $childTask 85 | } 86 | $stopwatch.Start() 87 | 88 | $currentContext.currentTaskName = $taskName 89 | 90 | try { 91 | & $currentContext.taskSetupScriptBlock @($task) 92 | try { 93 | if ($task.PreAction) { 94 | & $task.PreAction 95 | } 96 | 97 | if ($currentContext.config.taskNameFormat -is [ScriptBlock]) { 98 | $taskHeader = & $currentContext.config.taskNameFormat $taskName 99 | } else { 100 | $taskHeader = $currentContext.config.taskNameFormat -f $taskName 101 | } 102 | WriteColoredOutput $taskHeader -foregroundcolor Cyan 103 | 104 | foreach ($variable in $task.requiredVariables) { 105 | Assert ((Test-Path "variable:$variable") -and ($null -ne (Get-Variable $variable).Value)) ($msgs.required_variable_not_set -f $variable, $taskName) 106 | } 107 | 108 | & $task.Action 109 | } finally { 110 | if ($task.PostAction) { 111 | & $task.PostAction 112 | } 113 | } 114 | } catch { 115 | # want to catch errors here _before_ we invoke TaskTearDown 116 | # so that TaskTearDown reliably gets the Task-scoped 117 | # success/fail/error context. 118 | $task.Success = $false 119 | $task.ErrorMessage = $_ 120 | $task.ErrorDetail = $_ | Out-String 121 | $task.ErrorFormatted = FormatErrorMessage $_ 122 | 123 | throw $_ # pass this up the chain; cleanup is handled higher int he stack 124 | } finally { 125 | & $currentContext.taskTearDownScriptBlock $task 126 | } 127 | } catch { 128 | if ($task.ContinueOnError) { 129 | "-"*70 130 | WriteColoredOutput ($msgs.continue_on_error -f $taskName,$_) -foregroundcolor Yellow 131 | "-"*70 132 | [void]$currentContext.callStack.Pop() 133 | } else { 134 | throw $_ 135 | } 136 | } finally { 137 | $task.Duration = $stopwatch.Elapsed 138 | } 139 | } else { 140 | # no action was specified but we still execute all the dependencies 141 | foreach($childTask in $task.DependsOn) { 142 | Invoke-Task $childTask 143 | } 144 | } 145 | } else { 146 | foreach($childTask in $task.DependsOn) { 147 | Invoke-Task $childTask 148 | } 149 | } 150 | 151 | Assert (& $task.Postcondition) ($msgs.postcondition_failed -f $taskName) 152 | } 153 | 154 | $poppedTaskKey = $currentContext.callStack.Pop() 155 | Assert ($poppedTaskKey -eq $taskKey) ($msgs.error_corrupt_callstack -f $taskKey,$poppedTaskKey) 156 | 157 | $currentContext.executedTasks.Push($taskKey) 158 | } 159 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/public/Properties.ps1: -------------------------------------------------------------------------------- 1 | function Properties { 2 | <# 3 | .SYNOPSIS 4 | Define a scriptblock that contains assignments to variables that will be available to all tasks in the build script 5 | 6 | .DESCRIPTION 7 | A build script may declare a "Properies" function which allows you to define variables that will be available to all the "Task" functions in the build script. 8 | 9 | .PARAMETER properties 10 | The script block containing all the variable assignment statements 11 | 12 | .EXAMPLE 13 | A sample build script is shown below: 14 | 15 | Properties { 16 | $build_dir = "c:\build" 17 | $connection_string = "datasource=localhost;initial catalog=northwind;integrated security=sspi" 18 | } 19 | 20 | Task default -depends Test 21 | 22 | Task Test -depends Compile, Clean { 23 | } 24 | 25 | Task Compile -depends Clean { 26 | } 27 | 28 | Task Clean { 29 | } 30 | 31 | Note: You can have more than one "Properties" function defined in the build script. 32 | 33 | .LINK 34 | Assert 35 | .LINK 36 | Exec 37 | .LINK 38 | FormatTaskName 39 | .LINK 40 | Framework 41 | .LINK 42 | Get-PSakeScriptTasks 43 | .LINK 44 | Include 45 | .LINK 46 | Invoke-psake 47 | .LINK 48 | Task 49 | .LINK 50 | TaskSetup 51 | .LINK 52 | TaskTearDown 53 | #> 54 | [CmdletBinding()] 55 | param( 56 | [Parameter(Mandatory = $true)] 57 | [scriptblock]$properties 58 | ) 59 | 60 | $psake.context.Peek().properties.Push($properties) 61 | } 62 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/public/Task.ps1: -------------------------------------------------------------------------------- 1 | function Task { 2 | <# 3 | .SYNOPSIS 4 | Defines a build task to be executed by psake 5 | 6 | .DESCRIPTION 7 | This function creates a 'task' object that will be used by the psake engine to execute a build task. 8 | Note: There must be at least one task called 'default' in the build script 9 | 10 | .PARAMETER name 11 | The name of the task 12 | 13 | .PARAMETER action 14 | A scriptblock containing the statements to execute for the task. 15 | 16 | .PARAMETER preaction 17 | A scriptblock to be executed before the 'Action' scriptblock. 18 | Note: This parameter is ignored if the 'Action' scriptblock is not defined. 19 | 20 | .PARAMETER postaction 21 | A scriptblock to be executed after the 'Action' scriptblock. 22 | Note: This parameter is ignored if the 'Action' scriptblock is not defined. 23 | 24 | .PARAMETER precondition 25 | A scriptblock that is executed to determine if the task is executed or skipped. 26 | This scriptblock should return $true or $false 27 | 28 | .PARAMETER postcondition 29 | A scriptblock that is executed to determine if the task completed its job correctly. 30 | An exception is thrown if the scriptblock returns $false. 31 | 32 | .PARAMETER continueOnError 33 | If this switch parameter is set then the task will not cause the build to fail when an exception is thrown by the task 34 | 35 | .PARAMETER depends 36 | An array of task names that this task depends on. 37 | These tasks will be executed before the current task is executed. 38 | 39 | .PARAMETER requiredVariables 40 | An array of names of variables that must be set to run this task. 41 | 42 | .PARAMETER description 43 | A description of the task. 44 | 45 | .PARAMETER alias 46 | An alternate name for the task. 47 | 48 | .PARAMETER FromModule 49 | Load in the task from the specified PowerShell module. 50 | 51 | .PARAMETER requiredVersion 52 | The specific version of a module to load the task from 53 | 54 | .PARAMETER minimumVersion 55 | The minimum (inclusive) version of the PowerShell module to load in the task from. 56 | 57 | .PARAMETER maximumVersion 58 | The maximum (inclusive) version of the PowerShell module to load in the task from. 59 | 60 | .PARAMETER lessThanVersion 61 | The version of the PowerShell module to load in the task from that should not be met or exceeded. eg -lessThanVersion 2.0.0 will reject anything 2.0.0 or higher, allowing any module in the 1.x.x series. 62 | 63 | .EXAMPLE 64 | A sample build script is shown below: 65 | 66 | Task default -Depends Test 67 | 68 | Task Test -Depends Compile, Clean { 69 | "This is a test" 70 | } 71 | 72 | Task Compile -Depends Clean { 73 | "Compile" 74 | } 75 | 76 | Task Clean { 77 | "Clean" 78 | } 79 | 80 | The 'default' task is required and should not contain an 'Action' parameter. 81 | It uses the 'Depends' parameter to specify that 'Test' is a dependency 82 | 83 | The 'Test' task uses the 'Depends' parameter to specify that 'Compile' and 'Clean' are dependencies 84 | The 'Compile' task depends on the 'Clean' task. 85 | 86 | Note: 87 | The 'Action' parameter is defaulted to the script block following the 'Clean' task. 88 | 89 | An equivalent 'Test' task is shown below: 90 | 91 | Task Test -Depends Compile, Clean -Action { 92 | $testMessage 93 | } 94 | 95 | The output for the above sample build script is shown below: 96 | 97 | Executing task, Clean... 98 | Clean 99 | Executing task, Compile... 100 | Compile 101 | Executing task, Test... 102 | This is a test 103 | 104 | Build Succeeded! 105 | 106 | ---------------------------------------------------------------------- 107 | Build Time Report 108 | ---------------------------------------------------------------------- 109 | Name Duration 110 | ---- -------- 111 | Clean 00:00:00.0065614 112 | Compile 00:00:00.0133268 113 | Test 00:00:00.0225964 114 | Total: 00:00:00.0782496 115 | 116 | .LINK 117 | Assert 118 | .LINK 119 | Exec 120 | .LINK 121 | FormatTaskName 122 | .LINK 123 | Framework 124 | .LINK 125 | Get-PSakeScriptTasks 126 | .LINK 127 | Include 128 | .LINK 129 | Invoke-psake 130 | .LINK 131 | Properties 132 | .LINK 133 | TaskSetup 134 | .LINK 135 | TaskTearDown 136 | #> 137 | [CmdletBinding(DefaultParameterSetName = 'Normal')] 138 | param( 139 | [Parameter(Mandatory = $true, Position = 0)] 140 | [string]$name, 141 | 142 | [Parameter(Position = 1)] 143 | [scriptblock]$action = $null, 144 | 145 | [Parameter(Position = 2)] 146 | [scriptblock]$preaction = $null, 147 | 148 | [Parameter(Position = 3)] 149 | [scriptblock]$postaction = $null, 150 | 151 | [Parameter(Position = 4)] 152 | [scriptblock]$precondition = {$true}, 153 | 154 | [Parameter(Position = 5)] 155 | [scriptblock]$postcondition = {$true}, 156 | 157 | [Parameter(Position = 6)] 158 | [switch]$continueOnError, 159 | 160 | [ValidateNotNull()] 161 | [Parameter(Position = 7)] 162 | [string[]]$depends = @(), 163 | 164 | [ValidateNotNull()] 165 | [Parameter(Position = 8)] 166 | [string[]]$requiredVariables = @(), 167 | 168 | [Parameter(Position = 9)] 169 | [string]$description = $null, 170 | 171 | [Parameter(Position = 10)] 172 | [string]$alias = $null, 173 | 174 | [parameter(Mandatory = $true, ParameterSetName = 'SharedTask', Position = 11)] 175 | [ValidateNotNullOrEmpty()] 176 | [string]$FromModule, 177 | 178 | [Alias('Version')] 179 | [parameter(ParameterSetName = 'SharedTask', Position = 12)] 180 | [string]$requiredVersion, 181 | 182 | [parameter(ParameterSetName = 'SharedTask', Position = 13)] 183 | [string]$minimumVersion, 184 | 185 | [parameter(ParameterSetName = 'SharedTask', Position = 14)] 186 | [string]$maximumVersion, 187 | 188 | [parameter(ParameterSetName = 'SharedTask', Position = 15)] 189 | [string]$lessThanVersion 190 | ) 191 | 192 | function CreateTask { 193 | @{ 194 | Name = $Name 195 | DependsOn = $depends 196 | PreAction = $preaction 197 | Action = $action 198 | PostAction = $postaction 199 | Precondition = $precondition 200 | Postcondition = $postcondition 201 | ContinueOnError = $continueOnError 202 | Description = $description 203 | Duration = [System.TimeSpan]::Zero 204 | RequiredVariables = $requiredVariables 205 | Alias = $alias 206 | Success = $true # let's be optimistic 207 | ErrorMessage = $null 208 | ErrorDetail = $null 209 | ErrorFormatted = $null 210 | } 211 | } 212 | 213 | # Default tasks have no action 214 | if ($name -eq 'default') { 215 | Assert (!$action) ($msgs.error_shared_task_cannot_have_action) 216 | } 217 | 218 | # Shared tasks have no action 219 | if ($PSCmdlet.ParameterSetName -eq 'SharedTask') { 220 | Assert (!$action) ($msgs.error_shared_task_cannot_have_action -f $Name, $FromModule) 221 | } 222 | 223 | $currentContext = $psake.context.Peek() 224 | 225 | # Dot source the shared task module to load in its tasks 226 | if ($PSCmdlet.ParameterSetName -eq 'SharedTask') { 227 | $testModuleParams = @{ 228 | minimumVersion = $minimumVersion 229 | maximumVersion = $maximumVersion 230 | lessThanVersion = $lessThanVersion 231 | } 232 | 233 | if(![string]::IsNullOrEmpty($requiredVersion)){ 234 | $testModuleParams.minimumVersion = $requiredVersion 235 | $testModuleParams.maximumVersion = $requiredVersion 236 | } 237 | 238 | if ($taskModule = Get-Module -Name $FromModule) { 239 | # Use the task module that is already loaded into the session 240 | $testModuleParams.currentVersion = $taskModule.Version 241 | $taskModule = Where-Object -InputObject $taskModule -FilterScript {Test-ModuleVersion @testModuleParams} 242 | } else { 243 | # Find the module 244 | $getModuleParams = @{ 245 | ListAvailable = $true 246 | Name = $FromModule 247 | ErrorAction = 'Ignore' 248 | Verbose = $false 249 | } 250 | $taskModule = Get-Module @getModuleParams | 251 | Where-Object -FilterScript {Test-ModuleVersion -currentVersion $_.Version @testModuleParams} | 252 | Sort-Object -Property Version -Descending | 253 | Select-Object -First 1 254 | } 255 | 256 | # This task references a task from a module 257 | # This reference task "could" include extra data about the task such as 258 | # additional dependOn, aliase, etc. 259 | # Store this task to the side so after we load the real task, we can combine 260 | # this extra data if nesessary 261 | $referenceTask = CreateTask 262 | Assert (-not $psake.ReferenceTasks.ContainsKey($referenceTask.Name)) ($msgs.error_duplicate_task_name -f $referenceTask.Name) 263 | $referenceTaskKey = $referenceTask.Name.ToLower() 264 | $psake.ReferenceTasks.Add($referenceTaskKey, $referenceTask) 265 | 266 | # Load in tasks from shared module into staging area 267 | Assert ($null -ne $taskModule) ($msgs.error_unknown_module -f $FromModule) 268 | $psakeFilePath = Join-Path -Path $taskModule.ModuleBase -ChildPath 'psakeFile.ps1' 269 | if (-not $psake.LoadedTaskModules.ContainsKey($psakeFilePath)) { 270 | Write-Debug -Message "Loading tasks from task module [$psakeFilePath]" 271 | . $psakeFilePath 272 | $psake.LoadedTaskModules.Add($psakeFilePath, $null) 273 | } 274 | } else { 275 | # Create new task object 276 | $newTask = CreateTask 277 | $taskKey = $newTask.Name.ToLower() 278 | 279 | # If this task was referenced from a parent build script 280 | # check to see if that reference task has extra data to add 281 | $refTask = $psake.ReferenceTasks[$taskKey] 282 | if ($refTask) { 283 | 284 | # Override the preaction 285 | if ($refTask.PreAction -ne $newTask.PreAction) { 286 | $newTask.PreAction = $refTask.PreAction 287 | } 288 | 289 | # Override the postaction 290 | if ($refTask.PostAction -ne $newTask.PostAction) { 291 | $newTask.PostAction = $refTask.PostAction 292 | } 293 | 294 | # Override the precondition 295 | if ($refTask.PreCondition -ne $newTask.PreCondition) { 296 | $newTask.PreCondition = $refTask.PreCondition 297 | } 298 | 299 | # Override the postcondition 300 | if ($refTask.PostCondition -ne $newTask.PostCondition) { 301 | $newTask.PostCondition = $refTask.PostCondition 302 | } 303 | 304 | # Override the continueOnError 305 | if ($refTask.ContinueOnError) { 306 | $newTask.ContinueOnError = $refTask.ContinueOnError 307 | } 308 | 309 | # Override the depends 310 | if ($refTask.DependsOn.Count -gt 0 -and (Compare-Object -ReferenceObject $refTask.DependsOn -DifferenceObject $newTask.DependsOn)) { 311 | $newTask.DependsOn = $refTask.DependsOn 312 | } 313 | 314 | # Override the requiredVariables 315 | if ($refTask.RequiredVariables.Count -gt 0 -and (Compare-Object -ReferenceObject.RequiredVariables -DifferenceObject $newTask.RequiredVariables)) { 316 | $newTask.RequiredVariables += $refTask.RequiredVariables 317 | } 318 | } 319 | 320 | # Add the task to the context 321 | Assert (-not $currentContext.tasks.ContainsKey($taskKey)) ($msgs.error_duplicate_task_name -f $taskKey) 322 | Write-Debug "Adding task [$taskKey)]" 323 | $currentContext.tasks[$taskKey] = $newTask 324 | 325 | if ($alias) { 326 | $aliasKey = $alias.ToLower() 327 | Assert (-not $currentContext.aliases.ContainsKey($aliasKey)) ($msgs.error_duplicate_alias_name -f $alias) 328 | $currentContext.aliases[$aliasKey] = $newTask 329 | } 330 | } 331 | } 332 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/public/TaskSetup.ps1: -------------------------------------------------------------------------------- 1 | function TaskSetup { 2 | <# 3 | .SYNOPSIS 4 | Adds a scriptblock that will be executed before each task 5 | 6 | .DESCRIPTION 7 | This function will accept a scriptblock that will be executed before each task in the build script. 8 | 9 | The scriptblock accepts an optional parameter which describes the Task being setup. 10 | 11 | .PARAMETER setup 12 | A scriptblock to execute 13 | 14 | .EXAMPLE 15 | A sample build script is shown below: 16 | 17 | Task default -depends Test 18 | 19 | Task Test -depends Compile, Clean { 20 | } 21 | 22 | Task Compile -depends Clean { 23 | } 24 | 25 | Task Clean { 26 | } 27 | 28 | TaskSetup { 29 | "Running 'TaskSetup' for task $context.Peek().currentTaskName" 30 | } 31 | 32 | The script above produces the following output: 33 | 34 | Running 'TaskSetup' for task Clean 35 | Executing task, Clean... 36 | Running 'TaskSetup' for task Compile 37 | Executing task, Compile... 38 | Running 'TaskSetup' for task Test 39 | Executing task, Test... 40 | 41 | Build Succeeded 42 | 43 | .EXAMPLE 44 | A sample build script showing access to the Task context is shown below: 45 | 46 | Task default -depends Test 47 | 48 | Task Test -depends Compile, Clean { 49 | } 50 | 51 | Task Compile -depends Clean { 52 | } 53 | 54 | Task Clean { 55 | } 56 | 57 | TaskSetup { 58 | param($task) 59 | 60 | "Running 'TaskSetup' for task $($task.Name)" 61 | } 62 | 63 | The script above produces the following output: 64 | 65 | Running 'TaskSetup' for task Clean 66 | Executing task, Clean... 67 | Running 'TaskSetup' for task Compile 68 | Executing task, Compile... 69 | Running 'TaskSetup' for task Test 70 | Executing task, Test... 71 | 72 | Build Succeeded 73 | 74 | .LINK 75 | Assert 76 | .LINK 77 | Exec 78 | .LINK 79 | FormatTaskName 80 | .LINK 81 | Framework 82 | .LINK 83 | Get-PSakeScriptTasks 84 | .LINK 85 | Include 86 | .LINK 87 | Invoke-psake 88 | .LINK 89 | Properties 90 | .LINK 91 | Task 92 | .LINK 93 | TaskTearDown 94 | #> 95 | [CmdletBinding()] 96 | param( 97 | [Parameter(Mandatory = $true)] 98 | [scriptblock]$setup 99 | ) 100 | 101 | $psake.context.Peek().taskSetupScriptBlock = $setup 102 | } 103 | -------------------------------------------------------------------------------- /_DevTools/Tools/PSake/public/TaskTearDown.ps1: -------------------------------------------------------------------------------- 1 | 2 | function TaskTearDown { 3 | <# 4 | .SYNOPSIS 5 | Adds a scriptblock to the build that will be executed after each task 6 | 7 | .DESCRIPTION 8 | This function will accept a scriptblock that will be executed after each task in the build script. 9 | 10 | The scriptblock accepts an optional parameter which describes the Task being torn down. 11 | 12 | .PARAMETER teardown 13 | A scriptblock to execute 14 | 15 | .EXAMPLE 16 | A sample build script is shown below: 17 | 18 | Task default -depends Test 19 | 20 | Task Test -depends Compile, Clean { 21 | } 22 | 23 | Task Compile -depends Clean { 24 | } 25 | 26 | Task Clean { 27 | } 28 | 29 | TaskTearDown { 30 | "Running 'TaskTearDown' for task $context.Peek().currentTaskName" 31 | } 32 | 33 | The script above produces the following output: 34 | 35 | Executing task, Clean... 36 | Running 'TaskTearDown' for task Clean 37 | Executing task, Compile... 38 | Running 'TaskTearDown' for task Compile 39 | Executing task, Test... 40 | Running 'TaskTearDown' for task Test 41 | 42 | Build Succeeded 43 | 44 | .EXAMPLE 45 | A sample build script demonstrating access to the task context is shown below: 46 | 47 | Task default -depends Test 48 | 49 | Task Test -depends Compile, Clean { 50 | } 51 | 52 | Task Compile -depends Clean { 53 | } 54 | 55 | Task Clean { 56 | } 57 | 58 | TaskTearDown { 59 | param($task) 60 | 61 | if ($task.Success) { 62 | "Running 'TaskTearDown' for task $($task.Name) - success!" 63 | } else { 64 | "Running 'TaskTearDown' for task $($task.Name) - failed: $($task.ErrorMessage)" 65 | } 66 | } 67 | 68 | The script above produces the following output: 69 | 70 | Executing task, Clean... 71 | Running 'TaskTearDown' for task Clean - success! 72 | Executing task, Compile... 73 | Running 'TaskTearDown' for task Compile - success! 74 | Executing task, Test... 75 | Running 'TaskTearDown' for task Test - success! 76 | 77 | Build Succeeded 78 | 79 | .LINK 80 | Assert 81 | .LINK 82 | Exec 83 | .LINK 84 | FormatTaskName 85 | .LINK 86 | Framework 87 | .LINK 88 | Get-PSakeScriptTasks 89 | .LINK 90 | Include 91 | .LINK 92 | Invoke-psake 93 | .LINK 94 | Properties 95 | .LINK 96 | Task 97 | .LINK 98 | TaskSetup 99 | #> 100 | [CmdletBinding()] 101 | param( 102 | [Parameter(Mandatory = $true)] 103 | [scriptblock]$teardown 104 | ) 105 | 106 | $psake.context.Peek().taskTearDownScriptBlock = $teardown 107 | } 108 | -------------------------------------------------------------------------------- /_DevTools/run-build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem Build a solution 4 | rem Copyright (c) Davide Gironi, 2014 5 | 6 | powershell -Command "& { [Console]::WindowWidth = 150; [Console]::WindowHeight = 50; Start-Transcript out.txt; Import-Module .\Tools\PSake\psake.psm1; Invoke-psake '.\Tools\AutoBuilder\AutoBuilder.ps1' -task Build; Remove-Module psake; %*; Stop-Transcript; }" 7 | @if "%NOPAUSE%"=="1" (echo stop) else (pause) 8 | -------------------------------------------------------------------------------- /_DevTools/run-builddebugandrelease.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem Build Debug and Release for a solution 4 | rem Copyright (c) Davide Gironi, 2014 5 | 6 | powershell -Command "& { [Console]::WindowWidth = 150; [Console]::WindowHeight = 50; Start-Transcript out.txt; Import-Module .\Tools\PSake\psake.psm1; Invoke-psake '.\Tools\AutoBuilder\AutoBuilder.ps1' -task BuildDebugAndRelease; Remove-Module psake; %*; Stop-Transcript; }" 7 | @if "%NOPAUSE%"=="1" (echo stop) else (pause) 8 | -------------------------------------------------------------------------------- /_DevTools/run-clean.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem Clean a solution 4 | rem Copyright (c) Davide Gironi, 2014 5 | 6 | powershell -Command "& { [Console]::WindowWidth = 150; [Console]::WindowHeight = 50; Start-Transcript out.txt; Import-Module .\Tools\PSake\psake.psm1; Invoke-psake '.\Tools\AutoBuilder\AutoBuilder.ps1' -task Clean; Remove-Module psake; %*; Stop-Transcript; exit $lastexitcode}" 7 | @if "%NOPAUSE%"=="1" (echo stop) else (pause) 8 | exit %errorlevel% 9 | -------------------------------------------------------------------------------- /_DevTools/run-cleanfolders.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem Fully clean a solution 4 | rem Copyright (c) Davide Gironi, 2014 5 | 6 | powershell -Command "& { [Console]::WindowWidth = 150; [Console]::WindowHeight = 50; Start-Transcript out.txt; Import-Module .\Tools\PSake\psake.psm1; Invoke-psake '.\Tools\AutoBuilder\AutoBuilder.ps1' -task CleanFolders; Remove-Module psake; %*; Stop-Transcript; exit $lastexitcode}" 7 | @if "%NOPAUSE%"=="1" (echo stop) else (pause) 8 | exit %errorlevel% 9 | -------------------------------------------------------------------------------- /_DevTools/run-cleanworking.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem Clean working folders for the release stage 4 | rem Copyright (c) Davide Gironi, 2014 5 | 6 | powershell -Command "& { [Console]::WindowWidth = 150; [Console]::WindowHeight = 50; Start-Transcript out.txt; Import-Module .\Tools\PSake\psake.psm1; Invoke-psake '.\Tools\AutoBuilder\AutoBuilder.ps1' -task CleanWorking; Remove-Module psake; %*; Stop-Transcript; exit $lastexitcode}" 7 | @if "%NOPAUSE%"=="1" (echo stop) else (pause) 8 | exit %errorlevel% 9 | -------------------------------------------------------------------------------- /_DevTools/run-devinit.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem Initialize dev environment 4 | rem Copyright (c) Davide Gironi, 2015 5 | 6 | rem load custom dev environment commands 7 | if exist config.run-devinit.bat config.run-devinit.bat 8 | 9 | if not exist Working mkdir Working 10 | if not exist ..\..\Release mkdir ..\..\Release 11 | 12 | exit 13 | -------------------------------------------------------------------------------- /_DevTools/run-releasebin.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem Build and Release a solution Binary 4 | rem Copyright (c) Davide Gironi, 2014 5 | 6 | powershell -Command "& { [Console]::WindowWidth = 150; [Console]::WindowHeight = 50; Start-Transcript out.txt; Import-Module .\Tools\PSake\psake.psm1; Invoke-psake '.\Tools\AutoBuilder\AutoBuilder.ps1' -task ReleaseBin; Remove-Module psake; %*; Stop-Transcript; exit $lastexitcode}" 7 | @if "%NOPAUSE%"=="1" (echo stop) else (pause) 8 | exit %errorlevel% 9 | -------------------------------------------------------------------------------- /_DevTools/run-releasebinsrcclean.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem Build and Release a solution Binary and Source 4 | rem Copyright (c) Davide Gironi, 2014 5 | 6 | SET NOPAUSE=1 7 | cmd /C run-cleanfolders.bat 8 | if ERRORLEVEL 1 ( 9 | pause 10 | exit %ERRORLEVEL% 11 | ) 12 | cmd /C run-releasebin.bat 13 | if ERRORLEVEL 1 ( 14 | pause 15 | exit %ERRORLEVEL% 16 | ) 17 | cmd /C run-releasesrc.bat 18 | if ERRORLEVEL 1 ( 19 | pause 20 | exit %ERRORLEVEL% 21 | ) 22 | pause 23 | -------------------------------------------------------------------------------- /_DevTools/run-releasebinsrccleanrebuild.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem Build and Release a solution Binary and Source, also rebuild 4 | rem Copyright (c) Davide Gironi, 2014 5 | 6 | SET NOPAUSE=1 7 | cmd /C run-cleanfolders.bat 8 | if ERRORLEVEL 1 ( 9 | pause 10 | exit %ERRORLEVEL% 11 | ) 12 | cmd /C run-releasebin.bat 13 | if ERRORLEVEL 1 ( 14 | pause 15 | exit %ERRORLEVEL% 16 | ) 17 | cmd /C run-releasesrc.bat 18 | if ERRORLEVEL 1 ( 19 | pause 20 | exit %ERRORLEVEL% 21 | ) 22 | cmd /C run-builddebugandrelease.bat 23 | if ERRORLEVEL 1 ( 24 | pause 25 | exit %ERRORLEVEL% 26 | ) 27 | cmd /C run-cleanworking.bat 28 | if ERRORLEVEL 1 ( 29 | pause 30 | exit %ERRORLEVEL% 31 | ) 32 | pause 33 | -------------------------------------------------------------------------------- /_DevTools/run-releasebinsrccleanrebuildexit.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem Build and Release a solution Binary and Source, also rebuild 4 | rem Copyright (c) Davide Gironi, 2014 5 | 6 | SET NOPAUSE=1 7 | cmd /C run-cleanfolders.bat 8 | if ERRORLEVEL 1 ( 9 | pause 10 | exit %ERRORLEVEL% 11 | ) 12 | cmd /C run-releasebin.bat 13 | if ERRORLEVEL 1 ( 14 | pause 15 | exit %ERRORLEVEL% 16 | ) 17 | cmd /C run-releasesrc.bat 18 | if ERRORLEVEL 1 ( 19 | pause 20 | exit %ERRORLEVEL% 21 | ) 22 | cmd /C run-builddebugandrelease.bat 23 | if ERRORLEVEL 1 ( 24 | pause 25 | exit %ERRORLEVEL% 26 | ) 27 | cmd /C run-cleanworking.bat 28 | if ERRORLEVEL 1 ( 29 | pause 30 | exit %ERRORLEVEL% 31 | ) 32 | -------------------------------------------------------------------------------- /_DevTools/run-releasesrc.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem Build and Release a solution Source 4 | rem Copyright (c) Davide Gironi, 2014 5 | 6 | powershell -Command "& { [Console]::WindowWidth = 150; [Console]::WindowHeight = 50; Start-Transcript out.txt; Import-Module .\Tools\PSake\psake.psm1; Invoke-psake '.\Tools\AutoBuilder\AutoBuilder.ps1' -task ReleaseSrc; Remove-Module psake; %*; Stop-Transcript; exit $lastexitcode}" 7 | @if "%NOPAUSE%"=="1" (echo stop) else (pause) 8 | exit %errorlevel% 9 | -------------------------------------------------------------------------------- /_DevTools/run-unittests.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem Run unit tests for a solution 4 | rem Copyright (c) Davide Gironi, 2014 5 | 6 | powershell -Command "& { [Console]::WindowWidth = 150; [Console]::WindowHeight = 50; Start-Transcript out.txt; Import-Module .\Tools\PSake\psake.psm1; Invoke-psake '.\Tools\AutoBuilder\AutoBuilder.ps1' -task TestConsole; Remove-Module psake; %*; Stop-Transcript; exit $lastexitcode}" 7 | @if "%NOPAUSE%"=="1" (echo stop) else (pause) 8 | exit %errorlevel% 9 | -------------------------------------------------------------------------------- /_DevTools/run-updateversion.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | rem Update AssemblyInfo version 4 | rem Copyright (c) Davide Gironi, 2014 5 | 6 | powershell -Command "& { [Console]::WindowWidth = 150; [Console]::WindowHeight = 50; Start-Transcript out.txt; Import-Module .\Tools\PSake\psake.psm1; Invoke-psake '.\Tools\AutoBuilder\AutoBuilder.ps1' -task UpdateVersion; Remove-Module psake; %*; Stop-Transcript; exit $lastexitcode}" 7 | @if "%NOPAUSE%"=="1" (echo stop) else (pause) 8 | exit %errorlevel% 9 | --------------------------------------------------------------------------------