private void NewBarButton_Click(object sender, EventArgs e) { var result = InputBox.Show("Name:", "New Bar Graph", "", BarGraphOptions.ValidateNameHandler); if (result.Ok) { //TODO: Add Exception Control BarGraphOptions.CreateNew(result.Text); } PopulateList(); EditBarGraph(result.Text); }
private static void CreateDefaultTypes() { if (BarGraphOptions.GetAvaliable().Count == 0) { BarGraphOptions.CreateNew("Default"); } if (PieGraphOptions.GetAvaliable().Count == 0) { PieGraphOptions.CreateNew("Default"); } if (GiveawayOptions.GetAvaliable().Count == 0) { GiveawayOptions.CreateNew("Default"); } }