Ejemplo n.º 1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            var mainVm = new EdataManagerViewModel();

            DialogProvider.ProvideView(mainVm);

            //var versionVm = new VersionManagerViewModel(mainVm);
            //DialogProvider.ProvideView(versionVm);
        }
Ejemplo n.º 2
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            var startApplication = false;

            var settings = SettingsManager.Load();
            var mgr      = new EdataManagerView();


            if (settings.InitialSettings)
            {
                var settingsView = new SettingsView();
                settingsView.DataContext = settings;

                var result = settingsView.ShowDialog();
                if (result.GetValueOrDefault(false))
                {
                    if (Directory.Exists(settings.SavePath) && Directory.Exists(settings.WargamePath))
                    {
                        settings.InitialSettings = false;
                    }

                    SettingsManager.Save(settings);
                    startApplication = true;
                }
            }
            else
            {
                startApplication = true;
            }

            if (startApplication)
            {
                var mainVm = new EdataManagerViewModel();
                mgr.DataContext = mainVm;
                mgr.Show();
            }
        }
 public VersionManagerViewModel(EdataManagerViewModel edataManagerViewModel)
 {
     EdataManagerViewModel = edataManagerViewModel;
     Initialize();
 }