Beispiel #1
0
 private void Send()
 {
     if (UserMassageTB?.Any() ?? false)
     {
         log.AddLog("Получена команда от пользвателя - ", UserMassageTB);
         Messages.Add(new UserMessage(UserMassageTB, "user"));              //Add msg from user
         //Invoke after message is send
         GiveAnswer(new DuckMessage(sc.GetAnswer(UserMassageTB), "Ducky")); //Msg from Ducky
         UserMassageTB = "";
     }
 }
Beispiel #2
0
        private async void PlayStation()
        {
            timerStart();
            RadioSpinVisibility = Visibility.Visible;
            //CurrentStation.RadioLogo = empt;
            // CurrentStation.RadioSongName = "buffering...";
            try
            {
                bh.StopUrlStream();
                CurrentStation = await st.GetStationInfo(CategoryIndex, StationIndex);

                bh.PlayFromURL(CurrentStation.URL, Properties.Settings.Default.UserVolume);
            }
            catch (Exception e)
            {
                log.AddLog("ERROR", e.Message);
            }
            RadioSpinVisibility = Visibility.Hidden;
            PlayingVisibility   = Visibility.Hidden;
            PauseVisibility     = Visibility.Visible;
        }