/// <summary> /// This function is the callback used to execute the command when the menu item is clicked. /// See the constructor to see how the menu item is associated with this function using /// OleMenuCommandService service and MenuCommand class. /// </summary> /// <param name="sender">Event sender.</param> /// <param name="e">Event args.</param> private void Execute(object sender, EventArgs e) { ThreadHelper.ThrowIfNotOnUIThread(); WindowDiagramControl windowDiagramControl = WindowDiagramControl.getInstance(); windowDiagramControl.Diagram.save(); }
/// <summary> /// Initializes a new instance of the <see cref="WindowDiagram"/> class. /// </summary> public WindowDiagram() : base(null) { this.Caption = "WindowDiagram"; // This is the user control hosted by the tool window; Note that, even if this class implements IDisposable, // we are not calling Dispose on this object. This is because ToolWindowPane calls Dispose on // the object returned by the Content property. this.Content = WindowDiagramControl.getInstance(); }