Пример #1
0
        private async void btnDeleteAll_Click(object sender, RoutedEventArgs e)
        {
            var target = GetTargetMobileIndexs();

            if (!target.Item1)
            {
                MessageDialogManager.ShowDialogAsync(SystemLanguageManager.Instance.ResourceManager.GetString("Select_Vm", SystemLanguageManager.Instance.CultureInfo));
                return;
            }

            foreach (var index in target.Item2)
            {
                if (_mobilePictures.Keys.Contains(index))
                {
                    string[] mobilePics           = _mobilePictures[index];
                    bool     deletePicturesResult = await SimulationTaskWrapper.DeletePictures(index, mobilePics);

                    Console.WriteLine($"delete pictures result:{deletePicturesResult}");
                }
                else
                {
                    string mobileId = DeviceConnectionManager.Instance.GetDeviceNameByMobileIndex(index);
                    ProcessUtils.DeleteAllPictures(mobileId);
                }
            }
        }