public virtual void close_button_Click(object sender, EventArgs e) { if (!JsonEditorHandler.AreJsonErrors()) { this.Close(); } Main.bg.SendToBack(); }
private void Close_button_Click(object sender, EventArgs e) { ProjectHandler.SaveProject(); Serializer.SaveSettings(); if (JsonEditorHandler.AreJsonErrors()) { DialogResult diag = MessageBox.Show(tabControl1.SelectedTab.Text + " has a Json Error! Your mod will break if you don't fix it.\nClose anyways?", "WARNING!!", MessageBoxButtons.YesNo); if (diag == DialogResult.Yes) { this.Close(); } } }