public virtual MainFormIOController GetNew() { WindowFlowPanel MainPanel = new WindowFlowPanel(); PanelControlEvents PanelEvents = new PanelControlEvents(); MyToolbar Toolbar = new MyToolbar(MainPanel, PanelEvents); return(new MainFormIOController(MainPanel, Toolbar, PanelEvents, "")); }
/// <summary> /// Creates a new instance of a MainFormIOController class. /// </summary> /// <param name="Form">The form to be associated with this controller.</param> /// <param name="Collection">The colleciton of forms in which the form is located.</param> public MainFormIOController(WindowFlowPanel MainPanel, MyToolbar Toolbar, PanelControlEvents Events, string Title) { this.mainPanel = MainPanel; this.toolbar = Toolbar; this.flowEvents = new FlowLayoutEvents(); this.formTitle = Title; SetEvents(Events); SubscribeToEvents(); }
public MyToolbar(WindowFlowPanel parent, PanelControlEvents events) { SetupToolbar(); windowFillStyle = FillStyles.FullWidth; autoSize = AutosizeTypes.Constant; windowDockType = DockTypes.TopLeft; this.parent = parent; removed = true; type = typeof(MyToolbar); originalSize = this.Size; events.ShowToolStrip += OnToolStripAdded; events.RemoveToolStrip += OnToolStripRemoved; }