├── .editorconfig ├── .gitignore ├── Legacy ├── App.config ├── Form1.Designer.cs ├── Form1.cs ├── Form1.resx ├── Form2.Designer.cs ├── Form2.cs ├── Form2.resx ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resources │ ├── FontDesign.ConservativeSimplicity.Neo.Levis.Completus_0.ttf │ ├── Icon.ico │ └── segmdl2.ttf ├── ToDue.csproj ├── app.manifest └── icon [256x256].ico ├── README.md ├── ToDue.sln ├── ToDue2 FrameworkImpl ├── App.config ├── App.xaml ├── App.xaml.cs ├── ApplicationResources.cs ├── Converters │ ├── ColorConverter.cs │ ├── DateConverter.cs │ ├── NegateConverter.cs │ ├── PriorityToColorConverter.cs │ ├── PriorityToFontWeightConverter.cs │ └── VisibilityConverter.cs ├── CustomDatePicker.xaml ├── CustomDatePicker.xaml.cs ├── DragAndDropHandler.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── ObservableSortedList.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.en.Designer.cs │ ├── Resources.en.resx │ ├── Resources.resx │ ├── Resources.zh-CN.Designer.cs │ ├── Resources.zh-CN.resx │ ├── Settings.Designer.cs │ ├── Settings.settings │ └── app.manifest ├── Resources │ ├── FontDesign.ConservativeSimplicity.Neo.Levis.Completus_0.ttf │ ├── Labels.Designer.cs │ ├── Labels.resx │ ├── Labels.zh-cn.Designer.cs │ ├── Labels.zh-cn.resx │ ├── icon [256x256].ico │ └── segmdl2.ttf ├── Settings.cs ├── ToDue2.csproj ├── TodoItem.cs ├── Win32.cs ├── icon [256x256].ico ├── new.png └── packages.config ├── ToDue2 ├── App.xaml ├── App.xaml.cs ├── AssemblyInfo.cs ├── Converters │ ├── ColorConverter.cs │ ├── DateConverter.cs │ ├── NegateConverter.cs │ ├── PriorityToColorConverter.cs │ ├── PriorityToFontWeightConverter.cs │ └── VisibilityConverter.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── MyDatePicker.cs ├── ObservableSortedList.cs ├── Properties │ ├── PublishProfiles │ │ └── FolderProfile.pubxml │ ├── Settings.Designer.cs │ └── Settings.settings ├── README.md ├── Resources │ ├── FontDesign.ConservativeSimplicity.Neo.Levis.Completus_0.ttf │ ├── icon [256x256].ico │ └── segmdl2.ttf ├── ToDue2.csproj ├── TodoItem.cs ├── Win32.cs ├── design.jpg ├── icon [256x256].ico └── icon.ico ├── icon [256x256].ico ├── new.png └── new2.png /.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | 3 | # IDE0008: Use explicit type 4 | csharp_style_var_when_type_is_apparent = true 5 | 6 | # IDE0055: Fix formatting 7 | dotnet_diagnostic.IDE0055.severity = none 8 | 9 | # IDE0002: Simplify Member Access 10 | dotnet_diagnostic.IDE0002.severity = silent 11 | -------------------------------------------------------------------------------- /.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 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc 262 | 263 | *.ionide/ 264 | *.gitignore -------------------------------------------------------------------------------- /Legacy/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 0, 0 15 | 16 | 17 | AAEAAAD/////AQAAAAAAAAAMAgAAADxUb0R1ZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAHFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW1RvRHVlLlRvZG9JdGVtLCBUb0R1ZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGxdXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBAAAEFRvRHVlLlRvZG9JdGVtW10CAAAACAgJAwAAAAAAAAAEAAAABwMAAAAAAQAAAAQAAAAEDlRvRHVlLlRvZG9JdGVtAgAAAA0ECw== 18 | 19 | 20 | 1 21 | 22 | 23 | False 24 | 25 | 26 | 0 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Legacy/Form1.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace ToDue 2 | { 3 | partial class Form1 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); 33 | this.label1 = new System.Windows.Forms.Label(); 34 | this.label2 = new System.Windows.Forms.Label(); 35 | this.label3 = new System.Windows.Forms.Label(); 36 | this.label4 = new System.Windows.Forms.Label(); 37 | this.label5 = new System.Windows.Forms.Label(); 38 | this.label6 = new System.Windows.Forms.Label(); 39 | this.label7 = new System.Windows.Forms.Label(); 40 | this.label8 = new System.Windows.Forms.Label(); 41 | this.label9 = new System.Windows.Forms.Label(); 42 | this.button1 = new System.Windows.Forms.Button(); 43 | this.label10 = new System.Windows.Forms.Label(); 44 | this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components); 45 | this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components); 46 | this.SuspendLayout(); 47 | // 48 | // label1 49 | // 50 | this.label1.AutoSize = true; 51 | this.label1.BackColor = System.Drawing.Color.Transparent; 52 | this.label1.Font = new System.Drawing.Font("CONSERVATIVE SIMPLICITY-Light", 50F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 53 | this.label1.ForeColor = System.Drawing.Color.White; 54 | this.label1.Location = new System.Drawing.Point(-9, 13); 55 | this.label1.Name = "label1"; 56 | this.label1.Size = new System.Drawing.Size(118, 112); 57 | this.label1.TabIndex = 0; 58 | this.label1.Text = "T"; 59 | // 60 | // label2 61 | // 62 | this.label2.AutoSize = true; 63 | this.label2.BackColor = System.Drawing.Color.Transparent; 64 | this.label2.Font = new System.Drawing.Font("CONSERVATIVE SIMPLICITY-Light", 40F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 65 | this.label2.ForeColor = System.Drawing.Color.White; 66 | this.label2.Location = new System.Drawing.Point(66, 32); 67 | this.label2.Name = "label2"; 68 | this.label2.Size = new System.Drawing.Size(103, 89); 69 | this.label2.TabIndex = 1; 70 | this.label2.Text = "H"; 71 | // 72 | // label3 73 | // 74 | this.label3.AutoSize = true; 75 | this.label3.BackColor = System.Drawing.Color.Transparent; 76 | this.label3.Font = new System.Drawing.Font("CONSERVATIVE SIMPLICITY-Light", 40F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 77 | this.label3.ForeColor = System.Drawing.Color.White; 78 | this.label3.Location = new System.Drawing.Point(148, 32); 79 | this.label3.Name = "label3"; 80 | this.label3.Size = new System.Drawing.Size(61, 89); 81 | this.label3.TabIndex = 2; 82 | this.label3.Text = "I"; 83 | // 84 | // label4 85 | // 86 | this.label4.AutoSize = true; 87 | this.label4.BackColor = System.Drawing.Color.Transparent; 88 | this.label4.Font = new System.Drawing.Font("CONSERVATIVE SIMPLICITY-Light", 40F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 89 | this.label4.ForeColor = System.Drawing.Color.White; 90 | this.label4.Location = new System.Drawing.Point(188, 32); 91 | this.label4.Name = "label4"; 92 | this.label4.Size = new System.Drawing.Size(106, 89); 93 | this.label4.TabIndex = 3; 94 | this.label4.Text = "N"; 95 | // 96 | // label5 97 | // 98 | this.label5.AutoSize = true; 99 | this.label5.BackColor = System.Drawing.Color.Transparent; 100 | this.label5.Font = new System.Drawing.Font("CONSERVATIVE SIMPLICITY-Light", 40F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 101 | this.label5.ForeColor = System.Drawing.Color.White; 102 | this.label5.Location = new System.Drawing.Point(272, 32); 103 | this.label5.Name = "label5"; 104 | this.label5.Size = new System.Drawing.Size(101, 89); 105 | this.label5.TabIndex = 4; 106 | this.label5.Text = "G"; 107 | // 108 | // label6 109 | // 110 | this.label6.AutoSize = true; 111 | this.label6.BackColor = System.Drawing.Color.Transparent; 112 | this.label6.Font = new System.Drawing.Font("CONSERVATIVE SIMPLICITY-Light", 40F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 113 | this.label6.ForeColor = System.Drawing.Color.White; 114 | this.label6.Location = new System.Drawing.Point(351, 32); 115 | this.label6.Name = "label6"; 116 | this.label6.Size = new System.Drawing.Size(94, 89); 117 | this.label6.TabIndex = 5; 118 | this.label6.Text = "S"; 119 | this.label6.Click += new System.EventHandler(this.label6_Click); 120 | // 121 | // label7 122 | // 123 | this.label7.AutoSize = true; 124 | this.label7.BackColor = System.Drawing.Color.Transparent; 125 | this.label7.Font = new System.Drawing.Font("Source Han Sans SC ExtraLight", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 126 | this.label7.ForeColor = System.Drawing.Color.White; 127 | this.label7.Location = new System.Drawing.Point(26, 130); 128 | this.label7.Name = "label7"; 129 | this.label7.Size = new System.Drawing.Size(305, 35); 130 | this.label7.TabIndex = 6; 131 | this.label7.Text = "CMSC430 abvlibuivfhnmjml"; 132 | this.label7.Visible = false; 133 | // 134 | // label8 135 | // 136 | this.label8.AutoSize = true; 137 | this.label8.BackColor = System.Drawing.Color.Transparent; 138 | this.label8.Font = new System.Drawing.Font("Segoe MDL2 Assets", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 139 | this.label8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(1)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); 140 | this.label8.Location = new System.Drawing.Point(6, 141); 141 | this.label8.Name = "label8"; 142 | this.label8.Size = new System.Drawing.Size(24, 16); 143 | this.label8.TabIndex = 7; 144 | this.label8.Text = ""; 145 | this.label8.Visible = false; 146 | // 147 | // label9 148 | // 149 | this.label9.Anchor = System.Windows.Forms.AnchorStyles.Right; 150 | this.label9.AutoSize = true; 151 | this.label9.BackColor = System.Drawing.Color.Transparent; 152 | this.label9.Font = new System.Drawing.Font("Source Han Sans SC", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 153 | this.label9.ForeColor = System.Drawing.Color.White; 154 | this.label9.Location = new System.Drawing.Point(375, 130); 155 | this.label9.Name = "label9"; 156 | this.label9.Size = new System.Drawing.Size(67, 35); 157 | this.label9.TabIndex = 8; 158 | this.label9.Text = "1006"; 159 | this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleRight; 160 | this.label9.Visible = false; 161 | // 162 | // button1 163 | // 164 | this.button1.BackColor = System.Drawing.Color.Transparent; 165 | this.button1.FlatAppearance.BorderSize = 0; 166 | this.button1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; 167 | this.button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; 168 | this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 169 | this.button1.Font = new System.Drawing.Font("Source Han Sans SC ExtraLight", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 170 | this.button1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); 171 | this.button1.Location = new System.Drawing.Point(10, 333); 172 | this.button1.Name = "button1"; 173 | this.button1.Size = new System.Drawing.Size(400, 44); 174 | this.button1.TabIndex = 9; 175 | this.button1.Text = "Add"; 176 | this.button1.UseVisualStyleBackColor = false; 177 | this.button1.Click += new System.EventHandler(this.button1_Click); 178 | this.button1.MouseEnter += new System.EventHandler(this.button1_MouseEnter); 179 | this.button1.MouseLeave += new System.EventHandler(this.button1_MouseLeave); 180 | // 181 | // label10 182 | // 183 | this.label10.AutoSize = true; 184 | this.label10.BackColor = System.Drawing.Color.Transparent; 185 | this.label10.Font = new System.Drawing.Font("Source Han Sans SC ExtraLight", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 186 | this.label10.ForeColor = System.Drawing.Color.White; 187 | this.label10.Location = new System.Drawing.Point(26, 180); 188 | this.label10.Name = "label10"; 189 | this.label10.Size = new System.Drawing.Size(116, 35); 190 | this.label10.TabIndex = 10; 191 | this.label10.Text = "MATH241"; 192 | this.label10.Visible = false; 193 | // 194 | // notifyIcon1 195 | // 196 | this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip1; 197 | this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon"))); 198 | this.notifyIcon1.Text = "notifyIcon1"; 199 | this.notifyIcon1.Visible = true; 200 | // 201 | // contextMenuStrip1 202 | // 203 | this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(24, 24); 204 | this.contextMenuStrip1.Name = "contextMenuStrip1"; 205 | this.contextMenuStrip1.Size = new System.Drawing.Size(61, 4); 206 | // 207 | // Form1 208 | // 209 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); 210 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 211 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(255))))); 212 | this.ClientSize = new System.Drawing.Size(440, 633); 213 | this.Controls.Add(this.label10); 214 | this.Controls.Add(this.button1); 215 | this.Controls.Add(this.label9); 216 | this.Controls.Add(this.label8); 217 | this.Controls.Add(this.label7); 218 | this.Controls.Add(this.label6); 219 | this.Controls.Add(this.label5); 220 | this.Controls.Add(this.label4); 221 | this.Controls.Add(this.label3); 222 | this.Controls.Add(this.label2); 223 | this.Controls.Add(this.label1); 224 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; 225 | this.MinimumSize = new System.Drawing.Size(440, 0); 226 | this.Name = "Form1"; 227 | this.ShowInTaskbar = false; 228 | this.Text = "Todue"; 229 | this.TransparencyKey = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(255))))); 230 | this.Deactivate += new System.EventHandler(this.Form1_Deactivate); 231 | this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed); 232 | this.Load += new System.EventHandler(this.Form1_Load); 233 | this.SizeChanged += new System.EventHandler(this.Form1_SizeChanged); 234 | this.VisibleChanged += new System.EventHandler(this.Form1_VisibleChanged); 235 | this.Paint += new System.Windows.Forms.PaintEventHandler(this.Form1_Paint); 236 | this.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseDown); 237 | this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseMove); 238 | this.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseUp); 239 | this.ResumeLayout(false); 240 | this.PerformLayout(); 241 | 242 | } 243 | 244 | #endregion 245 | 246 | private System.Windows.Forms.Label label1; 247 | private System.Windows.Forms.Label label2; 248 | private System.Windows.Forms.Label label3; 249 | private System.Windows.Forms.Label label4; 250 | private System.Windows.Forms.Label label5; 251 | private System.Windows.Forms.Label label6; 252 | private System.Windows.Forms.Label label7; 253 | private System.Windows.Forms.Label label8; 254 | private System.Windows.Forms.Label label9; 255 | private System.Windows.Forms.Button button1; 256 | private System.Windows.Forms.Label label10; 257 | private System.Windows.Forms.NotifyIcon notifyIcon1; 258 | private System.Windows.Forms.ContextMenuStrip contextMenuStrip1; 259 | } 260 | } 261 | 262 | -------------------------------------------------------------------------------- /Legacy/Form1.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 | 124 | 170, 17 125 | 126 | 127 | 128 | 129 | AAABAAEAAAAAAAEAIABLCAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAEAAAABAAgGAAAAXHKoZgAAAAlw 130 | SFlzAAAOxAAADsQBlSsOGwAAB/1JREFUeJzt3L1uVdkdxuE1Ugrbd4CERJMq6aiYAs1cBJrO5TAFQZpi 131 | GhBxwSBoKJCYFJjSre9hRqKhoktSJIpkyZLvwHaZghxyZsuY87E/1trv83SRIuY06/f+sY2/+vqb774t 132 | pfxagDS//WHqTwBMRwAgmABAMAGAYAIAwQQAggkABBMACCYAEEwAIJgAQDABgGACAMEEAIIJAAQTAAgm 133 | ABBMACCYAEAwAYBgAgDBBACCCQAEEwAIJgAQbLQA/PlPfyxP//qXsf5z0Ky//+Pf5eDnX0b5b7kAIJgA 134 | QDABgGACAMEEAIIJAAQTAAgmABBMACCYAEAwAYBgAgDBBACCCQAEEwAIJgAQTAAgmABAMAGAYAIAwQQA 135 | ggkABBMACCYAEEwAIJgAQDABgGACAMEEAIIJAAQTAAgmABBMACCYAEAwAYBgAgDBBABKKecXl2Vvd2fq 136 | jzE6ASDeyelZefLidSmllKO/PZ/404xLAIh2cnpWnr96++l/v3v/ody9c3vCTzQuASDW8vIvHB4dl8Oj 137 | 45hLQACItbz8XSmXgAAQZ3H2n19cfvb/k3IJCABxvvT4l839EhAAYqyy/F1zvwQEgBjrPv5lc70EBIDZ 138 | 22T5u+Z6CQgAs7ft4182t0tAAJitPpa/a26XgAAwS1f9kE+f9h88Lvf37zV/DQgAs9P98d6hHB4dCwDU 139 | ZOjl72r9EhAAZmOs5e9q+RIQAGZh7OXv2n/wuMkvDAoAzZtq+bta/BahANC0qZd/WYvfIhQAmlXL8rdM 140 | AGhSTcu/cPfO7XJ//97UH2MtAkCTalz+1h5/KQJAY4b48d4+tPT3/mUCQFNqfPytfeV/mQDQBMs/DAGg 141 | CTU+/paXf0EAqJrlH5YAULUaH/8cln9BAKiS5R+HAFClGh//nJZ/QQCoiuUflwBQlRof/xyXf0EAqILl 142 | n4YAMDn/sGc6AsCkav0nvQmPvxQBYEKWf3oCwCQsfx0EgNFZ/noIAKOy/HURAEZj+esjAIzG8tdHABic 143 | H/KplwAwuBof/5x/vHcdAsBgLH/9BIDB1Pj4Lf/vCQC9s/ztEAB6V+Pjt/xXEwB6Y/nbIwD0psbHb/mv 144 | JwBszfK3SwDYWo2P3/KvRgDYmOVvnwCwsRofv+VfjwCs4eT0rNy6eWPqjzE5yz8fArCCd+8/lMOj41JK 145 | KXu7O+XNy4OJP9F0/JPeeRGAFSwefymlnF9cxl4CfpnH/AjANZaXf9mTF6/jLgHLP08CcI2rHv9C0iVg 146 | +edLAK7wueXvSrgEalz+UnzBry8CcIVVHv/C3C+BGpfft/r6IwBLVl3+ricvXpdnjx7OKgK+1ZdBAJZs 147 | 8vgXnr96Wx7/+P1sIlDj47f8/ROAsvnyLzu/uCxPXrwub14elL3dnZ4+2fgsfxYBKNstf9fiEmg1AjU+ 148 | fss/nPgA7D943Oufd3J6Vn746Wlzl4DlzxQdgHfvPwz2Z7d2CdT4+C3/8GID0Pfyd7VyCVj+bJEBGHL5 149 | u2q/BGp8/JZ/PHEBGHr5u2q9BCw/pYQFYMzl76rtEqjx8Vv+8cUEYOzl76rlErD8LIsIwJTL3zX1JVDj 150 | 47f804kIwD//9Z+pP8InU10Clp+rRATg/v69qq6AUsa/BGp8/JZ/ehEBKOXj0hweHVcTgrEuAcvPdWIC 151 | UErmJVDj47f89YgKQClZl8APPz2t7vFb/rrEBaCU//8uuVoiUMrHx3rr5o3y7NHDrf8sZz+rigxAKXVG 152 | 4OT0rJxfXG59CdT4+J39dYoNQCl1RmCbvw5YftYVHYBS5vWFwRofv+WvW3wASmn/C4OWn00JwP+0fAnU 153 | +PgtfxsEYElrl4DlZ1sC0NHSJVDj47f8bRGAK9R+CVh++iIAn1HzJVDj47f8bRKAa9R6CdTG8rdLAL6g 154 | xkugJpa/bQKwgtougVpY/vYJwIpcAr9n+edBANbgEvjI8s+HAKwp/RKw/PMiABtIvQQs//wIwIbSLgHL 155 | P08CsIU3Lw/K81dvy8np2dQfZVCWf74EYAt7uzvl8Y/fV/nDOX2x/PMmAFva290pb14ezDICd+/c/vRb 156 | k5gnAejBIgJz+uuAsz+DAPRkTn8dcPbnEIAezeESsPxZBKBnLV8Clj+PAAygxUvA8mcSgIG0dAlY/lwC 157 | MKAWLgHLn00ABlbzJWD5EYAR1HgJWH5KEYDR1HQJWH4WBGBENVwClp9lAjCyKS8By0+XAExgikvA8nMV 158 | AZjImJeA5edzBGBCY1wClp/rCMDEhrwELD9fIgAVGOIS8Ms8WIUAVKLPS8DjZ1UCUJE+fr2Yx886BKAy 159 | e7s75dbNGxv9VcDjZ10CUKFnjx6W84vLtS4Bj59NCECl1vnCoG/1sSkBqNgqXxj0rT62IQCVu+4SsPxs 160 | SwAacNUlYPnpgwA0YvkSePbo4dQfh5kQgIYsLgHoiwA0Zm93Z+qPwIwIAAQTAAgmABBMACCYAEAwAYBg 161 | AgDBBACCCQAEEwAIJgAQTAAgmABAMAGAYAIAwQQAggkABBMACCYAEEwAIJgAQDABgGACAMEEAIIJAAQT 162 | AAgmABBMACCYAEAwAYBgAgDBBACCCQAEEwAIJgAQTAAgmABAMAGAYAIAwQQAggkABPvq62+++7aU8uvU 163 | HwQY3W8uAAgmABBMACCYAEAwAYBgAgDBBACCCQAEEwAIJgAQTAAgmABAMAGAYAIAwQQAggkABBMACCYA 164 | EEwAIJgAQDABgGACAMEEAIIJAAQTAAj2X5lNSLpAVKW0AAAAAElFTkSuQmCC 165 | 166 | 167 | -------------------------------------------------------------------------------- /Legacy/Form2.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace ToDue 2 | { 3 | partial class Form2 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.button1 = new System.Windows.Forms.Button(); 32 | this.textBox1 = new System.Windows.Forms.TextBox(); 33 | this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker(); 34 | this.button2 = new System.Windows.Forms.Button(); 35 | this.SuspendLayout(); 36 | // 37 | // button1 38 | // 39 | this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 40 | this.button1.Font = new System.Drawing.Font("Source Han Sans SC ExtraLight", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 41 | this.button1.Location = new System.Drawing.Point(188, 108); 42 | this.button1.Name = "button1"; 43 | this.button1.Size = new System.Drawing.Size(131, 33); 44 | this.button1.TabIndex = 0; 45 | this.button1.Text = "OK"; 46 | this.button1.UseVisualStyleBackColor = true; 47 | this.button1.Click += new System.EventHandler(this.button1_Click); 48 | // 49 | // textBox1 50 | // 51 | this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 52 | this.textBox1.Font = new System.Drawing.Font("Source Han Sans SC ExtraLight", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 53 | this.textBox1.Location = new System.Drawing.Point(12, 12); 54 | this.textBox1.Name = "textBox1"; 55 | this.textBox1.Size = new System.Drawing.Size(307, 31); 56 | this.textBox1.TabIndex = 1; 57 | // 58 | // dateTimePicker1 59 | // 60 | this.dateTimePicker1.CalendarFont = new System.Drawing.Font("Source Han Sans SC ExtraLight", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 61 | this.dateTimePicker1.Font = new System.Drawing.Font("Source Han Sans SC ExtraLight", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 62 | this.dateTimePicker1.Location = new System.Drawing.Point(12, 60); 63 | this.dateTimePicker1.Name = "dateTimePicker1"; 64 | this.dateTimePicker1.Size = new System.Drawing.Size(307, 31); 65 | this.dateTimePicker1.TabIndex = 2; 66 | // 67 | // button2 68 | // 69 | this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; 70 | this.button2.Font = new System.Drawing.Font("Source Han Sans SC ExtraLight", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 71 | this.button2.Location = new System.Drawing.Point(12, 108); 72 | this.button2.Name = "button2"; 73 | this.button2.Size = new System.Drawing.Size(131, 33); 74 | this.button2.TabIndex = 3; 75 | this.button2.Text = "Cancel"; 76 | this.button2.UseVisualStyleBackColor = true; 77 | // 78 | // Form2 79 | // 80 | this.AcceptButton = this.button1; 81 | this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); 82 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 83 | this.BackColor = System.Drawing.Color.White; 84 | this.CancelButton = this.button2; 85 | this.ClientSize = new System.Drawing.Size(331, 159); 86 | this.Controls.Add(this.button2); 87 | this.Controls.Add(this.dateTimePicker1); 88 | this.Controls.Add(this.textBox1); 89 | this.Controls.Add(this.button1); 90 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; 91 | this.MaximizeBox = false; 92 | this.MinimizeBox = false; 93 | this.Name = "Form2"; 94 | this.ShowIcon = false; 95 | this.ShowInTaskbar = false; 96 | this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; 97 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 98 | this.ResumeLayout(false); 99 | this.PerformLayout(); 100 | 101 | } 102 | 103 | #endregion 104 | 105 | private System.Windows.Forms.Button button1; 106 | private System.Windows.Forms.TextBox textBox1; 107 | private System.Windows.Forms.DateTimePicker dateTimePicker1; 108 | private System.Windows.Forms.Button button2; 109 | } 110 | } -------------------------------------------------------------------------------- /Legacy/Form2.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Runtime.Serialization.Formatters.Binary; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | using System.Windows.Forms; 12 | using ToDue.Properties; 13 | 14 | namespace ToDue 15 | { 16 | public partial class Form2 : Form 17 | { 18 | public Form2(Form1 parent) 19 | { 20 | InitializeComponent(); 21 | 22 | _Parent = parent; 23 | } 24 | 25 | private Form1 _Parent; 26 | 27 | private void button1_Click(object sender, EventArgs e) 28 | { 29 | var content = textBox1.Text; 30 | var date = dateTimePicker1.Value; 31 | _Parent.ListView.Add(content, date); 32 | _Parent.RedrawAll(); 33 | _Parent.SaveTodoList(); 34 | this.Close(); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Legacy/Form2.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 | -------------------------------------------------------------------------------- /Legacy/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Threading.Tasks; 7 | using System.Windows.Forms; 8 | 9 | namespace ToDue 10 | { 11 | static class Program 12 | { 13 | /// 14 | /// The main entry point for the application. 15 | /// 16 | [STAThread] 17 | static void Main() 18 | { 19 | Process mypid = Process.GetCurrentProcess(); 20 | IEnumerable pc = Process 21 | .GetProcessesByName(Path.GetFileNameWithoutExtension(Application.ExecutablePath)) 22 | .Where(pcs => pcs.MainModule.FileName == mypid.MainModule.FileName && pcs.Id != mypid.Id); 23 | if (pc.Count() > 0) 24 | { 25 | pc.ToList().ForEach(p => p.Kill()); 26 | } 27 | 28 | Application.EnableVisualStyles(); 29 | Application.SetCompatibleTextRenderingDefault(false); 30 | Environment.CurrentDirectory = Path.GetDirectoryName(Application.ExecutablePath); 31 | Application.Run(new Form1()); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Legacy/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ToDue")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("ToDue")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("e9eaa516-7137-4ce8-8757-67272afe1c84")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Legacy/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 ToDue.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", "16.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("ToDue.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[] ConservativeSimplicity { 67 | get { 68 | object obj = ResourceManager.GetObject("ConservativeSimplicity", resourceCulture); 69 | return ((byte[])(obj)); 70 | } 71 | } 72 | 73 | /// 74 | /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). 75 | /// 76 | internal static System.Drawing.Icon icon__256x256_ { 77 | get { 78 | object obj = ResourceManager.GetObject("icon__256x256_", resourceCulture); 79 | return ((System.Drawing.Icon)(obj)); 80 | } 81 | } 82 | 83 | /// 84 | /// Looks up a localized resource of type System.Byte[]. 85 | /// 86 | internal static byte[] segmdl2 { 87 | get { 88 | object obj = ResourceManager.GetObject("segmdl2", resourceCulture); 89 | return ((byte[])(obj)); 90 | } 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /Legacy/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\FontDesign.ConservativeSimplicity.Neo.Levis.Completus_0.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 123 | 124 | 125 | ..\icon [256x256].ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a 126 | 127 | 128 | ..\Resources\segmdl2.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 129 | 130 | -------------------------------------------------------------------------------- /Legacy/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 ToDue.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.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 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("0, 0")] 29 | public global::System.Drawing.Point StartupLocation { 30 | get { 31 | return ((global::System.Drawing.Point)(this["StartupLocation"])); 32 | } 33 | set { 34 | this["StartupLocation"] = value; 35 | } 36 | } 37 | 38 | [global::System.Configuration.UserScopedSettingAttribute()] 39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 40 | [global::System.Configuration.DefaultSettingValueAttribute(@"AAEAAAD/////AQAAAAAAAAAMAgAAADxUb0R1ZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAHFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW1RvRHVlLlRvZG9JdGVtLCBUb0R1ZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGxdXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBAAAEFRvRHVlLlRvZG9JdGVtW10CAAAACAgJAwAAAAAAAAAEAAAABwMAAAAAAQAAAAQAAAAEDlRvRHVlLlRvZG9JdGVtAgAAAA0ECw==")] 41 | public string TodoItems { 42 | get { 43 | return ((string)(this["TodoItems"])); 44 | } 45 | set { 46 | this["TodoItems"] = value; 47 | } 48 | } 49 | 50 | [global::System.Configuration.UserScopedSettingAttribute()] 51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 52 | [global::System.Configuration.DefaultSettingValueAttribute("1")] 53 | public double Opacity { 54 | get { 55 | return ((double)(this["Opacity"])); 56 | } 57 | set { 58 | this["Opacity"] = value; 59 | } 60 | } 61 | 62 | [global::System.Configuration.UserScopedSettingAttribute()] 63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [global::System.Configuration.DefaultSettingValueAttribute("False")] 65 | public bool IsLightMode { 66 | get { 67 | return ((bool)(this["IsLightMode"])); 68 | } 69 | set { 70 | this["IsLightMode"] = value; 71 | } 72 | } 73 | 74 | [global::System.Configuration.UserScopedSettingAttribute()] 75 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 76 | [global::System.Configuration.DefaultSettingValueAttribute("0")] 77 | public int Counter { 78 | get { 79 | return ((int)(this["Counter"])); 80 | } 81 | set { 82 | this["Counter"] = value; 83 | } 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /Legacy/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 0, 0 7 | 8 | 9 | AAEAAAD/////AQAAAAAAAAAMAgAAADxUb0R1ZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAHFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW1RvRHVlLlRvZG9JdGVtLCBUb0R1ZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGxdXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBAAAEFRvRHVlLlRvZG9JdGVtW10CAAAACAgJAwAAAAAAAAAEAAAABwMAAAAAAQAAAAQAAAAEDlRvRHVlLlRvZG9JdGVtAgAAAA0ECw== 10 | 11 | 12 | 1 13 | 14 | 15 | False 16 | 17 | 18 | 0 19 | 20 | 21 | -------------------------------------------------------------------------------- /Legacy/Resources/FontDesign.ConservativeSimplicity.Neo.Levis.Completus_0.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/Legacy/Resources/FontDesign.ConservativeSimplicity.Neo.Levis.Completus_0.ttf -------------------------------------------------------------------------------- /Legacy/Resources/Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/Legacy/Resources/Icon.ico -------------------------------------------------------------------------------- /Legacy/Resources/segmdl2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/Legacy/Resources/segmdl2.ttf -------------------------------------------------------------------------------- /Legacy/ToDue.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {E9EAA516-7137-4CE8-8757-67272AFE1C84} 8 | WinExe 9 | ToDue 10 | ToDue 11 | v4.6 12 | 512 13 | true 14 | true 15 | 16 | publish\ 17 | true 18 | Disk 19 | false 20 | Foreground 21 | 7 22 | Days 23 | false 24 | false 25 | true 26 | 0 27 | 1.0.0.%2a 28 | false 29 | false 30 | true 31 | 32 | 33 | AnyCPU 34 | true 35 | full 36 | false 37 | bin\Debug\ 38 | DEBUG;TRACE 39 | prompt 40 | 4 41 | 42 | 43 | AnyCPU 44 | pdbonly 45 | true 46 | bin\Release\ 47 | TRACE 48 | prompt 49 | 4 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | app.manifest 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | Form 79 | 80 | 81 | Form1.cs 82 | 83 | 84 | Form 85 | 86 | 87 | Form2.cs 88 | 89 | 90 | 91 | 92 | Form1.cs 93 | 94 | 95 | Form2.cs 96 | 97 | 98 | ResXFileCodeGenerator 99 | Resources.Designer.cs 100 | Designer 101 | 102 | 103 | True 104 | Resources.resx 105 | True 106 | 107 | 108 | .editorconfig 109 | 110 | 111 | 112 | SettingsSingleFileGenerator 113 | Settings.Designer.cs 114 | 115 | 116 | True 117 | Settings.settings 118 | True 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | False 127 | Microsoft .NET Framework 4.6 %28x86 and x64%29 128 | true 129 | 130 | 131 | False 132 | .NET Framework 3.5 SP1 133 | false 134 | 135 | 136 | 137 | 138 | icon [256x256].ico 139 | 140 | 141 | 142 | 143 | 144 | 145 | -------------------------------------------------------------------------------- /Legacy/app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 52 | 53 | 54 | true 55 | 56 | 57 | 58 | 59 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /Legacy/icon [256x256].ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/Legacy/icon [256x256].ico -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ToDue 2 | 3 | ## What is it? 4 | 5 | It's basically a todo list. 6 | 7 | Originally I planned to implement it as a *Rainmeter* widget, but failed for all sorts of reasons. 8 | 9 | ## What are the unique features? 10 | 11 | - [x] It is simple and concise, more of a resemblance of the classical sticky-note-on-monitor solution 12 | - [x] It pins on desktop just like a *Windows 7* gadget. Great for reminding people (especially me) that they have works to do, but without the hassle of constantly buying sticky notes and make the monitor look messy 13 | - [x] It also shows the due dates, color coded in a helpful way 14 | - [x] You can pin items and reorganize them with total freedom (given that the "auto reordering" option is turned off) 15 | - [x] You can highlight the even more important todo items 16 | 17 | ## Screenshots 18 | 19 | design 20 | 21 | 22 | 23 | new 24 | 25 | ## Other 26 | 27 | - It automatically create a shortcut in `Startup` folder to make it automatically start on *Windows* start. You can always disable it in the task manager. 28 | - It is intentionally hidden from the "Application" category in the task manager, so that Win + Tab won't show it 29 | - The font `segmdl2` is copyrighted by *Microsoft* 30 | - The font `CONSERVATIVE SIMPLICITY` is created by myself. It is not allowed for commercial purposes. For more copyright info, please visit my [*Behance* page](https://www.behance.net/gallery/49352569/Font-Design-Conservative-Simplicity) 31 | 32 | --- 33 | 34 | ## Checklist 35 | 36 | - [x] Transparent background 37 | - [x] Title 38 | - [x] Todo item data structure 39 | - [x] List view of items 40 | - [x] Layout 41 | - [x] Adaptive 42 | - [x] Meet design style 43 | - [x] Data binding 44 | - [x] *Remove* button 45 | - [x] Item name 46 | - [x] Data 47 | - [x] Style 48 | - [x] Visual Style 49 | - [x] *Remove* button 50 | - [x] Item name 51 | - [x] Data 52 | - [x] Add button 53 | - [x] Application logic 54 | - [x] Building domain model from inputs 55 | - [x] Adding & Sorting 56 | - [x] Style 57 | - [x] Visual Style 58 | - [x] Layout 59 | - [x] Separator 60 | - [x] Draggable interface 61 | - [x] Keep on desktop 62 | - [x] Show in notification area 63 | - [x] Setting transparency 64 | - [x] Switching between light/dark mode 65 | - [x] Exit 66 | - [x] Reset position 67 | - [x] An icon 68 | - [x] Read from/write to file 69 | - [x] Embed fonts 70 | - [x] Start on bootup -------------------------------------------------------------------------------- /ToDue.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30204.135 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5C779A20-ADAF-4324-BE3C-C4DADEBC46EE}" 7 | ProjectSection(SolutionItems) = preProject 8 | .editorconfig = .editorconfig 9 | EndProjectSection 10 | EndProject 11 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToDue", "Legacy\ToDue.csproj", "{E9EAA516-7137-4CE8-8757-67272AFE1C84}" 12 | EndProject 13 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToDue2", "ToDue2 FrameworkImpl\ToDue2.csproj", "{B3083B23-76EE-4CEE-97AF-D99681CF1261}" 14 | EndProject 15 | Global 16 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 17 | Debug|Any CPU = Debug|Any CPU 18 | Release|Any CPU = Release|Any CPU 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {E9EAA516-7137-4CE8-8757-67272AFE1C84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {E9EAA516-7137-4CE8-8757-67272AFE1C84}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {E9EAA516-7137-4CE8-8757-67272AFE1C84}.Release|Any CPU.ActiveCfg = Release|Any CPU 24 | {E9EAA516-7137-4CE8-8757-67272AFE1C84}.Release|Any CPU.Build.0 = Release|Any CPU 25 | {B3083B23-76EE-4CEE-97AF-D99681CF1261}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 26 | {B3083B23-76EE-4CEE-97AF-D99681CF1261}.Debug|Any CPU.Build.0 = Debug|Any CPU 27 | {B3083B23-76EE-4CEE-97AF-D99681CF1261}.Release|Any CPU.ActiveCfg = Release|Any CPU 28 | {B3083B23-76EE-4CEE-97AF-D99681CF1261}.Release|Any CPU.Build.0 = Release|Any CPU 29 | EndGlobalSection 30 | GlobalSection(SolutionProperties) = preSolution 31 | HideSolutionNode = FALSE 32 | EndGlobalSection 33 | GlobalSection(ExtensibilityGlobals) = postSolution 34 | SolutionGuid = {A916CF9D-DE0D-4A53-B3E3-84DA4CF887DE} 35 | EndGlobalSection 36 | EndGlobal 37 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 0 19 | 20 | 21 | 0 22 | 23 | 24 | True 25 | 26 | 27 | 1 28 | 29 | 30 | 31 | 32 | 33 | 0.75 34 | 35 | 36 | -50 37 | 38 | 39 | 0 40 | 41 | 42 | -80 43 | 44 | 45 | False 46 | 47 | 48 | True 49 | 50 | 51 | True 52 | 53 | 54 | True 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 0 63 | 64 | 65 | 0 66 | 67 | 68 | True 69 | 70 | 71 | 1 72 | 73 | 74 | 75 | 76 | 77 | True 78 | 79 | 80 | False 81 | 82 | 83 | True 84 | 85 | 86 | 0.75 87 | 88 | 89 | -50 90 | 91 | 92 | 0 93 | 94 | 95 | -80 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Diagnostics; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Reflection; 9 | using System.Runtime.InteropServices; 10 | using System.Threading; 11 | using System.Threading.Tasks; 12 | using System.Windows; 13 | using System.Windows.Interop; 14 | using System.Windows.Media; 15 | 16 | namespace ToDue2 17 | { 18 | /// 19 | /// Interaction logic for App.xaml 20 | /// 21 | public partial class App : Application 22 | { 23 | [DllImport("user32.dll")] 24 | [return: MarshalAs(UnmanagedType.Bool)] 25 | public static extern bool SetForegroundWindow(IntPtr hWnd); 26 | 27 | protected override void OnStartup(StartupEventArgs e) 28 | { 29 | if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1) 30 | { 31 | Environment.Exit(-2); 32 | return; 33 | } 34 | 35 | TryAddToStartupLocation(); 36 | 37 | base.OnStartup(e); 38 | } 39 | 40 | public void TryAddToStartupLocation() 41 | { 42 | string startup = Environment.GetFolderPath(Environment.SpecialFolder.Startup); 43 | if (!Directory.Exists(startup)) return; 44 | 45 | var path = $"{startup}\\ToDue2.url"; 46 | if (!File.Exists(path)) 47 | { 48 | using (StreamWriter writer = new StreamWriter(path)) 49 | { 50 | string app = Assembly.GetExecutingAssembly().Location; 51 | writer.WriteLine("[InternetShortcut]"); 52 | writer.WriteLine("URL=file:///" + app); 53 | writer.WriteLine("IconIndex=0"); 54 | string icon = app.Replace('\\', '/'); 55 | writer.WriteLine("IconFile=" + icon); 56 | } 57 | } 58 | } 59 | 60 | public void TryRemoveFromStartupLocation() 61 | { 62 | string startup = Environment.GetFolderPath(Environment.SpecialFolder.Startup); 63 | if (!Directory.Exists(startup)) return; 64 | 65 | var path = $"{startup}\\ToDue2"; 66 | if (File.Exists(path)) 67 | { 68 | File.Delete(path); 69 | } 70 | } 71 | 72 | public static bool IsValidDate(DateTime? date) 73 | { 74 | return date != null && date >= DateTime.Now.Subtract(TimeSpan.FromDays(7)); 75 | } 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/ApplicationResources.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Globalization; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading; 8 | using System.Threading.Tasks; 9 | using ToDue2.Resources; 10 | 11 | namespace ToDue2 12 | { 13 | public class ApplicationResources 14 | { 15 | public static ApplicationResources Current { get; private set; } 16 | 17 | public ApplicationResources() 18 | { 19 | Current = this; 20 | Labels = new Labels(); 21 | } 22 | 23 | public Labels Labels { get; set; } 24 | 25 | private string _language; 26 | 27 | /// 28 | /// 获取或设置 Language 的值 29 | /// 30 | public string Language 31 | { 32 | get { return _language; } 33 | set 34 | { 35 | if (_language == value) 36 | return; 37 | 38 | _language = value; 39 | var cultureInfo = new CultureInfo(value); 40 | Thread.CurrentThread.CurrentUICulture = cultureInfo; 41 | Thread.CurrentThread.CurrentCulture = cultureInfo; 42 | Labels.Culture = cultureInfo; 43 | 44 | RaiseProoertyChanged(); 45 | } 46 | } 47 | 48 | 49 | public event PropertyChangedEventHandler PropertyChanged; 50 | 51 | public void ChangeCulture(System.Globalization.CultureInfo cultureInfo) 52 | { 53 | Thread.CurrentThread.CurrentUICulture = cultureInfo; 54 | Thread.CurrentThread.CurrentCulture = cultureInfo; 55 | Labels.Culture = cultureInfo; 56 | 57 | if (Current != null) 58 | Current.RaiseProoertyChanged(); 59 | } 60 | 61 | public void RaiseProoertyChanged() 62 | { 63 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("")); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Converters/ColorConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Text; 5 | using System.Windows.Data; 6 | using System.Windows.Controls; 7 | using System.Windows; 8 | 9 | namespace ToDue2.Converters 10 | { 11 | class ColorConverter : IValueConverter 12 | { 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | var diff = (DateTime)(value ?? DateTime.MinValue) - DateTime.Now; 16 | if (diff >= TimeSpan.FromDays(7)) 17 | { 18 | return Application.Current?.Resources["OK"]; 19 | } 20 | else if (diff >= TimeSpan.FromDays(1)) 21 | { 22 | return Application.Current?.Resources["Warning"]; 23 | } 24 | else if (diff >= TimeSpan.FromDays(-7)) 25 | { 26 | return Application.Current?.Resources["Alert"]; 27 | } 28 | else 29 | { 30 | return Application.Current?.Resources["PressedBackground"]; 31 | } 32 | } 33 | 34 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 35 | { 36 | throw new NotImplementedException(); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Converters/DateConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Text; 5 | using System.Windows.Data; 6 | 7 | namespace ToDue2.Converters 8 | { 9 | public class DateConverter : IValueConverter 10 | { 11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 12 | { 13 | var date = (DateTime)(value ?? DateTime.MinValue); 14 | if (App.IsValidDate(date)) return $"{date.Month:00}/{date.Day:00}"; 15 | else return "None"; 16 | } 17 | 18 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 19 | { 20 | throw new NotImplementedException(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Converters/NegateConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Text; 5 | using System.Windows.Data; 6 | using System.Windows.Controls; 7 | using System.Windows; 8 | 9 | namespace ToDue2.Converters 10 | { 11 | class NegateConverter : IValueConverter 12 | { 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | return !(bool)value; 16 | } 17 | 18 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 19 | { 20 | return !(bool)value; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Converters/PriorityToColorConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Text; 5 | using System.Windows.Data; 6 | using System.Windows.Controls; 7 | using System.Windows; 8 | 9 | namespace ToDue2.Converters 10 | { 11 | class PriorityToColorConverter : IValueConverter 12 | { 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | if ((bool)(value ?? false)) 16 | { 17 | return Application.Current?.Resources["Alert"]; 18 | } 19 | else 20 | { 21 | return App.Current?.Resources["Foreground"]; 22 | } 23 | } 24 | 25 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 26 | { 27 | throw new NotImplementedException(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Converters/PriorityToFontWeightConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Text; 5 | using System.Windows.Data; 6 | using System.Windows.Controls; 7 | using System.Windows; 8 | 9 | namespace ToDue2.Converters 10 | { 11 | class PriorityToFontWeightConverter : IValueConverter 12 | { 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | if ((bool)(value ?? false)) 16 | { 17 | return "Regular"; 18 | } 19 | else 20 | { 21 | return "Light"; 22 | } 23 | } 24 | 25 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 26 | { 27 | throw new NotImplementedException(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Converters/VisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Text; 5 | using System.Windows.Data; 6 | using System.Windows.Controls; 7 | using System.Windows; 8 | 9 | namespace ToDue2.Converters 10 | { 11 | class VisibilityConverter : IValueConverter 12 | { 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | if ((bool)value) 16 | { 17 | return Visibility.Visible; 18 | } 19 | else 20 | { 21 | return Visibility.Collapsed; 22 | } 23 | } 24 | 25 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 26 | { 27 | throw new NotImplementedException(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/CustomDatePicker.xaml: -------------------------------------------------------------------------------- 1 |  12 | 13 | 14 | 15 | 16 | 17 | 86 | 94 | 95 | 96 | 97 | 102 | 103 | 111 | 117 | 118 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/CustomDatePicker.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.Windows; 7 | using System.Windows.Controls; 8 | using System.Windows.Data; 9 | using System.Windows.Documents; 10 | using System.Windows.Input; 11 | using System.Windows.Media; 12 | using System.Windows.Media.Imaging; 13 | using System.Windows.Navigation; 14 | using System.Windows.Shapes; 15 | 16 | namespace ToDue2 17 | { 18 | /// 19 | /// Interaction logic for CustomDatePicker.xaml 20 | /// 21 | public partial class CustomDatePicker : UserControl 22 | { 23 | public CustomDatePicker() 24 | { 25 | InitializeComponent(); 26 | 27 | Display.Click += (s, e) => Container.IsOpen = true; 28 | Picker.SelectedDatesChanged += (s, e) => 29 | { 30 | IndefiniteToggle.IsChecked = !App.IsValidDate(Picker.SelectedDate); 31 | if (SelectedDate != DateTime.MinValue) 32 | { 33 | _LastNonNullValue = (DateTime)SelectedDate; 34 | IndefiniteToggle.IsChecked = false; 35 | } 36 | else 37 | { 38 | IndefiniteToggle.IsChecked = true; 39 | } 40 | Container.IsOpen = false; 41 | }; 42 | } 43 | 44 | public static readonly DependencyProperty SelectedDateProperty = 45 | DependencyProperty.Register("SelectedDate", typeof(DateTime?), typeof(CustomDatePicker), 46 | new PropertyMetadata(DateTime.Now)); 47 | 48 | public DateTime? SelectedDate 49 | { 50 | get => (DateTime?)GetValue(SelectedDateProperty); 51 | set 52 | { 53 | if (value == SelectedDate) return; 54 | 55 | if (!App.IsValidDate(value)) 56 | { 57 | value = DateTime.MinValue; 58 | } 59 | 60 | SetValue(SelectedDateProperty, value); 61 | RaiseEvent(new UselessRoutedEventArgs(SelectedDateChangedEvent, this)); 62 | 63 | if (value != DateTime.MinValue) 64 | { 65 | _LastNonNullValue = (DateTime)value; 66 | IndefiniteToggle.IsChecked = false; 67 | } 68 | else 69 | { 70 | IndefiniteToggle.IsChecked = true; 71 | } 72 | } 73 | } 74 | 75 | public static readonly RoutedEvent SelectedDateChangedEvent = EventManager.RegisterRoutedEvent( 76 | "SelectedDateChanged", RoutingStrategy.Bubble, typeof(EventHandler), typeof(CustomDatePicker)); 77 | 78 | // Provide CLR accessors for the event 79 | public event RoutedEventHandler SelectedDateChanged 80 | { 81 | add { AddHandler(SelectedDateChangedEvent, value); } 82 | remove { RemoveHandler(SelectedDateChangedEvent, value); } 83 | } 84 | 85 | public DateTime _LastNonNullValue = DateTime.Now; 86 | 87 | private void IndefiniteToggle_Checked(object sender, RoutedEventArgs e) 88 | { 89 | if (SelectedDate != DateTime.MinValue) 90 | { 91 | _LastNonNullValue = (DateTime)SelectedDate; 92 | SelectedDate = DateTime.MinValue; 93 | } 94 | 95 | Container.IsOpen = false; 96 | } 97 | 98 | private void IndefiniteToggle_Unchecked(object sender, RoutedEventArgs e) 99 | { 100 | if (!App.IsValidDate(SelectedDate)) SelectedDate = _LastNonNullValue; 101 | Container.IsOpen = false; 102 | } 103 | 104 | private void Control_Loaded(object sender, RoutedEventArgs e) 105 | { 106 | //if (!App.IsValidDate(SelectedDate)) IndefiniteToggle.IsChecked = true; 107 | } 108 | } 109 | 110 | public class UselessRoutedEventArgs : RoutedEventArgs 111 | { 112 | public UselessRoutedEventArgs(RoutedEvent routedEvent, object source) : base(routedEvent, source) { } 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/DragAndDropHandler.cs: -------------------------------------------------------------------------------- 1 | using GongSolutions.Wpf.DragDrop; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | using System.Windows; 8 | using System.Windows.Controls; 9 | using System.Windows.Media; 10 | using ToDue2.Properties; 11 | 12 | namespace ToDue2 13 | { 14 | public class DragAndDropHandler : IDragSource, IDropTarget 15 | { 16 | private readonly DefaultDragHandler _DragHandler = new DefaultDragHandler(); 17 | private readonly DefaultDropHandler _DropHandler = new DefaultDropHandler(); 18 | private readonly MainWindow _Window; 19 | 20 | public DragAndDropHandler(MainWindow window) => _Window = window; 21 | 22 | void IDropTarget.DragOver(IDropInfo dropInfo) => _DropHandler.DragOver(dropInfo); 23 | 24 | void IDropTarget.Drop(IDropInfo dropInfo) => _DropHandler.Drop(dropInfo); 25 | 26 | public void StartDrag(IDragInfo dragInfo) => _DragHandler.StartDrag(dragInfo); 27 | 28 | public bool CanStartDrag(IDragInfo dragInfo) => true; 29 | 30 | public void Dropped(IDropInfo dropInfo) 31 | { 32 | _DragHandler.Dropped(dropInfo); 33 | //var content = dropInfo.VisualTargetItem as ContentPresenter; 34 | //var grid = content.ContentTemplate.FindName("TodoGrid", content) as Grid; 35 | //grid.Background = Application.Current.Resources["HighlightBackground"] as SolidColorBrush; 36 | } 37 | 38 | public void DragDropOperationFinished(DragDropEffects operationResult, IDragInfo dragInfo) 39 | { 40 | if (Settings.Default.DoesReorderTodo) 41 | { 42 | if (Settings.Default.DoesShowPopup) 43 | { 44 | Settings.Default.DoesShowPopup = false; 45 | 46 | var result = MainWindow.ShowConfirmationMessage(); 47 | 48 | if (result == MessageBoxResult.Yes) 49 | { 50 | Settings.Default.DoesReorderTodo = false; 51 | } 52 | else 53 | { 54 | Settings.Default.DoesReorderTodo = true; 55 | _Window.TodoItems.Reorder(); 56 | } 57 | 58 | Settings.Default.Save(); 59 | 60 | } 61 | else 62 | { 63 | _Window.TodoItems.Reorder(); 64 | } 65 | } 66 | else 67 | { 68 | _Window.TodoItems.Refresh(); 69 | } 70 | 71 | _Window.PinnedItems.Refresh(); 72 | 73 | _Window.SavePinnedList(); 74 | _Window.SaveTodoList(); 75 | } 76 | 77 | public void DragCancelled() => _DragHandler.DragCancelled(); 78 | 79 | public bool TryCatchOccurredException(Exception exception) 80 | => _DragHandler.TryCatchOccurredException(exception); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/ObservableSortedList.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.Specialized; 4 | using System.ComponentModel; 5 | using System.Text; 6 | using System.Linq; 7 | using GongSolutions.Wpf.DragDrop; 8 | using System.Windows; 9 | using System.Collections.ObjectModel; 10 | 11 | namespace ToDue2 12 | { 13 | public class ObservableTodoList : List, INotifyCollectionChanged 14 | { 15 | public ObservableTodoList() : base() { } 16 | 17 | public ObservableTodoList(IEnumerable items, bool doesAutoSort = true) 18 | : base(items) 19 | { 20 | DoesAutoSort = doesAutoSort; 21 | } 22 | 23 | public bool DoesAutoSort { get; set; } 24 | 25 | public event NotifyCollectionChangedEventHandler CollectionChanged; 26 | 27 | public new void Add(TodoItem content) 28 | { 29 | if (DoesAutoSort) 30 | { 31 | int pos = 0; 32 | for (; pos < base.Count; pos++) 33 | { 34 | if (content.DueDate <= base[pos].DueDate) break; 35 | } 36 | base.Insert(pos, content); 37 | CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs( 38 | NotifyCollectionChangedAction.Add, content, pos)); 39 | } 40 | else 41 | { 42 | base.Add(content); 43 | CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs( 44 | NotifyCollectionChangedAction.Add, content)); 45 | } 46 | } 47 | 48 | public new void Remove(TodoItem content) 49 | { 50 | base.Remove(content); 51 | CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, content)); 52 | } 53 | 54 | public void Refresh() 55 | { 56 | CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); 57 | } 58 | 59 | public void Reorder() 60 | { 61 | var newList = this.OrderBy(todo => todo.DueDate).ToArray(); 62 | this.Clear(); 63 | this.AddRange(newList); 64 | Refresh(); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Resources; 3 | using System.Runtime.CompilerServices; 4 | using System.Runtime.InteropServices; 5 | using System.Windows; 6 | 7 | // General Information about an assembly is controlled through the following 8 | // set of attributes. Change these attribute values to modify the information 9 | // associated with an assembly. 10 | [assembly: AssemblyTitle("ToDue2")] 11 | [assembly: AssemblyDescription("")] 12 | [assembly: AssemblyConfiguration("")] 13 | [assembly: AssemblyCompany("")] 14 | [assembly: AssemblyProduct("ToDue2 FrameworkImpl")] 15 | [assembly: AssemblyCopyright("Copyright © 2021")] 16 | [assembly: AssemblyTrademark("")] 17 | [assembly: AssemblyCulture("")] 18 | 19 | // Setting ComVisible to false makes the types in this assembly not visible 20 | // to COM components. If you need to access a type in this assembly from 21 | // COM, set the ComVisible attribute to true on that type. 22 | [assembly: ComVisible(false)] 23 | 24 | //In order to begin building localizable applications, set 25 | //CultureYouAreCodingWith in your .csproj file 26 | //inside a . For example, if you are using US english 27 | //in your source files, set the to en-US. Then uncomment 28 | //the NeutralResourceLanguage attribute below. Update the "en-US" in 29 | //the line below to match the UICulture setting in the project file. 30 | 31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] 32 | 33 | 34 | [assembly: ThemeInfo( 35 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 36 | //(used if a resource is not found in the page, 37 | // or application resource dictionaries) 38 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 39 | //(used if a resource is not found in the page, 40 | // app, or any theme specific resource dictionaries) 41 | )] 42 | 43 | 44 | // Version information for an assembly consists of the following four values: 45 | // 46 | // Major Version 47 | // Minor Version 48 | // Build Number 49 | // Revision 50 | // 51 | // You can specify all the values or you can default the Build and Revision Numbers 52 | // by using the '*' as shown below: 53 | // [assembly: AssemblyVersion("1.0.*")] 54 | [assembly: AssemblyVersion("2.0.0.0")] 55 | [assembly: AssemblyFileVersion("1.0.0.0")] 56 | [assembly: NeutralResourcesLanguage("en")] 57 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/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 ToDue2.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", "16.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | public 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 | public 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("ToDue2.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 | public static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Properties/Resources.en.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/ToDue2 FrameworkImpl/Properties/Resources.en.Designer.cs -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Properties/Resources.en.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 | Advanced 122 | 123 | 124 | Dark (Reload Required) 125 | 126 | 127 | Exit 128 | 129 | 130 | Opacity 131 | 132 | 133 | Refresh 134 | 135 | 136 | Reset Position 137 | 138 | 139 | Scale 140 | 141 | 142 | Show Background 143 | 144 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Properties/Resources.zh-CN.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/ToDue2 FrameworkImpl/Properties/Resources.zh-CN.Designer.cs -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Properties/Resources.zh-CN.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 | 123 | 124 | 暗色(需要重启应用) 125 | 126 | 127 | 退出 128 | 129 | 130 | 透明度 131 | 132 | 133 | 刷新 134 | 135 | 136 | 重置位置 137 | 138 | 139 | 缩放 140 | 141 | 142 | 显示背景 143 | 144 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/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 ToDue2.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.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 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("")] 29 | public string TodoItems { 30 | get { 31 | return ((string)(this["TodoItems"])); 32 | } 33 | set { 34 | this["TodoItems"] = value; 35 | } 36 | } 37 | 38 | [global::System.Configuration.UserScopedSettingAttribute()] 39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 40 | [global::System.Configuration.DefaultSettingValueAttribute("0")] 41 | public int Counter { 42 | get { 43 | return ((int)(this["Counter"])); 44 | } 45 | set { 46 | this["Counter"] = value; 47 | } 48 | } 49 | 50 | [global::System.Configuration.UserScopedSettingAttribute()] 51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 52 | [global::System.Configuration.DefaultSettingValueAttribute("0")] 53 | public double StartupLocationX { 54 | get { 55 | return ((double)(this["StartupLocationX"])); 56 | } 57 | set { 58 | this["StartupLocationX"] = value; 59 | } 60 | } 61 | 62 | [global::System.Configuration.UserScopedSettingAttribute()] 63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 65 | public bool IsLight { 66 | get { 67 | return ((bool)(this["IsLight"])); 68 | } 69 | set { 70 | this["IsLight"] = value; 71 | } 72 | } 73 | 74 | [global::System.Configuration.UserScopedSettingAttribute()] 75 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 76 | [global::System.Configuration.DefaultSettingValueAttribute("1")] 77 | public double Opacity { 78 | get { 79 | return ((double)(this["Opacity"])); 80 | } 81 | set { 82 | this["Opacity"] = value; 83 | } 84 | } 85 | 86 | [global::System.Configuration.UserScopedSettingAttribute()] 87 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 88 | [global::System.Configuration.DefaultSettingValueAttribute("")] 89 | public string PinnedItems { 90 | get { 91 | return ((string)(this["PinnedItems"])); 92 | } 93 | set { 94 | this["PinnedItems"] = value; 95 | } 96 | } 97 | 98 | [global::System.Configuration.UserScopedSettingAttribute()] 99 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 100 | [global::System.Configuration.DefaultSettingValueAttribute("0.75")] 101 | public double Scale { 102 | get { 103 | return ((double)(this["Scale"])); 104 | } 105 | set { 106 | this["Scale"] = value; 107 | } 108 | } 109 | 110 | [global::System.Configuration.UserScopedSettingAttribute()] 111 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 112 | [global::System.Configuration.DefaultSettingValueAttribute("-50")] 113 | public double AdjustedMarginX { 114 | get { 115 | return ((double)(this["AdjustedMarginX"])); 116 | } 117 | set { 118 | this["AdjustedMarginX"] = value; 119 | } 120 | } 121 | 122 | [global::System.Configuration.UserScopedSettingAttribute()] 123 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 124 | [global::System.Configuration.DefaultSettingValueAttribute("0")] 125 | public double StartupLocationY { 126 | get { 127 | return ((double)(this["StartupLocationY"])); 128 | } 129 | set { 130 | this["StartupLocationY"] = value; 131 | } 132 | } 133 | 134 | [global::System.Configuration.UserScopedSettingAttribute()] 135 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 136 | [global::System.Configuration.DefaultSettingValueAttribute("-80")] 137 | public double AdjustedMarginY { 138 | get { 139 | return ((double)(this["AdjustedMarginY"])); 140 | } 141 | set { 142 | this["AdjustedMarginY"] = value; 143 | } 144 | } 145 | 146 | [global::System.Configuration.UserScopedSettingAttribute()] 147 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 148 | [global::System.Configuration.DefaultSettingValueAttribute("False")] 149 | public bool ShowBackground { 150 | get { 151 | return ((bool)(this["ShowBackground"])); 152 | } 153 | set { 154 | this["ShowBackground"] = value; 155 | } 156 | } 157 | 158 | [global::System.Configuration.UserScopedSettingAttribute()] 159 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 160 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 161 | public bool DoesReorderTodo { 162 | get { 163 | return ((bool)(this["DoesReorderTodo"])); 164 | } 165 | set { 166 | this["DoesReorderTodo"] = value; 167 | } 168 | } 169 | 170 | [global::System.Configuration.UserScopedSettingAttribute()] 171 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 172 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 173 | public bool DoesShowPopup { 174 | get { 175 | return ((bool)(this["DoesShowPopup"])); 176 | } 177 | set { 178 | this["DoesShowPopup"] = value; 179 | } 180 | } 181 | 182 | [global::System.Configuration.UserScopedSettingAttribute()] 183 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 184 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 185 | public bool IsHighContrast { 186 | get { 187 | return ((bool)(this["IsHighContrast"])); 188 | } 189 | set { 190 | this["IsHighContrast"] = value; 191 | } 192 | } 193 | } 194 | } 195 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 10 | 11 | 12 | 0 13 | 14 | 15 | True 16 | 17 | 18 | 1 19 | 20 | 21 | 22 | 23 | 24 | 0.75 25 | 26 | 27 | -50 28 | 29 | 30 | 0 31 | 32 | 33 | -80 34 | 35 | 36 | False 37 | 38 | 39 | True 40 | 41 | 42 | True 43 | 44 | 45 | True 46 | 47 | 48 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Properties/app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 50 | 58 | 59 | 73 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Resources/FontDesign.ConservativeSimplicity.Neo.Levis.Completus_0.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/ToDue2 FrameworkImpl/Resources/FontDesign.ConservativeSimplicity.Neo.Levis.Completus_0.ttf -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Resources/Labels.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // 此代码由工具生成。 4 | // 运行时版本:4.0.30319.42000 5 | // 6 | // 对此文件的更改可能会导致不正确的行为,并且如果 7 | // 重新生成代码,这些更改将会丢失。 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ToDue2.Resources { 12 | using System; 13 | 14 | 15 | /// 16 | /// 一个强类型的资源类,用于查找本地化的字符串等。 17 | /// 18 | // 此类是由 StronglyTypedResourceBuilder 19 | // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 20 | // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen 21 | // (以 /str 作为命令选项),或重新生成 VS 项目。 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | public class Labels { 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 Labels() { 33 | } 34 | 35 | /// 36 | /// 返回此类使用的缓存的 ResourceManager 实例。 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | public 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("ToDue2.Resources.Labels", typeof(Labels).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// 重写当前线程的 CurrentUICulture 属性,对 51 | /// 使用此强类型资源类的所有资源查找执行重写。 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | public static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | 63 | /// 64 | /// 查找类似 The \"Auto reorder option\" is enabled which stops you from this operation\n Do you want to turn off this setting?\n This notification will not show up again. 的本地化字符串。 65 | /// 66 | public static string ConfirmationMessageText { 67 | get { 68 | return ResourceManager.GetString("ConfirmationMessageText", resourceCulture); 69 | } 70 | } 71 | 72 | /// 73 | /// 查找类似 Infor 的本地化字符串。 74 | /// 75 | public static string ConfirmationMessageTitle { 76 | get { 77 | return ResourceManager.GetString("ConfirmationMessageTitle", resourceCulture); 78 | } 79 | } 80 | 81 | /// 82 | /// 查找类似 Something to do ... 的本地化字符串。 83 | /// 84 | public static string MainPageTipText { 85 | get { 86 | return ResourceManager.GetString("MainPageTipText", resourceCulture); 87 | } 88 | } 89 | 90 | /// 91 | /// 查找类似 Automatically reorder todo 的本地化字符串。 92 | /// 93 | public static string MenuItemAdvancedAutoReorder { 94 | get { 95 | return ResourceManager.GetString("MenuItemAdvancedAutoReorder", resourceCulture); 96 | } 97 | } 98 | 99 | /// 100 | /// 查找类似 Refresh 的本地化字符串。 101 | /// 102 | public static string MenuItemAdvancedRefresh { 103 | get { 104 | return ResourceManager.GetString("MenuItemAdvancedRefresh", resourceCulture); 105 | } 106 | } 107 | 108 | /// 109 | /// 查找类似 Reset position 的本地化字符串。 110 | /// 111 | public static string MenuItemAdvancedReset { 112 | get { 113 | return ResourceManager.GetString("MenuItemAdvancedReset", resourceCulture); 114 | } 115 | } 116 | 117 | /// 118 | /// 查找类似 Dark (Reload required) 的本地化字符串。 119 | /// 120 | public static string MenuItemDark { 121 | get { 122 | return ResourceManager.GetString("MenuItemDark", resourceCulture); 123 | } 124 | } 125 | 126 | /// 127 | /// 查找类似 Exit 的本地化字符串。 128 | /// 129 | public static string MenuItemExit { 130 | get { 131 | return ResourceManager.GetString("MenuItemExit", resourceCulture); 132 | } 133 | } 134 | 135 | /// 136 | /// 查找类似 High Contrast 的本地化字符串。 137 | /// 138 | public static string MenuItemHighContrast { 139 | get { 140 | return ResourceManager.GetString("MenuItemHighContrast", resourceCulture); 141 | } 142 | } 143 | 144 | /// 145 | /// 查找类似 Monochrome 的本地化字符串。 146 | /// 147 | public static string MenuItemMonochrome { 148 | get { 149 | return ResourceManager.GetString("MenuItemMonochrome", resourceCulture); 150 | } 151 | } 152 | 153 | /// 154 | /// 查找类似 Normal 的本地化字符串。 155 | /// 156 | public static string MenuItemScaleLarge { 157 | get { 158 | return ResourceManager.GetString("MenuItemScaleLarge", resourceCulture); 159 | } 160 | } 161 | 162 | /// 163 | /// 查找类似 Large 的本地化字符串。 164 | /// 165 | public static string MenuItemScaleNormal { 166 | get { 167 | return ResourceManager.GetString("MenuItemScaleNormal", resourceCulture); 168 | } 169 | } 170 | 171 | /// 172 | /// 查找类似 Small 的本地化字符串。 173 | /// 174 | public static string MenuItemScaleSmall { 175 | get { 176 | return ResourceManager.GetString("MenuItemScaleSmall", resourceCulture); 177 | } 178 | } 179 | 180 | /// 181 | /// 查找类似 Show background 的本地化字符串。 182 | /// 183 | public static string MenuItemShowBackground { 184 | get { 185 | return ResourceManager.GetString("MenuItemShowBackground", resourceCulture); 186 | } 187 | } 188 | 189 | /// 190 | /// 查找类似 Advanced 的本地化字符串。 191 | /// 192 | public static string MenuItemTitleAdvanced { 193 | get { 194 | return ResourceManager.GetString("MenuItemTitleAdvanced", resourceCulture); 195 | } 196 | } 197 | 198 | /// 199 | /// 查找类似 Opacity 的本地化字符串。 200 | /// 201 | public static string MenuItemTitleOpacity { 202 | get { 203 | return ResourceManager.GetString("MenuItemTitleOpacity", resourceCulture); 204 | } 205 | } 206 | 207 | /// 208 | /// 查找类似 Palette (reload required) 的本地化字符串。 209 | /// 210 | public static string MenuItemTitlePalette { 211 | get { 212 | return ResourceManager.GetString("MenuItemTitlePalette", resourceCulture); 213 | } 214 | } 215 | 216 | /// 217 | /// 查找类似 Scale 的本地化字符串。 218 | /// 219 | public static string MenuItemTitleScale { 220 | get { 221 | return ResourceManager.GetString("MenuItemTitleScale", resourceCulture); 222 | } 223 | } 224 | } 225 | } 226 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Resources/Labels.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 | The \"Auto reorder option\" is enabled which stops you from this operation\n Do you want to turn off this setting?\n This notification will not show up again. 122 | 123 | 124 | Infor 125 | 126 | 127 | Something to do ... 128 | 129 | 130 | Automatically reorder todo 131 | 132 | 133 | Refresh 134 | 135 | 136 | Reset position 137 | 138 | 139 | Dark (Reload required) 140 | 141 | 142 | Exit 143 | 144 | 145 | High Contrast 146 | 147 | 148 | Monochrome 149 | 150 | 151 | Normal 152 | 153 | 154 | Large 155 | 156 | 157 | Small 158 | 159 | 160 | Show background 161 | 162 | 163 | Advanced 164 | 165 | 166 | Opacity 167 | 168 | 169 | Palette (reload required) 170 | 171 | 172 | Scale 173 | 174 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Resources/Labels.zh-cn.Designer.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/ToDue2 FrameworkImpl/Resources/Labels.zh-cn.Designer.cs -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Resources/Labels.zh-cn.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 | 123 | 124 | 提示 125 | 126 | 127 | 一些要做的事情…… 128 | 129 | 130 | 自动排序 131 | 132 | 133 | 刷新 134 | 135 | 136 | 重置位置 137 | 138 | 139 | 深色模式(需要重启) 140 | 141 | 142 | 退出 143 | 144 | 145 | 高对比度 146 | 147 | 148 | 单色 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 显示背景 161 | 162 | 163 | 高级 164 | 165 | 166 | 透明度 167 | 168 | 169 | 配色 170 | 171 | 172 | 缩放比例 173 | 174 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Resources/icon [256x256].ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/ToDue2 FrameworkImpl/Resources/icon [256x256].ico -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Resources/segmdl2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/ToDue2 FrameworkImpl/Resources/segmdl2.ttf -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Settings.cs: -------------------------------------------------------------------------------- 1 | namespace ToDue2.Properties { 2 | 3 | 4 | // This class allows you to handle specific events on the settings class: 5 | // The SettingChanging event is raised before a setting's value is changed. 6 | // The PropertyChanged event is raised after a setting's value is changed. 7 | // The SettingsLoaded event is raised after the setting values are loaded. 8 | // The SettingsSaving event is raised before the setting values are saved. 9 | internal sealed partial class Settings { 10 | 11 | public Settings() { 12 | // // To add event handlers for saving and changing settings, uncomment the lines below: 13 | // 14 | // this.SettingChanging += this.SettingChangingEventHandler; 15 | // 16 | // this.SettingsSaving += this.SettingsSavingEventHandler; 17 | // 18 | } 19 | 20 | private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { 21 | // Add code to handle the SettingChangingEvent event here. 22 | } 23 | 24 | private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { 25 | // Add code to handle the SettingsSaving event here. 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/ToDue2.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {B3083B23-76EE-4CEE-97AF-D99681CF1261} 8 | WinExe 9 | ToDue2 10 | ToDue2 11 | v4.6.1 12 | 512 13 | {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 14 | 4 15 | true 16 | true 17 | false 18 | publish\ 19 | true 20 | Disk 21 | false 22 | Foreground 23 | 7 24 | Days 25 | false 26 | false 27 | true 28 | 0 29 | 1.0.0.%2a 30 | false 31 | true 32 | 33 | 34 | AnyCPU 35 | true 36 | full 37 | false 38 | bin\Debug\ 39 | DEBUG;TRACE 40 | prompt 41 | 4 42 | 43 | 44 | AnyCPU 45 | pdbonly 46 | true 47 | bin\Release\ 48 | TRACE 49 | prompt 50 | 4 51 | 52 | 53 | icon [256x256].ico 54 | 55 | 56 | LocalIntranet 57 | 58 | 59 | false 60 | 61 | 62 | Properties\app.manifest 63 | 64 | 65 | 66 | ..\packages\gong-wpf-dragdrop.2.4.1\lib\net46\GongSolutions.WPF.DragDrop.dll 67 | 68 | 69 | ..\packages\Hardcodet.NotifyIcon.Wpf.1.1.0\lib\net45\Hardcodet.NotifyIcon.Wpf.dll 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 4.0 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | MSBuild:Compile 89 | Designer 90 | 91 | 92 | 93 | CustomDatePicker.xaml 94 | 95 | 96 | 97 | 98 | True 99 | True 100 | Resources.en.resx 101 | 102 | 103 | True 104 | True 105 | Resources.zh-CN.resx 106 | 107 | 108 | Labels.zh-cn.resx 109 | True 110 | True 111 | 112 | 113 | True 114 | True 115 | Labels.resx 116 | 117 | 118 | True 119 | True 120 | Labels.zh-cn.resx 121 | 122 | 123 | 124 | 125 | 126 | Designer 127 | MSBuild:Compile 128 | 129 | 130 | MSBuild:Compile 131 | Designer 132 | 133 | 134 | App.xaml 135 | Code 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | MainWindow.xaml 145 | Code 146 | 147 | 148 | 149 | 150 | Code 151 | 152 | 153 | True 154 | True 155 | Resources.resx 156 | 157 | 158 | True 159 | Settings.settings 160 | True 161 | 162 | 163 | PublicResXFileCodeGenerator 164 | Resources.en.Designer.cs 165 | 166 | 167 | PublicResXFileCodeGenerator 168 | Resources.Designer.cs 169 | 170 | 171 | PublicResXFileCodeGenerator 172 | Resources.zh-CN.Designer.cs 173 | 174 | 175 | PublicResXFileCodeGenerator 176 | Labels.zh-cn.Designer.cs 177 | 178 | 179 | PublicResXFileCodeGenerator 180 | Labels.Designer.cs 181 | 182 | 183 | 184 | 185 | SettingsSingleFileGenerator 186 | Settings.Designer.cs 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | False 203 | Microsoft .NET Framework 4.6.1 %28x86 and x64%29 204 | true 205 | 206 | 207 | False 208 | .NET Framework 3.5 SP1 209 | false 210 | 211 | 212 | 213 | 214 | 215 | 216 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/TodoItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Text; 5 | using System.Windows; 6 | using ToDue2.Properties; 7 | 8 | namespace ToDue2 9 | { 10 | [Serializable] 11 | public class TodoItem : INotifyPropertyChanged 12 | { 13 | 14 | public TodoItem(DateTime dueDate, string content, bool isOfHighPriority, string id = null) 15 | { 16 | DueDate = dueDate; 17 | Content = content; 18 | IsOfHighPriority = isOfHighPriority; 19 | ID = id ?? GenerateID(); 20 | } 21 | 22 | public event PropertyChangedEventHandler PropertyChanged; 23 | 24 | private DateTime _DueDate; 25 | public DateTime DueDate 26 | { 27 | get => _DueDate; 28 | set 29 | { 30 | _DueDate = value; 31 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(DueDate))); 32 | } 33 | } 34 | 35 | private string _Content; 36 | public string Content 37 | { 38 | get => _Content; 39 | set 40 | { 41 | _Content = value; 42 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Content))); 43 | } 44 | } 45 | 46 | private bool _IsOfHighPriority; 47 | public bool IsOfHighPriority 48 | { 49 | get => _IsOfHighPriority; 50 | set 51 | { 52 | _IsOfHighPriority = value; 53 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsOfHighPriority))); 54 | } 55 | } 56 | 57 | public string ID { get; } 58 | 59 | private static string GenerateID() => Settings.Default.Counter++.ToString(); 60 | 61 | public static explicit operator TodoItem(TodoStruct s) 62 | { 63 | return new TodoItem(s.DueDate, s.Content, s.IsOfHighPriority, s.ID); 64 | } 65 | 66 | public static explicit operator TodoStruct(TodoItem o) 67 | { 68 | return new TodoStruct(o.DueDate, o.Content, o.ID, o.IsOfHighPriority); 69 | } 70 | } 71 | 72 | [Serializable] 73 | public class TodoStruct 74 | { 75 | public TodoStruct(DateTime dueDate, string content, string id, bool isOfHighPriority) 76 | { 77 | DueDate = dueDate; 78 | Content = content; 79 | ID = id; 80 | IsOfHighPriority = isOfHighPriority; 81 | } 82 | 83 | public readonly DateTime DueDate; 84 | public readonly string Content; 85 | public readonly string ID; 86 | public readonly bool IsOfHighPriority; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/Win32.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.InteropServices; 4 | using System.Text; 5 | using System.Windows; 6 | using System.Windows.Interop; 7 | 8 | namespace ToDue2 9 | { 10 | public class Win32 11 | { 12 | [DllImport("user32.dll")] 13 | public static extern IntPtr GetWindowLong(IntPtr hWnd, int nIndex); 14 | 15 | [Flags] 16 | public enum ExtendedWindowStyles 17 | { 18 | // ... 19 | WS_EX_TOOLWINDOW = 0x00000080, 20 | // ... 21 | } 22 | 23 | public enum GetWindowLongFields 24 | { 25 | // ... 26 | GWL_EXSTYLE = -20, 27 | // ... 28 | } 29 | 30 | public static IntPtr SetWindowLong(IntPtr hWnd, int nIndex, IntPtr dwNewLong) 31 | { 32 | int error = 0; 33 | IntPtr result = IntPtr.Zero; 34 | // Win32 SetWindowLong doesn't clear error on success 35 | SetLastError(0); 36 | 37 | if (IntPtr.Size == 4) 38 | { 39 | // use SetWindowLong 40 | Int32 tempResult = IntSetWindowLong(hWnd, nIndex, IntPtrToInt32(dwNewLong)); 41 | error = Marshal.GetLastWin32Error(); 42 | result = new IntPtr(tempResult); 43 | } 44 | else 45 | { 46 | // use SetWindowLongPtr 47 | result = IntSetWindowLongPtr(hWnd, nIndex, dwNewLong); 48 | error = Marshal.GetLastWin32Error(); 49 | } 50 | 51 | if ((result == IntPtr.Zero) && (error != 0)) 52 | { 53 | throw new System.ComponentModel.Win32Exception(error); 54 | } 55 | 56 | return result; 57 | } 58 | 59 | [DllImport("user32.dll", EntryPoint = "SetWindowLongPtr", SetLastError = true)] 60 | private static extern IntPtr IntSetWindowLongPtr(IntPtr hWnd, int nIndex, IntPtr dwNewLong); 61 | 62 | [DllImport("user32.dll", EntryPoint = "SetWindowLong", SetLastError = true)] 63 | private static extern Int32 IntSetWindowLong(IntPtr hWnd, int nIndex, Int32 dwNewLong); 64 | 65 | private static int IntPtrToInt32(IntPtr intPtr) 66 | { 67 | return unchecked((int)intPtr.ToInt64()); 68 | } 69 | 70 | [DllImport("kernel32.dll", EntryPoint = "SetLastError")] 71 | public static extern void SetLastError(int dwErrorCode); 72 | 73 | [DllImport("user32.dll")] 74 | static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent); 75 | [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode)] 76 | static extern IntPtr FindWindow(string lpClassName, string lpWindowName); 77 | [DllImport("user32.dll")] 78 | 79 | static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, 80 | int Y, int cx, int cy, uint uFlags); 81 | 82 | const uint SWP_NOSIZE = 0x0001; 83 | const uint SWP_NOMOVE = 0x0002; 84 | const uint SWP_NOACTIVATE = 0x0010; 85 | 86 | static readonly IntPtr HWND_BOTTOM = new IntPtr(1); 87 | 88 | public static void SetBottom(Window window) 89 | { 90 | IntPtr hWnd = new WindowInteropHelper(window).Handle; 91 | SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE); 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/icon [256x256].ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/ToDue2 FrameworkImpl/icon [256x256].ico -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/ToDue2 FrameworkImpl/new.png -------------------------------------------------------------------------------- /ToDue2 FrameworkImpl/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /ToDue2/App.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /ToDue2/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Data; 5 | using System.Diagnostics; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Reflection; 9 | using System.Runtime.InteropServices; 10 | using System.Threading; 11 | using System.Threading.Tasks; 12 | using System.Windows; 13 | using System.Windows.Interop; 14 | using System.Windows.Media; 15 | 16 | namespace ToDue2 17 | { 18 | /// 19 | /// Interaction logic for App.xaml 20 | /// 21 | public partial class App : Application 22 | { 23 | [DllImport("user32.dll")] 24 | [return: MarshalAs(UnmanagedType.Bool)] 25 | public static extern bool SetForegroundWindow(IntPtr hWnd); 26 | 27 | protected override void OnStartup(StartupEventArgs e) 28 | { 29 | RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly; 30 | var appName = Path.GetFileNameWithoutExtension(Process.GetCurrentProcess().MainModule.FileName); 31 | var programStarted = new EventWaitHandle(false, EventResetMode.AutoReset, appName, out var createNew); 32 | if (!createNew) 33 | { 34 | Process current = Process.GetCurrentProcess(); 35 | foreach (Process process in Process.GetProcessesByName(current.ProcessName)) 36 | { 37 | if (process.Id != current.Id) 38 | { 39 | SetForegroundWindow(process.MainWindowHandle); 40 | App.Current.Shutdown(); 41 | Environment.Exit(-1); 42 | break; 43 | } 44 | } 45 | } 46 | else 47 | { 48 | TryAddToStartupLocation(); 49 | } 50 | 51 | base.OnStartup(e); 52 | } 53 | 54 | public void TryAddToStartupLocation() 55 | { 56 | string startup = Environment.GetFolderPath(Environment.SpecialFolder.Startup); 57 | if (!Directory.Exists(startup)) return; 58 | 59 | var path = $"{startup}\\ToDue2.url"; 60 | if (!File.Exists(path)) 61 | { 62 | using (StreamWriter writer = new StreamWriter(path)) 63 | { 64 | string app = Assembly.GetExecutingAssembly().Location; 65 | writer.WriteLine("[InternetShortcut]"); 66 | writer.WriteLine("URL=file:///" + app); 67 | writer.WriteLine("IconIndex=0"); 68 | string icon = app.Replace('\\', '/'); 69 | writer.WriteLine("IconFile=" + icon); 70 | } 71 | } 72 | } 73 | 74 | public void TryRemoveFromStartupLocation() 75 | { 76 | string startup = Environment.GetFolderPath(Environment.SpecialFolder.Startup); 77 | if (!Directory.Exists(startup)) return; 78 | 79 | var path = $"{startup}\\ToDue2.url"; 80 | if (File.Exists(path)) 81 | { 82 | Directory.Delete(path); 83 | } 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /ToDue2/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /ToDue2/Converters/ColorConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Text; 5 | using System.Windows.Data; 6 | using System.Windows.Controls; 7 | using System.Windows; 8 | 9 | namespace ToDue2.Converters 10 | { 11 | class ColorConverter : IValueConverter 12 | { 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | var diff = (DateTime)(value ?? DateTime.Now) - DateTime.Now; 16 | if (diff >= TimeSpan.FromDays(7)) 17 | { 18 | return Application.Current.MainWindow.Resources["OK"]; 19 | } 20 | else if (diff >= TimeSpan.FromDays(1)) 21 | { 22 | return Application.Current.MainWindow.Resources["Warning"]; 23 | } 24 | else 25 | { 26 | return Application.Current.MainWindow.Resources["Alert"]; 27 | } 28 | } 29 | 30 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 31 | { 32 | throw new NotImplementedException(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ToDue2/Converters/DateConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Text; 5 | using System.Windows.Data; 6 | 7 | namespace ToDue2.Converters 8 | { 9 | public class DateConverter : IValueConverter 10 | { 11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 12 | { 13 | var date = (DateTime)(value ?? DateTime.Now); 14 | return $"{date.Month:00}/{date.Day:00}"; 15 | } 16 | 17 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 18 | { 19 | throw new NotImplementedException(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ToDue2/Converters/NegateConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Text; 5 | using System.Windows.Data; 6 | using System.Windows.Controls; 7 | using System.Windows; 8 | 9 | namespace ToDue2.Converters 10 | { 11 | class NegateConverter : IValueConverter 12 | { 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | return !(bool)value; 16 | } 17 | 18 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 19 | { 20 | return !(bool)value; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ToDue2/Converters/PriorityToColorConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Text; 5 | using System.Windows.Data; 6 | using System.Windows.Controls; 7 | using System.Windows; 8 | 9 | namespace ToDue2.Converters 10 | { 11 | class PriorityToColorConverter : IValueConverter 12 | { 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | if ((bool)(value ?? false)) 16 | { 17 | return Application.Current.MainWindow.Resources["Alert"]; 18 | } 19 | else 20 | { 21 | return App.Current.MainWindow.Resources["Foreground"]; 22 | } 23 | } 24 | 25 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 26 | { 27 | throw new NotImplementedException(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ToDue2/Converters/PriorityToFontWeightConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Text; 5 | using System.Windows.Data; 6 | using System.Windows.Controls; 7 | using System.Windows; 8 | 9 | namespace ToDue2.Converters 10 | { 11 | class PriorityToFontWeightConverter : IValueConverter 12 | { 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | if ((bool)(value ?? false)) 16 | { 17 | return "Regular"; 18 | } 19 | else 20 | { 21 | return "Light"; 22 | } 23 | } 24 | 25 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 26 | { 27 | throw new NotImplementedException(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ToDue2/Converters/VisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Globalization; 4 | using System.Text; 5 | using System.Windows.Data; 6 | using System.Windows.Controls; 7 | using System.Windows; 8 | 9 | namespace ToDue2.Converters 10 | { 11 | class VisibilityConverter : IValueConverter 12 | { 13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 14 | { 15 | if ((bool)value) 16 | { 17 | return Visibility.Visible; 18 | } 19 | else 20 | { 21 | return Visibility.Collapsed; 22 | } 23 | } 24 | 25 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 26 | { 27 | throw new NotImplementedException(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /ToDue2/MyDatePicker.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Windows.Controls; 5 | using System.Windows.Controls.Primitives; 6 | 7 | namespace ToDue2 8 | { 9 | public class MyDatePicker : DatePicker 10 | { 11 | public Popup Popup { get; private set; } 12 | 13 | public override void OnApplyTemplate() 14 | { 15 | base.OnApplyTemplate(); 16 | 17 | if (Template.FindName("PART_Button", this) is Button button) 18 | { 19 | button.Visibility = System.Windows.Visibility.Collapsed; 20 | } 21 | 22 | Popup = Template.FindName("PART_Popup", this) as Popup; 23 | var textbox = Template.FindName("PART_TextBox", this) as TextBox; 24 | textbox.GotMouseCapture += (s, e) => Popup.IsOpen = true; 25 | SelectedDateChanged += (s, e) => 26 | { 27 | var todo = (Parent as Grid).DataContext as TodoItem; 28 | if (todo == null) 29 | { 30 | (App.Current.MainWindow as MainWindow).DisplayedDueDate = (DateTime)SelectedDate; 31 | } 32 | else 33 | { 34 | todo.DueDate = (DateTime)SelectedDate; 35 | } 36 | }; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ToDue2/ObservableSortedList.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Collections.Specialized; 4 | using System.ComponentModel; 5 | using System.Text; 6 | using System.Linq; 7 | 8 | namespace ToDue2 9 | { 10 | public class ObservableSortedList : List, INotifyCollectionChanged 11 | { 12 | public ObservableSortedList() : base() { } 13 | 14 | public ObservableSortedList(IEnumerable items) 15 | : base(items) { } 16 | 17 | public event NotifyCollectionChangedEventHandler CollectionChanged; 18 | 19 | public new void Add(TodoItem content) 20 | { 21 | int pos = 0; 22 | for (; pos < base.Count; pos++) 23 | { 24 | if (content.DueDate <= base[pos].DueDate) break; 25 | } 26 | base.Insert(pos, content); 27 | CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs( 28 | NotifyCollectionChangedAction.Add, content, pos)); 29 | } 30 | 31 | public new void Remove(TodoItem content) 32 | { 33 | base.Remove(content); 34 | CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs( 35 | NotifyCollectionChangedAction.Remove, content)); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /ToDue2/Properties/PublishProfiles/FolderProfile.pubxml: -------------------------------------------------------------------------------- 1 |  2 | 5 | 6 | 7 | Release 8 | Any CPU 9 | bin\Release\netcoreapp3.1\publish\ 10 | FileSystem 11 | netcoreapp3.1 12 | win-x86 13 | true 14 | False 15 | False 16 | True 17 | 18 | -------------------------------------------------------------------------------- /ToDue2/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 ToDue2.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.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 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("")] 29 | public string TodoItems { 30 | get { 31 | return ((string)(this["TodoItems"])); 32 | } 33 | set { 34 | this["TodoItems"] = value; 35 | } 36 | } 37 | 38 | [global::System.Configuration.UserScopedSettingAttribute()] 39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 40 | [global::System.Configuration.DefaultSettingValueAttribute("0")] 41 | public int Counter { 42 | get { 43 | return ((int)(this["Counter"])); 44 | } 45 | set { 46 | this["Counter"] = value; 47 | } 48 | } 49 | 50 | [global::System.Configuration.UserScopedSettingAttribute()] 51 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 52 | [global::System.Configuration.DefaultSettingValueAttribute("0, 0")] 53 | public global::System.Drawing.Point StartupLocation { 54 | get { 55 | return ((global::System.Drawing.Point)(this["StartupLocation"])); 56 | } 57 | set { 58 | this["StartupLocation"] = value; 59 | } 60 | } 61 | 62 | [global::System.Configuration.UserScopedSettingAttribute()] 63 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 64 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 65 | public bool IsLight { 66 | get { 67 | return ((bool)(this["IsLight"])); 68 | } 69 | set { 70 | this["IsLight"] = value; 71 | } 72 | } 73 | 74 | [global::System.Configuration.UserScopedSettingAttribute()] 75 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 76 | [global::System.Configuration.DefaultSettingValueAttribute("1")] 77 | public double Opacity { 78 | get { 79 | return ((double)(this["Opacity"])); 80 | } 81 | set { 82 | this["Opacity"] = value; 83 | } 84 | } 85 | 86 | [global::System.Configuration.UserScopedSettingAttribute()] 87 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 88 | [global::System.Configuration.DefaultSettingValueAttribute("")] 89 | public string PinnedItems { 90 | get { 91 | return ((string)(this["PinnedItems"])); 92 | } 93 | set { 94 | this["PinnedItems"] = value; 95 | } 96 | } 97 | 98 | [global::System.Configuration.UserScopedSettingAttribute()] 99 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 100 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 101 | public bool AutoStart { 102 | get { 103 | return ((bool)(this["AutoStart"])); 104 | } 105 | set { 106 | this["AutoStart"] = value; 107 | } 108 | } 109 | 110 | [global::System.Configuration.UserScopedSettingAttribute()] 111 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 112 | [global::System.Configuration.DefaultSettingValueAttribute("False")] 113 | public bool ShowInTaskBar { 114 | get { 115 | return ((bool)(this["ShowInTaskBar"])); 116 | } 117 | set { 118 | this["ShowInTaskBar"] = value; 119 | } 120 | } 121 | 122 | [global::System.Configuration.UserScopedSettingAttribute()] 123 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 124 | [global::System.Configuration.DefaultSettingValueAttribute("True")] 125 | public bool HideFromTaskManager { 126 | get { 127 | return ((bool)(this["HideFromTaskManager"])); 128 | } 129 | set { 130 | this["HideFromTaskManager"] = value; 131 | } 132 | } 133 | 134 | [global::System.Configuration.UserScopedSettingAttribute()] 135 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 136 | [global::System.Configuration.DefaultSettingValueAttribute("0.75")] 137 | public double Scale { 138 | get { 139 | return ((double)(this["Scale"])); 140 | } 141 | set { 142 | this["Scale"] = value; 143 | } 144 | } 145 | 146 | [global::System.Configuration.UserScopedSettingAttribute()] 147 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 148 | [global::System.Configuration.DefaultSettingValueAttribute("-50, -80")] 149 | public global::System.Drawing.Point AdjustedMargin { 150 | get { 151 | return ((global::System.Drawing.Point)(this["AdjustedMargin"])); 152 | } 153 | set { 154 | this["AdjustedMargin"] = value; 155 | } 156 | } 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /ToDue2/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 10 | 11 | 12 | 0, 0 13 | 14 | 15 | True 16 | 17 | 18 | 1 19 | 20 | 21 | 22 | 23 | 24 | True 25 | 26 | 27 | False 28 | 29 | 30 | True 31 | 32 | 33 | 0.75 34 | 35 | 36 | -50, -80 37 | 38 | 39 | -------------------------------------------------------------------------------- /ToDue2/README.md: -------------------------------------------------------------------------------- 1 | # ToDue 2 | 3 | ## What is it? 4 | 5 | It's basically a todo list. 6 | 7 | Originally I planned to implement it as a *Rainmeter* widget, but failed for all sorts of reasons. 8 | 9 | ## What are the unique features? 10 | 11 | - It is simple and concise, more of a resemblance of the classical sticky-note-on-monitor 12 | - It pins on desktop just like a *Windows 7* gadget. Great for reminding people (especially me) that they have works to do 13 | - It also shows the due dates 14 | 15 | ## Screenshots 16 | 17 | ### Initial design 18 | 19 | design 20 | 21 | ### Actual: 22 | 23 | new 24 | 25 | ### Actual (Legacy): 26 | 27 | actual 28 | 29 | ## Other 30 | 31 | - Create a shortcut in `Startup` folder to make it automatically start on *Windows* start. 32 | 33 | - The font `segmdl2` is copyrighted by *Microsoft* 34 | 35 | - The font `CONSERVATIVE SIMPLICITY` is created by myself. It is not allowed for commercial purposes. For more copyright info, please visit my *Behance* page 36 | 37 | --- 38 | 39 | ## Checklist 40 | 41 | - [x] Transparent background 42 | - [x] Title 43 | - [x] Todo item data structure 44 | - [x] List view of items 45 | - [x] Layout 46 | - [x] Adaptive 47 | - [x] Meet design style 48 | - [x] Data binding 49 | - [x] *Remove* button 50 | - [x] Item name 51 | - [x] Data 52 | - [x] Style 53 | - [x] Visual Style 54 | - [x] *Remove* button 55 | - [x] Item name 56 | - [x] Data 57 | - [x] Add button 58 | - [x] Application logic 59 | - [x] Building domain model from inputs 60 | - [x] Adding & Sorting 61 | - [x] Style 62 | - [x] Visual Style 63 | - [x] Layout 64 | - [x] Separator 65 | - [x] Draggable interface 66 | - [x] Keep on desktop 67 | - [ ] Show in notification area 68 | - [x] Setting transparency 69 | - [ ] Switching between light/dark mode 70 | - [x] Exit 71 | - [x] Reset position 72 | - [x] An icon 73 | - [x] Read from/write to file 74 | - [x] Embed fonts 75 | - [x] Start on bootup -------------------------------------------------------------------------------- /ToDue2/Resources/FontDesign.ConservativeSimplicity.Neo.Levis.Completus_0.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/ToDue2/Resources/FontDesign.ConservativeSimplicity.Neo.Levis.Completus_0.ttf -------------------------------------------------------------------------------- /ToDue2/Resources/icon [256x256].ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/ToDue2/Resources/icon [256x256].ico -------------------------------------------------------------------------------- /ToDue2/Resources/segmdl2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/ToDue2/Resources/segmdl2.ttf -------------------------------------------------------------------------------- /ToDue2/ToDue2.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | netcoreapp3.1 6 | true 7 | icon.ico 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Never 21 | 22 | 23 | Never 24 | 25 | 26 | Never 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | True 39 | True 40 | Settings.settings 41 | 42 | 43 | 44 | 45 | 46 | SettingsSingleFileGenerator 47 | Settings.Designer.cs 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /ToDue2/TodoItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Text; 5 | using ToDue2.Properties; 6 | 7 | namespace ToDue2 8 | { 9 | [Serializable] 10 | public class TodoItem : INotifyPropertyChanged 11 | { 12 | 13 | public TodoItem(DateTime dueDate, string content, bool isOfHighPriority, string id = null) 14 | { 15 | DueDate = dueDate; 16 | Content = content; 17 | IsOfHighPriority = isOfHighPriority; 18 | ID = id ?? GenerateID(); 19 | } 20 | 21 | public event PropertyChangedEventHandler PropertyChanged; 22 | 23 | private DateTime _DueDate; 24 | public DateTime DueDate 25 | { 26 | get => _DueDate; 27 | set 28 | { 29 | _DueDate = value; 30 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(DueDate))); 31 | } 32 | } 33 | 34 | private string _Content; 35 | public string Content 36 | { 37 | get => _Content; 38 | set 39 | { 40 | _Content = value; 41 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Content))); 42 | } 43 | } 44 | 45 | private bool _IsOfHighPriority; 46 | public bool IsOfHighPriority 47 | { 48 | get => _IsOfHighPriority; 49 | set 50 | { 51 | _IsOfHighPriority = value; 52 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsOfHighPriority))); 53 | } 54 | } 55 | 56 | public string ID { get; } 57 | 58 | private static string GenerateID() => Settings.Default.Counter++.ToString(); 59 | 60 | public static explicit operator TodoItem(TodoStruct s) 61 | { 62 | return new TodoItem(s.DueDate, s.Content, s.IsOfHighPriority, s.ID); 63 | } 64 | 65 | public static explicit operator TodoStruct(TodoItem o) 66 | { 67 | return new TodoStruct(o.DueDate, o.Content, o.ID, o.IsOfHighPriority); 68 | } 69 | } 70 | 71 | [Serializable] 72 | public class TodoStruct 73 | { 74 | public TodoStruct(DateTime dueDate, string content, string id, bool isOfHighPriority) 75 | { 76 | DueDate = dueDate; 77 | Content = content; 78 | ID = id; 79 | IsOfHighPriority = isOfHighPriority; 80 | } 81 | 82 | public readonly DateTime DueDate; 83 | public readonly string Content; 84 | public readonly string ID; 85 | public readonly bool IsOfHighPriority; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /ToDue2/Win32.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Runtime.InteropServices; 4 | using System.Text; 5 | 6 | namespace ToDue2 7 | { 8 | public class Win32 9 | { 10 | [DllImport("user32.dll")] 11 | public static extern IntPtr GetWindowLong(IntPtr hWnd, int nIndex); 12 | 13 | [Flags] 14 | public enum ExtendedWindowStyles 15 | { 16 | // ... 17 | WS_EX_TOOLWINDOW = 0x00000080, 18 | // ... 19 | } 20 | 21 | public enum GetWindowLongFields 22 | { 23 | // ... 24 | GWL_EXSTYLE = (-20), 25 | // ... 26 | } 27 | 28 | public static IntPtr SetWindowLong(IntPtr hWnd, int nIndex, IntPtr dwNewLong) 29 | { 30 | int error = 0; 31 | IntPtr result = IntPtr.Zero; 32 | // Win32 SetWindowLong doesn't clear error on success 33 | SetLastError(0); 34 | 35 | if (IntPtr.Size == 4) 36 | { 37 | // use SetWindowLong 38 | Int32 tempResult = IntSetWindowLong(hWnd, nIndex, IntPtrToInt32(dwNewLong)); 39 | error = Marshal.GetLastWin32Error(); 40 | result = new IntPtr(tempResult); 41 | } 42 | else 43 | { 44 | // use SetWindowLongPtr 45 | result = IntSetWindowLongPtr(hWnd, nIndex, dwNewLong); 46 | error = Marshal.GetLastWin32Error(); 47 | } 48 | 49 | if ((result == IntPtr.Zero) && (error != 0)) 50 | { 51 | throw new System.ComponentModel.Win32Exception(error); 52 | } 53 | 54 | return result; 55 | } 56 | 57 | [DllImport("user32.dll", EntryPoint = "SetWindowLongPtr", SetLastError = true)] 58 | private static extern IntPtr IntSetWindowLongPtr(IntPtr hWnd, int nIndex, IntPtr dwNewLong); 59 | 60 | [DllImport("user32.dll", EntryPoint = "SetWindowLong", SetLastError = true)] 61 | private static extern Int32 IntSetWindowLong(IntPtr hWnd, int nIndex, Int32 dwNewLong); 62 | 63 | private static int IntPtrToInt32(IntPtr intPtr) 64 | { 65 | return unchecked((int)intPtr.ToInt64()); 66 | } 67 | 68 | [DllImport("kernel32.dll", EntryPoint = "SetLastError")] 69 | public static extern void SetLastError(int dwErrorCode); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /ToDue2/design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/ToDue2/design.jpg -------------------------------------------------------------------------------- /ToDue2/icon [256x256].ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/ToDue2/icon [256x256].ico -------------------------------------------------------------------------------- /ToDue2/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/ToDue2/icon.ico -------------------------------------------------------------------------------- /icon [256x256].ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/icon [256x256].ico -------------------------------------------------------------------------------- /new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/new.png -------------------------------------------------------------------------------- /new2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Quantumzhao/ToDue/499369dc3194e20d8e9a1c4931af33b79099383f/new2.png --------------------------------------------------------------------------------