protected virtual void OnOpenFileEvent(OpenFileEventArgs e)
        {
            EventHandler <OpenFileEventArgs> handler = OpenFileEvent;

            if (handler != null)
            {
                handler(this, e);
            }
        }
 void HandleOpenFileEvent(Object sender, OpenFileEventArgs e)
 {
     if (File.Exists(e.Path))
     {
         Window     window     = _applicationObject.ItemOperations.OpenFile(e.Path);
         TextWindow textWindow = window.Document.Object("TextWindow") as TextWindow;
         textWindow.Selection.GotoLine(e.LineNumber);
     }
     else
     {
         MessageBox.Show(String.Format("{0} does not exist (but if it did, it might have line {1}!", e.Path, e.LineNumber));
     }
 }
 protected virtual void OnOpenFileEvent(OpenFileEventArgs e)
 {
     EventHandler<OpenFileEventArgs> handler = OpenFileEvent;
     if (handler != null)
         handler(this, e);
 }
Exemple #4
0
 void HandleOpenFileEvent(Object sender, OpenFileEventArgs e)
 {
     if (File.Exists(e.Path))
     {
         Window window = _applicationObject.ItemOperations.OpenFile(e.Path);
         TextWindow textWindow = window.Document.Object("TextWindow") as TextWindow;
         textWindow.Selection.GotoLine(e.LineNumber);
     }
     else
     {
         MessageBox.Show(String.Format("{0} does not exist (but if it did, it might have line {1}!", e.Path, e.LineNumber));
     }
 }