// select the object in cbb: link public void selectExistedObject(LinkModel link) { if (link is null || cbbExistedLinks is null || cbbExistedLinks.Items is null || scriptsTabControl is null || scriptsTabControl.SelectedTab is null) { return; } cbbExistedLinks.SelectedIndex = cbbExistedLinks.Items.IndexOf(link); ScriptCanvas canvas = ((ScriptTabPage)scriptsTabControl.SelectedTab).TheScriptCanvas; if (canvas is null) { return; } LinkView linkView = canvas.getLinkViewById(link.Id); if (linkView is null) { return; } ModelManager.showInfoPanel(linkView); }
// select the object in cbb: state public void selectExistedObject(StateModel state) { if (state is null || cbbExistedStates is null || cbbExistedStates.Items is null || scriptsTabControl is null || scriptsTabControl.SelectedTab is null) { return; } cbbExistedStates.SelectedIndex = cbbExistedStates.Items.IndexOf(state); ScriptCanvas canvas = ((ScriptTabPage)scriptsTabControl.SelectedTab).TheScriptCanvas; if (canvas is null) { return; } StateView stateView = canvas.getStateViewById(state.Id); if (stateView is null) { return; } ModelManager.showInfoPanel(stateView); //((ScriptTabPage)scriptsTabControl.SelectedTab).TheScriptCanvas.translateToState(stateView); }
public void adjustLinkViewAtCurrentScript(LinkModel linkModel, bool isOutgoingLink) { ScriptTabPage tabPage = (ScriptTabPage)scriptsTabControl.SelectedTab; ScriptCanvas scriptCanvas = tabPage.TheScriptCanvas; scriptCanvas.setDataByLinkModel(linkModel, isOutgoingLink); }
public void AddLinkViewAtCurrentScript(LinkView newLinkView) { ScriptTabPage tabPage = (ScriptTabPage)scriptsTabControl.SelectedTab; ScriptCanvas scriptCanvas = tabPage.TheScriptCanvas; scriptCanvas.AddLinkView(newLinkView); }
public void invalidateCanvasAtCurrentScript(ScriptModel scriptModel = null) { ScriptCanvas canvas = (scriptsTabControl.SelectedTab as ScriptTabPage).TheScriptCanvas; if (!(scriptModel is null)) { canvas.setDataByScriptModel(scriptModel); } getCertainStateViewOnTheShell(0).Invalidate(); canvas.Invalidate(); }
public bool deleteLinkView(LinkModel linkModel) { if (SimulationManager.checkSimulating()) { return(false); } ScriptTabPage tabPage = (ScriptTabPage)scriptsTabControl.SelectedTab; ScriptCanvas scriptCanvas = tabPage.TheScriptCanvas; scriptCanvas.deleteLinkView(linkModel); return(true); }