Exemplo n.º 1
0
        private void mMusicInfoFileNameTextBox_TextChanged(object sender, EventArgs e)
        {
            string procname = GetProcName(this.mMusicInfoFileNameTextBox.Text);

            mDefaultsButton.Enabled = MuteFmConfigUtil.hasDefaults(procname);

            //this.mNoIgnoreAutomuteCheckbox.Checked =
        }
Exemplo n.º 2
0
        private void mDefaultsButton_Click(object sender, EventArgs e)
        {
            string procname = "";

            if (mWebsiteRadioButton.Checked)
            {
                procname = this.mWebsiteUrlTextBox.Text.Trim().TrimEnd('/');
            }
            else
            {
                procname = GetProcName(this.mMusicInfoFileNameTextBox.Text);
            }
            if (MuteFmConfigUtil.hasDefaults(procname))
            {
                SoundPlayerInfo tempMusicInfo = new SoundPlayerInfo();
                if (mWebsiteRadioButton.Checked)
                {
                    tempMusicInfo.UrlOrCommandLine = procname;
                }
                else
                {
                    tempMusicInfo.UrlOrCommandLine = mMusicInfoFileNameTextBox.Text;
                }

                if (this.mWebsiteRadioButton.Checked)
                {
                    MuteFmConfigUtil.InitDefaultsWeb(tempMusicInfo);
                }
                else
                {
                    MuteFmConfigUtil.InitDefaultsProcess(tempMusicInfo, procname);
                }
                _commands["OnLoad"]    = tempMusicInfo.OnLoadCommand;
                _commands["Play"]      = tempMusicInfo.PlayCommand;
                _commands["Pause"]     = tempMusicInfo.PauseCommand;
                _commands["PrevTrack"] = tempMusicInfo.PrevSongCommand;
                _commands["NextTrack"] = tempMusicInfo.NextSongCommand;
                _commands["Like"]      = tempMusicInfo.LikeCommand;
                _commands["Dislike"]   = tempMusicInfo.DislikeCommand;
                _commands["Stop"]      = tempMusicInfo.StopCommand;

                MessageBox.Show(this, "Defaults loaded.", Constants.ProgramName);
                mCommandsListbox_SelectedIndexChanged(null, null);
            }
            else
            {
                MessageBox.Show(this, "No defaults", Constants.ProgramName); // should never see this
            }
        }
Exemplo n.º 3
0
 private void mWebsiteUrlTextBox_TextChanged(object sender, EventArgs e)
 {
     mDefaultsButton.Enabled = MuteFmConfigUtil.hasDefaults(mWebsiteUrlTextBox.Text);
 }