コード例 #1
0
ファイル: MainForm.cs プロジェクト: monstrim/Ares
        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
ファイル: MainForm.cs プロジェクト: monstrim/Ares
 private void ShowAudioSourceSearch()
 {
     if (m_AudioSourceSearch == null)
     {
         m_AudioSourceSearch = new AudioSourceSearchWindow(m_PluginManager);
         m_AudioSourceSearch.SetProject(m_CurrentProject);
         m_AudioSourceSearch.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.DockRight;
         m_AudioSourceSearch.Show(dockPanel);
     }
     else
     {
         UpdateWindowState(m_AudioSourceSearch);
     }
     ActivateWindow(m_AudioSourceSearch);
 }