public void ShowPropertyForm(Form caller, GenericProperties prop, SetValueCallBack2 PropertyChanged2, GetValueCallBack2 getPropertyValue, bool forceToShow) { if (propWindow2 != null) { propWindow2.showWindow(caller, prop, PropertyChanged2, getPropertyValue, forceToShow); propWindow2.setTopmost(true); } }
public void EditObject(object structData, SetValueCallBack2 setvalueCallBack, GetValueCallBack2 getvalueCallBack) { string helpYourselfMsg = "This is the property editor. Change any parameter you want. All changes are applied in real time."; if (!Visible) { return; } HelpZone.Text = "Please wait...."; HelpZone.Refresh(); //Console.WriteLine(" -> edit"); if (EditedDataSourceList.ContainsKey(structData)) { if (EditedDataSourceList[structData] == currentEditedDataSource) { HelpZone.Text = helpYourselfMsg; return; } } if (currentEditedDataSource != null) { currentEditedDataSource.root.stopEdit(); } UIElement it; if (!EditedDataSourceList.ContainsKey(structData)) { UIElementBaseParams rootparam = new UIElementBaseParams(panel1, HelpZone, null, null, "root", "Root", "root node", ""); it = new UIElement(rootparam); currentEditedDataSource = new EditedDataSource(structData, it); EditedDataSourceList[structData] = currentEditedDataSource; it.showLabel = false; it.expandable = true; it.ProcessNewType(structData); it.expanded = true; it.tabReOrder(0); } else { currentEditedDataSource = EditedDataSourceList[structData]; currentEditedDataSource.refresh(); } currentEditedDataSource.root.startEdit(setvalueCallBack, getvalueCallBack); currentEditedDataSource.root.resizeAll(); HelpZone.Text = helpYourselfMsg; outterpanel.Refresh(); }
public void showWindow(Form hostWindow, GenericProperties structData, SetValueCallBack2 setvalueCallBack, GetValueCallBack2 getvalueCallBack, bool ForceToTshow) { _changeCallback = setvalueCallBack; _getvalueCallback = getvalueCallBack; Text = "Properties of " + hostWindow.Text; if (ForceToTshow) { Show(); if (this.WindowState == FormWindowState.Minimized) { this.WindowState = FormWindowState.Normal; } } EditObject(structData, setvalueCallBack, getvalueCallBack); }