Esempio n. 1
0
 public void Options_Initialize(OptionsViewModel ovm)
 {
     // Monitored Folders
     ovm.MonitoredFolders.Clear();
     foreach (var folder in Core.Data.UserData.MonitoredFolders)
     {
         var vm = new FolderViewModel()
         {
             Data = folder,
             IsVisible_DeleteButton = true,
             UpdateMonitoredFolders = () => Options_Initialize(ovm)
         };
         ovm.MonitoredFolders.Add(vm);
     }
     // Destination Folder
     ovm.DestinationFolder = new FolderViewModel() { Data = new Folder() { FolderName = Core.Data.UserData.DestinationFolder } };
 }
Esempio n. 2
0
 internal void Options_AddNewMonitoredFolder(OptionsViewModel ovm)
 {
     var vm = new FolderViewModel()
     {
         Data = new Folder(),
         UpdateMonitoredFolders = () => Options_Initialize(ovm)
     };
     ovm.MonitoredFolders.Add(vm);
 }
Esempio n. 3
0
 internal void Options_DeleteMonitoredFolder(FolderViewModel vm)
 {
     var data = vm.Data;
     if (!Data.UserData.MonitoredFolders.Contains(data)) return;
     Data.UserData.MonitoredFolders.Remove(data);
     vm.UpdateMonitoredFolders?.Invoke();
 }