statusbar_string() public méthode

StatusBar message
public statusbar_string ( string st_status, bool error ) : void
st_status string status message
error bool error or message
Résultat void
Exemple #1
0
        public TriacDevice()
        {
            this.InitializeComponent();


            dim_bright1.Interval  = TimeSpan.FromMilliseconds(50);
            dim_bright1.Tick     += dim_bright_Tick;
            day_delay_timer.Tick += day_hour;

            bool device2_state, device3_state;

            device2_state     = Convert.ToBoolean(rootPage.lastitem.device2_state);
            device3_state     = Convert.ToBoolean(rootPage.lastitem.device3_state);
            buzzer.IsOn       = device2_state;
            relay_on_off.IsOn = device3_state;
            slider.Value      = rootPage.lastitem.device1_state;
            rootPage.statusbar_string(device2_state.ToString() + device3_state.ToString(), false);
        }
Exemple #2
0
 //Use checked unchecked events instead of this
 //This will also work but not recommended to do these kinda tasks
 //I used this event didn't change
 private void device1_Tapped(object sender, TappedRoutedEventArgs e)
 {
     ///update status bar info
     if ((bool)device1.IsChecked)
     {
         rootPage.statusbar_string("Device1 On", false);
     }
     else
     {
         rootPage.statusbar_string("Device1 Off", true);
     }
 }