/// <summary> ///This function is called when executing the action. /// </summary> ///<returns>true, if the action performed successfully</returns> public bool Execute(ActionCallingContext ctx) { try { if (EProjectManager.GetInstance().GetCurrentPrj() == null) { MessageBox.Show("Нет открытого проекта!", "EPlaner", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { Editor.ITreeViewItem treeViewItem = null; DFrm.OnSetNewValue OnSetNewValueFunction = null; bool isRebuiltTree = true; DFrm.GetInstance().ShowDisplayObjects(treeViewItem, OnSetNewValueFunction, isRebuiltTree); } } catch (Exception ex) { MessageBox.Show(ex.Message); } return(true); }
/// <summary> ///This function is called when executing the action. /// </summary> ///<returns>true, if the action performed successfully</returns> public bool Execute(ActionCallingContext ctx) { try { if (EProjectManager.GetInstance().GetCurrentPrj() == null) { MessageBox.Show("Нет открытого проекта!", "EPlaner", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { Device.DeviceType[] devTypes = null; // All. Device.DeviceSubType[] devSubTypes = null; // All. bool showChannels = true; bool showCheckboxes = false; string checkedDev = ""; DFrm.OnSetNewValue OnSetNewValueFunction = null; bool isRebuiltTree = true; DFrm.GetInstance().ShowDevices( Device.DeviceManager.GetInstance(), devTypes, devSubTypes, showChannels, showCheckboxes, checkedDev, OnSetNewValueFunction, isRebuiltTree); } } catch (Exception ex) { MessageBox.Show(ex.Message); } return(true); }