예제 #1
0
 public SHV(Installing_Tags Tags)
 {
     InitializeComponent();
     on  = new SolidColorBrush(Color.FromArgb(100, 0, 255, 0));
     off = new SolidColorBrush(Color.FromArgb(100, 255, 0, 0));
     Tag = Tags;
     System.Windows.Threading.DispatcherTimer dispatcherTimer = new DispatcherTimer();
     dispatcherTimer.Interval = new System.TimeSpan(0, 0, 1);
     dispatcherTimer.Tick    += new EventHandler(Update_GUI);
     dispatcherTimer.Start();
 }
예제 #2
0
 public void ConnectToPlc()
 {
     if (plc.IsConnected == false)
     {
         plc.Open();
         if (plc.IsConnected)
         {
             Tags = new Installing_Tags(plc, real_Tag_Entitys);
             dispatcherTimer.Interval = new System.TimeSpan(0, 0, 1);
             dispatcherTimer.Tick    += new EventHandler(Count);
             dispatcherTimer.Start();
         }
     }
 }
예제 #3
0
 public Driver_Speed(Installing_Tags i_t)
 {
     InitializeComponent();
     tags = i_t;
     txtDriverSpeed.Text = tags.get_Driver_Speed().ToString();
 }