示例#1
0
 private void OpenResource()
 {
     if (PluginBase.CurrentProject != null)
     {
         if (projectResources == null) projectResources = new OpenResourceForm(this);
         projectResources.ShowDialog(pluginUI);
     }
 }
示例#2
0
        void CloseProject(bool internalClosing)
        {
            Project project = Tree.Projects.Count > 0 ? Tree.Projects[0] : null; // TODO we need a main project/solution
            if (project == null) return; // already closed
            listenToPathChange = false;

            // save project prefs
            ProjectPreferences prefs = Settings.GetPrefs(project);
            prefs.ExpandedPaths = Tree.ExpandedPaths;
            prefs.DebugMode = project.TraceEnabled;
            prefs.TargetBuild = project.TargetBuild;
            
            if (!PluginBase.MainForm.ClosingEntirely) SaveProjectSession();

            activeProject = null;
            if (projectResources != null)
            {
                projectResources.Close();
                projectResources = null;
            }
            FlexCompilerShell.Cleanup(); // clear compile cache for this project
            Webserver.KillServer();

            if (!internalClosing)
            {
                pluginUI.SetProject(null);
                Settings.LastProject = "";
                menus.DisabledForBuild = true;
                
                PluginBase.CurrentSolution = null;
                PluginBase.CurrentProject = null;
                PluginBase.CurrentSDK = null;
                PluginBase.MainForm.RefreshUI();

                BroadcastProjectInfo(null);
                projectActions.UpdateASCompletion(MainForm, null);
            }
            TabColors.UpdateTabColors(Settings);
        }
示例#3
0
 private void OpenResource()
 {
     if (PluginBase.CurrentProject != null)
     {
         OpenResourceForm opr = new OpenResourceForm(this);
         opr.ShowDialog(pluginUI);
     }
 }