void bSetWater_Click(object sender, MyClasses.MetaViewWrappers.MVControlEventArgs e) { try { MyClasses.MyDialog_ColorQuery dlgWaterColor = new MyClasses.MyDialog_ColorQuery(Host, new string[] { "Cancel", "Set" }, "SkunkVision: Set Impassable Water Color", "Select new color for impassable water:", 0, Render.WaterColor, "SVdlg", View); dlgWaterColor.DialogReturned += new MyClasses.MyDialog <System.Drawing.Color> .delDialogReturned(dlgWaterColor_DialogReturned); } catch (Exception exx) { OnError(exx); } }
private void btnLoadAll_Click(object sender, MyClasses.MetaViewWrappers.MVControlEventArgs e) { try { if (IsDisplayingCurrentChar) { Util.Warning("You can't load the <Current> profile, that's what's already on your spellbars"); return; } if (chkAutoBackup.Checked) { SaveTabsXml(mSpellTabs, Core.CharacterFilter.Name + "-backup", true); } for (int t = 0; t < NumSpellTabs; t++) { LoadBar(t, t); } } catch (Exception ex) { Util.HandleException(ex); } }
private void btnSave_Click(object sender, MyClasses.MetaViewWrappers.MVControlEventArgs e) { try { string profileName = edtSaveAs.Text; char[] invalidChars = IOPath.GetInvalidFileNameChars(); foreach (char invalid in invalidChars) { if (profileName.Contains(invalid.ToString())) { string err = "The profile name can't contain any of the following characters:"; foreach (char invalid2 in invalidChars) { err += " " + invalid2; } Util.Error(err); return; } } SaveTabsXml(mSpellTabs, profileName, false); } catch (Exception ex) { Util.HandleException(ex); } }
private void btnDelete_Click(object sender, MyClasses.MetaViewWrappers.MVControlEventArgs e) { try { string profileName = choLoad.Text[choLoad.Selected]; if (IsDisplayingCurrentChar) { Util.Warning("You can't delete the <Current> profile."); } else if (!Util.IsControlDown()) { Util.Warning("Please hold down CTRL and click Delete to delete the " + profileName + " profile."); } else { File.Delete(Util.FullPath(@"Spellbars\" + profileName + ".xml")); Util.Message("Profile " + profileName + " deleted."); int curSel = choLoad.Selected; choLoad.Selected = 0; choLoad.Remove(curSel); } } catch (Exception ex) { Util.HandleException(ex); } }