Пример #1
0
        private void NewProject()
        {
            String title = StringResources.NewProject;

            if (!UnloadProject())
            {
                return;
            }

            m_CurrentProject = Ares.Data.DataModule.ProjectManager.CreateProject(title);
            try
            {
                m_CurrentProject.TagLanguageId = Ares.Tags.TagsModule.GetTagsDB().TranslationsInterface.GetIdOfCurrentUILanguage();
            }
            catch (Ares.Tags.TagsDbException ex)
            {
                MessageBox.Show(this, String.Format(StringResources.TagsDbError, ex.Message), StringResources.Ares, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            DoModelChecks();

            Ares.Editor.Actions.FilesWatcher.Instance.Project = m_CurrentProject;
            if (m_ProjectExplorer != null)
            {
                m_ProjectExplorer.SetProject(m_CurrentProject);
            }
            if (m_TagsEditor != null)
            {
                m_TagsEditor.SetProject(m_CurrentProject);
            }
            if (m_FileTagsEditor != null)
            {
                m_FileTagsEditor.SetProject(m_CurrentProject);
            }
            for (int i = 0; i < m_FileExplorers.Length; ++i)
            {
                if (m_FileExplorers[i] != null)
                {
                    m_FileExplorers[i].SetProject(m_CurrentProject);
                }
            }
            if (m_AudioSourceSearch != null)
            {
                m_AudioSourceSearch.SetProject(m_CurrentProject);
            }

            if (m_ProjectExplorer.IsHidden)
            {
                ShowProjectExplorer();
            }
            UpdateGUI();

            m_ProjectExplorer.InitNewProject();
        }
Пример #2
0
 private void ShowProjectExplorer()
 {
     if (m_ProjectExplorer == null)
     {
         m_ProjectExplorer = new ProjectExplorer();
         m_ProjectExplorer.SetProject(m_CurrentProject);
         m_ProjectExplorer.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.DockLeft;
         m_ProjectExplorer.Show(dockPanel);
     }
     else
     {
         UpdateWindowState(m_ProjectExplorer);
     }
     ActivateWindow(m_ProjectExplorer);
 }