Exemple #1
0
        internal static void OnFileBrowsed(object?sender, FileBrowsedEventArgs args)
        {
            var folder = args.SelectedFile;

            if (string.IsNullOrEmpty(folder))
            {
                return;
            }
            Helpers.UpdateRecentFolderList(folder);
            if (sender != null)
            {
                var fileSelectable = (IFileSelectable)sender;
                fileSelectable.SetFolderValues(GetFolderValues());
                fileSelectable.SeletedFolderIndex = 2;
            }
        }
Exemple #2
0
 internal static void OnDropdownSelectionChanged(object?sender, FileBrowsedEventArgs args)
 {
     if (sender != null)
     {
         var fileSelectable = (IFileSelectable)sender;
         var index          = fileSelectable.SeletedFolderIndex;
         if (index == 0)
         {
             Config.Instance.FolderSelectionMode = FolderSelectionMode.Auto;
         }
         else if (!string.IsNullOrEmpty(args.SelectedFile))
         {
             Config.Instance.FolderSelectionMode = FolderSelectionMode.Manual;
             if (index > 1)
             {
                 Config.Instance.UserSelectedDownloadFolder = args.SelectedFile;
             }
         }
         Config.SaveConfig();
     }
 }