/// <summary> /// /// </summary> // internal bool ZoomEnabled { get { return (gViewer.DrawingPanel as DrawingPanel).ZoomEnabled; } set { (gViewer.DrawingPanel as DrawingPanel).ZoomEnabled = value; } } /// <summary> /// Default constructor /// </summary> public GraphEditor() : this(null, null, null) { ShowEditorDelegate = DefaultShowEditor; ValidateEditorDelegate = DefaultValidateEditor; CloseEditorDelegate = DefaultCloseEditor; ShowEditorDelegate(null); }
/// <summary> /// /// </summary> // internal bool ZoomEnabled { get { return (gViewer.DrawingPanel as DrawingPanel).ZoomEnabled; } set { (gViewer.DrawingPanel as DrawingPanel).ZoomEnabled = value; } } /// <summary> /// Default constructor /// </summary> public GraphEditor() : this(null, null, null) { ShowEditorDelegate = DefaultShowEditor; ValidateEditorDelegate = DefaultValidateEditor; CloseEditorDelegate = DefaultCloseEditor; ShowEditorDelegate(null); treeImage = Image.FromFile("tree.jpg"); }
/// <summary> /// A constructor that allows the user to specify functions which deals with the label/property editing /// </summary> /// <param name="showEditorDelegate">A delegate which constructs and displays the editor for a given object.</param> /// <param name="validateEditorDelegate">A delegate which validates the content of the editor and copies it to the graph.</param> /// <param name="closeEditorDelegate">A delegate which closes the editor.</param> internal GraphEditor(ShowEditor showEditorDelegate, ValidateEditor validateEditorDelegate, CloseEditor closeEditorDelegate) { ShowEditorDelegate = showEditorDelegate; ValidateEditorDelegate = validateEditorDelegate; CloseEditorDelegate = closeEditorDelegate; SuspendLayout(); Controls.Add(gViewer); gViewer.Dock = DockStyle.Fill; m_LabelBox.Enabled = false; m_LabelBox.Dock = DockStyle.Top; m_LabelBox.KeyDown += m_LabelBox_KeyDown; ResumeLayout(); /* this.drawingLayoutEditor = new Microsoft.Msagl.Drawing.DrawingLayoutEditor(this.gViewer, * new Microsoft.Msagl.Drawing.DelegateForEdge(edgeDecorator), * new Microsoft.Msagl.Drawing.DelegateForEdge(edgeDeDecorator), * new Microsoft.Msagl.Drawing.DelegateForNode(nodeDecorator), * new Microsoft.Msagl.Drawing.DelegateForNode(nodeDeDecorator), * new Microsoft.Msagl.Drawing.MouseAndKeysAnalyser(mouseAndKeysAnalyserForDragToggle)); */ (gViewer as IViewer).MouseDown += Form1_MouseDown; (gViewer as IViewer).MouseUp += Form1_MouseUp; // gViewer.DrawingPanel.Paint += new PaintEventHandler(gViewer_Paint); gViewer.NeedToCalculateLayout = false; toolTip.Active = true; toolTip.AutoPopDelay = 5000; toolTip.InitialDelay = 1000; toolTip.ReshowDelay = 500; ToolBar.ButtonClick += ToolBar_ButtonClick; }
/// <summary> /// A constructor that allows the user to specify functions which deals with the label/property editing /// </summary> /// <param name="showEditorDelegate">A delegate which constructs and displays the editor for a given object.</param> /// <param name="validateEditorDelegate">A delegate which validates the content of the editor and copies it to the graph.</param> /// <param name="closeEditorDelegate">A delegate which closes the editor.</param> internal GraphEditor(ShowEditor showEditorDelegate, ValidateEditor validateEditorDelegate, CloseEditor closeEditorDelegate) { ShowEditorDelegate = showEditorDelegate; ValidateEditorDelegate = validateEditorDelegate; CloseEditorDelegate = closeEditorDelegate; SuspendLayout(); Controls.Add(gViewer); gViewer.Dock = DockStyle.Fill; m_LabelBox.Enabled = false; m_LabelBox.Dock = DockStyle.Top; m_LabelBox.KeyDown += m_LabelBox_KeyDown; ResumeLayout(); /* this.drawingLayoutEditor = new Microsoft.Msagl.Drawing.DrawingLayoutEditor(this.gViewer, new Microsoft.Msagl.Drawing.DelegateForEdge(edgeDecorator), new Microsoft.Msagl.Drawing.DelegateForEdge(edgeDeDecorator), new Microsoft.Msagl.Drawing.DelegateForNode(nodeDecorator), new Microsoft.Msagl.Drawing.DelegateForNode(nodeDeDecorator), new Microsoft.Msagl.Drawing.MouseAndKeysAnalyser(mouseAndKeysAnalyserForDragToggle)); */ (gViewer as IViewer).MouseDown += Form1_MouseDown; (gViewer as IViewer).MouseUp += Form1_MouseUp; (gViewer as IViewer).MouseUp += GViewerKeyDown; gViewer.SaveButtonVisible = false; gViewer.NavigationVisible = false; // gViewer.DrawingPanel.Paint += new PaintEventHandler(gViewer_Paint); gViewer.NeedToCalculateLayout = false; toolTip.Active = true; toolTip.AutoPopDelay = 5000; toolTip.InitialDelay = 1000; toolTip.ReshowDelay = 500; ToolBar.ButtonClick += ToolBar_ButtonClick; }
private void TextEditorForm_FormClosed(object sender, FormClosedEventArgs e) { _tem.Text = EditorRtb.Text; CloseEditor?.Invoke(); }
private void FavoritesForm_FormClosed(object sender, FormClosedEventArgs e) { _favoritesManager.UpdateCallHistory -= FavoritesManager_UpdateCallHistory; LanguageManager.Instance.LanguageChanged -= LanguageChanged; CloseEditor?.Invoke(); }