Ejemplo n.º 1
0
        private void Button_Click(object sender, EventArgs e)
        {
            panelPresentation.SuspendLayout();

            lblActiveDemo.Text = "Presentation: " + (sender as Button).Text;

            if (panelActiveDemo != null)
            {
                panelPresentation.Children.Remove(panelActiveDemo);
                panelActiveDemo = null;
            }

            switch ((sender as Button).Text)
            {
                case "Checkbox": panelActiveDemo = new CheckboxDemo(); break;
                case "Image": panelActiveDemo = new ImageDemo(); break;
                case "Level": panelActiveDemo = new LevelDemo(); break;
                case "Panel": panelActiveDemo = new PanelDemo(); break;
                case "Slider": panelActiveDemo = new SliderDemo(); break;

            }

            if (panelActiveDemo != null)
            {
                panelActiveDemo.X = 1;
                panelActiveDemo.Y = tlb2.Height + 1;
                panelActiveDemo.Width = panelPresentation.Width - 2;
                panelActiveDemo.Height = panelPresentation.Height - tlb2.Height - 2;
                panelPresentation.Children.Add(panelActiveDemo);
            }

            panelPresentation.ResumeLayout();
        }
Ejemplo n.º 2
0
 private void RadioButton_CheckedChanged(object sender, EventArgs e)
 {
     if (!ignore)
     {
         RadioButton rb = (RadioButton)sender;
         for (int i = 0; i < Children.Count; i++)
             if (children[i] == rb)
             {
                 SelectedIndex = i;
                 break;
             }
     }
 }
        public static uint OnMeasureCompleted(object sender, EventArgs e)
        {
            if (sm == null) {
                Debug.Print(((SensorBase.SensorItemEventArgs)e).ToString());
                return 0;
            }

            // sensor mesurement completed, now publish to MQTT Service running on Azure
            var json = ((SensorBase.SensorItemEventArgs)e).ToJson();
            var topic = ((SensorBase.SensorItemEventArgs)e).topic;

            return sm.Publish(topic, json);
        }
        private void btnOK_Clicked(object sender, EventArgs e)
        {
            //Desktop.RemoveLastPage();
            //switch (itemTypes.SelectedIndex)
            //{
            //    case 0: // Locomotives
            //        Locomotive loco = new Locomotive();
            //        Model.LayoutItems.Add(loco);
            //        Desktop.AddPage(new PageLocomotiveProperties(loco));
            //        break;

            //}
        }
        public static uint OnBeforeMeasure(object sender, EventArgs e)
        {
            uint id = ((SensorBase.SensorIdEventArgs)e).id;

            if (led != null) {
                led.AllOn();
             //   relay.TurnOn();
                Thread.Sleep(50);
                led.AllOff();
              //  relay.TurnOff();
            }

            return 0;
        }
Ejemplo n.º 6
0
 private void dt_Tick(object sender, Microsoft.SPOT.EventArgs e)
 {
     try
     {
         if (this.Behavior == BehaviorType.RunOnce)
         {
             this.Stop();
         }
         if (this.Tick != null)
         {
             this.Tick(this);
         }
     }
     catch
     {
         Debug.WriteLine("Exception performing Timer operation");
     }
 }
Ejemplo n.º 7
0
 private void btn3_Clicked(object sender, EventArgs e)
 {
     switch (buttonsSet)
     {
         case MessageBoxButton.YesNoCancel:
             result = MessageBoxResult.Cancel;
             modalBlock.Continue = false;
             break;
     }
 }
Ejemplo n.º 8
0
 void Value_Click(object sender, EventArgs e)
 {
     SimpleButton m=sender as SimpleButton;
     Value.TextContent += m.Text;
 }
Ejemplo n.º 9
0
 void Cancel_Click(object sender, EventArgs e)
 {
     spWindow = new Settings(spWindow, HwDevices);
 }
Ejemplo n.º 10
0
 public void Invoke(object sender, EventArgs e)
 {
     this.h(sender, e);
 }
Ejemplo n.º 11
0
 private void Tab_Clicked(object sender, EventArgs e)
 {
     IsSelected = true;
 }
Ejemplo n.º 12
0
 private void BonusCountDown_Expired(object sender, EventArgs e)
 {
     _maze.BonusItem = BonusItemType.None;
 }
Ejemplo n.º 13
0
 void plus_Click(object sender, EventArgs e)
 {
     HwDevices.setUpdateTime(HwDevices.getUpdateTime() + 1);
     updatetext.TextContent = "" + HwDevices.getUpdateTime();
 }
Ejemplo n.º 14
0
 private static void NetworkChange_NetworkAddressChanged(object sender, Microsoft.SPOT.EventArgs e)
 {
     Debug.Print("Network address changed");
 }
Ejemplo n.º 15
0
 void Dying_Completed(object sender, EventArgs e)
 {
     MessageService.Instance.Publish(Messages.PacmanDeadMessage.Message());
       Reset();
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Timer event handler to update the display
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 public void timerDisplayUpdate_Tick(object sender, EventArgs e)
 {
     if (this.Visibility == Visibility.Visible)
     {
         UpdateDisplay();
     }
 }
Ejemplo n.º 17
0
 void minus_Click(object sender, EventArgs e)
 {
     if (HwDevices.getUpdateTime() > 0)
     {
         HwDevices.setUpdateTime(HwDevices.getUpdateTime() - 1);
         updatetext.TextContent = "" + HwDevices.getUpdateTime();
     }
 }
Ejemplo n.º 18
0
 protected void OnCheckedChanged(EventArgs e)
 {
     if (CheckedChanged != null)
         CheckedChanged(this, e);
 }
 private void NetworkChange_NetworkAddressChanged( object sender, EventArgs e )
 {
     Debug.Print( "A network address changed" );
     StatusChanged.Set( );
 }
Ejemplo n.º 20
0
 protected void OnClick(EventArgs e)
 {
     if (Click != null)
         Click(this, e);
 }
Ejemplo n.º 21
0
 private void MazeLevelComplete(object sender, EventArgs e)
 {
     Reset();
       PrepareLevel(Level + 1);
 }
Ejemplo n.º 22
0
 private void btnDown_Clicked(object sender, EventArgs e)
 {
     SelectedIdx--;
 }
Ejemplo n.º 23
0
 private void btnWrite_Clicked(object sender, EventArgs e)
 {
     if (WriteClicked != null)
         WriteClicked(this, EventArgs.Empty);
 }
Ejemplo n.º 24
0
 private void btnUp_Clicked(object sender, EventArgs e)
 {
     SelectedIdx++;
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Raise the Completed event if there are registerd handlers
 /// </summary>
 /// <param name="e"></param>
 protected void OnCompleted(EventArgs e)
 {
     if (Completed != null)
       {
     Completed(this, e);
       }
 }
Ejemplo n.º 26
0
 void back_Click(object sender, EventArgs e)
 {
     spWindow = new MainMenu(spWindow, HwDevices);
 }
Ejemplo n.º 27
0
 void Ok_Click(object sender, EventArgs e)
 {
     HwDevices.WOEID = Value.TextContent;
     spWindow = new Settings(spWindow, HwDevices);
 }
Ejemplo n.º 28
0
 void C_Click(object sender, EventArgs e)
 {
     HwDevices.fahrenheit = false;
     DrawCanvas();
 }
Ejemplo n.º 29
0
 private void btn2_Clicked(object sender, EventArgs e)
 {
     switch (buttonsSet)
     {
         case MessageBoxButton.OKCancel:
             result = MessageBoxResult.Cancel;
             modalBlock.Continue = false;
             break;
         case MessageBoxButton.YesNo:
             result = MessageBoxResult.No;
             modalBlock.Continue = false;
             break;
         case MessageBoxButton.YesNoCancel:
             result = MessageBoxResult.No;
             modalBlock.Continue = false;
             break;
     }
     //TouchCapture.Capture(this, CaptureMode.None);
 }
Ejemplo n.º 30
0
 void F_Click(object sender, EventArgs e)
 {
     HwDevices.fahrenheit = true;
     DrawCanvas();
 }
Ejemplo n.º 31
0
 private void btn3_Clicked(object sender, EventArgs e)
 {
     switch (buttons)
     {
         case MessageBoxButton.YesNoCancel:
             result = MessageBoxResult.Cancel;
             break;
     }
     Exit();
 }
Ejemplo n.º 32
0
 void Location_Click(object sender, EventArgs e)
 {
     spWindow = new Keyboard(spWindow, HwDevices);
 }