예제 #1
0
파일: Main.cs 프로젝트: hongquan1408/WEHY
        private void openRecentlyToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Controllers.Common.RecentProjectCommon recentProject = new Controllers.Common.RecentProjectCommon();
            string path = recentProject.getRecentlyProjectPath();

            if (System.IO.File.Exists(path))
            {
                ProjectDirectory.Directory = System.IO.Path.GetDirectoryName(path);
                ProjectName.Name           = System.IO.Path.GetFileName(path);
                MessageBox.Show("Open : " + ProjectDirectory.Directory);
            }
            else
            {
                MessageBox.Show("Recently Project is not Exist !");
            }
        }
예제 #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            Controllers.Common.RecentProjectCommon recentProject = new Controllers.Common.RecentProjectCommon();

            if (textBox1.Text != "" && textBox2.Text != "")
            {
                this.ProjectDirectory = textBox2.Text;
                this.ProjectName      = textBox1.Text;
                this.controller.CreateProject(ProjectDirectory, ProjectName);
                ProjectFullPath = System.IO.Path.Combine(ProjectDirectory, ProjectName);
                string path = System.IO.Path.Combine(System.IO.Path.Combine(ProjectDirectory, ProjectName), ProjectName + ".wehy");
                recentProject.setRecentlyProjectPath(path);
                frmForm.OutputFolder = ProjectFullPath;

                this.Close();
            }
            else
            {
                MessageBox.Show("Please Input Project name or Directory", "Missing name or directory", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
예제 #3
0
파일: Main.cs 프로젝트: hongquan1408/WEHY
        private void openProjectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog Opener = new OpenFileDialog();

            Opener.ShowDialog();
            Controllers.Common.RecentProjectCommon recentProject = new Controllers.Common.RecentProjectCommon();
            string filename = System.IO.Path.GetFileName(Opener.FileName);

            if (filename.Contains(".wehy"))
            {
                ProjectDirectory.Directory = System.IO.Path.GetDirectoryName(Opener.FileName);
                ProjectName.Name           = System.IO.Path.GetFileName(Opener.FileName);
                recentProject.setRecentlyProjectPath(System.IO.Path.Combine(ProjectDirectory.Directory, ProjectName.Name));
                OutputFolder = ProjectDirectory.Directory;
                CheckExistOutputFile(OutputFolder);
                MessageBox.Show("Open Succeed Project " + filename);
            }
            else
            {
                MessageBox.Show("Please Choose a Project !");
            }
        }