/// <summary> Initializes a new instance of the <see cref="SettingsPanelViewModel"/> class. </summary>
        /// <param name="settings"> The application settings. </param>
        /// <param name="controlViewModel"> The scoreboard controlpanel view model. </param>
        public SettingsPanelViewModel(Settings settings, ScoreboardControlPanelViewModel controlViewModel)
        {
            this.controlViewModel = controlViewModel;
            this.settings = settings;

            this.desiredWidth = this.settings.Size;

            this.WidthMinimum = (int)(SystemParameters.PrimaryScreenWidth * .40);
            this.WidthMaximum = (int)SystemParameters.PrimaryScreenWidth;
            this.ViewboxWidth = this.desiredWidth;
        }
示例#2
0
        /// <summary> Initializes a new instance of the <see cref="SettingsPanelViewModel"/> class. </summary>
        /// <param name="settings"> The application settings. </param>
        /// <param name="controlViewModel"> The scoreboard controlpanel view model. </param>
        public SettingsPanelViewModel(Settings settings, ScoreboardControlPanelViewModel controlViewModel)
        {
            this.controlViewModel = controlViewModel;
            this.settings         = settings;

            this.desiredWidth = this.settings.Size;

            this.WidthMinimum = (int)(SystemParameters.PrimaryScreenWidth * .10);
            this.WidthMaximum = (int)(SystemParameters.PrimaryScreenWidth * .60);
            this.ViewboxWidth = this.desiredWidth;

            this.AllowTransparency = this.settings.AllowTransparency;
            this.TransparencyLevel = this.settings.WindowTransparency;
        }
        /// <summary> Initializes a new instance of the <see cref="SettingsPanelViewModel"/> class. </summary>
        /// <param name="settings"> The application settings. </param>
        /// <param name="controlViewModel"> The scoreboard controlpanel view model. </param>
        public SettingsPanelViewModel(Settings settings, ScoreboardControlPanelViewModel controlViewModel)
        {
            this.controlViewModel = controlViewModel;
            this.settings = settings;

            this.desiredWidth = this.settings.Size;

            this.WidthMinimum = (int)(SystemParameters.PrimaryScreenWidth * .10);
            this.WidthMaximum = (int)(SystemParameters.PrimaryScreenWidth * .60);
            this.ViewboxWidth = this.desiredWidth;

            this.AllowTransparency = this.settings.AllowTransparency;
            this.TransparencyLevel = this.settings.WindowTransparency;
        }
        /// <summary> Initializes a new instance of the <see cref="MainWindowViewModel"/> class. </summary>
        public MainWindowViewModel()
        {
            this.scoreboardControlViewModel = new ScoreboardControlPanelViewModel(this.Scoreboard);
            this.settingsPanelViewModel = new SettingsPanelViewModel(this.settings, this.scoreboardControlViewModel);
            display.SetViewModel(this.Scoreboard);
            this.IsMainSettingsVisible = true;

            if (Math.Abs(this.settings.Position.X - 0) > .001 || Math.Abs(this.settings.Position.Y - 0) > .001)
            {
                display.InitializePositionOnLoad = false;
                display.SetValue(Window.TopProperty, this.settings.Position.Y);
                display.SetValue(Window.LeftProperty, this.settings.Position.X);
            }
        }
        /// <summary> Initializes a new instance of the <see cref="MainWindowViewModel"/> class. </summary>
        public MainWindowViewModel()
        {
            this.scoreboardControlViewModel = new ScoreboardControlPanelViewModel(this.Scoreboard);
            this.settingsPanelViewModel     = new SettingsPanelViewModel(this.settings, this.scoreboardControlViewModel);
            display.SetViewModel(this.Scoreboard);
            this.IsMainSettingsVisible = true;

            if (Math.Abs(this.settings.Position.X - 0) > .001 || Math.Abs(this.settings.Position.Y - 0) > .001)
            {
                display.InitializePositionOnLoad = false;
                display.SetValue(Window.TopProperty, this.settings.Position.Y);
                display.SetValue(Window.LeftProperty, this.settings.Position.X);
            }
        }
        /// <summary> Initializes a new instance of the <see cref="MainWindowViewModel"/> class. </summary>
        public MainWindowViewModel()
        {
            this.scoreboardControlViewModel = new ScoreboardControlPanelViewModel(this.Scoreboard);
            this.settingsPanelViewModel = new SettingsPanelViewModel(this.settings, this.scoreboardControlViewModel);
            display.SetViewModel(this.Scoreboard);

            if (this.settings.Position.X != 0 || this.settings.Position.Y != 0)
            {
                display.InitializePositionOnLoad = false;
                display.SetValue(Window.TopProperty, this.settings.Position.Y);
                display.SetValue(Window.LeftProperty, this.settings.Position.X);
            }

            this.ActiveViewModel = this.scoreboardControlViewModel;
        }
        /// <summary> Initializes a new instance of the <see cref="MainWindowViewModel"/> class. </summary>
        public MainWindowViewModel()
        {
            this.scoreboardControlViewModel = new ScoreboardControlPanelViewModel(this.Scoreboard);
            this.settingsPanelViewModel     = new SettingsPanelViewModel(this.settings, this.scoreboardControlViewModel);
            display.SetViewModel(this.Scoreboard);

            if (this.settings.Position.X != 0 || this.settings.Position.Y != 0)
            {
                display.InitializePositionOnLoad = false;
                display.SetValue(Window.TopProperty, this.settings.Position.Y);
                display.SetValue(Window.LeftProperty, this.settings.Position.X);
            }

            this.ActiveViewModel = this.scoreboardControlViewModel;
        }