Exemplo n.º 1
0
 public MainWindow(IWakeOnLanAction action)
 {
     InitializeComponent();
     actionView.Apply  += () => DialogResult = true;
     actionView.Cancel += () => DialogResult = false;
     actionView.RefreshWith(action);
 }
 public void SetSettingsTo(IWakeOnLanAction action)
 {
     action.MacAddress = tbMac.Text;
     action.Port       = ushort.Parse(tbPort.Text);
     action.TryCount   = ushort.Parse(tbTryCount.Text);
 }
 public void RefreshWith(IWakeOnLanAction action)
 {
     tbMac.Text      = action.MacAddress;
     tbPort.Text     = action.Port.ToString();
     tbTryCount.Text = action.TryCount.ToString();
 }
 public void RefreshWith(IWakeOnLanAction action)
 {
     paramsView.RefreshWith(_action = action);
 }