public MpSettingForm(MpSettings mpSettings) { InitializeComponent(); SkinHelper.SetFont(Controls); //MpSettings if (mpSettings.IsOnline) { rb_Wan.Checked = true; } else { rb_Lan.Checked = true; } if (mpSettings.AutoPortMapping) { rb_Automatic.Checked = true; } else { rb_Manual.Checked = true; } //numericUpDown2.Value = mpSettings.PublicPort; }
public StyleEditor() { InitializeComponent(); MpWindowHelpers.OnWindowStartUp( this, MpSettings.GetValue("Settings", "MainSet", "Theme"), MpSettings.GetValue("Settings", "MainSet", "AccentColor"), MpSettings.GetValue("Settings", "MainSet", "BordersType") ); Loaded += StyleEditor_OnLoaded; MouseLeftButtonDown += StyleEditor_OnMouseLeftButtonDown; PreviewKeyDown += StyleEditor_OnPreviewKeyDown; ContentRendered += StyleEditor_ContentRendered; }
public MpSettingForm(MpSettings mpSettings) { InitializeComponent(); SkinHelperFonts.SetFont(Controls); //MpSettings switch (mpSettings.ConnectionType) { case ConnectionType.Wan: rb_Wan.Checked = true; break; case ConnectionType.Lan: rb_Lan.Checked = true; break; case ConnectionType.Other: rb_Other.Checked = true; break; default: throw new ArgumentOutOfRangeException(nameof(mpSettings.ConnectionType), mpSettings.ConnectionType, null); } switch (mpSettings.PortMappingType) { case PortMappingType.NatPunch: rb_NatPunchtrough.Checked = true; break; case PortMappingType.Upnp: rb_UPnP.Checked = true; break; case PortMappingType.Manual: rb_Manual.Checked = true; break; default: throw new ArgumentOutOfRangeException(nameof(mpSettings.PortMappingType), mpSettings.PortMappingType, null); } }
public WeixinModel(IOptions <MpSettings> settings, MessageCenter messageCenter) { _settings = settings.Value; _messageCenter = messageCenter; }
public MpServiceFactory(MpSettings settings) { _settings = settings; }
public JsScanModel(IOptions <MpSettings> settings, IJsapiTicketManager jsapi) { _settings = settings.Value; _jsapi = jsapi; }
public AuthModel(IOptions <MpSettings> settings) { _settings = settings.Value; }