Example #1
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;
                }
            }
        }
Example #2
0
        private void newProjectButton_Click(object sender, EventArgs e)
        {
            using (var form = new CreateProjectForm())
            {
                this.Hide();

                var result = form.ShowDialog();
                if (result == DialogResult.OK)
                {
                    var id = form.projectId;
                    if (!id.HasValue)
                    {
                        return;
                    }

                    using (var projectForm = new ProjectDetailForm(id.Value))
                    {
                        var res = projectForm.ShowDialog();
                        if (res == DialogResult.OK)
                        {
                            using (var resultForm = new ResultForm(id.Value))
                            {
                                resultForm.ShowDialog();
                            }
                        }
                    }
                }
            }

            this.Show();
        }
Example #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);
            }
        }
Example #4
0
        private void T1002()
        {
            //新建项目
            CreateProjectForm createProject = new CreateProjectForm();

            createProject.transf += ((dynamic project) =>
            {
                Program.MainForm.Text = $"好蓝图平面CAD-[{project.name}.hlt]";
                Program.MainForm.Tag = new
                {
                    name = project.name,
                    path = project.path
                };
                _Tree.SaveProjectInfo(Program.MainForm.Tag);
            });
            createProject.ShowDialog();
        }
        public void CreateProject()
        {
            var createProjectForm = new CreateProjectForm();

            createProjectForm.ShowDialog();
        }
Example #6
0
        private void ClickMethodAddProject()
        {
            var windowProject = new CreateProjectForm();

            windowProject.ShowDialog();
        }