Beispiel #1
0
 public FastbootTools()
 {
     InitializeComponent();
     AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
     _fastboot = new FastbootOperations();
     LoadAccents();
 }
 public MainWindow()
 {
     InitializeComponent();
     AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
     _adb      = new AdbOperations();
     _fastboot = new FastbootOperations();
 }
 public DeviceWindow()
 {
     InitializeComponent();
     AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
     _adb                    = new AdbOperations();
     _fastboot               = new FastbootOperations();
     _bw                     = new BackgroundWorker();
     _bw.DoWork             += _bw_DoWork;
     _bw.RunWorkerCompleted += _bw_RunWorkerCompleted;
     _bw.RunWorkerAsync();
 }
 public DeviceRestore()
 {
     InitializeComponent();
     _fastboot = new FastbootOperations();
     LightThemeSwitch.Checked += delegate
     {
         ThemeManager.ChangeTheme(this, ThemeManager.DefaultAccents.First(a => a.Name == "Blue"), Theme.Light);
     };
     LightThemeSwitch.Unchecked += delegate
     {
         ThemeManager.ChangeTheme(this, ThemeManager.DefaultAccents.First(a => a.Name == "Blue"), Theme.Dark);
     };
     AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
 }
        public RecoveryMaster()
        {
            InitializeComponent();
            _db       = new AndroidToolkitDB();
            _fastboot = new FastbootOperations();
            BackgroundWorker loader = new BackgroundWorker();

            loader.DoWork += ((sender, args) =>
            {
                Load();
                //this.View.Dispatcher.BeginInvoke((Action)(() => Load()));
            });
            loader.RunWorkerCompleted += ((sender, args) =>
            {
                View.ItemsSource = _tempDevices;
                RunFlyout(0);
                RunFlyout(1);
            });
            RunFlyout(0);
            loader.RunWorkerAsync();

            View.SelectionChanged += ((sender, args) =>
            {
                FlashRecoveriesComboBox.Items.Clear();
                _device = (Device)View.SelectedItem;
                if (!string.IsNullOrEmpty(_device.CWMRecovery))
                {
                    FlashRecoveriesComboBox.Items.Add("CWM");
                }
                if (!string.IsNullOrEmpty(_device.CWMTouchRecovery))
                {
                    FlashRecoveriesComboBox.Items.Add("CWM Touch");
                }
                if (!string.IsNullOrEmpty(_device.TWRPRecovery))
                {
                    FlashRecoveriesComboBox.Items.Add("TWRP");
                }
            });

            LightThemeSwitch.Checked += delegate
            {
                ThemeManager.ChangeTheme(this, ThemeManager.DefaultAccents.First(a => a.Name == "Blue"), Theme.Light);
            };
            LightThemeSwitch.Unchecked += delegate
            {
                ThemeManager.ChangeTheme(this, ThemeManager.DefaultAccents.First(a => a.Name == "Blue"), Theme.Dark);
            };
        }
Beispiel #6
0
 public ZipFlasher()
 {
     InitializeComponent();
     AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
     _fastboot = new FastbootOperations();
 }