private void btnUninstall_Click(object sender, RoutedEventArgs e) { string apkfile = $"{Path.GetDirectoryName(Assembly.GetEntryAssembly().Location)}\\AppDatas\\" + FilterSpecial(DelChinese(((Button)sender).Content.ToString()).Trim()).Trim(); if (_runningGroupIndex == -1) { MessageDialogManager.ShowDialogAsync(SystemLanguageManager.Instance.ResourceManager.GetString("Error_Please_Launch_A_Vm", SystemLanguageManager.Instance.CultureInfo)); return; } for (int i = 0; i < VmManager.Instance.Column; i++) { int vmIndex = VmManager.Instance.VmIndexArray[_runningGroupIndex, i]; if (vmIndex != -1) { int id = ProcessUtils.AdbUnInstallApp(vmIndex, apkfile); Thread.Sleep(200); } } ((Button)e.Source).Click += btnInstall_Click; ((Button)e.Source).Click -= btnUninstall_Click; ((Button)e.Source).Content = SystemLanguageManager.Instance.ResourceManager.GetString("Install", SystemLanguageManager.Instance.CultureInfo) + " " + ((InstallButton)e.Source).FileName; }