├── .gitattributes ├── .gitignore ├── LICENSE ├── README.md ├── Taskban.WPF ├── App.xaml ├── App.xaml.cs ├── AssemblyInfo.cs ├── Commands │ └── RelayCommand.cs ├── Converters │ ├── ButtonVisibilityConverter.cs │ ├── CountToWidthConverter.cs │ ├── FromNumberToVisibilityConverter.cs │ ├── StringToColorConverter.cs │ └── SubTasksToStringConverter.cs ├── Database │ ├── BaseRepository.cs │ ├── IRepository.cs │ ├── IUnitOfWork.cs │ └── UnitOfWork.cs ├── Entities │ ├── Board.cs │ ├── SubTask.cs │ ├── Tag.cs │ └── Task.cs ├── Resources │ └── logo.png ├── Services │ ├── IWindowService.cs │ └── WindowService.cs ├── Taskban.WPF.csproj ├── ViewModels │ ├── BoardViewModel.cs │ ├── HomeViewModel.cs │ ├── MainViewModel.cs │ ├── NewBoardViewModel.cs │ └── ViewModelBase.cs ├── Views │ ├── AboutWindow.xaml │ ├── AboutWindow.xaml.cs │ ├── BoardWindow.xaml │ ├── BoardWindow.xaml.cs │ ├── HomeView.xaml │ ├── HomeView.xaml.cs │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── NewBoardView.xaml │ ├── NewBoardView.xaml.cs │ ├── SettingsWindows.xaml │ └── SettingsWindows.xaml.cs └── icon.ico ├── Taskban.sln ├── azure-pipelines.yml └── readmeimages ├── features1.gif ├── features2.gif ├── features3.gif ├── features4.gif └── features5.png /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Aa][Rr][Mm]/ 27 | [Aa][Rr][Mm]64/ 28 | bld/ 29 | [Bb]in/ 30 | [Oo]bj/ 31 | [Ll]og/ 32 | [Ll]ogs/ 33 | 34 | # Visual Studio 2015/2017 cache/options directory 35 | .vs/ 36 | # Uncomment if you have tasks that create the project's static files in wwwroot 37 | #wwwroot/ 38 | 39 | # Visual Studio 2017 auto generated files 40 | Generated\ Files/ 41 | 42 | # MSTest test Results 43 | [Tt]est[Rr]esult*/ 44 | [Bb]uild[Ll]og.* 45 | 46 | # NUnit 47 | *.VisualState.xml 48 | TestResult.xml 49 | nunit-*.xml 50 | 51 | # Build Results of an ATL Project 52 | [Dd]ebugPS/ 53 | [Rr]eleasePS/ 54 | dlldata.c 55 | 56 | # Benchmark Results 57 | BenchmarkDotNet.Artifacts/ 58 | 59 | # .NET Core 60 | project.lock.json 61 | project.fragment.lock.json 62 | artifacts/ 63 | 64 | # StyleCop 65 | StyleCopReport.xml 66 | 67 | # Files built by Visual Studio 68 | *_i.c 69 | *_p.c 70 | *_h.h 71 | *.ilk 72 | *.meta 73 | *.obj 74 | *.iobj 75 | *.pch 76 | *.pdb 77 | *.ipdb 78 | *.pgc 79 | *.pgd 80 | *.rsp 81 | *.sbr 82 | *.tlb 83 | *.tli 84 | *.tlh 85 | *.tmp 86 | *.tmp_proj 87 | *_wpftmp.csproj 88 | *.log 89 | *.vspscc 90 | *.vssscc 91 | .builds 92 | *.pidb 93 | *.svclog 94 | *.scc 95 | 96 | # Chutzpah Test files 97 | _Chutzpah* 98 | 99 | # Visual C++ cache files 100 | ipch/ 101 | *.aps 102 | *.ncb 103 | *.opendb 104 | *.opensdf 105 | *.sdf 106 | *.cachefile 107 | *.VC.db 108 | *.VC.VC.opendb 109 | 110 | # Visual Studio profiler 111 | *.psess 112 | *.vsp 113 | *.vspx 114 | *.sap 115 | 116 | # Visual Studio Trace Files 117 | *.e2e 118 | 119 | # TFS 2012 Local Workspace 120 | $tf/ 121 | 122 | # Guidance Automation Toolkit 123 | *.gpState 124 | 125 | # ReSharper is a .NET coding add-in 126 | _ReSharper*/ 127 | *.[Rr]e[Ss]harper 128 | *.DotSettings.user 129 | 130 | # JustCode is a .NET coding add-in 131 | .JustCode 132 | 133 | # TeamCity is a build add-in 134 | _TeamCity* 135 | 136 | # DotCover is a Code Coverage Tool 137 | *.dotCover 138 | 139 | # AxoCover is a Code Coverage Tool 140 | .axoCover/* 141 | !.axoCover/settings.json 142 | 143 | # Visual Studio code coverage results 144 | *.coverage 145 | *.coveragexml 146 | 147 | # NCrunch 148 | _NCrunch_* 149 | .*crunch*.local.xml 150 | nCrunchTemp_* 151 | 152 | # MightyMoose 153 | *.mm.* 154 | AutoTest.Net/ 155 | 156 | # Web workbench (sass) 157 | .sass-cache/ 158 | 159 | # Installshield output folder 160 | [Ee]xpress/ 161 | 162 | # DocProject is a documentation generator add-in 163 | DocProject/buildhelp/ 164 | DocProject/Help/*.HxT 165 | DocProject/Help/*.HxC 166 | DocProject/Help/*.hhc 167 | DocProject/Help/*.hhk 168 | DocProject/Help/*.hhp 169 | DocProject/Help/Html2 170 | DocProject/Help/html 171 | 172 | # Click-Once directory 173 | publish/ 174 | 175 | # Publish Web Output 176 | *.[Pp]ublish.xml 177 | *.azurePubxml 178 | # Note: Comment the next line if you want to checkin your web deploy settings, 179 | # but database connection strings (with potential passwords) will be unencrypted 180 | *.pubxml 181 | *.publishproj 182 | 183 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 184 | # checkin your Azure Web App publish settings, but sensitive information contained 185 | # in these scripts will be unencrypted 186 | PublishScripts/ 187 | 188 | # NuGet Packages 189 | *.nupkg 190 | # NuGet Symbol Packages 191 | *.snupkg 192 | # The packages folder can be ignored because of Package Restore 193 | **/[Pp]ackages/* 194 | # except build/, which is used as an MSBuild target. 195 | !**/[Pp]ackages/build/ 196 | # Uncomment if necessary however generally it will be regenerated when needed 197 | #!**/[Pp]ackages/repositories.config 198 | # NuGet v3's project.json files produces more ignorable files 199 | *.nuget.props 200 | *.nuget.targets 201 | 202 | # Microsoft Azure Build Output 203 | csx/ 204 | *.build.csdef 205 | 206 | # Microsoft Azure Emulator 207 | ecf/ 208 | rcf/ 209 | 210 | # Windows Store app package directories and files 211 | AppPackages/ 212 | BundleArtifacts/ 213 | Package.StoreAssociation.xml 214 | _pkginfo.txt 215 | *.appx 216 | *.appxbundle 217 | *.appxupload 218 | 219 | # Visual Studio cache files 220 | # files ending in .cache can be ignored 221 | *.[Cc]ache 222 | # but keep track of directories ending in .cache 223 | !?*.[Cc]ache/ 224 | 225 | # Others 226 | ClientBin/ 227 | ~$* 228 | *~ 229 | *.dbmdl 230 | *.dbproj.schemaview 231 | *.jfm 232 | *.pfx 233 | *.publishsettings 234 | orleans.codegen.cs 235 | 236 | # Including strong name files can present a security risk 237 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 238 | #*.snk 239 | 240 | # Since there are multiple workflows, uncomment next line to ignore bower_components 241 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 242 | #bower_components/ 243 | 244 | # RIA/Silverlight projects 245 | Generated_Code/ 246 | 247 | # Backup & report files from converting an old project file 248 | # to a newer Visual Studio version. Backup files are not needed, 249 | # because we have git ;-) 250 | _UpgradeReport_Files/ 251 | Backup*/ 252 | UpgradeLog*.XML 253 | UpgradeLog*.htm 254 | ServiceFabricBackup/ 255 | *.rptproj.bak 256 | 257 | # SQL Server files 258 | *.mdf 259 | *.ldf 260 | *.ndf 261 | 262 | # Business Intelligence projects 263 | *.rdl.data 264 | *.bim.layout 265 | *.bim_*.settings 266 | *.rptproj.rsuser 267 | *- [Bb]ackup.rdl 268 | *- [Bb]ackup ([0-9]).rdl 269 | *- [Bb]ackup ([0-9][0-9]).rdl 270 | 271 | # Microsoft Fakes 272 | FakesAssemblies/ 273 | 274 | # GhostDoc plugin setting file 275 | *.GhostDoc.xml 276 | 277 | # Node.js Tools for Visual Studio 278 | .ntvs_analysis.dat 279 | node_modules/ 280 | 281 | # Visual Studio 6 build log 282 | *.plg 283 | 284 | # Visual Studio 6 workspace options file 285 | *.opt 286 | 287 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 288 | *.vbw 289 | 290 | # Visual Studio LightSwitch build output 291 | **/*.HTMLClient/GeneratedArtifacts 292 | **/*.DesktopClient/GeneratedArtifacts 293 | **/*.DesktopClient/ModelManifest.xml 294 | **/*.Server/GeneratedArtifacts 295 | **/*.Server/ModelManifest.xml 296 | _Pvt_Extensions 297 | 298 | # Paket dependency manager 299 | .paket/paket.exe 300 | paket-files/ 301 | 302 | # FAKE - F# Make 303 | .fake/ 304 | 305 | # CodeRush personal settings 306 | .cr/personal 307 | 308 | # Python Tools for Visual Studio (PTVS) 309 | __pycache__/ 310 | *.pyc 311 | 312 | # Cake - Uncomment if you are using it 313 | # tools/** 314 | # !tools/packages.config 315 | 316 | # Tabs Studio 317 | *.tss 318 | 319 | # Telerik's JustMock configuration file 320 | *.jmconfig 321 | 322 | # BizTalk build output 323 | *.btp.cs 324 | *.btm.cs 325 | *.odx.cs 326 | *.xsd.cs 327 | 328 | # OpenCover UI analysis results 329 | OpenCover/ 330 | 331 | # Azure Stream Analytics local run output 332 | ASALocalRun/ 333 | 334 | # MSBuild Binary and Structured Log 335 | *.binlog 336 | 337 | # NVidia Nsight GPU debugger configuration file 338 | *.nvuser 339 | 340 | # MFractors (Xamarin productivity tool) working folder 341 | .mfractor/ 342 | 343 | # Local History for Visual Studio 344 | .localhistory/ 345 | 346 | # BeatPulse healthcheck temp database 347 | healthchecksdb 348 | 349 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 350 | MigrationBackup/ 351 | 352 | # Ionide (cross platform F# VS Code tools) working folder 353 | .ionide/ 354 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Jacob Mercado 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://dev.azure.com/pawsuwu/Taskban/_apis/build/status/jamerbi.Taskban?branchName=master)](https://dev.azure.com/pawsuwu/Taskban/_build/latest?definitionId=2&branchName=master) 2 | 3 | # Taskban 4 | 5 | A personal productivity tool developed with C# and XAML. I want it to be a combination of three tools: a task list, a Kanban board and a pomodoro. So, in the future, I will finish developing it. 6 | 7 | ## Details 8 | 9 | The application is simple and only needs a computer with Windows 7, 8 or 10 and Net Core 3.1+ installed. When you run the application, a taskban.db database file is created where the changes made are stored. 10 | * The app requires a Syncfusion license due to the use of WPF Kanban Board which is theirs, but they provide a free community license here: https://www.syncfusion.com/products/communitylicense 11 | 12 | ## Features 13 | 14 | #### A clean, simple UI 15 | * the description is optional 16 | 17 | ![Image of app](readmeimages/features4.gif) 18 | ![Image of app](readmeimages/features5.png) 19 | 20 | * Manage all your boards from the main window. Double-click to access an already created board or click on the X button to delete it 21 | 22 | ![Image of app](readmeimages/features2.gif) 23 | 24 | #### Data Binding everywhere (almost) easy and quick way to create tasks 25 | * Fill in the cards with the information you require, you can give them priority and visibility with tags 26 | ![Image of app](readmeimages/features1.gif) 27 | 28 | * Drag, add, edit and delete cards quickly 29 | ![Image of app](readmeimages/features3.gif) 30 | 31 | ## Features I will be adding in the future 32 | * Touch screen support 33 | * Due date of tasks 34 | * Pomodoro 35 | * Edit Kanban Board Columns 36 | * Themes 37 | * Autocompletion of the tags 38 | * Summary of everything in a calendar 39 | * User program configuration 40 | 41 | ## Built With 42 | * [Net Core 3.1](https://dotnet.microsoft.com/download/dotnet-core/3.1) 43 | * [Windows Presentation Foundation](https://docs.microsoft.com/en-us/visualstudio/designers/getting-started-with-wpf) 44 | * [Syncfusion for WPF Kanban Board](https://www.syncfusion.com/wpf-ui-controls/kanban-board) 45 | * [LiteDB](https://www.litedb.org/) 46 | * [MahApps.Metro](https://mahapps.com/) 47 | 48 | ## Download 49 | [Here](https://github.com/jamerbi/Taskban/releases/tag/v0.1.0) 50 | 51 | ## Authors 52 | 53 | * **Jacob Mercado** - [jamerbi](https://github.com/jamerbi) 54 | 55 | ## License 56 | 57 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details 58 | -------------------------------------------------------------------------------- /Taskban.WPF/App.xaml: -------------------------------------------------------------------------------- 1 |  4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /Taskban.WPF/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using Taskban.WPF.Database; 2 | using Taskban.WPF.Services; 3 | using System.Windows; 4 | 5 | namespace Taskban.WPF 6 | { 7 | public partial class App 8 | { 9 | public static IWindowService WindowService { get; } = new WindowService(); 10 | 11 | public static IUnitOfWork UnitOfWork { get; } = new UnitOfWork(); 12 | 13 | protected override void OnStartup(StartupEventArgs e) 14 | { 15 | WindowService.ShowMain(); 16 | 17 | base.OnStartup(e); 18 | } 19 | 20 | protected override void OnExit(ExitEventArgs e) 21 | { 22 | UnitOfWork.Dispose(); 23 | 24 | base.OnExit(e); 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /Taskban.WPF/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 | -------------------------------------------------------------------------------- /Taskban.WPF/Commands/RelayCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Input; 3 | 4 | namespace Taskban.WPF.Commands 5 | { 6 | public class RelayCommand : ICommand 7 | { 8 | private readonly Action _executeAction; 9 | 10 | private readonly Func _canExecuteFunc; 11 | 12 | public RelayCommand(Action executeAction, Func canExecuteFunc) 13 | { 14 | _executeAction = executeAction; 15 | _canExecuteFunc = canExecuteFunc; 16 | } 17 | 18 | public bool CanExecute(object parameter) 19 | { 20 | return _canExecuteFunc.Invoke(parameter); 21 | } 22 | 23 | public void Execute(object parameter) 24 | { 25 | _executeAction(parameter); 26 | } 27 | 28 | public event EventHandler CanExecuteChanged 29 | { 30 | add => CommandManager.RequerySuggested += value; 31 | remove => CommandManager.RequerySuggested -= value; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Taskban.WPF/Converters/ButtonVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows; 4 | using System.Windows.Data; 5 | 6 | namespace Taskban.WPF.Converters 7 | { 8 | public class ButtonVisibilityConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | return value != null && (bool) value ? Visibility.Visible : Visibility.Hidden; 13 | } 14 | 15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | return value; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Taskban.WPF/Converters/CountToWidthConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | 5 | namespace Taskban.WPF.Converters 6 | { 7 | public class CountToWidthConverter : IValueConverter 8 | { 9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 10 | { 11 | if (value != null && (int) value > 0) return 200; 12 | return 0; 13 | } 14 | 15 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 16 | { 17 | return value; 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /Taskban.WPF/Converters/FromNumberToVisibilityConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.Globalization; 4 | using System.Windows; 5 | using System.Windows.Data; 6 | 7 | namespace Taskban.WPF.Converters 8 | { 9 | public class FromNumberToVisibilityConverter : IValueConverter 10 | { 11 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 12 | { 13 | Debug.Assert(value != null, nameof(value) + " != null"); 14 | return (int) value > 0 ? Visibility.Visible : Visibility.Collapsed; 15 | } 16 | 17 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 18 | { 19 | return value; 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /Taskban.WPF/Converters/StringToColorConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Globalization; 3 | using System.Windows.Data; 4 | using System.Windows.Media; 5 | 6 | namespace Taskban.WPF.Converters 7 | { 8 | public class StringToColorConverter : IValueConverter 9 | { 10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 11 | { 12 | return (string) value switch 13 | { 14 | "High" => new SolidColorBrush(Colors.IndianRed), 15 | "Medium" => new SolidColorBrush(Colors.Goldenrod), 16 | "Low" => new SolidColorBrush(Colors.ForestGreen), 17 | _ => new SolidColorBrush(Colors.LightGray) 18 | }; 19 | } 20 | 21 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 22 | { 23 | return value; 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Taskban.WPF/Converters/SubTasksToStringConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.ObjectModel; 3 | using System.Globalization; 4 | using System.Linq; 5 | using System.Windows.Data; 6 | using Taskban.WPF.Entities; 7 | 8 | namespace Taskban.WPF.Converters 9 | { 10 | public class SubTasksToStringConverter : IValueConverter 11 | { 12 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) 13 | { 14 | var subTasks = (ObservableCollection) value; 15 | return $"{subTasks!.Count(task => (task != null) && task.Completed)}/{subTasks.Count}"; 16 | } 17 | 18 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) 19 | { 20 | return value; 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /Taskban.WPF/Database/BaseRepository.cs: -------------------------------------------------------------------------------- 1 | using LiteDB; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq.Expressions; 5 | 6 | namespace Taskban.WPF.Database 7 | { 8 | public class BaseRepository : IRepository where TEntity : class 9 | { 10 | private readonly ILiteCollection _collection; 11 | 12 | public BaseRepository(ILiteDatabase database, string collection) 13 | { 14 | _collection = database.GetCollection(collection); 15 | } 16 | 17 | public IEnumerable Get(Expression> filter = null, Expression> orderBy = null, bool ascending = true) 18 | { 19 | var query = _collection.Query(); 20 | 21 | if (filter != null) 22 | { 23 | query.Where(filter); 24 | } 25 | 26 | if (orderBy != null) 27 | { 28 | if (ascending) 29 | { 30 | query.OrderBy(orderBy); 31 | } 32 | else 33 | { 34 | query.OrderByDescending(orderBy); 35 | } 36 | } 37 | 38 | return query.ToList(); 39 | } 40 | 41 | public TEntity GetById(object id) 42 | { 43 | return _collection.FindOne($"$._id = {id}"); 44 | } 45 | 46 | public TEntity Insert(TEntity entity) 47 | { 48 | var result = _collection.Insert(entity); 49 | return GetById(result); 50 | } 51 | 52 | public void Update(TEntity entity) 53 | { 54 | _collection.Update(entity); 55 | } 56 | 57 | public void Delete(object id) 58 | { 59 | _collection.Delete((int) id); 60 | } 61 | } 62 | } -------------------------------------------------------------------------------- /Taskban.WPF/Database/IRepository.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq.Expressions; 4 | 5 | namespace Taskban.WPF.Database 6 | { 7 | public interface IRepository where TEntity : class 8 | { 9 | IEnumerable Get(Expression> filter = null, Expression> orderBy = null, bool ascending = true); 10 | TEntity GetById(object id); 11 | TEntity Insert(TEntity entity); 12 | void Update(TEntity entity); 13 | void Delete(object id); 14 | } 15 | } -------------------------------------------------------------------------------- /Taskban.WPF/Database/IUnitOfWork.cs: -------------------------------------------------------------------------------- 1 | using Taskban.WPF.Entities; 2 | using System; 3 | 4 | namespace Taskban.WPF.Database 5 | { 6 | public interface IUnitOfWork : IDisposable 7 | { 8 | IRepository Boards { get; } 9 | } 10 | } -------------------------------------------------------------------------------- /Taskban.WPF/Database/UnitOfWork.cs: -------------------------------------------------------------------------------- 1 | using LiteDB; 2 | using Taskban.WPF.Entities; 3 | 4 | namespace Taskban.WPF.Database 5 | { 6 | public class UnitOfWork : IUnitOfWork 7 | { 8 | private const string Name = "taskban.db"; 9 | public IRepository Boards { get; } 10 | 11 | //public IRepository Tasks { get; } 12 | 13 | //public IRepository Settings { get; } 14 | 15 | private readonly ILiteDatabase _database; 16 | 17 | public UnitOfWork() 18 | { 19 | _database = new LiteDatabase(Name); 20 | 21 | Boards = new BaseRepository(_database, "Boards"); 22 | } 23 | 24 | public void Dispose() 25 | { 26 | _database.Dispose(); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /Taskban.WPF/Entities/Board.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.ObjectModel; 3 | 4 | namespace Taskban.WPF.Entities 5 | { 6 | public class Board 7 | { 8 | public int Id { get; set; } 9 | public string Name { get; set; } 10 | public string Description { get; set; } 11 | public DateTime CreatedAt { get; } = DateTime.Now; 12 | public ObservableCollection Tasks { get; set; } = new ObservableCollection(); 13 | } 14 | } -------------------------------------------------------------------------------- /Taskban.WPF/Entities/SubTask.cs: -------------------------------------------------------------------------------- 1 | namespace Taskban.WPF.Entities 2 | { 3 | public class SubTask 4 | { 5 | public string Title { get; set; } 6 | public bool Completed { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /Taskban.WPF/Entities/Tag.cs: -------------------------------------------------------------------------------- 1 | namespace Taskban.WPF.Entities 2 | { 3 | public class Tag 4 | { 5 | public string Name { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Taskban.WPF/Entities/Task.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.ObjectModel; 3 | 4 | namespace Taskban.WPF.Entities 5 | { 6 | public class Task 7 | { 8 | public int Id { get; set; } 9 | public int BoardId { get; set; } 10 | public string Title { get; set; } 11 | public string Description { get; set; } 12 | public string Category { get; set; } 13 | public string Priority { get; set; } 14 | public DateTime CreatedAt { get; set; } 15 | public ObservableCollection Tags { get; set; } 16 | public ObservableCollection SubTasks { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /Taskban.WPF/Resources/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jamerbi/Taskban/fc38ead4c2d3124d22a633dbbfd825e7a5dd8b10/Taskban.WPF/Resources/logo.png -------------------------------------------------------------------------------- /Taskban.WPF/Services/IWindowService.cs: -------------------------------------------------------------------------------- 1 | using Taskban.WPF.Entities; 2 | 3 | namespace Taskban.WPF.Services 4 | { 5 | public interface IWindowService 6 | { 7 | void ShowMain(); 8 | void ShowBoard(Board board); 9 | void ShowMainCloseBoard(); 10 | } 11 | } -------------------------------------------------------------------------------- /Taskban.WPF/Services/WindowService.cs: -------------------------------------------------------------------------------- 1 | using Taskban.WPF.Entities; 2 | using Taskban.WPF.ViewModels; 3 | using Taskban.WPF.Views; 4 | 5 | namespace Taskban.WPF.Services 6 | { 7 | public class WindowService : IWindowService 8 | { 9 | private MainWindow _mainWindow; 10 | private BoardWindow _boardWindow; 11 | private SettingsWindows _settingsWindows; 12 | 13 | public void ShowMain() 14 | { 15 | _mainWindow = new MainWindow {DataContext = new MainViewModel()}; 16 | _mainWindow.Show(); 17 | } 18 | 19 | public void ShowBoard(Board board) 20 | { 21 | _boardWindow = new BoardWindow(); 22 | _boardWindow.DataContext = new BoardViewModel {BoardWindow = _boardWindow, Board = board}; 23 | _boardWindow.Show(); 24 | _mainWindow.Close(); 25 | } 26 | 27 | public void ShowMainCloseBoard() 28 | { 29 | ShowMain(); 30 | _boardWindow.Close(); 31 | } 32 | 33 | public void ShowSettings() 34 | { 35 | _settingsWindows = new SettingsWindows {DataContext = _boardWindow.DataContext}; 36 | _settingsWindows.ShowDialog(); 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /Taskban.WPF/Taskban.WPF.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | netcoreapp3.1 6 | true 7 | Jacob Mercado 8 | Taskban 9 | Jamerbi 10 | 0.1.0 11 | icon.png 12 | icon.ico 13 | 14 | 15 | 16 | 17 | 18 | True 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | PreserveNewest 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /Taskban.WPF/ViewModels/BoardViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Taskban.WPF.Commands; 3 | using Taskban.WPF.Entities; 4 | using System.Collections.ObjectModel; 5 | using System.Windows.Input; 6 | using Taskban.WPF.Views; 7 | 8 | namespace Taskban.WPF.ViewModels 9 | { 10 | public class BoardViewModel : ViewModelBase 11 | { 12 | public BoardWindow BoardWindow { get; set; } 13 | 14 | private Board _board; 15 | 16 | public Board Board 17 | { 18 | get => _board; 19 | set 20 | { 21 | _board = value; 22 | OnPropertyChanged(); 23 | } 24 | } 25 | 26 | private Task _selectedTask = new Task(); 27 | 28 | public Task SelectedTask 29 | { 30 | get => _selectedTask; 31 | set 32 | { 33 | _selectedTask = value; 34 | OnPropertyChanged(); 35 | } 36 | } 37 | 38 | private SubTask _newSubTask = new SubTask(); 39 | 40 | public SubTask NewSubTask 41 | { 42 | get => _newSubTask; 43 | set 44 | { 45 | _newSubTask = value; 46 | OnPropertyChanged(); 47 | } 48 | } 49 | 50 | private int _taskViewWidth; 51 | 52 | public int TaskViewWidth 53 | { 54 | get => _taskViewWidth; 55 | set 56 | { 57 | _taskViewWidth = value; 58 | OnPropertyChanged(); 59 | } 60 | } 61 | 62 | public ICommand CloseBoardCommand { get; } 63 | public ICommand AddTagCommand { get; } 64 | public ICommand AddSubTaskCommand { get; } 65 | public ICommand DeleteSubTaskCommand { get; } 66 | public ICommand DeleteTagCommand { get; } 67 | public ICommand DeleteTaskCommand { get; } 68 | public ICommand CloseTaskViewCommand { get; } 69 | public ICommand AddTaskCommand { get; } 70 | public ICommand SaveBoardCommand { get; } 71 | 72 | public BoardViewModel() 73 | { 74 | CloseBoardCommand = new RelayCommand(CloseBoardShowMain, o => true); 75 | AddTaskCommand = new RelayCommand(AddTask, o => true); 76 | AddTagCommand = new RelayCommand(AddNewTag, o => !string.IsNullOrWhiteSpace(o.ToString())); 77 | AddSubTaskCommand = new RelayCommand(AddNewSubTask, o => !string.IsNullOrWhiteSpace(_newSubTask.Title)); 78 | SaveBoardCommand = new RelayCommand(SaveBoard, o => true); 79 | DeleteSubTaskCommand = new RelayCommand(o => SelectedTask.SubTasks.Remove((SubTask) o), o => true); 80 | DeleteTagCommand = new RelayCommand(o => SelectedTask.Tags.Remove((Tag) o), o => true); 81 | DeleteTaskCommand = new RelayCommand(RemoveSelectedTask, o => SelectedTask != null); 82 | CloseTaskViewCommand = new RelayCommand(o => TaskViewWidth = 0, o => true); 83 | } 84 | 85 | private void CloseBoardShowMain(object parameter) 86 | { 87 | SaveBoard(parameter); 88 | App.WindowService.ShowMainCloseBoard(); 89 | } 90 | 91 | private void RemoveSelectedTask(object parameter) 92 | { 93 | Board.Tasks.Remove(SelectedTask); 94 | TaskViewWidth = 0; 95 | } 96 | 97 | private void AddNewSubTask(object parameter) 98 | { 99 | SelectedTask.SubTasks.Add(new SubTask {Completed = NewSubTask.Completed, Title = NewSubTask.Title}); 100 | BoardWindow.ClearSubTaskEntry(); 101 | } 102 | 103 | private void AddNewTag(object parameter) 104 | { 105 | SelectedTask.Tags.Add(new Tag {Name = parameter.ToString()}); 106 | BoardWindow.ClearTaskTagEntry(); 107 | } 108 | 109 | private void AddTask(object parameter) 110 | { 111 | var task = new Task 112 | { 113 | BoardId = Board.Id, Category = (string) parameter, CreatedAt = DateTime.Now, 114 | Description = "", Title = "", SubTasks = new ObservableCollection(), 115 | Priority = "None", Tags = new ObservableCollection() 116 | }; 117 | 118 | Board.Tasks.Insert(0, task); 119 | SelectedTask = task; 120 | TaskViewWidth = 250; 121 | } 122 | 123 | public void SaveBoard(object parameter) 124 | { 125 | App.UnitOfWork.Boards.Update(Board); 126 | } 127 | } 128 | } -------------------------------------------------------------------------------- /Taskban.WPF/ViewModels/HomeViewModel.cs: -------------------------------------------------------------------------------- 1 | using Taskban.WPF.Commands; 2 | using System; 3 | using System.Windows.Input; 4 | 5 | namespace Taskban.WPF.ViewModels 6 | { 7 | public class HomeViewModel : ViewModelBase 8 | { 9 | public ICommand NewBoardCommand { get; } 10 | 11 | public HomeViewModel(Action goNewBoarView) 12 | { 13 | NewBoardCommand = new RelayCommand(o => goNewBoarView(), o => true); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /Taskban.WPF/ViewModels/MainViewModel.cs: -------------------------------------------------------------------------------- 1 | using Taskban.WPF.Commands; 2 | using Taskban.WPF.Entities; 3 | using System.Collections.ObjectModel; 4 | using System.Windows.Input; 5 | 6 | namespace Taskban.WPF.ViewModels 7 | { 8 | public class MainViewModel : ViewModelBase 9 | { 10 | public ObservableCollection ListBoxSource { get; set; } 11 | 12 | private Board _selectedBoard = new Board(); 13 | 14 | public Board SelectedBoard 15 | { 16 | get => _selectedBoard; 17 | set 18 | { 19 | _selectedBoard = value; 20 | OnPropertyChanged(); 21 | } 22 | } 23 | 24 | private ViewModelBase _currentViewModel; 25 | 26 | public ViewModelBase CurrentViewModel 27 | { 28 | get => _currentViewModel; 29 | set 30 | { 31 | _currentViewModel = value; 32 | OnPropertyChanged(); 33 | } 34 | } 35 | 36 | public ICommand OpenBoardCommand { get; } 37 | public ICommand DeleteBoardCommand { get; } 38 | 39 | private readonly HomeViewModel _homeViewModel; 40 | private readonly NewBoardViewModel _boardViewModel; 41 | 42 | public MainViewModel() 43 | { 44 | _homeViewModel = new HomeViewModel(GoToBoardView); 45 | _boardViewModel = new NewBoardViewModel(GoToHomeView); 46 | 47 | CurrentViewModel = _homeViewModel; 48 | 49 | OpenBoardCommand = new RelayCommand(o => App.WindowService.ShowBoard(SelectedBoard), o => true); 50 | DeleteBoardCommand = new RelayCommand(DeleteBoard, o => true); 51 | 52 | ListBoxSource = new ObservableCollection(App.UnitOfWork.Boards.Get(orderBy: board => board.CreatedAt, ascending: false)); 53 | } 54 | 55 | private void GoToBoardView() 56 | { 57 | CurrentViewModel = _boardViewModel; 58 | } 59 | 60 | private void GoToHomeView() 61 | { 62 | CurrentViewModel = _homeViewModel; 63 | } 64 | 65 | private void DeleteBoard(object parameter) 66 | { 67 | var board = (Board) parameter; 68 | ListBoxSource.Remove(board); 69 | App.UnitOfWork.Boards.Delete(board.Id); 70 | } 71 | } 72 | } -------------------------------------------------------------------------------- /Taskban.WPF/ViewModels/NewBoardViewModel.cs: -------------------------------------------------------------------------------- 1 | using Taskban.WPF.Commands; 2 | using Taskban.WPF.Entities; 3 | using System; 4 | using System.Windows.Input; 5 | 6 | namespace Taskban.WPF.ViewModels 7 | { 8 | public class NewBoardViewModel : ViewModelBase 9 | { 10 | public Board Board 11 | { 12 | get => _board; 13 | set 14 | { 15 | _board = value; 16 | OnPropertyChanged(); 17 | } 18 | } 19 | 20 | private Board _board = new Board(); 21 | 22 | public ICommand CancelCommand { get; } 23 | 24 | public ICommand SaveCommand { get; } 25 | 26 | public NewBoardViewModel(Action goHomeView) 27 | { 28 | CancelCommand = new RelayCommand(o => goHomeView(), o => true); 29 | SaveCommand = new RelayCommand(o => SaveBoard(), o => !string.IsNullOrWhiteSpace(Board.Name)); 30 | } 31 | 32 | private void SaveBoard() 33 | { 34 | App.WindowService.ShowBoard(App.UnitOfWork.Boards.Insert(Board)); 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /Taskban.WPF/ViewModels/ViewModelBase.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.Runtime.CompilerServices; 3 | 4 | namespace Taskban.WPF.ViewModels 5 | { 6 | public abstract class ViewModelBase : INotifyPropertyChanged 7 | { 8 | public event PropertyChangedEventHandler PropertyChanged; 9 | 10 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) 11 | { 12 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /Taskban.WPF/Views/AboutWindow.xaml: -------------------------------------------------------------------------------- 1 |  10 | 12 | 14 | 16 | 17 | Developed by 18 | 21 | Jacob Mer. 22 | 23 | 24 | 26 | 27 | 28 | 29 | 31 | 33 | Source Code 34 | 35 | 36 | 68 | 72 | 78 | 84 | 85 | 95 | 96 | 97 | 98 | 99 | 100 | 106 | 107 | 108 | 109 | 111 | 114 | 243 | 245 | 246 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 261 | 262 | 269 | 271 | 273 | 274 | 275 | 279 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 298 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | -------------------------------------------------------------------------------- /Taskban.WPF/Views/BoardWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Taskban.WPF.Entities; 3 | using Taskban.WPF.ViewModels; 4 | using Syncfusion.UI.Xaml.Kanban; 5 | 6 | namespace Taskban.WPF.Views 7 | { 8 | public partial class BoardWindow 9 | { 10 | public BoardWindow() 11 | { 12 | InitializeComponent(); 13 | } 14 | 15 | private void SfKanban_OnCardTapped(object sender, KanbanTappedEventArgs e) 16 | { 17 | var viewModel = (BoardViewModel) DataContext; 18 | viewModel.SelectedTask = (Task) e.SelectedCard.Content; 19 | viewModel.TaskViewWidth = 250; 20 | ClearTaskTagEntry(); 21 | ClearSubTaskEntry(); 22 | } 23 | 24 | public void ClearSubTaskEntry() 25 | { 26 | SubTaskIsCompletedCheckBox.IsChecked = false; 27 | SubTaskTitleTextBox.Text = ""; 28 | } 29 | 30 | public void ClearTaskTagEntry() 31 | { 32 | TaskTagTextBox.Text = ""; 33 | } 34 | 35 | private void BoardWindow_OnClosed(object sender, EventArgs e) 36 | { 37 | var viewModel = (BoardViewModel) DataContext; 38 | viewModel.SaveBoard(null); 39 | } 40 | 41 | private void AboutMenuItem_Click(object sender, System.Windows.RoutedEventArgs e) 42 | { 43 | var window = new AboutWindow(); 44 | window.ShowDialog(); 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /Taskban.WPF/Views/HomeView.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 15 | 16 | 17 | 18 | 19 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /Taskban.WPF/Views/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | namespace Taskban.WPF.Views 2 | { 3 | public partial class MainWindow 4 | { 5 | public MainWindow() 6 | { 7 | InitializeComponent(); 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /Taskban.WPF/Views/NewBoardView.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 15 |