Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
        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);
            }
        }
Exemplo n.º 4
0
 public WeixinModel(IOptions <MpSettings> settings, MessageCenter messageCenter)
 {
     _settings      = settings.Value;
     _messageCenter = messageCenter;
 }
 public MpServiceFactory(MpSettings settings)
 {
     _settings = settings;
 }
Exemplo n.º 6
0
 public JsScanModel(IOptions <MpSettings> settings, IJsapiTicketManager jsapi)
 {
     _settings = settings.Value;
     _jsapi    = jsapi;
 }
Exemplo n.º 7
0
 public AuthModel(IOptions <MpSettings> settings)
 {
     _settings = settings.Value;
 }