예제 #1
0
파일: App.xaml.cs 프로젝트: Lemiort/SI
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

#if !DEBUG
            ProcessAsync();

            if (ApplicationDeployment.IsNetworkDeployed)
            {
                if (CheckUpdate())
                {
                    return;
                }
            }
#endif
            var main = new MainViewModel(Settings);

            if (e.Args.Length > 0)
            {
                main.PackageSource = new FilePackageSource(e.Args[0]);
            }

#if DEBUG
            main.PackageSource = new SIStoragePackageSource(new Services.SI.PackageInfo {
                Description = "Пакет микс 1"
            }, new Uri("http://vladimirkhil.com/content/sistorage/Для эрудитов/2.1.siq"));                                                                                                           // new FilePackageSource(@"C:\ProgramData\Svoyak-soft\SIGame\Data\1.siq");
#endif

            MainWindow = new CommandWindow()
            {
                DataContext = main
            };
            MainWindow.Show();
        }
예제 #2
0
파일: App.xaml.cs 프로젝트: VladimirKhil/SI
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

#if !DEBUG && LEGACY
            ProcessAsync();

            if (ApplicationDeployment.IsNetworkDeployed)
            {
                if (CheckUpdate())
                {
                    return;
                }
            }
#endif
            UI.Initialize();

            var main = new MainViewModel(Settings);

            if (e.Args.Length > 0)
            {
                main.PackageSource = new FilePackageSource(e.Args[0]);
            }

#if DEBUG
            main.PackageSource = new SIStoragePackageSource(
                new Services.SI.PackageInfo
            {
                Description = SImulator.Properties.Resources.TestPackage
            },
                new Uri("https://vladimirkhil.com/sistorage/Основные/1.siq"));
#endif

            MainWindow = new CommandWindow {
                DataContext = main
            };
            MainWindow.Show();
        }