コード例 #1
0
ファイル: SettingsDialog.cs プロジェクト: zBart/Ares
 public SettingsDialog(Ares.Settings.Settings settings, BasicSettings basicSettings)
 {
     InitializeComponent();
     musicDirLabel.Text = settings.MusicDirectory;
     soundDirLabel.Text = settings.SoundDirectory;
     if (basicSettings.UserSettingsLocation == BasicSettings.SettingsLocation.Custom)
     {
         otherDirButton.Checked = true;
     }
     else if (basicSettings.UserSettingsLocation == BasicSettings.SettingsLocation.AppDir && BasicSettings.IsAppDirAllowed())
     {
         appDirButton.Checked = true;
     }
     else
     {
         userDirButton.Checked = true;
     }
     otherDirLabel.Text = basicSettings.CustomSettingsDirectory;
     userDirLabel.Text = basicSettings.GetSettingsDir(BasicSettings.SettingsLocation.AppDataDir);
     appDirLabel.Text = basicSettings.GetSettingsDir(BasicSettings.SettingsLocation.AppDir);
     appDirButton.Enabled = BasicSettings.IsAppDirAllowed();
     updateCheckBox.Checked = settings.CheckForUpdate;
     m_Settings = settings;
     m_BasicSettings = basicSettings;
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: monstrim/Ares
        private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Ares.Settings.Settings settings = Ares.Settings.Settings.Instance;
            String oldSoundsDir             = settings.SoundDirectory;
            String oldMusicDir = settings.MusicDirectory;

            ShowSettingsDialog(-1);
        }
コード例 #3
0
ファイル: MainForm.cs プロジェクト: monstrim/Ares
 private void SettingsChanged(bool fundamentalChange)
 {
     if (InvokeRequired)
     {
         Invoke(new MethodInvoker(() => SettingsChanged(fundamentalChange)));
         return;
     }
     Ares.Settings.Settings settings = Ares.Settings.Settings.Instance;
     Actions.Playing.Instance.SetDirectories(Ares.Settings.Settings.Instance.MusicDirectory, Ares.Settings.Settings.Instance.SoundDirectory);
     Actions.FilesWatcher.Instance.SetDirectories(Ares.Settings.Settings.Instance.MusicDirectory, Ares.Settings.Settings.Instance.SoundDirectory);
     Tags.TagsModule.GetTagsDB().FilesInterface.CloseDatabase();
     LoadTagsDB();
 }
コード例 #4
0
 private void SettingsChanged(bool fundamentalChange)
 {
     Ares.Settings.Settings settings = Ares.Settings.Settings.Instance;
     if (fundamentalChange)
     {
         m_PlayingControl.KeyReceived((int)Ares.Data.Keys.Escape);
         m_PlayingControl.UpdateDirectories();
         LoadTagsDB();
     }
     m_PlayingControl.GlobalVolume = settings.GlobalVolume;
     m_PlayingControl.MusicVolume  = settings.MusicVolume;
     m_PlayingControl.SoundVolume  = settings.SoundVolume;
     m_PlayingControl.SetMusicTagFading(settings.TagMusicFadeTime, settings.TagMusicFadeOnlyOnChange);
     m_PlayingControl.SetPlayMusicOnAllSpeakers(settings.PlayMusicOnAllSpeakers);
     m_PlayingControl.SetFadingOnPreviousNext(settings.ButtonMusicFadeMode != 0, settings.ButtonMusicFadeMode == 2, settings.ButtonMusicFadeTime);
     if (fundamentalChange)
     {
         if (m_Network != null && m_Network.ClientConnected)
         {
             m_Network.DisconnectClient(true);
         }
     }
 }
コード例 #5
0
 private void EnsureDirectoriesExist(Ares.Settings.Settings settings)
 {
     EnsureDirectoryExists(settings.MusicDirectory);
     EnsureDirectoryExists(settings.SoundDirectory);
     EnsureDirectoryExists(settings.ProjectDirectory);
 }