Beispiel #1
0
        void GraphEditor_EditSubmodelClick(object sender, EventArgs e)
        {
            ManageSubmodelForm form = new Modeller.ManageSubmodelForm(Model, Model.DisplayedSubmodel);

            if (form.ShowDialog() == DialogResult.OK)
            {
                Model.CaptureCoordinates();
                Model.RebindControl();
                RefreshNodeCombobox();
                FillSubmodelComboBox(form.Submodel);
            }
        }
Beispiel #2
0
        private void CmbSubmodels_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cmbSubmodels.Text == NEWSUBMODEL)
            {
                ManageSubmodelForm form = new Modeller.ManageSubmodelForm(Model);
                if (form.ShowDialog() == DialogResult.OK)
                {
                    Model.Submodels.Submodel.Add(form.Submodel);
                    FillSubmodelComboBox();
                    cmbSubmodels.SelectedItem = form.Submodel;
                }
            }
            else
            {
                selectedNode            = null;
                Model.DisplayedSubmodel = cmbSubmodels.SelectedItem as Submodel;
            }

            this.graphEditor.Viewer.Tag = Model.DisplayedSubmodel;
            this.entityEditor.CloseEditor();
            EnableDisableButtons();
            RefreshNodeCombobox();
        }