コード例 #1
0
ファイル: MainPage.xaml.cs プロジェクト: bauerslab/Oven
        private async void SendAmbient_Click(object sender, RoutedEventArgs e)
        {   //Send set ambient temperature to the oven
            SendAmbient.IsEnabled = false;

            if (await Oven.SetAmbient(Ambient.ValueFloat()))
            {
                await ShowSuccess("Ambient temperature sent successfully.");
            }
            else
            {
                await ShowError($"Ambient temperature failed to send.{(Oven.ErrorMessage != null ? Environment.NewLine + Oven.ErrorMessage : "")}");
            }

            SendAmbient.IsEnabled = true;
        }