Пример #1
0
        public UpdateWindow(string updateurl, bool restart = false, string exectuable = "", string parameter = "")
        {
            this.restart = restart;
            this.executable = exectuable;
            this.parameter = parameter;

            ThemeManager.IsThemeChanged += ThemeManager_IsThemeChanged;
            var mainThemeSettings = ThemeManager.DetectAppStyle(Application.Current);
            ThemeManager.ChangeAppStyle(this,mainThemeSettings.Item2,ThemeManager.GetInverseAppTheme(mainThemeSettings.Item1));

            InitializeComponent();
            updater = new Updater(updateurl);
            updater.errorEvent += updater_errorEvent;

            this.DataContext = new UpdaterViewModel(ref updater);

            //Timeline.DesiredFrameRateProperty.OverrideMetadata(
            //   typeof(Timeline),
            //   new FrameworkPropertyMetadata { DefaultValue = 1 }
            //   );
        }
Пример #2
0
        public UpdaterViewModel(ref Updater updater)
        {
            this.updater = updater;

            updater.PropertyChanged += updater_PropertyChanged;
        }