Пример #1
0
 /// <summary>
 /// Creates an instance of the class
 /// </summary>
 public CodeEditorControl()
 {
     InitializeComponent();
     referencePanel1.ParentEditor = this;
     References                = new AssemblyReferenceCollection();
     References.ListChanged   += new ListChangedEventHandler(References_ListChanged);
     ErrorPanelSettings        = new ErrorPanelOptions(this);
     ReferencePanelSettings    = new ReferencePanelOptions(this);
     CompileRequestOptions     = new CompileRequestOptions();
     wpfControl1.ParentControl = this;
     Persistance               = new CSharpTextEditor.PersistanceCache(this);
     buttonErrorPanelOpenHide_Click(this, new EventArgs());
     if (!DesignMode)
     {
         // PersistencePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CodeEditorControl");
         Caret_PositionChanged(this, new EventArgs());
         wpfControl1.TextEditor1.KeyUp += new System.Windows.Input.KeyEventHandler(TextEditor1_KeyUp);
         wpfControl1.TextEditor1.TextArea.Caret.PositionChanged += new EventHandler(Caret_PositionChanged);
     }
     // TODO: button focus change if need
 }
Пример #2
0
 /// <summary>
 /// Creates an instance of the class
 /// </summary>
 public CodeEditorControl()
 {
     InitializeComponent();
     referencePanel1.ParentEditor = this;
     References = new AssemblyReferenceCollection();
     References.ListChanged += new ListChangedEventHandler(References_ListChanged);
     ErrorPanelSettings = new ErrorPanelOptions(this);
     ReferencePanelSettings = new ReferencePanelOptions(this);
     CompileRequestOptions = new CompileRequestOptions();
     wpfControl1.ParentControl = this;
     Persistance = new CSharpTextEditor.PersistanceCache(this);
     buttonErrorPanelOpenHide_Click(this, new EventArgs());
     if (!DesignMode)
     {
        // PersistencePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CodeEditorControl");               
         Caret_PositionChanged(this, new EventArgs());
         wpfControl1.TextEditor1.KeyUp += new System.Windows.Input.KeyEventHandler(TextEditor1_KeyUp);
         wpfControl1.TextEditor1.TextArea.Caret.PositionChanged += new EventHandler(Caret_PositionChanged);
     }
     // TODO: button focus change if need
 }