예제 #1
0
 public void RefreshWith(IModbusSingleCoilAction action)
 {
     _action = action;
     transportView.RefreshWith(action.Manager.Transport);
     tbAddress.Text = action.SlaveAddress.ToString();
     tbCoil.Text    = action.CoilAddress.ToString();
 }
예제 #2
0
 public SingleCoilActionWindow(IModbusSingleCoilAction action)
 {
     InitializeComponent();
     actionView.RefreshWith(action);
     actionView.OkPressed += (a) => {
         this.DialogResult = true;
     };
     actionView.CancelPressed += () => {
         this.DialogResult = false;
     };
 }