Example #1
0
 private void OpenFile(string fileName)
 {
     if (hyperlinkInterface.OpenFile(fileName))
     {
         recentProjectMenu.Notify(fileName);
         Search();
         UpdateStatusInfo();
     }
     else
     {
         MessageBox.Show(this, "Hyperlink Manager could not find this file at the specified path.", ConfigSettings.ApplicationTitle, MessageBoxButton.OK, MessageBoxImage.Error);
         recentProjectMenu.Remove(fileName);
     }
 }
Example #2
0
 private void recentProjectMenu_RecentProjectOpened(object sender, RecentProjectEventArgs e)
 {
     if (File.Exists(e.RecentFile.FullPath))
     {
         syncProject.Load(e.RecentFile.FullPath);
         ListviewHelper.ReloadListview(listView1, imageList, syncProject.SyncItems);
         recentProjectMenu.Notify(e.RecentFile.FullPath);
         recentProjectMenu.CurrentlyOpenedFile = e.RecentFile.FullPath;
         ConfigSettings.LastProject            = e.RecentFile.FullPath;
         this.Text = WindowCaption();
         EnableControls();
     }
     else
     {
         DialogResult result = Dialogs.MissingRecentFileError(this);
         if (result == System.Windows.Forms.DialogResult.Yes)
         {
             recentProjectMenu.Remove(e.RecentFile.FullPath);
         }
     }
 }