Exemplo n.º 1
0
        private void OutputTextBox_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            int Line = OutputTextBox.GetLineFromCharIndex(OutputTextBox.GetCharIndexFromPosition(e.Location));

            if (ErrorsAndWarningsDict.ContainsKey(Line))
            {
                if (LastHighlitedLine != -1)
                {
                    CleanHighlight(LastHighlitedLine);
                }
                HighlightLine(Line, Color.Blue, Color.White);
                WEMessage mes = ErrorsAndWarningsDict[Line];
                if ((mes.MessageObject as FileMessageObject) != null)
                {
                    FileMessageObject FMO = mes.MessageObject as FileMessageObject;
                    if (File.Exists(FMO.File))
                    {
                        PKStudio.Helpers.EditorsFormsController.EditFileDescriptor comp = new PKStudio.Helpers.EditorsFormsController.EditFileDescriptor();
                        comp.Path   = FMO.File;
                        comp.Line   = FMO.LineNumber;
                        comp.Column = FMO.ColumnNumber;
                        this.OnEditEvent(comp);
                    }
                }
                if ((mes.MessageObject as ComponentMessageObject) != null)
                {
                    ComponentMessageObject CMO = mes.MessageObject as ComponentMessageObject;
                    this.OnEditEvent(CMO.Component);
                }
            }
        }
Exemplo n.º 2
0
 private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (listView1.SelectedItems.Count > 0)
     {
         WEMessage mes = (WEMessage)listView1.SelectedItems[0].Tag;
         if ((mes.MessageObject as FileMessageObject) != null)
         {
             FileMessageObject FMO = mes.MessageObject as FileMessageObject;
             if (File.Exists(FMO.File))
             {
                 PKStudio.Helpers.EditorsFormsController.EditFileDescriptor comp = new PKStudio.Helpers.EditorsFormsController.EditFileDescriptor();
                 comp.Path   = FMO.File;
                 comp.Line   = FMO.LineNumber;
                 comp.Column = FMO.ColumnNumber;
                 this.OnEditEvent(comp);
             }
         }
         if ((mes.MessageObject as ComponentMessageObject) != null)
         {
             ComponentMessageObject CMO = mes.MessageObject as ComponentMessageObject;
             this.OnEditEvent(CMO.Component);
         }
     }
 }
Exemplo n.º 3
0
 private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (listView1.SelectedItems.Count > 0)
     {
         WEMessage mes = (WEMessage)listView1.SelectedItems[0].Tag;
         if ((mes.MessageObject as FileMessageObject) != null)
         {
             FileMessageObject FMO = mes.MessageObject as FileMessageObject;
             if (File.Exists(FMO.File))
             {
                 PKStudio.Helpers.EditorsFormsController.EditFileDescriptor comp = new PKStudio.Helpers.EditorsFormsController.EditFileDescriptor();
                 comp.Path = FMO.File;
                 comp.Line = FMO.LineNumber;
                 comp.Column = FMO.ColumnNumber;
                 this.OnEditEvent(comp);
             }
         }
         if ((mes.MessageObject as ComponentMessageObject) != null)
         {
             ComponentMessageObject CMO = mes.MessageObject as ComponentMessageObject;
             this.OnEditEvent(CMO.Component);
         }
     }
 }
Exemplo n.º 4
0
 private void OutputTextBox_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     int Line = OutputTextBox.GetLineFromCharIndex(OutputTextBox.GetCharIndexFromPosition(e.Location));
     if (ErrorsAndWarningsDict.ContainsKey(Line))
     {
         if (LastHighlitedLine != -1) CleanHighlight(LastHighlitedLine);
         HighlightLine(Line, Color.Blue, Color.White);
         WEMessage mes = ErrorsAndWarningsDict[Line];
         if ((mes.MessageObject as FileMessageObject) != null)
         {
             FileMessageObject FMO = mes.MessageObject as FileMessageObject;
             if (File.Exists(FMO.File))
             {
                 PKStudio.Helpers.EditorsFormsController.EditFileDescriptor comp = new PKStudio.Helpers.EditorsFormsController.EditFileDescriptor();
                 comp.Path = FMO.File;
                 comp.Line = FMO.LineNumber;
                 comp.Column = FMO.ColumnNumber;
                 this.OnEditEvent(comp);
             }
         }
         if ((mes.MessageObject as ComponentMessageObject) != null)
         {
             ComponentMessageObject CMO = mes.MessageObject as ComponentMessageObject;
             this.OnEditEvent(CMO.Component);
         }
     }
 }