private void Button2_Click(object sender, EventArgs e) { try { using (SphubCore.ReportUploader rp = new SphubCore.ReportUploader(MCHandler.mclocation + "/logs/" + "debug.log", Properties.Settings.Default.username + "-Debug.log")) { rp.ShowDialog(); } using (SphubCore.ReportUploader rp1 = new SphubCore.ReportUploader(MCHandler.mclocation + "/logs/" + "latest.log", Properties.Settings.Default.username + "-Latest.log")) { rp1.ShowDialog(); } } catch (Exception errormessage) { using (SphubCore.ErrorWindow ew = new SphubCore.ErrorWindow(errormessage)) { ew.Show(); } } }
public MCSettings() { try { InitializeComponent(); NativeMethods.GetPhysicallyInstalledSystemMemory(out long memKb); int mem = int.Parse(memKb.ToString()) / 1024; trackBar1.Maximum = mem; trackBar1.Value = Properties.Settings.Default.ram; label2.Text = trackBar1.Value.ToString() + " MB"; args.Text = Properties.Settings.Default.javargs; textBox1.Text = Properties.Settings.Default.mclocation; } catch (Exception errormessage) { using (SphubCore.ErrorWindow ew = new SphubCore.ErrorWindow(errormessage)) { ew.Show(); } } }