Beispiel #1
0
        private void mntNew_Click(object sender, EventArgs e)
        {
            var wnd = new CreateProjectForm();

            if (wnd.ShowDialog(this) == DialogResult.OK)
            {
                string projectName   = wnd.tbxProjectName.Text;
                string projectDir    = wnd.tbxProjectLocation.Text;
                string modelName     = wnd.tbxNewModelName.Text;
                string modelFileName = wnd.tbxModelFile.Text;

                switch (wnd.checkedRadioButtonName)
                {
                case "rbCreateNew":
                    pm.CreateNewProject(projectName, projectDir, modelName);
                    break;

                case "rbSelectFromFile":
                    pm.CloneProject(projectName, projectDir, modelFileName);
                    break;

                case "rbSelectCurrent":
                    pm.CloneProject(projectName, projectDir, string.Empty);
                    break;
                }
            }
        }
Beispiel #2
0
        private void ShadowButton_CreateProject_Click(object sender, RoutedEventArgs e)
        {
            if (sliderPosition == SliderPositions.spExperiments) sliderPosition = SliderPositions.spTree;

            var wnd = new CreateProjectForm();

            var ww = new WindowWrapper(new WindowInteropHelper(this).Handle);
            if (wnd.ShowDialog(ww) == System.Windows.Forms.DialogResult.OK)
            {
                string projectName = wnd.tbxProjectName.Text;
                string projectDir = wnd.tbxProjectLocation.Text;
                string modelName = wnd.tbxNewModelName.Text;
                string modelFileName = wnd.tbxModelFile.Text;

                switch (wnd.checkedRadioButtonName)
                {
                    case "rbCreateNew":
                        pm.Initialize(projectName, projectDir, ModelCreationMode.cmCreateNew, modelName);
                        break;
                    case "rbSelectFromFile":
                        pm.Initialize(projectName, projectDir, ModelCreationMode.cmClone, System.IO.Path.GetDirectoryName(modelFileName));
                        break;
                    case "rbSelectCurrent":
                        pm.Initialize(projectName, projectDir, ModelCreationMode.cmClone, vissim.Instance.GetWorkingDirectory());
                        break;
                }
            }
        }
Beispiel #3
0
        void btnCreateProject_Click(object sender, RoutedEventArgs e)
        {
            var wnd = new CreateProjectForm();

            var ww = new WindowWrapper(new WindowInteropHelper(this).Handle);
            if (wnd.ShowDialog(ww) == System.Windows.Forms.DialogResult.OK)
            {
                string projectName = wnd.tbxProjectName.Text;
                string projectDir = wnd.tbxProjectLocation.Text;
                string modelName = wnd.tbxNewModelName.Text;
                string modelFileName = wnd.tbxModelFile.Text;

                switch (wnd.checkedRadioButtonName)
                {
                    case "rbCreateNew":
                        manager.CreateNewProject(projectName, projectDir, modelName);
                        break;
                    case "rbSelectFromFile":
                        //string dir = System.IO.Path.GetDirectoryName(modelFileName);
                        modelName = manager.CloneProject(projectName, projectDir, modelFileName);
                        break;
                    case "rbSelectCurrent":
                        //pm.Initialize(projectName, projectDir, ModelCreationMode.cmClone, vissim.Instance.GetWorkingDirectory());
                        break;
                }

                InsertFirstTreeControlToNavigator(modelName);
            }
        }
Beispiel #4
0
        private void button23_Click(object sender, EventArgs e)
        {
            CreateProjectForm wnd = new CreateProjectForm();

            wnd.Show();
        }
Beispiel #5
0
 private void button23_Click(object sender, EventArgs e)
 {
     CreateProjectForm wnd = new CreateProjectForm();
     wnd.Show();
 }
Beispiel #6
0
        private void mntNew_Click(object sender, EventArgs e)
        {
            var wnd = new CreateProjectForm();
            if (wnd.ShowDialog(this) == DialogResult.OK)
            {
                string projectName = wnd.tbxProjectName.Text;
                string projectDir = wnd.tbxProjectLocation.Text;
                string modelName = wnd.tbxNewModelName.Text;
                string modelFileName = wnd.tbxModelFile.Text;

                switch (wnd.checkedRadioButtonName)
                {
                    case "rbCreateNew":
                        pm.CreateNewProject(projectName, projectDir, modelName);
                        break;
                    case "rbSelectFromFile":
                        pm.CloneProject(projectName, projectDir, modelFileName);
                        break;
                    case "rbSelectCurrent":
                        pm.CloneProject(projectName, projectDir, string.Empty);
                        break;
                }
            }
        }