예제 #1
0
        public void Cannot_put_null_to_time()
        {

            var s = new CalculateTime();
            s.Time(null, null);

        }
예제 #2
0
        public async void Cannot_be_not_string()
        {
            Factory.Time = "3455";
            Factory.Day = DayOfWeek.Friday;
            var s = new CalculateTime();
            await s.Calculate();

        }
예제 #3
0
        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); }
            
        }