public override void SetData(IMSConfiguration configuration) { WebPort port = (WebPort)configuration.GetType().GetField(FieldName, BindingFlags.Public | BindingFlags.Instance).GetValue(configuration); PortBox.Text = port.Port.ToString(); ForwardToggle.SelectedOption = port.AttemptUPnPForwarding ? 0 : 1; }
public override void SetData(IMSConfiguration configuration) { StringBox.Text = (string)configuration.GetType().GetField(FieldName, BindingFlags.Public | BindingFlags.Instance).GetValue(configuration); }
public override void SetData(IMSConfiguration configuration) { BooleanToggle.SelectedOption = (int)configuration.GetType().GetField(FieldName, BindingFlags.Public | BindingFlags.Instance).GetValue(configuration) - IndexOffset; }
public override void PutData(IMSConfiguration configuration) { configuration.GetType().GetField(FieldName, BindingFlags.Public | BindingFlags.Instance).SetValue(configuration, BooleanToggle.SelectedOption == 0); }
public override void PutData(IMSConfiguration configuration) { WebPort port = new WebPort(int.Parse(PortBox.Text), ForwardToggle.SelectedOption == 0); configuration.GetType().GetField(FieldName, BindingFlags.Public | BindingFlags.Instance).SetValue(configuration, port); }
public override void PutData(IMSConfiguration configuration) { configuration.GetType().GetField(FieldName, BindingFlags.Public | BindingFlags.Instance).SetValue(configuration, int.Parse(IntBox.Text)); }