public MainWindow() { InitializeComponent(); UpdateCore.version(ver); if (!UpdateCore.verchk) { UpdateForm frm = new UpdateForm(); Hide(); frm.Show(); } else { changefilename(); CuttingEdge.Osuroot(); FormCuttingEdge frm2 = new FormCuttingEdge(); Hide(); frm2.Show(); } }
private void Form1_Load(object sender, EventArgs e) { try { UpdateCore.version(ver); if (UpdateCore.verchk == "1") { if (GetServerIP == "404 page not found") { ServerIP = GetServerIP; GetServer(); } if (GetServerIP != "404 page not found") { ServerIP = "34.85.96.178"; GetServer(); } } if (UpdateCore.verchk == "0") { UpdateForm frm = new UpdateForm(); Hide(); ShowInTaskbar = false; frm.Show(); } } catch (Exception ex) { LogCore.Log(ex); MessageBox.Show("Error! \r\rPlease Send Discrod Nerina#4444 the Switcher Logs", "Novah", MessageBoxButtons.OK, MessageBoxIcon.Error); string filepath = Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData) + "\\novahlog.txt"; Process.Start(filepath); Environment.Exit(0); } }