diff options
| author | Roy <roy.mail.net@gmail.com> | 2017-12-26 23:55:41 +0200 |
|---|---|---|
| committer | Roy <roy.mail.net@gmail.com> | 2017-12-26 23:55:41 +0200 |
| commit | 9d12fd0ba222619dd5b42816ed004c7b762809dd (patch) | |
| tree | bf8c2dd95f70484f9f8474ab44d4918ef2b30f44 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CatsViewVM.cs | |
| parent | 03caa4c6a2807e461edd98fc377498674e83c15c (diff) | |
| download | Tango-9d12fd0ba222619dd5b42816ed004c7b762809dd.tar.gz Tango-9d12fd0ba222619dd5b42816ed004c7b762809dd.zip | |
Added CCT & CAT to DB Module !
Implemented "deep filtering" on db module search.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CatsViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CatsViewVM.cs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CatsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CatsViewVM.cs new file mode 100644 index 000000000..74a7e29eb --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/CatsViewVM.cs @@ -0,0 +1,41 @@ +using Microsoft.Win32; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.Commands; +using Tango.DAL.Observables; +using Tango.MachineStudio.Common.Notifications; + +namespace Tango.MachineStudio.DB.ViewModels +{ + public class CatsViewVM : DbTableViewModel<Cat> + { + public CatsViewVM(INotificationProvider notification) : base(notification) + { + SelectDataFileCommand = new RelayCommand(SelectDataFile); + } + + public RelayCommand SelectDataFileCommand { get; set; } + + private void SelectDataFile() + { + OpenFileDialog dlg = new OpenFileDialog(); + dlg.Filter = "Color Adjustment Files|*.CAT"; + dlg.Title = "Select Color Adjustment File"; + if (dlg.ShowDialog().Value) + { + try + { + EditEntity.Data = File.ReadAllBytes(dlg.FileName); + } + catch (Exception ex) + { + _notification.ShowError(ex.Message); + } + } + } + } +} |
