private void InitCommands() { _toSystem = new FlexiableCommand(() => { DeviceSelectionObserver.Instance.CurrentDevice.Reboot2System(); }) { CanExecuteProp = false }; _toRecovery = new FlexiableCommand(() => { DeviceSelectionObserver.Instance.CurrentDevice.Reboot2Recovery(); }) { CanExecuteProp = false };; _toFastboot = new FlexiableCommand(() => { DeviceSelectionObserver.Instance.CurrentDevice.Reboot2Fastboot(); }) { CanExecuteProp = false };; _to9008 = new FlexiableCommand(() => { DeviceSelectionObserver.Instance.CurrentDevice.Reboot29008(); }) { CanExecuteProp = false }; }
public VMDeviceBar() { if (IsDesignMode()) { return; } ConnectDevice = new FlexiableCommand((p) => { openFxManager.RunExtension("ENetDeviceConnecter"); }); DisconnectDevice = new FlexiableCommand((p) => { openFxManager.RunExtension("ENetDeviceDisconnecter"); }); OpenDeviceNetDebugging = new FlexiableCommand((p) => { openFxManager.RunExtension("EOpenUsbDeviceNetDebugging"); }); devicesManager.ConnectedDevicesChanged += (s, e) => { Devices = e.Devices; if (Devices.Count() >= 1) { SelectedDevice = Devices.First(); } }; RefreshCommandState(); }
public VMDefaultInformation() { Donate = new FlexiableCommand(() => { (App.Current.MainWindow as MainWindow).DialogHost.ShowDialog(new ContentDonate()); }); ViewOpenSource = new FlexiableCommand(() => { (App.Current.MainWindow as MainWindow).DialogHost.ShowDialog(new ContentOpenSource()); }); }
public VMMore() { OpenLibsView = new FlexiableCommand(() => { new LibsWindow().ShowDialog(); }); OpenExtFloder = new FlexiableCommand(() => { Process.Start(BuildInfo.DEFAULT_EXTENSION_PATH); }); ApiVersion = BuildInfo.SDK_VERSION.ToString(); }
public VMHome() { Donate = new FlexiableCommand(() => { DialogHost.Show(new ContentDonate()); }); OpenUrl = new FlexiableCommand((args) => { try { Process.Start(args.ToString()); } catch { } }); }
public VMConnectDevices() { ConnectDevice = new FlexiableCommand((p) => { new ContentConnectNetDevice().Show(); }); DisconnectDevice = new FlexiableCommand((p) => { new ContentDisconnectDevice().Show(); }); OpenDeviceNetDebugging = new FlexiableCommand((p) => { new ContentEnableDeviceNetDebugging().Show(); }); ConnectedDevicesListener.Instance.DevicesChanged += ConnectedDevicesChanged; }
public VMConnectDevices() { ConnectDevice = new FlexiableCommand((p) => { AtmbContext.Instance.NewExtensionThread("ENetDeviceConnecter")?.Start(); }); DisconnectDevice = new FlexiableCommand((p) => { AtmbContext.Instance.NewExtensionThread("ENetDeviceDisconnecter")?.Start(); }); OpenDeviceNetDebugging = new FlexiableCommand((p) => { AtmbContext.Instance.NewExtensionThread("EOpenUsbDeviceNetDebugging")?.Start(); }); ConnectedDevicesListener.Instance.DevicesChanged += ConnectedDevicesChanged; }
public VMMore() { OpenExtFloder = new FlexiableCommand(() => { Process.Start(Manager.InternalManager.ExtensionPath); }); OpenUrl = new FlexiableCommand((para) => { try { Process.Start(para.ToString()); } catch { } }); ApiVersion = BuildInfo.SDK_VERSION.ToString(); }
public VMContentChoice(ChoicerContentStartArgs args) { Model = args; DoChoice = new FlexiableCommand((para) => { switch (para) { case "R": args.DidChoice(ChoicerResult.Right); break; case "C": args.DidChoice(ChoicerResult.Center); break; default: args.DidChoice(ChoicerResult.Cancel); break; } }); }
public VMPOTD() { Click = new FlexiableCommand(() => { try { Process.Start(url); } catch (Exception e) { SLogger.Warn(this, "Click potd is failed", e); } }); new PotdGetter().Try((result) => { App.Current.Dispatcher.Invoke(() => { SettingBy(result); }); }); }
private void InitCommands() { _toSystem = new FlexiableCommand(() => { var thread = AtmbContext.Instance.NewExtensionThread("ERebooter"); thread.Data[KEY_REBOOT_OPTION] = SYSTEM; thread.Start(); }) { CanExecuteProp = false }; _toRecovery = new FlexiableCommand(() => { var thread = AtmbContext.Instance.NewExtensionThread("ERebooter"); thread.Data[KEY_REBOOT_OPTION] = RECOVERY; thread.Start(); }) { CanExecuteProp = false };; _toFastboot = new FlexiableCommand(() => { var thread = AtmbContext.Instance.NewExtensionThread("ERebooter"); thread.Data[KEY_REBOOT_OPTION] = FASTBOOT; thread.Start(); }) { CanExecuteProp = false };; _to9008 = new FlexiableCommand(() => { var thread = AtmbContext.Instance.NewExtensionThread("ERebooter"); thread.Data[KEY_REBOOT_OPTION] = _9008; thread.Start(); }) { CanExecuteProp = false }; }
public VMDeviceBar() { ConnectDevice = new FlexiableCommand((p) => { ExtensionBridge.Start("ENetDeviceConnecter"); }); DisconnectDevice = new FlexiableCommand((p) => { ExtensionBridge.Start("ENetDeviceDisconnecter"); }); OpenDeviceNetDebugging = new FlexiableCommand((p) => { ExtensionBridge.Start("EOpenUsbDeviceNetDebugging"); }); ConnectedDevicesListener.Instance.DevicesChanged += (s, e) => { Devices = e.Devices; if (Devices.Count() >= 1) { SelectedDevice = Devices.First(); } }; RefreshCommandState(); }
public VMTapper() { Input = new FlexiableCommand(InputImpl); executor = new HestExecutor(); }
public VMDisconnectDevice() { Disconnect = new FlexiableCommand(DisconnectImpl); DisconnectAndDisable = new FlexiableCommand(DisconnectAndDisableImpl); }
public VMOldExtension() { Execute = new FlexiableCommand(p => _Execute()); }
private void InitCommands() { _toSystem = new FlexiableCommand(() => { Task.Run(() => { if (running) { return; } running = true; DeviceSelectionObserver.Instance.CurrentDevice.Reboot2System(); running = false; }); }) { CanExecuteProp = false }; _toRecovery = new FlexiableCommand(() => { Task.Run(() => { if (running) { return; } running = true; DeviceSelectionObserver.Instance.CurrentDevice.Reboot2Recovery(); running = false; }); }) { CanExecuteProp = false };; _toFastboot = new FlexiableCommand(() => { Task.Run(() => { if (running) { return; } running = true; DeviceSelectionObserver.Instance.CurrentDevice.Reboot2Fastboot(); running = false; }); }) { CanExecuteProp = false };; _to9008 = new FlexiableCommand(() => { Task.Run(() => { if (running) { return; } running = true; DeviceSelectionObserver.Instance.CurrentDevice.Reboot29008(); running = false; }); }) { CanExecuteProp = false }; }