Пример #1
0
 private void button9_Click(object sender, EventArgs e)
 {
     BassMain.Stop();
     timer1.Enabled   = false;
     slTime.Value     = 0;
     timePlayNow.Text = "00:00";
 }
Пример #2
0
 public Form1()
 {
     InitializeComponent();
     BassMain.InitBass(BassMain.HZ);
     Vars.link = this;
     Vars.setInputFormats();
 }
Пример #3
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            timePlayNow.Text = TimeSpan.FromSeconds(BassMain.getPosOfChanal(BassMain.chanal)).ToString();
            slTime.Value     = BassMain.getPosOfChanal(BassMain.chanal);

            bool posSecBool      = false;
            bool firstSecBool    = false;
            int  timePlayNowInt  = (Convert.ToInt32(timePlayNow.Text.Substring(3, 2)) * 60) + Convert.ToInt32(timePlayNow.Text.Substring(6, 2));
            int  timePlayOverInt = (Convert.ToInt32(timePlayOver.Text.Substring(3, 2)) * 60) + Convert.ToInt32(timePlayOver.Text.Substring(6, 2));



            if (timePlayOverInt - timePlayNowInt == 1)
            {
                posSecBool = true;
            }
            else
            {
                posSecBool = false;
            }

            if (timePlayOverInt - timePlayNowInt == timePlayOverInt)
            {
                firstSecBool = true;
            }
            else
            {
                firstSecBool = false;
            }



            if (BassMain.ToNextTrack() & firstSecBool)
            {
                form2.playList.SelectedIndex = Vars.CurrentTrackNumber;
                timePlayNow.Text             = TimeSpan.FromSeconds(BassMain.getPosOfChanal(BassMain.chanal)).ToString();
                timePlayOver.Text            = TimeSpan.FromSeconds(BassMain.GetTimeOfChanal(BassMain.chanal)).ToString();
                slTime.Maximum = BassMain.GetTimeOfChanal(BassMain.chanal);
                slTime.Value   = BassMain.getPosOfChanal(BassMain.chanal);
            }

            if (BassMain.ToNextTrack() & posSecBool)
            {
                form2.playList.SelectedIndex = Vars.CurrentTrackNumber;
                timePlayNow.Text             = TimeSpan.FromSeconds(BassMain.getPosOfChanal(BassMain.chanal)).ToString();
                timePlayOver.Text            = TimeSpan.FromSeconds(BassMain.GetTimeOfChanal(BassMain.chanal)).ToString();
                slTime.Maximum = BassMain.GetTimeOfChanal(BassMain.chanal);
                slTime.Value   = BassMain.getPosOfChanal(BassMain.chanal);
            }
            if (BassMain.endPleyList)
            {
                button9_Click(this, new EventArgs());
                form2.playList.SelectedIndex = Vars.CurrentTrackNumber = 0;
                BassMain.endPleyList         = false;
                timePlayOver.Text            = "00:00:00";
            }
        }
Пример #4
0
        public void button6_Click(object sender, EventArgs e)
        {
            if ((form2.playList.Items.Count != 0) && (form2.playList.SelectedIndex != -1))
            {
                string current = Vars.Files[form2.playList.SelectedIndex];
                Vars.CurrentTrackNumber = form2.playList.SelectedIndex;

                BassMain.Play(current, BassMain.voluem);
                //timespan перевод секунды в минуты а минуты в часы
                timePlayNow.Text  = TimeSpan.FromSeconds(BassMain.getPosOfChanal(BassMain.chanal)).ToString();
                timePlayOver.Text = TimeSpan.FromSeconds(BassMain.GetTimeOfChanal(BassMain.chanal)).ToString();
                slTime.Maximum    = BassMain.GetTimeOfChanal(BassMain.chanal);
                slTime.Value      = BassMain.getPosOfChanal(BassMain.chanal);
                timer1.Enabled    = true;//vkl timer

                //fun nime;
                string fileNameTrack = Vars.GetFileName(openFileDialog1.FileName);
                label1.Text = Vars.GetFileName(current);
            }
        }
Пример #5
0
 private void button7_Click(object sender, EventArgs e)
 {
     BassMain.Pause();
 }
Пример #6
0
 //сама громкость
 private void slVol_Scroll(object sender, ScrollEventArgs e)
 {
     BassMain.setVoidToChanal(BassMain.chanal, slVol.Value);
 }
Пример #7
0
 //перематываем волум
 private void slTime_Scroll(object sender, ScrollEventArgs e)
 {
     BassMain.setPosOfScrol(BassMain.chanal, slTime.Value);
 }