Пример #1
0
        // 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);
        }
Пример #2
0
        // 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);
        }
Пример #3
0
        public void adjustLinkViewAtCurrentScript(LinkModel linkModel, bool isOutgoingLink)
        {
            ScriptTabPage tabPage      = (ScriptTabPage)scriptsTabControl.SelectedTab;
            ScriptCanvas  scriptCanvas = tabPage.TheScriptCanvas;

            scriptCanvas.setDataByLinkModel(linkModel, isOutgoingLink);
        }
Пример #4
0
        public void AddLinkViewAtCurrentScript(LinkView newLinkView)
        {
            ScriptTabPage tabPage      = (ScriptTabPage)scriptsTabControl.SelectedTab;
            ScriptCanvas  scriptCanvas = tabPage.TheScriptCanvas;

            scriptCanvas.AddLinkView(newLinkView);
        }
Пример #5
0
        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();
        }
Пример #6
0
        public bool deleteLinkView(LinkModel linkModel)
        {
            if (SimulationManager.checkSimulating())
            {
                return(false);
            }

            ScriptTabPage tabPage      = (ScriptTabPage)scriptsTabControl.SelectedTab;
            ScriptCanvas  scriptCanvas = tabPage.TheScriptCanvas;

            scriptCanvas.deleteLinkView(linkModel);
            return(true);
        }