コード例 #1
0
        private void buttonApply_Click(object sender, EventArgs e)
        {
            CustomColor.SetMainColor(Color.FromArgb(sliderRed.Value, sliderGreen.Value, sliderBlue.Value));
            MainPageOfPlayer.UpdateButtonImage();
            (Application.OpenForms["MainPageOfPlayer"].Controls["menu"].Controls["ButtonAdd"] as ns1.BunifuImageButton).Image              = CustomColor.FillShape(Properties.Resources.add);
            (Application.OpenForms["MainPageOfPlayer"].Controls["menu"].Controls["buttonDelete"] as ns1.BunifuImageButton).Image           = CustomColor.FillShape(Properties.Resources.delete);
            (Application.OpenForms["MainPageOfPlayer"].Controls["bottomPanel"].Controls["ButtonPlay"] as ns1.BunifuImageButton).Image      = CustomColor.FillShape(Properties.Resources.Circled_Play_100px);
            (Application.OpenForms["MainPageOfPlayer"].Controls["bottomPanel"].Controls["ButtonStop"] as ns1.BunifuImageButton).Image      = CustomColor.FillShape(Properties.Resources.stop1);
            (Application.OpenForms["MainPageOfPlayer"].Controls["bottomPanel"].Controls["ButtonPause"] as ns1.BunifuImageButton).Image     = CustomColor.FillShape(Properties.Resources.pause1);
            (Application.OpenForms["MainPageOfPlayer"].Controls["bottomPanel"].Controls["ButtonSkipLeft"] as ns1.BunifuImageButton).Image  = CustomColor.FillShape(Properties.Resources.SkipLeft);
            (Application.OpenForms["MainPageOfPlayer"].Controls["bottomPanel"].Controls["ButtonSkipRight"] as ns1.BunifuImageButton).Image = CustomColor.FillShape(Properties.Resources.SkipRight);
            (Application.OpenForms["MainPageOfPlayer"].Controls["menu"].Controls["ButtonSettings"] as ns1.BunifuImageButton).Image         = CustomColor.FillShape(Properties.Resources.settings);
            (Application.OpenForms["MainPageOfPlayer"].Controls["menu"].Controls["buttonMainList"] as ns1.BunifuFlatButton).Iconimage      = CustomColor.FillShape(Properties.Resources.list);
            (Application.OpenForms["MainPageOfPlayer"].Controls["menu"].Controls["buttonMainList"] as ns1.BunifuFlatButton).Text           = "   Основной плейлист";
            (Application.OpenForms["MainPageOfPlayer"].Controls["bottomPanel"].Controls["buttonDownload"] as ns1.BunifuImageButton).Image  = CustomColor.FillShape(Properties.Resources.Download);

            if ((Application.OpenForms["MainPageOfPlayer"].Controls["bottomPanel"].Controls["buttonMute"] as ns1.BunifuImageButton).Image == Properties.Resources.No_audio)
            {
                (Application.OpenForms["MainPageOfPlayer"].Controls["bottomPanel"].Controls["buttonMute"] as ns1.BunifuImageButton).Image = CustomColor.FillShape(Properties.Resources.No_audio);
            }
            else
            {
                (Application.OpenForms["MainPageOfPlayer"].Controls["bottomPanel"].Controls["buttonMute"] as ns1.BunifuImageButton).Image = CustomColor.FillShape(Properties.Resources.yes_audio);
            }
        }
コード例 #2
0
 private void buttonMute_Click(object sender, EventArgs e)
 {
     if (!BassClass.MuteStatus)
     {
         BassClass.MuteStatus = true;
         buttonMute.Image     = CustomColor.FillShape(Properties.Resources.No_audio);
         memoryVolume         = volumeTrackBar.Value;
         volumeTrackBar.Value = 0;
     }
     else
     {
         BassClass.MuteStatus = false;
         buttonMute.Image     = CustomColor.FillShape(Properties.Resources.yes_audio);
         volumeTrackBar.Value = memoryVolume;
     }
 }
コード例 #3
0
 private void volumeTrackBar_Click(object sender, EventArgs e)
 {
     BassClass.MuteStatus = false;
     buttonMute.Image     = CustomColor.FillShape(Resources.yes_audio);
 }
コード例 #4
0
        public MainPageOfPlayer()
        {
            InitializeComponent();

            if (!InternetChecker.ConnectionAvailable("https://www.google.by/"))
            {
                ErrorForm erForm = new ErrorForm("Отсутствует соединение с интернетом. Часть функционала программы недоступна. Попробуйте позже.");
                erForm.ShowDialog();
                buttonVK.Visible               = false;
                vkCom.Visible                  = false;
                buttonLoginVk.Visible          = false;
                imageSoundCloud.Visible        = false;
                soundCloud.Visible             = false;
                buttonSearchSoundCloud.Visible = false;
            }

            if (Settings.Default.red == 0 && Settings.Default.green == 0 && Settings.Default.blue == 0)
            {
                CustomColor.maincolor = CustomColor.defaultcolor;
            }
            else
            {
                CustomColor.maincolor = Color.FromArgb(Settings.Default.red, Settings.Default.green, Settings.Default.blue);
            }

            BassClass.InitBass(BassClass.HZ);
            openFileDialog1.Filter            = TrackBase.GetInputFormats();
            ButtonAdd.Image                   = CustomColor.FillShape(Properties.Resources.add);
            buttonDelete.Image                = CustomColor.FillShape(Properties.Resources.delete);
            ButtonPlay.Image                  = CustomColor.FillShape(Properties.Resources.Circled_Play_100px);
            ButtonStop.Image                  = CustomColor.FillShape(Properties.Resources.stop1);
            ButtonPause.Image                 = CustomColor.FillShape(Properties.Resources.pause1);
            ButtonSkipLeft.Image              = CustomColor.FillShape(Properties.Resources.SkipLeft);
            ButtonSkipRight.Image             = CustomColor.FillShape(Properties.Resources.SkipRight);
            ButtonSettings.Image              = CustomColor.FillShape(Properties.Resources.settings);
            ButtonSettings.Image              = CustomColor.FillShape(Properties.Resources.settings);
            buttonVK.Image                    = CustomColor.ColoredObject(Properties.Resources.VK_com_100px, Color.FromArgb(80, 114, 153));
            buttonLogoutVk.Image              = CustomColor.ColoredObject(Properties.Resources.logout, Color.FromArgb(80, 114, 153));
            buttonMute.Image                  = CustomColor.FillShape(Properties.Resources.yes_audio);
            streamTrackBar.UseCustomBackColor = true;
            streamTrackBar.UseCustomForeColor = true;
            streamTrackBar.ForeColor          = CustomColor.defaultcolor;

            playlist.Size               = new Size(1088, 609);
            playlist.Location           = new Point(52, 47);
            searchTextBox.Visible       = false;
            buttonSearchStartVK.Visible = false;
            buttonDelete.Visible        = true;
            buttonDownload.Visible      = false;

            soundCloud.Location             = new Point(46, 224);
            imageSoundCloud.Location        = new Point(4, 226);
            buttonSearchSoundCloud.Location = new Point(0, 271);
            if (!VkAuthLog.GetAuth())
            {
                buttonLogoutVk.Visible = false;
            }

            vkCom.Font     = new Font("Phenomena", 16.25F);
            vkCom.Location = new Point(46, 133);

            buttonDownload.Image = CustomColor.FillShape(Properties.Resources.Download);

            if (Settings.Default.path == "" || Settings.Default.path == null)
            {
                Settings.Default.path = TrackBase.AppPath;
            }
        }