/// <summary>
        /// 打开连接成功对话框
        /// </summary>
        public void openConnectSuccess(MainHomeViewModel.DeviceType devType)
        {
            hideMenus();

            var wSuccess = new DialogConnectSuccess(devType);

            wSuccess.Owner = this;
            wSuccess.ShowDialog();

            if (wSuccess.DialogResult == false)
            {
                return;
            }

            this.ExtractPath = wSuccess.FileControl.TextPath.Text;

            // 苹果设备直接进入提取页面
            if (devType == MainHomeViewModel.DeviceType.Apple)
            {
                ((MainViewModel)this.DataContext).GoToExtractPage(devType, this.ExtractPath);
            }
            // 安卓设备要进入选择提取方式的界面
            else if (devType == MainHomeViewModel.DeviceType.Android)
            {
                this.openExtractType();
            }
        }
Example #2
0
        /// <summary>
        /// 跳转到提取页面
        /// </summary>
        public void GoToExtractPage(MainHomeViewModel.DeviceType type, string saveExtractPath = null)
        {
            this.SelectedChild = GetChild(typeof(MainHomeViewModel));

            MainHomeViewModel vm = (MainHomeViewModel)this.SelectedChild;

            vm.showExtractPage(type, saveExtractPath);
        }
        public DialogSuccessViewModel(MainHomeViewModel.DeviceType devType)
        {
            this.IsAndroid = false;

            if (devType == MainHomeViewModel.DeviceType.Android)
            {
                this.IsAndroid = true;

                // 初始化
                MainViewModel  mainVM  = Globals.Instance.MainVM;
                DeviceProperty devProp = mainVM.CurrentDevice.DeviceProperty;

                this.Brand       = devProp.Brand;
                this.OSVersion   = devProp.OSVersion;
                this.ModelNumber = devProp.ModelNumber;
                this.RootStatus  = devProp.IsRooted ? "Root" : "Unroot";
            }
        }
Example #4
0
        /// <summary>
        /// 打开连接成功对话框
        /// </summary>
        public void openConnectSuccess(MainHomeViewModel.DeviceType devType)
        {
            hideMenus();

            var wSuccess = new DialogConnectSuccess();

            wSuccess.Owner = this;
            wSuccess.ShowDialog();

            MainViewModel mainVM = (MainViewModel)this.DataContext;

            if (wSuccess.DialogResult == false)
            {
                return;
            }

            this.ExtractPath = wSuccess.FileControl.TextPath.Text;

            // 苹果设备直接进入提取页面
            if (devType == MainHomeViewModel.DeviceType.Apple)
            {
                ((MainViewModel)this.DataContext).GoToExtractPage(devType, this.ExtractPath);
            }
            // 安卓设备要进入选择提取方式的界面
            else if (devType == MainHomeViewModel.DeviceType.Android)
            {
                var wExtractType = new DialogSelectExtractType();
                wExtractType.Owner = this;
                wExtractType.ShowDialog();

                if (wExtractType.DialogResult == false)
                {
                    return;
                }

                if (mainVM.CurrentDevice != null)
                {
                    // 打开提取页面
                    mainVM.GoToExtractPage(MainHomeViewModel.DeviceType.Android, this.ExtractPath);
                }
            }
        }
        public DialogConnectSuccess(MainHomeViewModel.DeviceType devType)
        {
            InitializeComponent();

            this.DataContext = new DialogSuccessViewModel(devType);
        }