public void DisplaySimpleLauncher()
 {
     if (_simpleLaunchWindow == null)
     {
         if (_simpleLaunchViewModel == null)
         {
             _simpleLaunchViewModel = SimpleLaunchWindowViewModel.CreateViewModel();
             _simpleLaunchViewModel.LaunchingEvent          += OnRequestExecuteSimpleLaunch;
             _simpleLaunchViewModel.RequestingMainViewEvent += OnSimpleLaunchRequestMainView;
             _simpleLaunchViewModel.RequestingConfigureFileLocationEvent += OnSimpleLaunchRequestConfigureFileLocation;
         }
         _simpleLaunchWindow          = new SimpleLaunchWindow(_simpleLaunchViewModel);
         _simpleLaunchWindow.Closing += OnSimpleLaunchWindowClosing;
     }
     try
     {
         Properties.Settings.Default.LastUsedSimpleLaunch = true;
     }
     catch
     {
     }
     _simpleLaunchWindow.Show();
     if (OpeningSimpleLauncherEvent != null)
     {
         OpeningSimpleLauncherEvent();
     }
 }
Esempio n. 2
0
 //private List<ServerInfo> sl = new List<ServerInfo>();
 internal SimpleLaunchWindow(SimpleLaunchWindowViewModel viewModel)
 {
     InitializeComponent();
     _viewModel             = viewModel;
     this.DataContext       = _viewModel;
     _viewModel.CloseAction = new Action(() => this.Close());
     ThwargLauncher.AppSettings.WpfWindowPlacementSetting.Persist(this);
 }
        public static SimpleLaunchWindowViewModel CreateViewModel(AccountManager accountManager)
        {
            var vmodel = new SimpleLaunchWindowViewModel(accountManager);

            return(vmodel);
        }
        public static SimpleLaunchWindowViewModel CreateViewModel()
        {
            var vmodel = new SimpleLaunchWindowViewModel();

            return(vmodel);
        }