├── .gitignore ├── LICENSE.txt ├── MaterialWinforms.gitignore ├── MaterialWinforms ├── Animations │ ├── AnimationDirection.cs │ ├── AnimationManager.cs │ └── Animations.cs ├── ColorScheme.cs ├── ColorSchemePresetCollection.cs ├── Controls │ ├── DrawerControls │ │ ├── MaterialDrawerItem.cs │ │ ├── MaterialSideDrawer.Designer.cs │ │ └── MaterialSideDrawer.cs │ ├── DropDownControl.cs │ ├── DropDownControl.designer.cs │ ├── HeadsUp.cs │ ├── HeadsUp.resx │ ├── MaterialActionBar.Designer.cs │ ├── MaterialActionBar.cs │ ├── MaterialAvatarView.cs │ ├── MaterialBreadCrumbToolbar.Designer.cs │ ├── MaterialBreadCrumbToolbar.cs │ ├── MaterialCard.cs │ ├── MaterialCheckBox.cs │ ├── MaterialColorPickercs.cs │ ├── MaterialComboBox.cs │ ├── MaterialContextMenuStrip.cs │ ├── MaterialDatePicker.Designer.cs │ ├── MaterialDatePicker.cs │ ├── MaterialDialog.cs │ ├── MaterialDialog.resx │ ├── MaterialDivider.cs │ ├── MaterialDropDownColorPicker.Designer.cs │ ├── MaterialDropDownColorPicker.cs │ ├── MaterialDropDownDatePicker.cs │ ├── MaterialFileInput.cs │ ├── MaterialFlatButton.cs │ ├── MaterialFloatingActionButton.cs │ ├── MaterialFlowLayoutPanel.cs │ ├── MaterialFolderInput.cs │ ├── MaterialForm.cs │ ├── MaterialForm.resx │ ├── MaterialLabel.cs │ ├── MaterialListView.cs │ ├── MaterialLoadingFloatingActionButton.cs │ ├── MaterialMenuStrip.cs │ ├── MaterialPanel.cs │ ├── MaterialProgressBar.cs │ ├── MaterialRadioButton.cs │ ├── MaterialRaisedButton.cs │ ├── MaterialScrollBar.cs │ ├── MaterialSingleLineTextField.cs │ ├── MaterialSlider.Designer.cs │ ├── MaterialSlider.cs │ ├── MaterialTabControl.cs │ ├── MaterialTabSelector.cs │ ├── MaterialTextBox.cs │ ├── MaterialTimeline.Designer.cs │ ├── MaterialTimeline.cs │ ├── MaterialToggle.cs │ ├── MaterialTreeControl.cs │ ├── MaterialUserControl.Designer.cs │ ├── MaterialUserControl.cs │ ├── Settings │ │ ├── BackGroundDim.Designer.cs │ │ ├── BackGroundDim.cs │ │ ├── BackGroundDim.resx │ │ ├── ColorOverlay.Designer.cs │ │ ├── ColorOverlay.cs │ │ ├── ColorOverlay.resx │ │ ├── MaterialSettings.cs │ │ ├── MaterialSettings.resx │ │ ├── MaterialThemeSettings.Designer.cs │ │ ├── MaterialThemeSettings.cs │ │ ├── MaterialThemeSettings.resx │ │ ├── SchemeCreator.Designer.cs │ │ ├── SchemeCreator.cs │ │ └── SchemeCreator.resx │ ├── TabControls │ │ ├── MaterialTabControl.cs │ │ ├── MaterialTabSelector.cs │ │ └── TabWindow.cs │ └── TimeLine │ │ ├── MaterialTimeLineEntry.Designer.cs │ │ └── MaterialTimeLineEntry.cs ├── DrawHelper.cs ├── IMaterialControl.cs ├── IShadowedMaterialControl.cs ├── LICENSE.txt ├── MaterialSkinManager.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ └── Resources.resx ├── Resources │ ├── Roboto-Medium.ttf │ └── Roboto-Regular.ttf ├── UIManagers │ ├── DrawHelper.cs │ └── FontManager.cs ├── Verweise │ └── Animator.dll └── Zeroit.Framework.MaterialWinforms.csproj ├── MaterialWinformsExample ├── App.config ├── MainForm.Designer.cs ├── MainForm.cs ├── MainForm.resx ├── MaterialWinformsExample.sln ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ ├── ic_action_action_search.png │ ├── ic_launcher.ico │ └── wallhaven-170258.jpg └── Zeroit.Framework.MaterialWinformsExample.csproj ├── Preview └── icon.ico ├── README.md ├── Zeroit.Framework.MaterialWinforms.sln └── _config.yml /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | 14 | # User-specific files (MonoDevelop/Xamarin Studio) 15 | *.userprefs 16 | 17 | # Mono auto generated files 18 | mono_crash.* 19 | 20 | # Build results 21 | [Dd]ebug/ 22 | [Dd]ebugPublic/ 23 | [Rr]elease/ 24 | [Rr]eleases/ 25 | x64/ 26 | x86/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Ll]og/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUNIT 47 | *.VisualState.xml 48 | TestResult.xml 49 | 50 | # Build Results of JetBrains 51 | .idea/ 52 | 53 | 54 | # Build Results of an ATL Project 55 | [Dd]ebugPS/ 56 | [Rr]eleasePS/ 57 | dlldata.c 58 | 59 | # Benchmark Results 60 | BenchmarkDotNet.Artifacts/ 61 | 62 | # .NET Core 63 | project.lock.json 64 | project.fragment.lock.json 65 | artifacts/ 66 | 67 | # StyleCop 68 | StyleCopReport.xml 69 | 70 | # Files built by Visual Studio 71 | *_i.c 72 | *_p.c 73 | *_h.h 74 | *.ilk 75 | *.meta 76 | *.obj 77 | *.iobj 78 | *.pch 79 | *.pdb 80 | *.ipdb 81 | *.pgc 82 | *.pgd 83 | *.rsp 84 | *.sbr 85 | *.tlb 86 | *.tli 87 | *.tlh 88 | *.tmp 89 | *.tmp_proj 90 | *_wpftmp.csproj 91 | *.log 92 | *.vspscc 93 | *.vssscc 94 | .builds 95 | *.pidb 96 | *.svclog 97 | *.scc 98 | 99 | # Chutzpah Test files 100 | _Chutzpah* 101 | 102 | # Visual C++ cache files 103 | ipch/ 104 | *.aps 105 | *.ncb 106 | *.opendb 107 | *.opensdf 108 | *.sdf 109 | *.cachefile 110 | *.VC.db 111 | *.VC.VC.opendb 112 | 113 | # Visual Studio profiler 114 | *.psess 115 | *.vsp 116 | *.vspx 117 | *.sap 118 | 119 | # Visual Studio Trace Files 120 | *.e2e 121 | 122 | # TFS 2012 Local Workspace 123 | $tf/ 124 | 125 | # Guidance Automation Toolkit 126 | *.gpState 127 | 128 | # ReSharper is a .NET coding add-in 129 | _ReSharper*/ 130 | *.[Rr]e[Ss]harper 131 | *.DotSettings.user 132 | 133 | # JustCode is a .NET coding add-in 134 | .JustCode 135 | 136 | # TeamCity is a build add-in 137 | _TeamCity* 138 | 139 | # DotCover is a Code Coverage Tool 140 | *.dotCover 141 | 142 | # AxoCover is a Code Coverage Tool 143 | .axoCover/* 144 | !.axoCover/settings.json 145 | 146 | # Visual Studio code coverage results 147 | *.coverage 148 | *.coveragexml 149 | 150 | # NCrunch 151 | _NCrunch_* 152 | .*crunch*.local.xml 153 | nCrunchTemp_* 154 | 155 | # MightyMoose 156 | *.mm.* 157 | AutoTest.Net/ 158 | 159 | # Web workbench (sass) 160 | .sass-cache/ 161 | 162 | # Installshield output folder 163 | [Ee]xpress/ 164 | 165 | # DocProject is a documentation generator add-in 166 | DocProject/buildhelp/ 167 | DocProject/Help/*.HxT 168 | DocProject/Help/*.HxC 169 | DocProject/Help/*.hhc 170 | DocProject/Help/*.hhk 171 | DocProject/Help/*.hhp 172 | DocProject/Help/Html2 173 | DocProject/Help/html 174 | 175 | # Click-Once directory 176 | publish/ 177 | 178 | # Publish Web Output 179 | *.[Pp]ublish.xml 180 | *.azurePubxml 181 | # Note: Comment the next line if you want to checkin your web deploy settings, 182 | # but database connection strings (with potential passwords) will be unencrypted 183 | *.pubxml 184 | *.publishproj 185 | 186 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 187 | # checkin your Azure Web App publish settings, but sensitive information contained 188 | # in these scripts will be unencrypted 189 | PublishScripts/ 190 | 191 | # NuGet Packages 192 | *.nupkg 193 | # The packages folder can be ignored because of Package Restore 194 | **/[Pp]ackages/* 195 | # except build/, which is used as an MSBuild target. 196 | !**/[Pp]ackages/build/ 197 | # Uncomment if necessary however generally it will be regenerated when needed 198 | #!**/[Pp]ackages/repositories.config 199 | # NuGet v3's project.json files produces more ignorable files 200 | *.nuget.props 201 | *.nuget.targets 202 | *.nuspec 203 | nuget.exe 204 | 205 | # Microsoft Azure Build Output 206 | csx/ 207 | *.build.csdef 208 | 209 | # Microsoft Azure Emulator 210 | ecf/ 211 | rcf/ 212 | 213 | # Windows Store app package directories and files 214 | AppPackages/ 215 | BundleArtifacts/ 216 | Package.StoreAssociation.xml 217 | _pkginfo.txt 218 | *.appx 219 | *.appxbundle 220 | *.appxupload 221 | 222 | # Visual Studio cache files 223 | # files ending in .cache can be ignored 224 | *.[Cc]ache 225 | # but keep track of directories ending in .cache 226 | !?*.[Cc]ache/ 227 | 228 | # Others 229 | ClientBin/ 230 | ~$* 231 | *~ 232 | *.dbmdl 233 | *.dbproj.schemaview 234 | *.jfm 235 | *.pfx 236 | *.publishsettings 237 | orleans.codegen.cs 238 | 239 | # Including strong name files can present a security risk 240 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 241 | *.snk 242 | 243 | # Since there are multiple workflows, uncomment next line to ignore bower_components 244 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 245 | #bower_components/ 246 | 247 | # RIA/Silverlight projects 248 | Generated_Code/ 249 | 250 | # Backup & report files from converting an old project file 251 | # to a newer Visual Studio version. Backup files are not needed, 252 | # because we have git ;-) 253 | _UpgradeReport_Files/ 254 | Backup*/ 255 | UpgradeLog*.XML 256 | UpgradeLog*.htm 257 | ServiceFabricBackup/ 258 | *.rptproj.bak 259 | 260 | # SQL Server files 261 | *.mdf 262 | *.ldf 263 | *.ndf 264 | 265 | # Business Intelligence projects 266 | *.rdl.data 267 | *.bim.layout 268 | *.bim_*.settings 269 | *.rptproj.rsuser 270 | *- Backup*.rdl 271 | 272 | # Microsoft Fakes 273 | FakesAssemblies/ 274 | 275 | # GhostDoc plugin setting file 276 | *.GhostDoc.xml 277 | 278 | # Node.js Tools for Visual Studio 279 | .ntvs_analysis.dat 280 | node_modules/ 281 | 282 | # Visual Studio 6 build log 283 | *.plg 284 | 285 | # Visual Studio 6 workspace options file 286 | *.opt 287 | 288 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 289 | *.vbw 290 | 291 | # Visual Studio LightSwitch build output 292 | **/*.HTMLClient/GeneratedArtifacts 293 | **/*.DesktopClient/GeneratedArtifacts 294 | **/*.DesktopClient/ModelManifest.xml 295 | **/*.Server/GeneratedArtifacts 296 | **/*.Server/ModelManifest.xml 297 | _Pvt_Extensions 298 | 299 | # Paket dependency manager 300 | .paket/paket.exe 301 | paket-files/ 302 | 303 | # FAKE - F# Make 304 | .fake/ 305 | 306 | # CodeRush personal settings 307 | .cr/personal 308 | 309 | # Python Tools for Visual Studio (PTVS) 310 | __pycache__/ 311 | *.pyc 312 | 313 | # Cake - Uncomment if you are using it 314 | # tools/** 315 | # !tools/packages.config 316 | 317 | # Tabs Studio 318 | *.tss 319 | 320 | # Telerik's JustMock configuration file 321 | *.jmconfig 322 | 323 | # BizTalk build output 324 | *.btp.cs 325 | *.btm.cs 326 | *.odx.cs 327 | *.xsd.cs 328 | 329 | # OpenCover UI analysis results 330 | OpenCover/ 331 | 332 | # Azure Stream Analytics local run output 333 | ASALocalRun/ 334 | 335 | # MSBuild Binary and Structured Log 336 | *.binlog 337 | 338 | # NVidia Nsight GPU debugger configuration file 339 | *.nvuser 340 | 341 | # MFractors (Xamarin productivity tool) working folder 342 | .mfractor/ 343 | 344 | # Local History for Visual Studio 345 | .localhistory/ 346 | 347 | # BeatPulse healthcheck temp database 348 | healthchecksdb 349 | 350 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 351 | MigrationBackup/ 352 | -------------------------------------------------------------------------------- /MaterialWinforms.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 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.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 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | *.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.pfx 193 | *.publishsettings 194 | node_modules/ 195 | orleans.codegen.cs 196 | 197 | # Since there are multiple workflows, uncomment next line to ignore bower_components 198 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 199 | #bower_components/ 200 | 201 | # RIA/Silverlight projects 202 | Generated_Code/ 203 | 204 | # Backup & report files from converting an old project file 205 | # to a newer Visual Studio version. Backup files are not needed, 206 | # because we have git ;-) 207 | _UpgradeReport_Files/ 208 | Backup*/ 209 | UpgradeLog*.XML 210 | UpgradeLog*.htm 211 | 212 | # SQL Server files 213 | *.mdf 214 | *.ldf 215 | 216 | # Business Intelligence projects 217 | *.rdl.data 218 | *.bim.layout 219 | *.bim_*.settings 220 | 221 | # Microsoft Fakes 222 | FakesAssemblies/ 223 | 224 | # GhostDoc plugin setting file 225 | *.GhostDoc.xml 226 | 227 | # Node.js Tools for Visual Studio 228 | .ntvs_analysis.dat 229 | 230 | # Visual Studio 6 build log 231 | *.plg 232 | 233 | # Visual Studio 6 workspace options file 234 | *.opt 235 | 236 | # Visual Studio LightSwitch build output 237 | **/*.HTMLClient/GeneratedArtifacts 238 | **/*.DesktopClient/GeneratedArtifacts 239 | **/*.DesktopClient/ModelManifest.xml 240 | **/*.Server/GeneratedArtifacts 241 | **/*.Server/ModelManifest.xml 242 | _Pvt_Extensions 243 | 244 | # Paket dependency manager 245 | .paket/paket.exe 246 | paket-files/ 247 | 248 | # FAKE - F# Make 249 | .fake/ 250 | 251 | # JetBrains Rider 252 | .idea/ 253 | *.sln.iml 254 | -------------------------------------------------------------------------------- /MaterialWinforms/Animations/AnimationDirection.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | namespace Zeroit.Framework.MaterialWinforms.Animations 31 | { 32 | /// 33 | /// Enum AnimationDirection 34 | /// 35 | public enum AnimationDirection 36 | { 37 | /// 38 | /// The in 39 | /// 40 | In, //In. Stops if finished. 41 | /// 42 | /// The out 43 | /// 44 | Out, //Out. Stops if finished. 45 | /// 46 | /// The in out in 47 | /// 48 | InOutIn, //Same as In, but changes to InOutOut if finished. 49 | /// 50 | /// The in out out 51 | /// 52 | InOutOut, //Same as Out. 53 | /// 54 | /// The in out repeating in 55 | /// 56 | InOutRepeatingIn, // Same as In, but changes to InOutRepeatingOut if finished. 57 | /// 58 | /// The in out repeating out 59 | /// 60 | InOutRepeatingOut // Same as Out, but changes to InOutRepeatingIn if finished. 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /MaterialWinforms/Animations/Animations.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | using System; 31 | 32 | namespace Zeroit.Framework.MaterialWinforms.Animations 33 | { 34 | /// 35 | /// Enum AnimationType 36 | /// 37 | public enum AnimationType 38 | { 39 | /// 40 | /// The linear 41 | /// 42 | Linear, 43 | /// 44 | /// The ease in out 45 | /// 46 | EaseInOut, 47 | /// 48 | /// The ease out 49 | /// 50 | EaseOut, 51 | /// 52 | /// The custom quadratic 53 | /// 54 | CustomQuadratic 55 | } 56 | 57 | /// 58 | /// Class AnimationLinear. 59 | /// 60 | static class AnimationLinear 61 | { 62 | /// 63 | /// Calculates the progress. 64 | /// 65 | /// The progress. 66 | /// System.Double. 67 | public static double CalculateProgress(double progress) 68 | { 69 | return progress; 70 | } 71 | } 72 | 73 | /// 74 | /// Class AnimationEaseInOut. 75 | /// 76 | static class AnimationEaseInOut 77 | { 78 | /// 79 | /// The pi 80 | /// 81 | public static double PI = Math.PI; 82 | /// 83 | /// The pi half 84 | /// 85 | public static double PI_HALF = Math.PI / 2; 86 | 87 | /// 88 | /// Calculates the progress. 89 | /// 90 | /// The progress. 91 | /// System.Double. 92 | public static double CalculateProgress(double progress) 93 | { 94 | return EaseInOut(progress); 95 | } 96 | 97 | /// 98 | /// Eases the in out. 99 | /// 100 | /// The s. 101 | /// System.Double. 102 | private static double EaseInOut(double s) 103 | { 104 | return s - Math.Sin(s * 2 * PI) / (2 * PI); 105 | } 106 | } 107 | 108 | /// 109 | /// Class AnimationEaseOut. 110 | /// 111 | public static class AnimationEaseOut 112 | { 113 | /// 114 | /// Calculates the progress. 115 | /// 116 | /// The progress. 117 | /// System.Double. 118 | public static double CalculateProgress(double progress) 119 | { 120 | return -1 * progress * (progress - 2); 121 | } 122 | } 123 | 124 | /// 125 | /// Class AnimationCustomQuadratic. 126 | /// 127 | public static class AnimationCustomQuadratic 128 | { 129 | /// 130 | /// Calculates the progress. 131 | /// 132 | /// The progress. 133 | /// System.Double. 134 | public static double CalculateProgress(double progress) 135 | { 136 | double kickoff = 0.6; 137 | return 1 - Math.Cos((Math.Max(progress, kickoff) - kickoff) * Math.PI / (2 - (2 * kickoff))); 138 | } 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/DrawerControls/MaterialSideDrawer.Designer.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | 31 | namespace Zeroit.Framework.MaterialWinforms.Controls 32 | { 33 | partial class MaterialSideDrawer 34 | { 35 | /// 36 | /// Erforderliche Designervariable. 37 | /// 38 | private System.ComponentModel.IContainer components = null; 39 | 40 | /// 41 | /// Verwendete Ressourcen bereinigen. 42 | /// 43 | /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. 44 | protected override void Dispose(bool disposing) 45 | { 46 | if (disposing && (components != null)) 47 | { 48 | components.Dispose(); 49 | } 50 | base.Dispose(disposing); 51 | } 52 | 53 | #region Vom Komponenten-Designer generierter Code 54 | 55 | /// 56 | /// Erforderliche Methode für die Designerunterstützung. 57 | /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. 58 | /// 59 | private void InitializeComponent() 60 | { 61 | components = new System.ComponentModel.Container(); 62 | } 63 | 64 | #endregion 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/DropDownControl.designer.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | namespace Zeroit.Framework.MaterialWinforms.Controls 31 | { 32 | /// 33 | /// Class DropDownControl. 34 | /// 35 | /// 36 | /// 37 | partial class DropDownControl 38 | { 39 | /// 40 | /// Required designer variable. 41 | /// 42 | private System.ComponentModel.IContainer components = null; 43 | 44 | /// 45 | /// Clean up any resources being used. 46 | /// 47 | /// true if managed resources should be disposed; otherwise, false. 48 | protected override void Dispose(bool disposing) 49 | { 50 | if (disposing && (components != null)) 51 | { 52 | components.Dispose(); 53 | } 54 | base.Dispose(disposing); 55 | } 56 | 57 | #region Component Designer generated code 58 | 59 | /// 60 | /// Required method for Designer support - do not modify 61 | /// the contents of this method with the code editor. 62 | /// 63 | protected void InitializeComponent() 64 | { 65 | components = new System.ComponentModel.Container(); 66 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 67 | } 68 | 69 | #endregion 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/HeadsUp.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 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialActionBar.Designer.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 12-18-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | 31 | namespace Zeroit.Framework.MaterialWinforms.Controls 32 | { 33 | partial class MaterialActionBar 34 | { 35 | /// 36 | /// Erforderliche Designervariable. 37 | /// 38 | private System.ComponentModel.IContainer components = null; 39 | 40 | /// 41 | /// Verwendete Ressourcen bereinigen. 42 | /// 43 | /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. 44 | protected override void Dispose(bool disposing) 45 | { 46 | if (disposing && (components != null)) 47 | { 48 | components.Dispose(); 49 | } 50 | base.Dispose(disposing); 51 | } 52 | 53 | #region Vom Komponenten-Designer generierter Code 54 | 55 | /// 56 | /// Erforderliche Methode für die Designerunterstützung. 57 | /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. 58 | /// 59 | private void InitializeComponent() 60 | { 61 | components = new System.ComponentModel.Container(); 62 | } 63 | 64 | #endregion 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialBreadCrumbToolbar.Designer.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 07-04-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | 31 | namespace Zeroit.Framework.MaterialWinforms.Controls 32 | { 33 | partial class MaterialBreadCrumbToolbar 34 | { 35 | /// 36 | /// Erforderliche Designervariable. 37 | /// 38 | private System.ComponentModel.IContainer components = null; 39 | 40 | /// 41 | /// Verwendete Ressourcen bereinigen. 42 | /// 43 | /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. 44 | protected override void Dispose(bool disposing) 45 | { 46 | if (disposing && (components != null)) 47 | { 48 | components.Dispose(); 49 | } 50 | base.Dispose(disposing); 51 | } 52 | 53 | #region Vom Komponenten-Designer generierter Code 54 | 55 | /// 56 | /// Erforderliche Methode für die Designerunterstützung. 57 | /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. 58 | /// 59 | private void InitializeComponent() 60 | { 61 | components = new System.ComponentModel.Container(); 62 | } 63 | 64 | #endregion 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialCard.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | using System.ComponentModel; 31 | using System.Windows.Forms; 32 | using System.Drawing; 33 | using System.Drawing.Drawing2D; 34 | using System.Drawing.Text; 35 | 36 | namespace Zeroit.Framework.MaterialWinforms.Controls 37 | { 38 | /// 39 | /// Class MaterialCard. 40 | /// 41 | /// 42 | /// 43 | public class MaterialCard : Panel, IShadowedMaterialControl 44 | { 45 | 46 | /// 47 | /// The text 48 | /// 49 | private string _Text; 50 | /// 51 | /// Gets or sets the depth. 52 | /// 53 | /// The depth. 54 | [Browsable(false)] 55 | public int Depth { get; set; } 56 | /// 57 | /// Gets the skin manager. 58 | /// 59 | /// The skin manager. 60 | [Browsable(false)] 61 | public MaterialSkinManager SkinManager { get { return MaterialSkinManager.Instance; } } 62 | /// 63 | /// Gets or sets the state of the mouse. 64 | /// 65 | /// The state of the mouse. 66 | [Browsable(false)] 67 | public MouseState MouseState { get; set; } 68 | 69 | /// 70 | /// Gets or sets the background color for the control. 71 | /// 72 | /// The color of the back. 73 | /// 74 | /// 75 | /// 76 | public Color BackColor { get { return SkinManager.GetCardsColor(); } } 77 | 78 | /// 79 | /// Gets or sets the elevation. 80 | /// 81 | /// The elevation. 82 | public int Elevation { get; set; } 83 | /// 84 | /// Gets or sets the shadow border. 85 | /// 86 | /// The shadow border. 87 | [Browsable(false)] 88 | public GraphicsPath ShadowBorder { get; set; } 89 | 90 | /// 91 | /// The large title 92 | /// 93 | private bool _LargeTitle; 94 | /// 95 | /// Gets or sets a value indicating whether [large title]. 96 | /// 97 | /// true if [large title]; otherwise, false. 98 | public bool LargeTitle 99 | { 100 | get 101 | { 102 | return _LargeTitle; 103 | } 104 | set 105 | { 106 | _LargeTitle = value; 107 | } 108 | } 109 | 110 | /// 111 | /// Gets or sets the title. 112 | /// 113 | /// The title. 114 | [Category("Appearance")] 115 | public string Title 116 | { 117 | get 118 | { 119 | return _Text; 120 | } 121 | set 122 | { 123 | _Text = value; 124 | Invalidate(); 125 | } 126 | } 127 | 128 | /// 129 | /// Gets the size of the title. 130 | /// 131 | /// The size of the title. 132 | public SizeF TitleSize { get { return CreateGraphics().MeasureString(_Text, LargeTitle ? new FontManager().Roboto_Medium15 : SkinManager.ROBOTO_MEDIUM_10); } } 133 | /// 134 | /// Initializes a new instance of the class. 135 | /// 136 | public MaterialCard() 137 | { 138 | SetStyle(ControlStyles.SupportsTransparentBackColor, true); 139 | Height = 1; 140 | Padding = new Padding(5, 25, 5, 5); 141 | Elevation = 5; 142 | SizeChanged += Redraw; 143 | LocationChanged += Redraw; 144 | DoubleBuffered = true; 145 | ParentChanged += new System.EventHandler(Redraw); 146 | } 147 | 148 | 149 | /// 150 | /// Redraws the specified sender. 151 | /// 152 | /// The sender. 153 | /// The instance containing the event data. 154 | private void Redraw(object sender, System.EventArgs e) 155 | { 156 | ShadowBorder = new GraphicsPath(); 157 | ShadowBorder = DrawHelper.CreateRoundRect(Location.X, 158 | Location.Y, 159 | ClientRectangle.Width, ClientRectangle.Height, 10); 160 | this.Region = new Region(DrawHelper.CreateRoundRect(ClientRectangle.X, 161 | ClientRectangle.Y, 162 | ClientRectangle.Width, ClientRectangle.Height, 10)); 163 | Invalidate(); 164 | 165 | 166 | } 167 | 168 | /// 169 | /// Handles the event. 170 | /// 171 | /// The instance containing the event data. 172 | protected override void OnPaint(PaintEventArgs pevent) 173 | { 174 | int iCropping = ClientRectangle.Width / 3; 175 | var g = pevent.Graphics; 176 | g.SmoothingMode = SmoothingMode.AntiAlias; 177 | g.TextRenderingHint = TextRenderingHint.AntiAlias; 178 | 179 | g.Clear(SkinManager.GetCardsColor()); 180 | 181 | if (!string.IsNullOrWhiteSpace(_Text)) 182 | { 183 | g.DrawString( 184 | _Text, 185 | LargeTitle?new FontManager().Roboto_Medium15: SkinManager.ROBOTO_MEDIUM_10, 186 | SkinManager.ColorScheme.PrimaryBrush, 187 | new Rectangle(ClientRectangle.X + 10, ClientRectangle.Y + 10, ClientRectangle.Width, (int)TitleSize.Height), 188 | new StringFormat { Alignment = StringAlignment.Near, LineAlignment = StringAlignment.Near }); 189 | } 190 | g.ResetClip(); 191 | } 192 | } 193 | } 194 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialDatePicker.Designer.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 12-18-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | 31 | namespace Zeroit.Framework.MaterialWinforms.Controls 32 | { 33 | partial class MaterialDatePicker 34 | { 35 | /// 36 | /// Erforderliche Designervariable. 37 | /// 38 | private System.ComponentModel.IContainer components = null; 39 | 40 | /// 41 | /// Verwendete Ressourcen bereinigen. 42 | /// 43 | /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. 44 | protected override void Dispose(bool disposing) 45 | { 46 | if (disposing && (components != null)) 47 | { 48 | components.Dispose(); 49 | } 50 | base.Dispose(disposing); 51 | } 52 | 53 | #region Vom Komponenten-Designer generierter Code 54 | 55 | /// 56 | /// Erforderliche Methode für die Designerunterstützung. 57 | /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. 58 | /// 59 | private void InitializeComponent() 60 | { 61 | components = new System.ComponentModel.Container(); 62 | } 63 | 64 | #endregion 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialDialog.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 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialDivider.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | using System.ComponentModel; 31 | using System.Windows.Forms; 32 | using System.Drawing; 33 | 34 | namespace Zeroit.Framework.MaterialWinforms.Controls 35 | { 36 | /// 37 | /// Class MaterialDivider. This class cannot be inherited. 38 | /// 39 | /// 40 | /// 41 | public sealed class MaterialDivider : Control, IMaterialControl 42 | { 43 | /// 44 | /// Gets or sets the depth. 45 | /// 46 | /// The depth. 47 | [Browsable(false)] 48 | public int Depth { get; set; } 49 | /// 50 | /// Gets the skin manager. 51 | /// 52 | /// The skin manager. 53 | [Browsable(false)] 54 | public MaterialSkinManager SkinManager { get { return MaterialSkinManager.Instance; } } 55 | /// 56 | /// Gets or sets the state of the mouse. 57 | /// 58 | /// The state of the mouse. 59 | [Browsable(false)] 60 | public MouseState MouseState { get; set; } 61 | /// 62 | /// Gets or sets the background color for the control. 63 | /// 64 | /// The color of the back. 65 | /// 66 | /// 67 | /// 68 | public Color BackColor { get { return SkinManager.GetDividersColor(); } } 69 | 70 | /// 71 | /// Initializes a new instance of the class. 72 | /// 73 | public MaterialDivider() 74 | { 75 | SetStyle(ControlStyles.SupportsTransparentBackColor, true); 76 | Height = 1; 77 | } 78 | 79 | /// 80 | /// Raises the event. 81 | /// 82 | /// An that contains the event data. 83 | protected override void OnResize(System.EventArgs e) 84 | { 85 | base.OnResize(e); 86 | Height = 1; 87 | } 88 | 89 | /// 90 | /// Raises the event. 91 | /// 92 | /// A that contains the event data. 93 | protected override void OnPaint(PaintEventArgs e) 94 | { 95 | e.Graphics.Clear(SkinManager.GetDividersColor()); 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialDropDownColorPicker.Designer.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | namespace Zeroit.Framework.MaterialWinforms.Controls 31 | { 32 | /// 33 | /// Class MaterialDropDownColorPicker. 34 | /// 35 | /// 36 | /// 37 | partial class MaterialDropDownColorPicker 38 | { 39 | /// 40 | /// Erforderliche Designervariable. 41 | /// 42 | private System.ComponentModel.IContainer components = null; 43 | 44 | /// 45 | /// Verwendete Ressourcen bereinigen. 46 | /// 47 | /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. 48 | protected override void Dispose(bool disposing) 49 | { 50 | if (disposing && (components != null)) 51 | { 52 | components.Dispose(); 53 | } 54 | base.Dispose(disposing); 55 | } 56 | 57 | #region Vom Komponenten-Designer generierter Code 58 | 59 | /// 60 | /// Erforderliche Methode für die Designerunterstützung. 61 | /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. 62 | /// 63 | private void InitializeComponent() 64 | { 65 | components = new System.ComponentModel.Container(); 66 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 67 | } 68 | 69 | #endregion 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialDropDownColorPicker.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 12-18-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | using System.ComponentModel; 31 | using System.Drawing; 32 | using System.Windows.Forms; 33 | 34 | namespace Zeroit.Framework.MaterialWinforms.Controls 35 | { 36 | /// 37 | /// Class MaterialDropDownColorPicker. 38 | /// 39 | /// 40 | /// 41 | public partial class MaterialDropDownColorPicker : DropDownControl,IMaterialControl 42 | { 43 | /// 44 | /// Gets or sets the depth. 45 | /// 46 | /// The depth. 47 | [Browsable(false)] 48 | public int Depth { get; set; } 49 | /// 50 | /// Gets the skin manager. 51 | /// 52 | /// The skin manager. 53 | [Browsable(false)] 54 | public MaterialSkinManager SkinManager { get { return MaterialSkinManager.Instance; } } 55 | /// 56 | /// Gets or sets the state of the mouse. 57 | /// 58 | /// The state of the mouse. 59 | [Browsable(false)] 60 | public MouseState MouseState { get; set; } 61 | 62 | /// 63 | /// The object color control 64 | /// 65 | private MaterialColorPicker objColorControl; 66 | /// 67 | /// The color 68 | /// 69 | private Color _Color; 70 | /// 71 | /// The color rect 72 | /// 73 | private Rectangle ColorRect; 74 | /// 75 | /// Gets or sets the background color for the control. 76 | /// 77 | /// The color of the back. 78 | /// 79 | /// 80 | /// 81 | public Color BackColor { get { return Parent == null ? SkinManager.GetApplicationBackgroundColor() : Parent.BackColor; } set { } } 82 | /// 83 | /// Gets or sets the color. 84 | /// 85 | /// The color. 86 | public Color Color 87 | { 88 | get { return _Color; } 89 | set 90 | { 91 | _Color = value; objColorControl.Value = _Color; 92 | } 93 | } 94 | /// 95 | /// Initializes a new instance of the class. 96 | /// 97 | public MaterialDropDownColorPicker() 98 | { 99 | InitializeComponent(); 100 | objColorControl = new MaterialColorPicker(); 101 | Color = SkinManager.ColorScheme.AccentColor; 102 | objColorControl.onColorChanged += objDateControl_onDateChanged; 103 | InitializeDropDown(objColorControl); 104 | } 105 | 106 | /// 107 | /// Raises the event. 108 | /// 109 | /// A that contains the event data. 110 | protected override void OnPaint(PaintEventArgs e) 111 | { 112 | base.OnPaint(e); 113 | ColorRect = new Rectangle(); 114 | ColorRect.Location = new Point(1, 1); 115 | ColorRect.Size = new Size((int)(Width - 18), (int)(Height * 0.8)); 116 | 117 | e.Graphics.FillRectangle(new SolidBrush(Color), ColorRect); 118 | } 119 | 120 | /// 121 | /// Objects the date control on date changed. 122 | /// 123 | /// The new color. 124 | void objDateControl_onDateChanged(Color newColor) 125 | { 126 | Color = newColor; 127 | Invalidate(); 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialDropDownDatePicker.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 12-18-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | using System; 31 | using System.ComponentModel; 32 | using System.Drawing; 33 | 34 | namespace Zeroit.Framework.MaterialWinforms.Controls 35 | { 36 | /// 37 | /// Class MaterialDropDownDatePicker. 38 | /// 39 | /// 40 | /// 41 | public partial class MaterialDropDownDatePicker : DropDownControl, IMaterialControl 42 | { 43 | /// 44 | /// Gets or sets the depth. 45 | /// 46 | /// The depth. 47 | [Browsable(false)] 48 | public int Depth { get; set; } 49 | /// 50 | /// Gets the skin manager. 51 | /// 52 | /// The skin manager. 53 | [Browsable(false)] 54 | public MaterialSkinManager SkinManager { get { return MaterialSkinManager.Instance; } } 55 | /// 56 | /// Gets or sets the state of the mouse. 57 | /// 58 | /// The state of the mouse. 59 | [Browsable(false)] 60 | public MouseState MouseState { get; set; } 61 | /// 62 | /// Gets or sets the background color for the control. 63 | /// 64 | /// The color of the back. 65 | /// 66 | /// 67 | /// 68 | public Color BackColor { get { return Parent == null ? SkinManager.GetApplicationBackgroundColor() : Parent.BackColor; } set { } } 69 | 70 | 71 | /// 72 | /// The object date control 73 | /// 74 | private MaterialDatePicker objDateControl; 75 | /// 76 | /// The date 77 | /// 78 | private DateTime _Date; 79 | /// 80 | /// Gets or sets the date. 81 | /// 82 | /// The date. 83 | public DateTime Date {get { return _Date;} 84 | set { _Date = value; objDateControl.Date = _Date; 85 | Text = _Date.ToShortDateString(); 86 | } 87 | } 88 | /// 89 | /// Initializes a new instance of the class. 90 | /// 91 | public MaterialDropDownDatePicker() 92 | { 93 | InitializeComponent(); 94 | objDateControl = new MaterialDatePicker(); 95 | Date = DateTime.Now; 96 | objDateControl.onDateChanged += objDateControl_onDateChanged; 97 | InitializeDropDown(objDateControl); 98 | } 99 | 100 | /// 101 | /// Objects the date control on date changed. 102 | /// 103 | /// The new date time. 104 | void objDateControl_onDateChanged(DateTime newDateTime) 105 | { 106 | _Date = newDateTime; 107 | Text = newDateTime.ToShortDateString(); 108 | 109 | } 110 | 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialForm.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 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialLabel.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | using System.ComponentModel; 31 | using System.Windows.Forms; 32 | using System.Drawing; 33 | 34 | namespace Zeroit.Framework.MaterialWinforms.Controls 35 | { 36 | /// 37 | /// Class MaterialLabel. 38 | /// 39 | /// 40 | /// 41 | public class MaterialLabel : Label, IMaterialControl 42 | { 43 | /// 44 | /// Gets or sets the depth. 45 | /// 46 | /// The depth. 47 | [Browsable(false)] 48 | public int Depth { get; set; } 49 | /// 50 | /// Gets the skin manager. 51 | /// 52 | /// The skin manager. 53 | [Browsable(false)] 54 | public MaterialSkinManager SkinManager { get { return MaterialSkinManager.Instance; } } 55 | /// 56 | /// Gets or sets the background color for the control. 57 | /// 58 | /// The color of the back. 59 | /// 60 | /// 61 | /// 62 | public override Color BackColor { get { return Parent == null ? SkinManager.GetApplicationBackgroundColor() : typeof(IMaterialControl).IsAssignableFrom(Parent.GetType())?((IMaterialControl)Parent).BackColor:Parent.BackColor; } } 63 | /// 64 | /// Gets or sets the state of the mouse. 65 | /// 66 | /// The state of the mouse. 67 | [Browsable(false)] 68 | public MouseState MouseState { get; set; } 69 | 70 | /// 71 | /// Raises the method. 72 | /// 73 | protected override void OnCreateControl() 74 | { 75 | base.OnCreateControl(); 76 | 77 | ForeColor = SkinManager.GetPrimaryTextColor(); 78 | Font = SkinManager.ROBOTO_REGULAR_11; 79 | 80 | BackColorChanged += (sender, args) => ForeColor = SkinManager.GetPrimaryTextColor(); 81 | } 82 | 83 | /// 84 | /// Handles the event. 85 | /// 86 | /// A that contains the event data. 87 | protected override void OnPaint(PaintEventArgs e) 88 | { 89 | e.Graphics.Clear(BackColor); 90 | base.OnPaint(e); 91 | } 92 | 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialMenuStrip.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Drawing.Drawing2D; 5 | using System.Drawing.Text; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace MaterialSkin.Controls 12 | { 13 | public class MaterialMenuStrip : MenuStrip, IMaterialControl 14 | { 15 | public int Depth { get; set; } 16 | public MaterialSkinManager SkinManager { get { return MaterialSkinManager.Instance; } } 17 | public MouseState MouseState { get; set; } 18 | 19 | public MaterialMenuStrip() 20 | { 21 | Renderer = new MaterialMenuStripRender(); 22 | 23 | if (DesignMode) 24 | { 25 | Dock = DockStyle.None; 26 | Anchor |= AnchorStyles.Right; 27 | AutoSize = false; 28 | Location = new Point(0, 28); 29 | } 30 | } 31 | 32 | protected override void OnCreateControl() 33 | { 34 | base.OnCreateControl(); 35 | Font = SkinManager.ROBOTO_MEDIUM_10; 36 | BackColor = SkinManager.PrimaryColor; 37 | } 38 | } 39 | 40 | internal class MaterialMenuStripRender : ToolStripProfessionalRenderer, IMaterialControl 41 | { 42 | //Properties for managing the material design properties 43 | public int Depth { get; set; } 44 | public MaterialSkinManager SkinManager { get { return MaterialSkinManager.Instance; } } 45 | public MouseState MouseState { get; set; } 46 | 47 | protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e) 48 | { 49 | var g = e.Graphics; 50 | g.TextRenderingHint = TextRenderingHint.AntiAlias; 51 | 52 | if (e.Item.IsOnDropDown) 53 | { 54 | var itemRect = GetItemRect(e.Item); 55 | var textRect = new Rectangle(24, itemRect.Y, itemRect.Width - (24 + 16), itemRect.Height); 56 | g.DrawString(e.Text, SkinManager.ROBOTO_MEDIUM_10, e.Item.Enabled ? SkinManager.GetMainTextBrush() : SkinManager.GetDisabledOrHintBrush(), textRect, new StringFormat() { LineAlignment = StringAlignment.Center }); 57 | } 58 | else 59 | { 60 | g.DrawString(e.Text, SkinManager.ROBOTO_MEDIUM_10, Brushes.White, e.TextRectangle, new StringFormat() { LineAlignment = StringAlignment.Center }); 61 | } 62 | } 63 | 64 | protected override void OnRenderMenuItemBackground(ToolStripItemRenderEventArgs e) 65 | { 66 | var g = e.Graphics; 67 | g.Clear(SkinManager.PrimaryColor); 68 | 69 | //Draw background 70 | var itemRect = GetItemRect(e.Item); 71 | if (e.Item.IsOnDropDown) 72 | { 73 | g.FillRectangle(e.Item.Selected && e.Item.Enabled ? SkinManager.GetCmsSelectedItemBrush() : new SolidBrush(SkinManager.GetApplicationBackgroundColor()), itemRect); 74 | } 75 | else 76 | { 77 | g.FillRectangle(e.Item.Selected ? SkinManager.GetFlatButtonPressedBackgroundBrush() : SkinManager.PrimaryColorBrush, itemRect); 78 | } 79 | 80 | //Ripple animation 81 | var toolStrip = e.ToolStrip as MaterialContextMenuStrip; 82 | if (toolStrip != null) 83 | { 84 | var animationManager = toolStrip.animationManager; 85 | var animationSource = toolStrip.animationSource; 86 | if (toolStrip.animationManager.IsAnimating() && e.Item.Bounds.Contains(animationSource)) 87 | { 88 | for (int i = 0; i < animationManager.GetAnimationCount(); i++) 89 | { 90 | var animationValue = animationManager.GetProgress(i); 91 | var rippleBrush = new SolidBrush(Color.FromArgb((int)(51 - (animationValue * 50)), Color.Black)); 92 | var rippleSize = (int)(animationValue * itemRect.Width * 2.5); 93 | g.FillEllipse(rippleBrush, new Rectangle(animationSource.X - rippleSize / 2, itemRect.Y - itemRect.Height, rippleSize, itemRect.Height * 3)); 94 | } 95 | } 96 | } 97 | } 98 | 99 | protected override void OnRenderImageMargin(ToolStripRenderEventArgs e) 100 | { 101 | //base.OnRenderImageMargin(e); 102 | } 103 | 104 | protected override void OnRenderSeparator(ToolStripSeparatorRenderEventArgs e) 105 | { 106 | var g = e.Graphics; 107 | 108 | g.FillRectangle(new SolidBrush(SkinManager.GetApplicationBackgroundColor()), e.Item.Bounds); 109 | g.DrawLine(new Pen(SkinManager.GetDividersColor()), new Point(e.Item.Bounds.Left, e.Item.Bounds.Height / 2), new Point(e.Item.Bounds.Right, e.Item.Bounds.Height / 2)); 110 | } 111 | 112 | protected override void OnRenderToolStripBorder(ToolStripRenderEventArgs e) 113 | { 114 | //var g = e.Graphics; 115 | 116 | //g.DrawRectangle(new Pen(SkinManager.GetDividersColor()), new Rectangle(e.AffectedBounds.X, e.AffectedBounds.Y, e.AffectedBounds.Width - 1, e.AffectedBounds.Height - 1)); 117 | } 118 | 119 | protected override void OnRenderArrow(ToolStripArrowRenderEventArgs e) 120 | { 121 | var g = e.Graphics; 122 | const int ARROW_SIZE = 4; 123 | 124 | var arrowMiddle = new Point(e.ArrowRectangle.X + e.ArrowRectangle.Width / 2, e.ArrowRectangle.Y + e.ArrowRectangle.Height / 2); 125 | var arrowBrush = e.Item.Enabled ? SkinManager.GetMainTextBrush() : SkinManager.GetDisabledOrHintBrush(); 126 | using (var arrowPath = new GraphicsPath()) 127 | { 128 | arrowPath.AddLines(new[] { new Point(arrowMiddle.X - ARROW_SIZE, arrowMiddle.Y - ARROW_SIZE), new Point(arrowMiddle.X, arrowMiddle.Y), new Point(arrowMiddle.X - ARROW_SIZE, arrowMiddle.Y + ARROW_SIZE) }); 129 | arrowPath.CloseFigure(); 130 | 131 | g.FillPath(arrowBrush, arrowPath); 132 | } 133 | } 134 | 135 | private Rectangle GetItemRect(ToolStripItem item) 136 | { 137 | return new Rectangle(0, item.ContentRectangle.Y, item.ContentRectangle.Width + 4, item.ContentRectangle.Height); 138 | } 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialSlider.Designer.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | 31 | namespace Zeroit.Framework.MaterialWinforms.Controls 32 | { 33 | partial class MaterialSlider 34 | { 35 | /// 36 | /// Erforderliche Designervariable. 37 | /// 38 | private System.ComponentModel.IContainer components = null; 39 | 40 | /// 41 | /// Verwendete Ressourcen bereinigen. 42 | /// 43 | /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. 44 | protected override void Dispose(bool disposing) 45 | { 46 | if (disposing && (components != null)) 47 | { 48 | components.Dispose(); 49 | } 50 | base.Dispose(disposing); 51 | } 52 | 53 | #region Vom Komponenten-Designer generierter Code 54 | 55 | /// 56 | /// Erforderliche Methode für die Designerunterstützung. 57 | /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. 58 | /// 59 | private void InitializeComponent() 60 | { 61 | components = new System.ComponentModel.Container(); 62 | } 63 | 64 | #endregion 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialTabControl.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.Windows.Forms; 4 | using System.Drawing; 5 | 6 | namespace MaterialWinforms.Controls 7 | { 8 | public class MaterialTabControl : TabControl, IMaterialControl 9 | { 10 | int _CurrentPage; 11 | 12 | [Browsable(false)] 13 | public int Depth { get; set; } 14 | [Browsable(false)] 15 | public MaterialSkinManager SkinManager { get { return MaterialSkinManager.Instance; } } 16 | [Browsable(false)] 17 | public MouseState MouseState { get; set; } 18 | 19 | protected override void WndProc(ref Message m) 20 | { 21 | if (m.Msg == 0x1328 && !DesignMode) m.Result = (IntPtr)1; 22 | else base.WndProc(ref m); 23 | } 24 | 25 | public MaterialTabControl() 26 | { 27 | _CurrentPage = 0; 28 | } 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialTabSelector.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel; 3 | using System.Drawing; 4 | using System.Drawing.Text; 5 | using System.Windows.Forms; 6 | using MaterialWinforms.Animations; 7 | 8 | namespace MaterialWinforms.Controls 9 | { 10 | public class MaterialTabSelector : Control, IMaterialControl 11 | { 12 | [Browsable(false)] 13 | public int Depth { get; set; } 14 | [Browsable(false)] 15 | public MaterialSkinManager SkinManager { get { return MaterialSkinManager.Instance; } } 16 | [Browsable(false)] 17 | public MouseState MouseState { get; set; } 18 | 19 | private MaterialTabControl baseTabControl; 20 | public MaterialTabControl BaseTabControl 21 | { 22 | get { return baseTabControl; } 23 | set 24 | { 25 | baseTabControl = value; 26 | if (baseTabControl == null) return; 27 | previousSelectedTabIndex = baseTabControl.SelectedIndex; 28 | baseTabControl.Deselected += (sender, args) => 29 | { 30 | previousSelectedTabIndex = baseTabControl.SelectedIndex; 31 | }; 32 | baseTabControl.SelectedIndexChanged += (sender, args) => 33 | { 34 | animationManager.SetProgress(0); 35 | animationManager.StartNewAnimation(AnimationDirection.In); 36 | }; 37 | baseTabControl.ControlAdded += delegate 38 | { 39 | Invalidate(); 40 | }; 41 | baseTabControl.ControlRemoved += delegate 42 | { 43 | Invalidate(); 44 | }; 45 | } 46 | } 47 | 48 | private int previousSelectedTabIndex; 49 | private Point animationSource; 50 | private readonly AnimationManager animationManager; 51 | 52 | private List tabRects; 53 | private const int TAB_HEADER_PADDING = 24; 54 | private const int TAB_INDICATOR_HEIGHT = 2; 55 | 56 | public MaterialTabSelector() 57 | { 58 | SetStyle(ControlStyles.DoubleBuffer | ControlStyles.OptimizedDoubleBuffer, true); 59 | Height = 48; 60 | 61 | animationManager = new AnimationManager 62 | { 63 | AnimationType = AnimationType.EaseOut, 64 | Increment = 0.04 65 | }; 66 | animationManager.OnAnimationProgress += sender => Invalidate(); 67 | } 68 | 69 | protected override void OnPaint(PaintEventArgs e) 70 | { 71 | var g = e.Graphics; 72 | g.TextRenderingHint = TextRenderingHint.AntiAlias; 73 | 74 | g.Clear(SkinManager.ColorScheme.PrimaryColor); 75 | 76 | if (baseTabControl == null) return; 77 | 78 | if (!animationManager.IsAnimating() || tabRects == null || tabRects.Count != baseTabControl.TabCount) 79 | UpdateTabRects(); 80 | 81 | double animationProgress = animationManager.GetProgress(); 82 | 83 | //Click feedback 84 | if (animationManager.IsAnimating()) 85 | { 86 | var rippleBrush = new SolidBrush(Color.FromArgb((int)(51 - (animationProgress * 50)), Color.White)); 87 | var rippleSize = (int)(animationProgress * tabRects[baseTabControl.SelectedIndex].Width * 1.75); 88 | 89 | g.SetClip(tabRects[baseTabControl.SelectedIndex]); 90 | g.FillEllipse(rippleBrush, new Rectangle(animationSource.X - rippleSize / 2, animationSource.Y - rippleSize / 2, rippleSize, rippleSize)); 91 | g.ResetClip(); 92 | rippleBrush.Dispose(); 93 | } 94 | 95 | //Draw tab headers 96 | foreach (TabPage tabPage in baseTabControl.TabPages) 97 | { 98 | int currentTabIndex = baseTabControl.TabPages.IndexOf(tabPage); 99 | Brush textBrush = new SolidBrush(Color.FromArgb(CalculateTextAlpha(currentTabIndex, animationProgress), SkinManager.ColorScheme.TextColor)); 100 | 101 | g.DrawString( 102 | tabPage.Text.ToUpper(), 103 | SkinManager.ROBOTO_MEDIUM_10, 104 | textBrush, 105 | tabRects[currentTabIndex], 106 | new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }); 107 | textBrush.Dispose(); 108 | } 109 | 110 | //Animate tab indicator 111 | int previousSelectedTabIndexIfHasOne = previousSelectedTabIndex == -1 ? baseTabControl.SelectedIndex : previousSelectedTabIndex; 112 | Rectangle previousActiveTabRect = tabRects[previousSelectedTabIndexIfHasOne]; 113 | Rectangle activeTabPageRect = tabRects[baseTabControl.SelectedIndex]; 114 | 115 | int y = activeTabPageRect.Bottom - 2; 116 | int x = previousActiveTabRect.X + (int)((activeTabPageRect.X - previousActiveTabRect.X) * animationProgress); 117 | int width = previousActiveTabRect.Width + (int)((activeTabPageRect.Width - previousActiveTabRect.Width) * animationProgress); 118 | 119 | g.FillRectangle(SkinManager.ColorScheme.AccentBrush, x, y, width, TAB_INDICATOR_HEIGHT); 120 | } 121 | 122 | private int CalculateTextAlpha(int tabIndex, double animationProgress) 123 | { 124 | int primaryA = SkinManager.ACTION_BAR_TEXT.A; 125 | int secondaryA = SkinManager.ACTION_BAR_TEXT_SECONDARY.A; 126 | 127 | if (tabIndex == baseTabControl.SelectedIndex && !animationManager.IsAnimating()) 128 | { 129 | return primaryA; 130 | } 131 | if (tabIndex != previousSelectedTabIndex && tabIndex != baseTabControl.SelectedIndex) 132 | { 133 | return secondaryA; 134 | } 135 | if (tabIndex == previousSelectedTabIndex) 136 | { 137 | return primaryA - (int)((primaryA - secondaryA) * animationProgress); 138 | } 139 | return secondaryA + (int)((primaryA - secondaryA) * animationProgress); 140 | } 141 | 142 | protected override void OnMouseUp(MouseEventArgs e) 143 | { 144 | base.OnMouseUp(e); 145 | 146 | if (tabRects == null) UpdateTabRects(); 147 | for (int i = 0; i < tabRects.Count; i++) 148 | { 149 | if (tabRects[i].Contains(e.Location)) 150 | { 151 | baseTabControl.SelectedIndex = i; 152 | } 153 | } 154 | 155 | animationSource = e.Location; 156 | } 157 | 158 | private void UpdateTabRects() 159 | { 160 | tabRects = new List(); 161 | 162 | //If there isn't a base tab control, the rects shouldn't be calculated 163 | //If there aren't tab pages in the base tab control, the list should just be empty which has been set already; exit the void 164 | if (baseTabControl == null || baseTabControl.TabCount == 0) return; 165 | 166 | //Calculate the bounds of each tab header specified in the base tab control 167 | using (var b = new Bitmap(1, 1)) 168 | { 169 | using (var g = Graphics.FromImage(b)) 170 | { 171 | tabRects.Add(new Rectangle(SkinManager.FORM_PADDING, 0, TAB_HEADER_PADDING * 2 + (int)g.MeasureString(baseTabControl.TabPages[0].Text, SkinManager.ROBOTO_MEDIUM_10).Width, Height)); 172 | for (int i = 1; i < baseTabControl.TabPages.Count; i++) 173 | { 174 | tabRects.Add(new Rectangle(tabRects[i - 1].Right, 0, TAB_HEADER_PADDING * 2 + (int)g.MeasureString(baseTabControl.TabPages[i].Text, SkinManager.ROBOTO_MEDIUM_10).Width, Height)); 175 | } 176 | } 177 | } 178 | } 179 | } 180 | } 181 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialTimeline.Designer.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 12-18-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | 31 | namespace Zeroit.Framework.MaterialWinforms.Controls 32 | { 33 | partial class MaterialTimeline 34 | { 35 | /// 36 | /// Erforderliche Designervariable. 37 | /// 38 | private System.ComponentModel.IContainer components = null; 39 | 40 | /// 41 | /// Verwendete Ressourcen bereinigen. 42 | /// 43 | /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. 44 | protected override void Dispose(bool disposing) 45 | { 46 | if (disposing && (components != null)) 47 | { 48 | components.Dispose(); 49 | } 50 | base.Dispose(disposing); 51 | } 52 | 53 | #region Vom Komponenten-Designer generierter Code 54 | 55 | /// 56 | /// Erforderliche Methode für die Designerunterstützung. 57 | /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. 58 | /// 59 | private void InitializeComponent() 60 | { 61 | components = new System.ComponentModel.Container(); 62 | } 63 | 64 | #endregion 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialUserControl.Designer.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | namespace Zeroit.Framework.MaterialWinforms.Controls 31 | { 32 | /// 33 | /// Class MaterialUserControl. 34 | /// 35 | /// 36 | /// 37 | partial class MaterialUserControl 38 | { 39 | /// 40 | /// Erforderliche Designervariable. 41 | /// 42 | private System.ComponentModel.IContainer components = null; 43 | 44 | /// 45 | /// Verwendete Ressourcen bereinigen. 46 | /// 47 | /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. 48 | protected override void Dispose(bool disposing) 49 | { 50 | if (disposing && (components != null)) 51 | { 52 | components.Dispose(); 53 | } 54 | base.Dispose(disposing); 55 | } 56 | 57 | #region Vom Komponenten-Designer generierter Code 58 | 59 | /// 60 | /// Erforderliche Methode für die Designerunterstützung. 61 | /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. 62 | /// 63 | private void InitializeComponent() 64 | { 65 | components = new System.ComponentModel.Container(); 66 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 67 | } 68 | 69 | #endregion 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/MaterialUserControl.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 12-18-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | using System.ComponentModel; 31 | using System.Drawing; 32 | using System.Windows.Forms; 33 | 34 | namespace Zeroit.Framework.MaterialWinforms.Controls 35 | { 36 | /// 37 | /// Class MaterialUserControl. 38 | /// 39 | /// 40 | /// 41 | public partial class MaterialUserControl : UserControl,IMaterialControl 42 | { 43 | /// 44 | /// Gets or sets the depth. 45 | /// 46 | /// The depth. 47 | [Browsable(false)] 48 | public int Depth { get; set; } 49 | /// 50 | /// Gets the skin manager. 51 | /// 52 | /// The skin manager. 53 | [Browsable(false)] 54 | public MaterialSkinManager SkinManager { get { return MaterialSkinManager.Instance; } } 55 | /// 56 | /// Gets or sets the state of the mouse. 57 | /// 58 | /// The state of the mouse. 59 | [Browsable(false)] 60 | public MouseState MouseState { get; set; } 61 | 62 | /// 63 | /// Gets or sets the background color for the control. 64 | /// 65 | /// The color of the back. 66 | /// 67 | /// 68 | /// 69 | public Color BackColor { get { return SkinManager.GetApplicationBackgroundColor(); } } 70 | 71 | /// 72 | /// Initializes a new instance of the class. 73 | /// 74 | public MaterialUserControl() 75 | { 76 | InitializeComponent(); 77 | DoubleBuffered = true; 78 | } 79 | 80 | /// 81 | /// Raises the event. 82 | /// 83 | /// A that contains the event data. 84 | protected override void OnPaint(PaintEventArgs e) 85 | { 86 | e.Graphics.Clear(BackColor); 87 | 88 | foreach (Control objChild in Controls) 89 | { 90 | if (typeof(IShadowedMaterialControl).IsAssignableFrom(objChild.GetType())) 91 | { 92 | IShadowedMaterialControl objCurrent = (IShadowedMaterialControl)objChild; 93 | DrawHelper.drawShadow(e.Graphics, objCurrent.ShadowBorder, objCurrent.Elevation, SkinManager.GetApplicationBackgroundColor()); 94 | } 95 | 96 | } 97 | } 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/Settings/BackGroundDim.Designer.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | namespace Zeroit.Framework.MaterialWinforms.Controls.Settings 31 | { 32 | /// 33 | /// Class BackGroundDim. 34 | /// 35 | /// 36 | partial class BackGroundDim 37 | { 38 | /// 39 | /// Required designer variable. 40 | /// 41 | private System.ComponentModel.IContainer components = null; 42 | 43 | /// 44 | /// Clean up any resources being used. 45 | /// 46 | /// true if managed resources should be disposed; otherwise, false. 47 | protected override void Dispose(bool disposing) 48 | { 49 | if (disposing && (components != null)) 50 | { 51 | components.Dispose(); 52 | } 53 | base.Dispose(disposing); 54 | } 55 | 56 | #region Windows Form Designer generated code 57 | 58 | /// 59 | /// Required method for Designer support - do not modify 60 | /// the contents of this method with the code editor. 61 | /// 62 | private void InitializeComponent() 63 | { 64 | this.SuspendLayout(); 65 | // 66 | // BackGroundDim 67 | // 68 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 69 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 70 | this.ClientSize = new System.Drawing.Size(284, 261); 71 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 72 | this.Name = "BackGroundDim"; 73 | this.ShowIcon = false; 74 | this.ShowInTaskbar = false; 75 | this.Text = "BackGroundDim"; 76 | this.ResumeLayout(false); 77 | 78 | } 79 | 80 | #endregion 81 | } 82 | } -------------------------------------------------------------------------------- /MaterialWinforms/Controls/Settings/BackGroundDim.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | using System; 31 | using System.ComponentModel; 32 | using System.Drawing; 33 | using System.Windows.Forms; 34 | 35 | namespace Zeroit.Framework.MaterialWinforms.Controls.Settings 36 | { 37 | /// 38 | /// Class BackGroundDim. 39 | /// 40 | /// 41 | public partial class BackGroundDim : MaterialForm 42 | { 43 | 44 | /// 45 | /// Gets a value indicating whether the control can receive focus. 46 | /// 47 | /// true if this instance can focus; otherwise, false. 48 | public new bool CanFocus { get { return false; } } 49 | /// 50 | /// The is visible 51 | /// 52 | public bool IsVisible = false; 53 | 54 | /// 55 | /// The final size 56 | /// 57 | private Size finalSize; 58 | /// 59 | /// The final location 60 | /// 61 | private Point finalLocation; 62 | /// 63 | /// The form to dim 64 | /// 65 | private Form _FormToDim; 66 | 67 | /// 68 | /// Initializes a new instance of the class. 69 | /// 70 | /// The form to dim. 71 | public BackGroundDim(MaterialForm FormToDim) 72 | { 73 | _FormToDim = FormToDim; 74 | InitializeComponent(); 75 | SkinManager.AddFormToManage(this); 76 | StartPosition = FormStartPosition.Manual; 77 | Size = FormToDim.Size; 78 | MinimumSize = Size; 79 | Location = FormToDim.Location; 80 | BackColor = FormToDim.SkinManager.GetApplicationBackgroundColor(); 81 | Opacity = 0; 82 | 83 | SetStyle(ControlStyles.StandardDoubleClick, false); 84 | //Enabled = false; 85 | finalLocation = FormToDim.Location; ; 86 | finalSize = FormToDim.Size; 87 | 88 | FormToDim.LocationChanged += FormToDim_LocationChanged; 89 | } 90 | 91 | /// 92 | /// Handles the LocationChanged event of the FormToDim control. 93 | /// 94 | /// The source of the event. 95 | /// The instance containing the event data. 96 | void FormToDim_LocationChanged(object sender, EventArgs e) 97 | { 98 | Location = ((Form)sender).Location; 99 | Application.DoEvents(); 100 | } 101 | 102 | 103 | /// 104 | /// Handles the event. 105 | /// 106 | /// The instance containing the event data. 107 | protected override void OnPaint(PaintEventArgs e) 108 | { 109 | e.Graphics.Clear(SkinManager.GetApplicationBackgroundColor()); 110 | } 111 | 112 | /// 113 | /// Gets a value indicating whether the window will be activated when it is shown. 114 | /// 115 | /// true if [show without activation]; otherwise, false. 116 | protected override bool ShowWithoutActivation 117 | { 118 | get 119 | { 120 | return true; 121 | } 122 | } 123 | 124 | /// 125 | /// Handles the event. 126 | /// 127 | /// The instance containing the event data. 128 | protected override void OnResize(EventArgs e) 129 | { 130 | WindowState = FormWindowState.Normal; 131 | Size = _FormToDim.Size; 132 | Location = _FormToDim.Location; 133 | } 134 | 135 | 136 | /// 137 | /// Raises the event. 138 | /// 139 | /// An that contains the event data. 140 | protected override void OnLocationChanged(EventArgs e) 141 | { 142 | Location = _FormToDim.Location; 143 | } 144 | 145 | /// 146 | /// The wm mouseactivate 147 | /// 148 | private const int WM_MOUSEACTIVATE = 0x0021, MA_NOACTIVATE = 0x0003; 149 | 150 | /// 151 | /// WNDs the proc. 152 | /// 153 | /// The m. 154 | protected override void WndProc(ref Message m) 155 | { 156 | if (m.Msg == WM_MOUSEACTIVATE) 157 | { 158 | m.Result = (IntPtr)MA_NOACTIVATE; 159 | return; 160 | } 161 | base.WndProc(ref m); 162 | } 163 | 164 | /// 165 | /// Raises the event. 166 | /// 167 | /// A that contains the event data. 168 | protected override void OnShown(EventArgs e) 169 | { 170 | base.OnShown(e); 171 | 172 | for (int i = 0; i < 40; i++) 173 | { 174 | Opacity = Opacity + 0.02; 175 | Application.DoEvents(); 176 | System.Threading.Thread.Sleep(1); 177 | } 178 | IsVisible = true; 179 | } 180 | 181 | /// 182 | /// Raises the event. 183 | /// 184 | /// A that contains the event data. 185 | protected override void OnClosing(CancelEventArgs e) 186 | { 187 | base.OnClosing(e); 188 | 189 | for (int i = 0; i < 40; i++) 190 | { 191 | Opacity = Opacity - 0.02; 192 | Application.DoEvents(); 193 | System.Threading.Thread.Sleep(1); 194 | } 195 | IsVisible = false; 196 | } 197 | } 198 | } 199 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/Settings/BackGroundDim.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 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/Settings/ColorOverlay.Designer.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | namespace Zeroit.Framework.MaterialWinforms.Controls.Settings 31 | { 32 | /// 33 | /// Class ColorOverlay. 34 | /// 35 | /// 36 | partial class ColorOverlay 37 | { 38 | /// 39 | /// Required designer variable. 40 | /// 41 | private System.ComponentModel.IContainer components = null; 42 | 43 | /// 44 | /// Clean up any resources being used. 45 | /// 46 | /// true if managed resources should be disposed; otherwise, false. 47 | protected override void Dispose(bool disposing) 48 | { 49 | if (disposing && (components != null)) 50 | { 51 | components.Dispose(); 52 | } 53 | base.Dispose(disposing); 54 | } 55 | 56 | #region Windows Form Designer generated code 57 | 58 | /// 59 | /// Required method for Designer support - do not modify 60 | /// the contents of this method with the code editor. 61 | /// 62 | private void InitializeComponent() 63 | { 64 | this.SuspendLayout(); 65 | // 66 | // ColorOverlay 67 | // 68 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 69 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 70 | this.BackColor = System.Drawing.Color.Magenta; 71 | this.ClientSize = new System.Drawing.Size(0, 0); 72 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 73 | this.Name = "ColorOverlay"; 74 | this.ShowIcon = false; 75 | this.ShowInTaskbar = false; 76 | this.Text = "ColorOverlay"; 77 | this.TopMost = true; 78 | this.TransparencyKey = System.Drawing.Color.Magenta; 79 | this.ResumeLayout(false); 80 | 81 | } 82 | 83 | #endregion 84 | } 85 | } -------------------------------------------------------------------------------- /MaterialWinforms/Controls/Settings/ColorOverlay.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 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/Settings/MaterialSettings.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 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/Settings/MaterialThemeSettings.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 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/Settings/SchemeCreator.Designer.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | namespace Zeroit.Framework.MaterialWinforms.Controls.Settings 31 | { 32 | /// 33 | /// Class SchemeCreator. 34 | /// 35 | /// 36 | partial class SchemeCreator 37 | { 38 | /// 39 | /// Required designer variable. 40 | /// 41 | private System.ComponentModel.IContainer components = null; 42 | 43 | /// 44 | /// Clean up any resources being used. 45 | /// 46 | /// true if managed resources should be disposed; otherwise, false. 47 | protected override void Dispose(bool disposing) 48 | { 49 | if (disposing && (components != null)) 50 | { 51 | components.Dispose(); 52 | } 53 | base.Dispose(disposing); 54 | } 55 | 56 | #region Windows Form Designer generated code 57 | 58 | /// 59 | /// Required method for Designer support - do not modify 60 | /// the contents of this method with the code editor. 61 | /// 62 | private void InitializeComponent() 63 | { 64 | this.SuspendLayout(); 65 | // 66 | // ColorOverlay 67 | // 68 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 69 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 70 | this.BackColor = System.Drawing.Color.Magenta; 71 | this.ClientSize = new System.Drawing.Size(0, 0); 72 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 73 | this.Name = "ColorOverlay"; 74 | this.ShowIcon = false; 75 | this.ShowInTaskbar = false; 76 | this.Text = "ColorOverlay"; 77 | this.TopMost = true; 78 | this.TransparencyKey = System.Drawing.Color.Magenta; 79 | this.ResumeLayout(false); 80 | 81 | } 82 | 83 | #endregion 84 | } 85 | } -------------------------------------------------------------------------------- /MaterialWinforms/Controls/Settings/SchemeCreator.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 | -------------------------------------------------------------------------------- /MaterialWinforms/Controls/TimeLine/MaterialTimeLineEntry.Designer.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | namespace Zeroit.Framework.MaterialWinforms.Controls 31 | { 32 | /// 33 | /// Class MaterialTimeLineEntry. 34 | /// 35 | /// 36 | partial class MaterialTimeLineEntry 37 | { 38 | /// 39 | /// Erforderliche Designervariable. 40 | /// 41 | private System.ComponentModel.IContainer components = null; 42 | 43 | #region Vom Komponenten-Designer generierter Code 44 | 45 | /// 46 | /// Erforderliche Methode für die Designerunterstützung. 47 | /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. 48 | /// 49 | private void InitializeComponent() 50 | { 51 | components = new System.ComponentModel.Container(); 52 | } 53 | 54 | #endregion 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /MaterialWinforms/IMaterialControl.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | namespace Zeroit.Framework.MaterialWinforms 31 | { 32 | /// 33 | /// Interface IMaterialControl 34 | /// 35 | interface IMaterialControl 36 | { 37 | /// 38 | /// Gets or sets the depth. 39 | /// 40 | /// The depth. 41 | int Depth { get; set; } 42 | /// 43 | /// Gets the skin manager. 44 | /// 45 | /// The skin manager. 46 | MaterialSkinManager SkinManager { get; } 47 | /// 48 | /// Gets or sets the state of the mouse. 49 | /// 50 | /// The state of the mouse. 51 | MouseState MouseState { get; set; } 52 | 53 | /// 54 | /// Gets the color of the back. 55 | /// 56 | /// The color of the back. 57 | System.Drawing.Color BackColor { get; } 58 | 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /MaterialWinforms/IShadowedMaterialControl.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-22-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | using System.Drawing.Drawing2D; 31 | 32 | namespace Zeroit.Framework.MaterialWinforms 33 | { 34 | /// 35 | /// Interface IShadowedMaterialControl 36 | /// 37 | /// 38 | interface IShadowedMaterialControl : IMaterialControl 39 | { 40 | /// 41 | /// Gets or sets the depth. 42 | /// 43 | /// The depth. 44 | int Depth { get; set; } 45 | /// 46 | /// Gets or sets the elevation. 47 | /// 48 | /// The elevation. 49 | int Elevation { get; set; } 50 | 51 | /// 52 | /// Gets or sets the shadow border. 53 | /// 54 | /// The shadow border. 55 | GraphicsPath ShadowBorder { get; set; } 56 | /// 57 | /// Gets the skin manager. 58 | /// 59 | /// The skin manager. 60 | MaterialSkinManager SkinManager { get; } 61 | /// 62 | /// Gets or sets the state of the mouse. 63 | /// 64 | /// The state of the mouse. 65 | MouseState MouseState { get; set; } 66 | 67 | } 68 | 69 | /// 70 | /// Enum MouseState 71 | /// 72 | public enum MouseState 73 | { 74 | /// 75 | /// The hover 76 | /// 77 | HOVER, 78 | /// 79 | /// Down 80 | /// 81 | DOWN, 82 | /// 83 | /// The out 84 | /// 85 | OUT 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /MaterialWinforms/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("Zeroit.Framework.MaterialWinforms")] 8 | [assembly: AssemblyDescription("Material Designed Windows Forms Controls")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("Zeroit Dev Technlologies")] 11 | [assembly: AssemblyProduct("Zeroit.Framework.MaterialWinforms")] 12 | [assembly: AssemblyCopyright("Copyright © 2017 Zeroit Dev Technologies. All Rights Reserved.")] 13 | [assembly: AssemblyTrademark("ZDT")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("52781de3-a323-49ee-9a4f-c67280f8d328")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | //[assembly: AssemblyKeyFile("C:\\ZeroitStrongKeys.snk")] 37 | -------------------------------------------------------------------------------- /MaterialWinforms/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 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 Zeroit.Framework.MaterialWinforms.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("Zeroit.Framework.MaterialWinforms.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.Byte[]. 65 | /// 66 | internal static byte[] Roboto_Medium { 67 | get { 68 | object obj = ResourceManager.GetObject("Roboto_Medium", resourceCulture); 69 | return ((byte[])(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Byte[]. 75 | /// 76 | internal static byte[] Roboto_Regular { 77 | get { 78 | object obj = ResourceManager.GetObject("Roboto_Regular", resourceCulture); 79 | return ((byte[])(obj)); 80 | } 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /MaterialWinforms/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\Roboto-Medium.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 123 | 124 | 125 | ..\Resources\Roboto-Regular.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 126 | 127 | -------------------------------------------------------------------------------- /MaterialWinforms/Resources/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroitdev/Zeroit.Framework.MaterialWinforms/41bcf6b59d82d16596d84ddb8b8626eb3a52e2f6/MaterialWinforms/Resources/Roboto-Medium.ttf -------------------------------------------------------------------------------- /MaterialWinforms/Resources/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroitdev/Zeroit.Framework.MaterialWinforms/41bcf6b59d82d16596d84ddb8b8626eb3a52e2f6/MaterialWinforms/Resources/Roboto-Regular.ttf -------------------------------------------------------------------------------- /MaterialWinforms/UIManagers/DrawHelper.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 06-18-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | using System.Drawing; 31 | using System.Drawing.Drawing2D; 32 | 33 | /// 34 | /// Class DrawHelper. 35 | /// 36 | static class DrawHelper 37 | { 38 | /// 39 | /// Creates the round rect. 40 | /// 41 | /// The x. 42 | /// The y. 43 | /// The width. 44 | /// The height. 45 | /// The radius. 46 | /// GraphicsPath. 47 | public static GraphicsPath CreateRoundRect(float x, float y, float width, float height, float radius) 48 | { 49 | GraphicsPath gp = new GraphicsPath(); 50 | gp.AddLine(x + radius, y, x + width - (radius * 2), y); 51 | gp.AddArc(x + width - (radius * 2), y, radius * 2, radius * 2, 270, 90); 52 | 53 | gp.AddLine(x + width, y + radius, x + width, y + height - (radius * 2)); 54 | gp.AddArc(x + width - (radius * 2), y + height - (radius * 2), radius * 2, radius * 2, 0, 90); 55 | 56 | gp.AddLine(x + width - (radius * 2), y + height, x + radius, y + height); 57 | gp.AddArc(x, y + height - (radius * 2), radius * 2, radius * 2, 90, 90); 58 | 59 | gp.AddLine(x, y + height - (radius * 2), x, y + radius); 60 | gp.AddArc(x, y, radius * 2, radius * 2, 180, 90); 61 | 62 | gp.CloseFigure(); 63 | return gp; 64 | } 65 | /// 66 | /// Creates up round rect. 67 | /// 68 | /// The x. 69 | /// The y. 70 | /// The width. 71 | /// The height. 72 | /// The radius. 73 | /// GraphicsPath. 74 | public static GraphicsPath CreateUpRoundRect(float x, float y, float width, float height, float radius) 75 | { 76 | GraphicsPath gp = new GraphicsPath(); 77 | 78 | gp.AddLine(x + radius, y, x + width - (radius * 2), y); 79 | gp.AddArc(x + width - (radius * 2), y, radius * 2, radius * 2, 270, 90); 80 | 81 | gp.AddLine(x + width, y + radius, x + width, y + height - (radius * 2) + 1); 82 | gp.AddArc(x + width - (radius * 2), y + height - (radius * 2), radius * 2, 2, 0, 90); 83 | 84 | gp.AddLine(x + width, y + height, x + radius, y + height); 85 | gp.AddArc(x, y + height - (radius * 2) + 1, radius * 2, 1, 90, 90); 86 | 87 | gp.AddLine(x, y + height, x, y + radius); 88 | gp.AddArc(x, y, radius * 2, radius * 2, 180, 90); 89 | 90 | gp.CloseFigure(); 91 | return gp; 92 | } 93 | /// 94 | /// Creates the left round rect. 95 | /// 96 | /// The x. 97 | /// The y. 98 | /// The width. 99 | /// The height. 100 | /// The radius. 101 | /// GraphicsPath. 102 | public static GraphicsPath CreateLeftRoundRect(float x, float y, float width, float height, float radius) 103 | { 104 | GraphicsPath gp = new GraphicsPath(); 105 | gp.AddLine(x + radius, y, x + width - (radius * 2), y); 106 | gp.AddArc(x + width - (radius * 2), y, radius * 2, radius * 2, 270, 90); 107 | 108 | gp.AddLine(x + width, y + 0, x + width, y + height); 109 | gp.AddArc(x + width - (radius * 2), y + height - (1), radius * 2, 1, 0, 90); 110 | 111 | gp.AddLine(x + width - (radius * 2), y + height, x + radius, y + height); 112 | gp.AddArc(x, y + height - (radius * 2), radius * 2, radius * 2, 90, 90); 113 | 114 | gp.AddLine(x, y + height - (radius * 2), x, y + radius); 115 | gp.AddArc(x, y, radius * 2, radius * 2, 180, 90); 116 | 117 | gp.CloseFigure(); 118 | return gp; 119 | } 120 | /// 121 | /// Blends the color. 122 | /// 123 | /// Color of the background. 124 | /// Color of the front. 125 | /// Color. 126 | public static Color BlendColor(Color backgroundColor, Color frontColor) 127 | { 128 | double ratio = 0 / 255d; 129 | double invRatio = 1d - ratio; 130 | int r = (int)((backgroundColor.R * invRatio) + (frontColor.R * ratio)); 131 | int g = (int)((backgroundColor.G * invRatio) + (frontColor.G * ratio)); 132 | int b = (int)((backgroundColor.B * invRatio) + (frontColor.B * ratio)); 133 | return Color.FromArgb(r, g, b); 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /MaterialWinforms/UIManagers/FontManager.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : Zeroit.Framework.MaterialWinforms 3 | // Author : ZEROIT 4 | // Created : 11-22-2018 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 12-18-2018 8 | // *********************************************************************** 9 | // 10 | // This program is for creating Material Design controls. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | 31 | using Zeroit.Framework.MaterialWinforms.Properties; 32 | using System; 33 | using System.Drawing; 34 | using System.Drawing.Text; 35 | using System.Linq; 36 | using System.Runtime.InteropServices; 37 | 38 | /// 39 | /// Class FontManager. 40 | /// 41 | public class FontManager 42 | { 43 | 44 | /// 45 | /// The roboto medium15 46 | /// 47 | public Font Roboto_Medium15; 48 | /// 49 | /// The roboto medium10 50 | /// 51 | public Font Roboto_Medium10; 52 | /// 53 | /// The roboto regular10 54 | /// 55 | public Font Roboto_Regular10; 56 | 57 | 58 | /// 59 | /// The roboto medium9 60 | /// 61 | public Font Roboto_Medium9; 62 | /// 63 | /// The roboto regular9 64 | /// 65 | public Font Roboto_Regular9; 66 | 67 | 68 | /// 69 | /// Initializes a new instance of the class. 70 | /// 71 | public FontManager() 72 | { 73 | Roboto_Medium15 = new Font(LoadFont(Resources.Roboto_Medium), 15f); 74 | Roboto_Medium10 = new Font(LoadFont(Resources.Roboto_Medium), 10f); 75 | Roboto_Regular10 = new Font(LoadFont(Resources.Roboto_Regular), 10f); 76 | 77 | Roboto_Medium9 = new Font(LoadFont(Resources.Roboto_Medium), 9f); 78 | Roboto_Regular9 = new Font(LoadFont(Resources.Roboto_Regular), 9f); 79 | } 80 | 81 | /// 82 | /// Scales the text to rectangle. 83 | /// 84 | /// The g. 85 | /// The text. 86 | /// The r. 87 | /// The use regular. 88 | /// Font. 89 | public Font ScaleTextToRectangle(Graphics g,String Text, Rectangle R, Boolean UseRegular = true) 90 | { 91 | float fontSize = 1f; 92 | FontFamily FontToUse = LoadFont(UseRegular?Resources.Roboto_Regular:Resources.Roboto_Medium); 93 | 94 | Font tmpFont = new Font(FontToUse, fontSize); 95 | SizeF CurrentTextSize = g.MeasureString(Text, tmpFont); 96 | 97 | while (CurrentTextSize.Width < R.Width && CurrentTextSize.Height < R.Height) 98 | { 99 | fontSize += 0.5f; 100 | tmpFont.Dispose(); 101 | tmpFont = new Font(FontToUse, fontSize); 102 | CurrentTextSize = g.MeasureString(Text, tmpFont); 103 | } 104 | 105 | return new Font(FontToUse, fontSize-0.5f);; 106 | } 107 | 108 | /// 109 | /// The private font collection 110 | /// 111 | private PrivateFontCollection privateFontCollection = new PrivateFontCollection(); 112 | 113 | /// 114 | /// Adds the font memory resource ex. 115 | /// 116 | /// The pb font. 117 | /// The cb font. 118 | /// The PVD. 119 | /// The pc fonts. 120 | /// IntPtr. 121 | [DllImport("gdi32.dll")] 122 | private static extern IntPtr AddFontMemResourceEx(IntPtr pbFont, uint cbFont, IntPtr pvd, [In] ref uint pcFonts); 123 | 124 | /// 125 | /// Loads the font. 126 | /// 127 | /// The font resource. 128 | /// FontFamily. 129 | private FontFamily LoadFont(byte[] fontResource) 130 | { 131 | int dataLength = fontResource.Length; 132 | IntPtr fontPtr = Marshal.AllocCoTaskMem(dataLength); 133 | Marshal.Copy(fontResource, 0, fontPtr, dataLength); 134 | 135 | uint cFonts = 0; 136 | AddFontMemResourceEx(fontPtr, (uint)fontResource.Length, IntPtr.Zero, ref cFonts); 137 | privateFontCollection.AddMemoryFont(fontPtr, dataLength); 138 | 139 | return privateFontCollection.Families.Last(); 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /MaterialWinforms/Verweise/Animator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroitdev/Zeroit.Framework.MaterialWinforms/41bcf6b59d82d16596d84ddb8b8626eb3a52e2f6/MaterialWinforms/Verweise/Animator.dll -------------------------------------------------------------------------------- /MaterialWinformsExample/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /MaterialWinformsExample/MaterialWinformsExample.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.30723.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaterialWinformsExample", "MaterialWinformsExample.csproj", "{47409AA5-62AE-4189-8E83-C471502DF5E9}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {47409AA5-62AE-4189-8E83-C471502DF5E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {47409AA5-62AE-4189-8E83-C471502DF5E9}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {47409AA5-62AE-4189-8E83-C471502DF5E9}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {47409AA5-62AE-4189-8E83-C471502DF5E9}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /MaterialWinformsExample/Program.cs: -------------------------------------------------------------------------------- 1 | // *********************************************************************** 2 | // Assembly : MaterialWinformsExample 3 | // Author : ZEROIT 4 | // Created : 02-16-2019 5 | // 6 | // Last Modified By : ZEROIT 7 | // Last Modified On : 04-04-2019 8 | // *********************************************************************** 9 | // 10 | // This program is for showing how the Material Design controls work. 11 | // Copyright © 2017 Zeroit Dev Technologies 12 | // 13 | // This program is free software: you can redistribute it and/or modify 14 | // it under the terms of the GNU General Public License as published by 15 | // the Free Software Foundation, either version 3 of the License, or 16 | // (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program. If not, see . 25 | // 26 | // You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 27 | // 28 | // 29 | // *********************************************************************** 30 | using System; 31 | using System.Windows.Forms; 32 | 33 | namespace Zeroit.Framework.MaterialWinformsExample 34 | { 35 | static class Program 36 | { 37 | /// 38 | /// The main entry point for the application. 39 | /// 40 | [STAThread] 41 | static void Main() 42 | { 43 | Application.EnableVisualStyles(); 44 | Application.SetCompatibleTextRenderingDefault(false); 45 | Application.Run(new MainForm()); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /MaterialWinformsExample/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("Zeroit.Framework.MaterialWinformsExample")] 8 | [assembly: AssemblyDescription("Material Designed Windows Forms Controls Example")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("Zeroit Dev Technlologies")] 11 | [assembly: AssemblyProduct("MaterialSkinExample")] 12 | [assembly: AssemblyCopyright("Copyright © 2017 Zeroit Dev Technologies. All Rights Reserved.")] 13 | [assembly: AssemblyTrademark("ZDT")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("b3fe1c46-7ac9-4dc9-bfe7-f66f3136e410")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /MaterialWinformsExample/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 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 Zeroit.Framework.MaterialWinformsExample.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("Zeroit.Framework.MaterialWinformsExample.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 ic_action_action_search { 67 | get { 68 | object obj = ResourceManager.GetObject("ic_action_action_search", 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 ic_launcher { 77 | get { 78 | object obj = ResourceManager.GetObject("ic_launcher", 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 wallhaven_170258 { 87 | get { 88 | object obj = ResourceManager.GetObject("wallhaven-170258", resourceCulture); 89 | return ((System.Drawing.Bitmap)(obj)); 90 | } 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /MaterialWinformsExample/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\ic_launcher.ico;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 123 | 124 | 125 | ..\Resources\ic_action_action_search.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Resources\wallhaven-170258.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 129 | 130 | -------------------------------------------------------------------------------- /MaterialWinformsExample/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 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 Zeroit.Framework.MaterialWinformsExample.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.1.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 | -------------------------------------------------------------------------------- /MaterialWinformsExample/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /MaterialWinformsExample/Resources/ic_action_action_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroitdev/Zeroit.Framework.MaterialWinforms/41bcf6b59d82d16596d84ddb8b8626eb3a52e2f6/MaterialWinformsExample/Resources/ic_action_action_search.png -------------------------------------------------------------------------------- /MaterialWinformsExample/Resources/ic_launcher.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroitdev/Zeroit.Framework.MaterialWinforms/41bcf6b59d82d16596d84ddb8b8626eb3a52e2f6/MaterialWinformsExample/Resources/ic_launcher.ico -------------------------------------------------------------------------------- /MaterialWinformsExample/Resources/wallhaven-170258.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroitdev/Zeroit.Framework.MaterialWinforms/41bcf6b59d82d16596d84ddb8b8626eb3a52e2f6/MaterialWinformsExample/Resources/wallhaven-170258.jpg -------------------------------------------------------------------------------- /MaterialWinformsExample/Zeroit.Framework.MaterialWinformsExample.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {47409AA5-62AE-4189-8E83-C471502DF5E9} 8 | WinExe 9 | Properties 10 | Zeroit.Framework.MaterialWinformsExample 11 | Zeroit.Framework.MaterialWinformsExample 12 | v4.0 13 | 512 14 | 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Form 50 | 51 | 52 | MainForm.cs 53 | 54 | 55 | 56 | 57 | MainForm.cs 58 | Designer 59 | 60 | 61 | ResXFileCodeGenerator 62 | Resources.Designer.cs 63 | Designer 64 | 65 | 66 | True 67 | Resources.resx 68 | True 69 | 70 | 71 | SettingsSingleFileGenerator 72 | Settings.Designer.cs 73 | 74 | 75 | True 76 | Settings.settings 77 | True 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | {8eb7611b-68cd-4b8b-987a-11717e2b250c} 89 | Zeroit.Framework.MaterialWinforms 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 106 | -------------------------------------------------------------------------------- /Preview/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zeroitdev/Zeroit.Framework.MaterialWinforms/41bcf6b59d82d16596d84ddb8b8626eb3a52e2f6/Preview/icon.ico -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![]() 2 | 3 | 4 | 5 | ## **ZEROIT DEV MATERIAL WINFORMS** 6 | 7 | This is a library for creating Google Material style controls. This control was inspired by [Material Skin](https://github.com/IgnaceMaes/MaterialSkin). I started this project as a way of practicing the C# language. After completing this project and reading through numerous source codes from developers on [codeproject](https://www.codeproject.com/) and [github](https://github.com/), I saw it very useful to help others who intend to learn the language through publishing this project and others. 8 | 9 | However, it should be noted that this project is not without any flaws and as such, there is a higher possibility of me changing some of the code to reflect current C# conventions and best practices. 10 | 11 | 12 | 13 | ## WHERE TO FIND 14 | 15 | This library is available as a NuGet package at [nuget.org](https://www.nuget.org/packages/Zeroit.Framework.Button/). 16 | 17 | 18 | 19 | ## DONATION 20 | 21 | Much effort went into developing this project and in order to continue, it will mean you (intended user) contribute either in cash or in any form appropriate to help support this project. 22 | 23 | You can always donate your time by contributing to the project or by introducing it to others. 24 | 25 | 26 | 27 | ## CONTACT 28 | 29 | You can contact me at zeroitdevnet@gmail.com or zeroitdev@outlook.com 30 | 31 | 32 | 33 | ## TUTORIALS 34 | 35 | You can also watch my videos on [Youtube](https://www.youtube.com/channel/UCUKBnRbnKCFtvhFKROaNg6g/videos) channel to show you how you can master the use of these controls. Enjoy the videos and share it as well. Don't forget to subscribe !!! 36 | 37 | 38 | 39 | ## LICENSE 40 | 41 | 42 | Copyright © 2017 Zeroit Dev Technologies 43 | 44 | This program is free software: you can redistribute it and/or modify 45 | it under the terms of the GNU General Public License as published by 46 | the Free Software Foundation, either version 3 of the License, or 47 | (at your option) any later version. 48 | 49 | This program is distributed in the hope that it will be useful, 50 | but WITHOUT ANY WARRANTY; without even the implied warranty of 51 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 52 | GNU General Public License for more details. 53 | 54 | You should have received a copy of the GNU General Public License 55 | along with this program. If not, see . 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /Zeroit.Framework.MaterialWinforms.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26403.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zeroit.Framework.MaterialWinformsExample", "MaterialWinformsExample\Zeroit.Framework.MaterialWinformsExample.csproj", "{47409AA5-62AE-4189-8E83-C471502DF5E9}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Zeroit.Framework.MaterialWinforms", "MaterialWinforms\Zeroit.Framework.MaterialWinforms.csproj", "{C66DC264-0820-46A8-8947-26061B3BA81D}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {47409AA5-62AE-4189-8E83-C471502DF5E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {47409AA5-62AE-4189-8E83-C471502DF5E9}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {47409AA5-62AE-4189-8E83-C471502DF5E9}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {47409AA5-62AE-4189-8E83-C471502DF5E9}.Release|Any CPU.Build.0 = Release|Any CPU 20 | {C66DC264-0820-46A8-8947-26061B3BA81D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 21 | {C66DC264-0820-46A8-8947-26061B3BA81D}.Debug|Any CPU.Build.0 = Debug|Any CPU 22 | {C66DC264-0820-46A8-8947-26061B3BA81D}.Release|Any CPU.ActiveCfg = Release|Any CPU 23 | {C66DC264-0820-46A8-8947-26061B3BA81D}.Release|Any CPU.Build.0 = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-midnight --------------------------------------------------------------------------------