/// <summary> /// Maximize the specified Maximize. This is a temporarly VALUE only. Meant to faciliate editing. /// </summary> /// <param name='Maximize'> /// If set to <c>true</c> maximize. /// </param> public void Maximize(bool Maximized) { lg.Instance.Line("Maximize", ProblemType.MESSAGE, String.Format("Calling Maximize for note with GUID = {0} and Parent LayoutPanel GUID Of {1}", this.GuidForNote, Layout.GUID)); // is this actually dock=none/bringtofront, full width? if (true == Maximized) { ParentNotePanel.Dock = DockStyle.None; // Dock = System.Windows.Forms.DockStyle.None; // temporary size change (change the form, not the XML) ParentNotePanel.Location = new Point(0, 0); ParentNotePanel.Height = Layout.Height - 15; ParentNotePanel.Width = Layout.Width - 15; ParentNotePanel.BringToFront(); IsMaximized = true; } else { // restore defaults this.Dock = DockStyle.None; // ParentNotePanel.Dock = DockStyle.Fill; UpdateLocation(); IsMaximized = false; } //UpdateLocation (); }
/// <summary> /// Recreates the interface, usually called when something like Caption is changed. Use UpdateLocation for position only changes /// /// DO NOT CALL THIS FROM EDITING PROPERTIES! /// </summary> /// <param name='Layout'> /// Layout. /// </param> public virtual void Update(LayoutPanelBase Layout) { Save(); ParentNotePanel.Dispose(); //Parent = null; CreateParent(Layout); }
public void ForceTableUpdate(DataTable newDataSource) { dataSource = newDataSource; Table = new TablePanel(dataSource, HandleCellBeginEdit, Columns, GoToNote, this.Caption, GetRandomTableResults); // ColumnDetails[] updatedColumns = Table.GetColumns(true); // if (null != updatedColumns) // { // // // we don't save if columns have been blanked // lg.Instance.Line("NoteDataXML_Table->Save", ProblemType.MESSAGE, "Do not save empty columns, which may have happened simply because the control was not visible"); // Columns=updatedColumns; // } // Save (); //Update(Layout); ParentNotePanel.Dispose(); //Parent = null; CreateParent(Layout); }
protected override void DoBuildChildren(LayoutPanelBase Layout) { //Width = 500; base.DoBuildChildren(Layout); // GetChildLayout().SystemNote = true; CaptionLabel.Dock = System.Windows.Forms.DockStyle.Top; //CaptionLabel.Visible = false; // Maximize(true); ParentNotePanel.Leave += HandleLeave; //Parent.Enter+= HandleEnter; //ParentNotePanel.GotFocus+= HandleGotFocus; //ParentNotePanel.MouseEnter+= HandleMouseEnter; ParentNotePanel.BringToFront(); //Parent.Dock = System.Windows.Forms.DockStyle.Left; Dock = DockStyle.Fill; UpdateLocation(); // Parent.BringToFront(); }
/// <summary> /// Destroy this instance. /// /// Called during a move (and probably a delete when they get there /// </summary> public void Destroy() { //NewMessage.Show ("DO NOT CALL THIS JAN 20 2013"); ParentNotePanel.Dispose(); }