Example #1
0
        public PickNANDPage() : base()
        {
            InitializeComponent();

            Loaded += (_, __) =>
            {
                if (Native.IsAdministrator)
                {
                    MemloaderDescriptionLabel.Text = "HACGUI is waiting for a Switch in RCM to be plugged in.";

                    RestartAsAdminButton.Content   = "Inject for me";
                    RestartAsAdminButton.IsEnabled = InjectService.LibusbKInstalled;
                    InjectService.DeviceInserted  += () =>
                    {
                        if (InjectService.LibusbKInstalled)
                        {
                            Dispatcher.Invoke(() => RestartAsAdminButton.IsEnabled = true);
                        }
                    };

                    InjectService.DeviceRemoved += () =>
                    {
                        Dispatcher.Invoke(() => RestartAsAdminButton.IsEnabled = false);
                    };
                }

                NANDService.OnNANDPluggedIn += () =>
                {
                    InjectService.Stop();
                    StartDeriving();
                };

                NANDService.Start();
            };
        }
Example #2
0
        public PickNANDPage() : base()
        {
            InitializeComponent();

            Loaded += (_, __) =>
            {
                NANDService.OnNANDPluggedIn += () =>
                {
                    StartDeriving();
                };

                NANDService.Start();
            };
        }
Example #3
0
        public PickNANDPage() : base()
        {
            InitializeComponent();

            Loaded += (_, __) =>
            {
                if (IsAdministrator)
                {
                    MemloaderDescriptionLabel.Content           = "HACGUI is waiting for a Switch with\nmemloader setup to be plugged in.";
                    MemloaderDescriptionLabel.VerticalAlignment = VerticalAlignment.Center;
                    MemloaderDescriptionLabel.Margin            = new Thickness();
                    RestartAsAdminButton.Visibility             = Visibility.Hidden;
                }

                NANDService.OnNANDPluggedIn += () =>
                {
                    StartDeriving();
                };

                NANDService.Start();
            };
        }