예제 #1
0
파일: Home.cs 프로젝트: anthrax3/PashIDE
        public void OpenProject(ProjectPreload preLoadProject)
        {
            MainPanel.Visible      = false;
            Loading_Title.Text     = "Loading " + preLoadProject.Name;
            Loading_Title.Location = new Point((Width / 2) - (Loading_Title.Width / 2), Loading_Title.Location.Y);
            Loading_Title.Visible  = true;

            Thread loadingTitleThread = new Thread(() =>
            {
                int dots = 0;
                while (true)
                {
                    Thread.Sleep(110);
                    dots++;
                    if (dots == 4)
                    {
                        dots = 1;
                    }
                    string str_dots = "";
                    for (int i = 0; i < dots; i++)
                    {
                        str_dots += ".";
                    }
                    try
                    {
                        Invoke(new MethodInvoker(delegate { Loading_Title.Text = "Loading " + preLoadProject.Name + str_dots; }));
                    }
                    catch (Exception e) { }
                }
            });

            loadingTitleThread.Start();

            new Thread(() =>
            {
                Settings settings = Settings.LoadIDESettings();
                Main main         = new Main();
                main.settings     = settings;
                Project project   = new Project(preLoadProject);
                main.project      = project;
                settings.LoadProjectSettings(project);
                Thread.Sleep(1000); //Until we have heavy loading, want to show off loading screen :3
                main.InitializeConsole();
                main.Show();
                loadingTitleThread.Abort();
                try {
                    Invoke(new MethodInvoker(delegate { Close(); }));
                }
                catch (Exception e) { Environment.Exit(0); }
                Application.Run(main);
            }).Start();
        }
예제 #2
0
파일: Home.cs 프로젝트: anthrax3/PashIDE
        private void Open_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog dialog = new FolderBrowserDialog();
            DialogResult        result = dialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                string         path    = dialog.SelectedPath;
                string         name    = Path.GetDirectoryName(path);
                ProjectPreload project = new ProjectPreload(name, path);
                OpenProject(project);
            }
        }
예제 #3
0
파일: Home.cs 프로젝트: anthrax3/PashIDE
        private void LoadProjects()
        {
            Projects.Clear();
            if (!Directory.Exists(WorkingDirectory))
            {
                Directory.CreateDirectory(WorkingDirectory); return;
            }

            foreach (string dir in Directory.GetDirectories(WorkingDirectory))
            {
                ProjectPreload p = new ProjectPreload(dir.Replace(WorkingDirectory, "").Substring(1), dir);
                Projects.Add(p);
            }

            RenderProjects();
        }
예제 #4
0
파일: Project.cs 프로젝트: anthrax3/PashIDE
 public Project(ProjectPreload preload)
 {
     Name             = preload.Name;
     WorkingDirectory = preload.WorkingDirectory;
 }