public void Update() { _design.Category = this.Parent.Parent.Text; _design.Subsection = this.Parent.Text; _design.Name = this.Text; _design.Save(); }
private void btnProperties_Click(object sender, System.EventArgs e) { if (SelectedNode != null) { if (!SelectedNode.Design.IsLoaded) { SelectedNode.Design.Load(); } DesignPropertyEditor dlg = new DesignPropertyEditor(); DesignData design = SelectedNode.Design; dlg.LoadForm(ref design); if (dlg.DialogResult == DialogResult.OK) { Cursor.Current = Cursors.WaitCursor; design.Save(); Cursor.Current = Cursors.Default; } design.Unload(); dlg.Dispose(); } }
private void mnuImportMultiText_Click(object sender, System.EventArgs e) { Cursor.Current = Cursors.WaitCursor; MultiTextDataAdapter adapter = new MultiTextDataAdapter(); DesignData design = adapter.ImportDesign(); if (design != null) { design.Save(); } Cursor.Current = Cursors.Default; }
private void ExtractDesign(bool multipleRects) { ItemExtracter extract = new ItemExtracter(); extract.UseMaxZ = ctlFilterZ.UseMaxZ; extract.UseMinZ = ctlFilterZ.UseMinZ; extract.MaxZ = ctlFilterZ.MaxZ; extract.MinZ = ctlFilterZ.MinZ; extract.Name = ctlProperties.DesignName; extract.Category = ctlProperties.Category; extract.Subsection = ctlProperties.Subsection; extract.NonStatic = _nonStatic; extract.Static = _static; extract.Frozen = _frozen; extract.Foundation = _foundation; extract.Hues = _hues; extract.MultipleRects = multipleRects; if (ctlProperties.CustomLevels) { extract.LevelZ = (int[])ctlProperties.LevelZ.ToArray(typeof(int)); } extract.OnExtracted += new ItemExtracter.DesignExtractEvent(OnExtracted); // wait for the extract to complete extract.ExtractDesign(); WaitForExtract(); extract.OnExtracted -= new ItemExtracter.DesignExtractEvent(OnExtracted); if (_extractedDesign != null) { _extractedDesign.Save(); } UpdateControlStates(); }