示例#1
0
            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;
            }
示例#2
0
 public override void SetData(IMSConfiguration configuration)
 {
     StringBox.Text = (string)configuration.GetType().GetField(FieldName, BindingFlags.Public | BindingFlags.Instance).GetValue(configuration);
 }
示例#3
0
 public override void SetData(IMSConfiguration configuration)
 {
     BooleanToggle.SelectedOption = (int)configuration.GetType().GetField(FieldName, BindingFlags.Public | BindingFlags.Instance).GetValue(configuration) - IndexOffset;
 }
示例#4
0
 public override void PutData(IMSConfiguration configuration)
 {
     configuration.GetType().GetField(FieldName, BindingFlags.Public | BindingFlags.Instance).SetValue(configuration, BooleanToggle.SelectedOption == 0);
 }
示例#5
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);
            }
示例#6
0
 public override void PutData(IMSConfiguration configuration)
 {
     configuration.GetType().GetField(FieldName, BindingFlags.Public | BindingFlags.Instance).SetValue(configuration, int.Parse(IntBox.Text));
 }