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

            if (handler != null)
            {
                handler(this, e);
            }
        }
Ejemplo n.º 2
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));
     }
 }
 protected virtual void OnOpenFileEvent(OpenFileEventArgs e)
 {
     EventHandler<OpenFileEventArgs> handler = OpenFileEvent;
     if (handler != null)
         handler(this, e);
 }
Ejemplo n.º 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));
     }
 }