コード例 #1
0
        public async void Cannot_be_not_string()
        {
            Factory.Time = "3455";
            Factory.Day = DayOfWeek.Friday;
            var s = new CalculateTime();
            await s.Calculate();

        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: anntitaeva/Alarm
        private async void Set_Alarm_Click(object sender, RoutedEventArgs e)
        {
            if (Factory.Time== null)
                MessageBox.Show("Wait a second...We need to check your schedule!", "Checking...", MessageBoxButton.OK, MessageBoxImage.Information);
            var start = new CalculateTime();

            start.OnReady += Message;
            try
            {
                await start.Calculate();
            }
            catch { MessageBox.Show("Connection with Arduino is not established.Please connect your Arduino to the computer.", "Error", MessageBoxButton.OK, MessageBoxImage.Error); }
            
        }