示例#1
0
        /// <summary>
        /// The menuItem_Settings_Click opens a new settings window.
        /// </summary>
        /// <param name="sender">The sender<see cref="object"/></param>
        /// <param name="e">The e<see cref="RoutedEventArgs"/></param>
        private void MenuItem_Settings_Click(object sender, RoutedEventArgs e)
        {
            if (this.mainSettingsWindow.IsVisible)
            {
                return;
            }

            this.mainSettingsWindow = new MainSettingsWindow(this.apiHandler, this.appData.TileHandlerData.GlobalTileStyle);
            this.mainSettingsWindow.OnAppDataChanged         += this.OnAppDataChanged;
            this.mainSettingsWindow.OnGlobalTileStyleChanged += this.MainSettingsWindow_OnGlobalTileStyleChanged;

            this.mainSettingsWindow.ShowDialog();
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindow"/> class.
        /// </summary>
        public MainWindow()
        {
            this.InitializeComponent();
            this.CheckRunningProcesses();

            fileHandler.OnFileHandlerError += this.FileHandler_OnFileHandlerError;
            this.appData                              = fileHandler.LoadAppData();
            this.apiHandler                           = new MultiApiHandler(this.appData, apiLoader);
            this.tileHandler                          = new WpfTileHandler(this.apiHandler, this.appData);
            this.mainSettingsWindow                   = new MainSettingsWindow(this.apiHandler, this.appData.TileHandlerData.GlobalTileStyle);
            this.tileHandler.OnAppDataChanged        += this.OnAppDataChanged;
            this.menuItem_HideAssetTiles.IsChecked    = this.appData.TileHandlerData.GlobalTileStyle.Hidden;
            this.menuItem_LockTilePositions.IsChecked = this.appData.TileHandlerData.PositionsLocked;
            this.apiHandler.OnAppDataChanged         += this.OnAppDataChanged;
        }