コード例 #1
0
ファイル: MainWindow.cs プロジェクト: joconno4/MediaPortal-2
    public MainWindow()
    {
      InitializeComponent();

      // Load plugins
      ServiceScope.Get<IConfigurationManager>().Load();
      // Localise window
      IResourceString settings = LocalizationHelper.CreateLabelProperty("[configuration.areas.settings]");
      areaSettings.Tag = settings;
      areaSettings.Text = settings.ToString();
      IResourceString logs = LocalizationHelper.CreateLabelProperty("[configuration.areas.logs]");
      areaLogs.Tag = logs;
      areaLogs.Text = logs.ToString();
      areaLogs.Enabled = false;
      ServiceScope.Get<ILocalisation>().LanguageChange += LangageChange;
      CheckRightToLeft();
      // Initialize SettingsControl
      _settingsArea = new SettingsControl();
      _settingsArea.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
      _areaType = AreaType.SettingsArea;
      areaControls.Controls.Add(_settingsArea);
    }
コード例 #2
0
        public MainWindow()
        {
            InitializeComponent();

            // Load plugins
            ServiceScope.Get <IConfigurationManager>().Load();
            // Localise window
            IResourceString settings = LocalizationHelper.CreateLabelProperty("[configuration.areas.settings]");

            areaSettings.Tag  = settings;
            areaSettings.Text = settings.ToString();
            IResourceString logs = LocalizationHelper.CreateLabelProperty("[configuration.areas.logs]");

            areaLogs.Tag     = logs;
            areaLogs.Text    = logs.ToString();
            areaLogs.Enabled = false;
            ServiceScope.Get <ILocalisation>().LanguageChange += LangageChange;
            CheckRightToLeft();
            // Initialize SettingsControl
            _settingsArea        = new SettingsControl();
            _settingsArea.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            _areaType            = AreaType.SettingsArea;
            areaControls.Controls.Add(_settingsArea);
        }