Example #1
0
 public void OpenFileExec(TabVM tab)
 {
     if (File.Exists(tab.File))
     {
         var argument = "/select, \"" + tab.File + "\"";
         Process.Start("explorer.exe", argument);
     }
     else
     {
         var notify = new Notify(new NotifyOptions(TimeSpan.FromSeconds(2),
                                                   Window,
                                                   NotifyCorner.BottomCenter,
                                                   with: 300,
                                                   offsetX: 0,
                                                   offsetY: 5));
         notify.Show("Путь скопирован в буфер обмена",
                     NotifyType.Information,
                     new NotifyMessageOptions {
             ShowCloseButton = false
         });
         Clipboard.SetText(tab.File);
     }
 }
Example #2
0
 private int HistoryOrder(TabVM t1, TabVM t2)
 {
     return(t2.Start.CompareTo(t1.Start));
 }
Example #3
0
 private bool HistoryFilter(TabVM tab)
 {
     return(HistorySearch.IsNullOrEmpty() || Regex.IsMatch(tab.File, Regex.Escape(HistorySearch), RegexOptions.IgnoreCase));
 }