示例#1
0
        public void LoadProject(string path)
        {
            Properties.Settings.Default.LoadedAddonDirectory = path;
            Properties.Settings.Default.Save();
            Console.WriteLine("Loading Project: " + path);

            AssetLoadingDialog loader = new AssetLoadingDialog();

            loader.ShowDialog(AssetLoadingDialog.AddonLoadTasks);

            InitTabs();

            ProjectView = new ProjectView();
            ProjectView.Show(dockPanel, DockState.DockLeft);

            ObjectBrowser = new DotaObjectBrowser();
            ObjectBrowser.Show(dockPanel, DockState.DockLeft);

            string addonName = Path.GetFileName(path.Remove(path.Length - 1));

            this.Text = "Worldsmith - " + addonName;

            AddToRecentAddonsList(addonName);
            UpdateStartPage();

            Console.WriteLine("Successfully Loaded Project: " + path);
        }
示例#2
0
        private void SetSchema(object sender, System.EventArgs e)
        {
            //We need to close all the forms or else it goes boom
            foreach (IDockContent document in dockPanel.DocumentsToArray())
            {
                document.DockHandler.Close();
            }

            //Lets nuke all the default stuff too while we are at it
            if (ConsoleForm != null)
            {
                ConsoleForm.DockPanel = null;
            }
            if (ProjectView != null)
            {
                ProjectView.DockPanel = null;
            }
            if (ObjectBrowser != null)
            {
                ObjectBrowser.DockPanel = null;
            }

            if (sender == theme2005Button)
            {
                dockPanel.Theme = vS2005Theme1;
                EnableVS2012Renderer(false);
            }
            else if (sender == theme2003Button)
            {
                dockPanel.Theme = vS2003Theme1;
                EnableVS2012Renderer(false);
            }
            else if (sender == theme2012LightButton)
            {
                dockPanel.Theme = vS2012LightTheme1;
                EnableVS2012Renderer(true);
            }

            theme2005Button.Checked      = (sender == theme2005Button);
            theme2003Button.Checked      = (sender == theme2003Button);
            theme2012LightButton.Checked = (sender == theme2012LightButton);

            if (ConsoleForm != null)
            {
                ConsoleForm.Show(dockPanel, DockState.DockBottom);
            }
            if (ProjectView != null)
            {
                ProjectView.Show(dockPanel, DockState.DockLeft);
            }
            if (ObjectBrowser != null)
            {
                ObjectBrowser.Show(dockPanel, DockState.DockLeft);
            }

            StartPageForm = new StartPageForm(ShowNewAddonWizard, LoadAddon, LoadProject);
            StartPageForm.Show(dockPanel, DockState.Document);
            UpdateStartPage();
        }
示例#3
0
        public void LoadProject(string path)
        {
            if (this.Text != "Worldsmith")
            {
                UnloadProject(); //This prevents some duplicated stuff
            }
            if (!Directory.Exists(path))
            {
                Console.WriteLine("Error: Directory does not exists. \"" + path + "\"");
                return;
            }
            Properties.Settings.Default.LoadedAddonDirectory = path;
            Properties.Settings.Default.Save();
            Console.WriteLine("Loading Project: " + path);

            AssetLoadingDialog loader = new AssetLoadingDialog();

            loader.ShowDialog(AssetLoadingDialog.AddonLoadTasks);

            ProjectView = new ProjectView();
            ProjectView.Show(dockPanel, DockState.DockLeft);

            ObjectBrowser = new DotaObjectBrowser();
            ObjectBrowser.Show(dockPanel, DockState.DockLeft);

            string addonName = Path.GetFileName(path.Remove(path.Length - 1));

            this.Text = "Worldsmith - " + addonName;

            projectExplorerToolStripMenuItem.Enabled = true;
            objectBrowserToolStripMenuItem.Enabled   = true;

            AddToRecentAddonsList(addonName);
            UpdateStartPage();

            Console.WriteLine("Successfully Loaded Project: " + path);
        }