/// <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); }
/// <summary> ///This function is called when executing the action. /// </summary> ///<returns>true, if the action performed successfully</returns> public bool Execute(ActionCallingContext ctx) { try { Project currentProject = EProjectManager.GetInstance() .GetCurrentPrj(); if (currentProject == null) { MessageBox.Show("Нет открытого проекта!", "EPlaner", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return(true); } var exportForm = new XMLReporterDialog(); exportForm.SetProjectName(currentProject.ProjectName); exportForm.ShowDialog(); } catch (Exception ex) { MessageBox.Show(ex.Message); } return(true); }
/// <summary> /// Обновление текущих устройств. /// </summary> private bool UpdateDevices() { EProjectManager.GetInstance().SyncAndSave(); return(true); }
/// <summary> /// Получить имя главного (открытого в Eplan) проекта, вызывается /// из LUA /// </summary> /// <returns></returns> public string GetMainProjectName() { return(EProjectManager.GetInstance() .GetModifyingCurrentProjectName()); }