Example #1
0
 internal virtual void OpenDocument(string filename)
 {
     if (!string.IsNullOrEmpty(filename))
     {
         var filePath = new FilePath(filename);
         IdeHelper.OpenDocument(filePath);
         StatusHelper.ShowStatus(MonoDevelop.Ide.Gui.Stock.OpenFileIcon, GetStatusPrefix(filename) + ": " + filename);
     }
     else
     {
         StatusHelper.ShowStatus(MonoDevelop.Ide.Gui.Stock.StatusError, "Could not find associated file");
     }
 }
 public virtual bool OpenDocument(string filename, Project project)
 {
     if (!string.IsNullOrEmpty(filename) && File.Exists(filename))
     {
         var filePath = new FilePath(filename);
         try {
             IdeHelper.OpenDocument(filePath, project);
             StatusHelper.ShowStatus(MonoDevelop.Ide.Gui.Stock.OpenFileIcon, GetStatusPrefix(filename) + ": " + filename);
             return(true);
         } catch (Exception ex) {
         }
     }
     StatusHelper.ShowStatus(MonoDevelop.Ide.Gui.Stock.StatusError, "Could not find associated file");
     return(false);
 }