Наследование: System.Windows.Window, INotifyPropertyChanged
Пример #1
0
        async void App_Startup(object sender, StartupEventArgs e)
        {
            if (e.Args.Contains("adventure"))
            {
                ClientConfig.EmbeddedServerOptions.NewGameOptions.Mode = GameMode.Adventure;
            }
            else if (e.Args.Contains("fortress"))
            {
                ClientConfig.EmbeddedServerOptions.NewGameOptions.Mode = GameMode.Fortress;
            }

            // this will force instantiating GameData.Data in the main thread
            GameData.Create();

            GameData.Data.UserConnected    += Data_UserConnected;
            GameData.Data.UserDisconnected += Data_UserDisconnected;

            var mainWindow = new UI.MainWindow();

            this.MainWindow = mainWindow;
            mainWindow.Show();

            if (ClientConfig.AutoConnect)
            {
                await StartServerAndConnectAsync();
            }
        }
Пример #2
0
		async void App_Startup(object sender, StartupEventArgs e)
		{
			if (e.Args.Contains("adventure"))
				ClientConfig.EmbeddedServerOptions.NewGameOptions.Mode = GameMode.Adventure;
			else if (e.Args.Contains("fortress"))
				ClientConfig.EmbeddedServerOptions.NewGameOptions.Mode = GameMode.Fortress;

			// this will force instantiating GameData.Data in the main thread
			GameData.Create();

			GameData.Data.UserConnected += Data_UserConnected;
			GameData.Data.UserDisconnected += Data_UserDisconnected;

			var mainWindow = new UI.MainWindow();
			this.MainWindow = mainWindow;
			mainWindow.Show();

			if (ClientConfig.AutoConnect)
			{
				await StartServerAndConnectAsync();
			}
		}
 public MainWindowCommandHandler(MainWindow mainWindow)
 {
     m_mainWindow = mainWindow;
 }
Пример #4
0
 public MainWindowCommandHandler(MainWindow mainWindow)
 {
     m_mainWindow = mainWindow;
     m_map = mainWindow.MapControl;
 }