public ConverterForm() { new Thread(() => { if (!Listfile.IsInitialized) { Listfile.Initialize(); } }).Start(); InitializeComponent(); lb.HorizontalScrollbar = true; new Thread(() => { Thread.Sleep(3000); var hasUpdate = UpdateManager.HasUpdates(AssemblyVersion); if (hasUpdate.Item1) { var messageBox = MessageBox.Show($"An update is available! From: {AssemblyVersion} To: {hasUpdate.Item2}.\nPress OK to update.", "Update!", MessageBoxButtons.OK); if (messageBox == DialogResult.OK) { // Start the updater.. UpdateManager.StartUpdater(); // Close the current window. Invoke((MethodInvoker) delegate { Close(); }); } } }).Start(); }
public ConverterForm() { new Thread(() => { if (!Listfile.IsInitialized) { Listfile.Initialize(); } }).Start(); InitializeComponent(); lb.HorizontalScrollbar = true; var key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\MultiConverter", true); if (key == null) { key = Registry.CurrentUser.CreateSubKey(@"SOFTWARE\MultiConverter"); } if (!key.GetValueNames().Contains("firstTime")) { key.SetValue("firstTime", false); } if (!bool.Parse(key.GetValue("firstTime").ToString())) { MessageBox.Show("First time converting might take a while since it is downloading + loading the listfile.."); key.SetValue("firstTime", true); } }
private void fix_btn_Click(object sender, EventArgs e) { if (!Listfile.IsInitialized) { Listfile.Initialize(); } if (lb.Items.Count == 0) { MessageBox.Show("No files"); return; } if (lb.Items.Count > 0) { progress.Value = 0; progress.Maximum = lb.Items.Count; progress.Step = PROGRESS; Fix(); } }
static void Main(string[] args) { Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("| First time converting might take a while since it is downloading + loading the listfile.."); Console.ForegroundColor = ConsoleColor.Gray; Console.WriteLine("Loading listfile..."); Listfile.Initialize(); // var printHelp = false; // foreach (var arg in args) // { // if (arg[0] == '-') // { // switch (arg.ToLower()) // { // case "-nomodel": AdtModels = false; break; // case "-nowater": AdtWater = false; break; // case "-fixhelm": FixHelm = true; break; // default: printHelp = true; break; // } // } // } // Print help if there are no files to convert. // printHelp |= FilesToConvert.Count == 0; // // if (printHelp) // PrintHelp(); string m2 = "nzoth - Copy.m2"; IConverter converter = new M2(m2, FixHelm); if (converter.Fix()) { converter.Save(); } }