/// <summary> /// 安卓手动连接 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void onAndroidManual(object sender, RoutedEventArgs e) { hideMenus(); var wDialog = new DialogSelectModel(); wDialog.Owner = this; wDialog.ShowDialog(); if (wDialog.DialogResult == true) { var wExtract = new DialogSelectExtractType(); wExtract.Owner = this; wExtract.ShowDialog(); } }
/// <summary> /// 打开提取方式对话框 /// </summary> public void openExtractType() { MainViewModel mainVM = (MainViewModel)this.DataContext; 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); } }
/// <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); } } }