public PatchCreator(string patch, bool edit) { InitializeComponent(); this.patch = patch; this.edit = edit; if (!this.edit) { text_Author.Text = Environment.UserName; combo_System.SelectedIndex = 0; } unifytb_ModCreator.ActiveColor = unifytb_ModCreator.HorizontalLineColor = Properties.Settings.Default.General_AccentColour; if (Properties.Settings.Default.General_HighContrastText) { unifytb_ModCreator.SelectedTextColor = SystemColors.ControlText; } if (edit) { Text = "Patch Editor"; if (File.Exists(patch)) { text_Title.Text = Lua.DeserialiseParameter("Title", patch, true); text_Author.Text = Lua.DeserialiseParameter("Author", patch, true); switch (Lua.DeserialiseParameter("Platform", patch, true)) { case "Xbox 360": combo_System.SelectedIndex = 0; break; case "PlayStation 3": combo_System.SelectedIndex = 1; break; case "All Systems": combo_System.SelectedIndex = 2; break; default: combo_System.SelectedIndex = 0; break; } text_Blurb.Text = Lua.DeserialiseParameter("Blurb", patch, true); tb_Description.Text += Lua.DeserialiseParameter("Description", patch, true).Replace(@"\n", Environment.NewLine); } else { Close(); } btn_Create.Text = "Edit Patch"; btn_Create.BackColor = Color.SkyBlue; } }