private void convertB_Click(object sender, EventArgs e) { FtGConverterButton.Enabled = false; FtGConverterButton.Text = nManager.Translate.Get(nManager.Translate.Id.In_progress); string[] files = Others.DialogBoxOpenFileMultiselect( Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "Profile files (*.xml;*.ini)|*.xml;*.ini|All files (*.*)|*.*"); int error = 0; int success = 0; foreach (string file in files) { if (!Products.IsStarted) { return; } if (Conversion.Gatherer.IsGathererProfile(file)) { if (Conversion.Gatherer.Convert(file)) { success++; } else { error++; } } else if (Conversion.Fisherbot.IsFisherbotProfile(file)) { if (Conversion.Fisherbot.Convert(file)) { success++; } else { error++; } } else if (Conversion.Grinder.IsGrinderProfile(file)) { if (Conversion.Grinder.Convert(file)) { success++; } else { error++; } } else { error++; } Application.DoEvents(); } MessageBox.Show(string.Format("{0}, {1} {2}, {3} {4} ", nManager.Translate.Get(nManager.Translate.Id.Convertion_finish), success, nManager.Translate.Get(nManager.Translate.Id.success), error, nManager.Translate.Get(nManager.Translate.Id.errors))); FtGConverterButton.Text = nManager.Translate.Get(nManager.Translate.Id.Convert_Profiles); FtGConverterButton.Enabled = true; }
private void convertB_Click(object sender, EventArgs e) { convertB.Enabled = false; convertB.Text = nManager.Translate.Get(nManager.Translate.Id.In_progress); string[] files = Others.DialogBoxOpenFileMultiselect( Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), "Profile files (*.xml;*.ini)|*.xml;*.ini|All files (*.*)|*.*"); int error = 0; int success = 0; foreach (string file in files) { if (!Products.IsStarted) { return; } if (HonorBuddyGrind.IsHonorBuddyGrindProfile(file)) { if (HonorBuddyGrind.Convert(file)) { success++; } else { error++; } } else if (GatherBuddy.IsGatherBuddyProfile(file)) { if (GatherBuddy.Convert(file)) { success++; } else { error++; } } else if (MMOLazyMyFlyer.IsMMoLazyFlyerProfile(file)) { if (MMOLazyMyFlyer.Convert(file)) { success++; } else { error++; } } else if (PiroxFlyGatherer.IsPiroxFlyGathererProfile(file)) { if (PiroxFlyGatherer.Convert(file)) { success++; } else { error++; } } else if (WowRobotGatherFly.IsWowRobotGatherFlyProfile(file)) { if (WowRobotGatherFly.Convert(file)) { success++; } else { error++; } } else { error++; Logging.Write("Profile: ''" + file + "'' no converted."); Application.DoEvents(); } } MessageBox.Show(nManager.Translate.Get(nManager.Translate.Id.Convertion_finish) + ", " + success + " " + nManager.Translate.Get(nManager.Translate.Id.success) + ", " + error + " " + nManager.Translate.Get(nManager.Translate.Id.errors) + " "); convertB.Text = nManager.Translate.Get(nManager.Translate.Id.Convert_Profiles); convertB.Enabled = true; }