private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "") { new BalloonTip("Warning", "Group name can not be empty", textBox1, BalloonTip.ICON.WARNING); return; } Config.SavedRouteGroup group = new Config.SavedRouteGroup(); group.Name = textBox1.Text; group.AutoLoadOnStartup = checkBox1.Checked; int result = Global.Config.SavedRoutes.AddNode(treeView, group, rename); if (result == 1) { new BalloonTip("Error", "Invalid destination", button1, BalloonTip.ICON.ERROR); return; } if (result == 2) { new BalloonTip("Warning", "Group name already used at current destination", textBox1, BalloonTip.ICON.WARNING); return; } DialogResult = System.Windows.Forms.DialogResult.OK; Close(); }
private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "") { new BalloonTip("Warning", "Route name can not be empty", textBox1, BalloonTip.ICON.WARNING); return; } Config.SavedRouteGroup group = new Config.SavedRouteGroup(); group.Name = textBox1.Text; int result = Global.Config.SavedRoutes.AddNode(treeView, group, false); if (result == 1) { new BalloonTip("Error", "Invalid destination", button1, BalloonTip.ICON.ERROR); return; } if (result == 2) { new BalloonTip("Warning", "Group name already used at current destination", textBox1, BalloonTip.ICON.WARNING); return; } Close(); }
private void button1_Click(object sender, EventArgs e) { if (textBox1.Text == "") { new BalloonTip("Warning", "Route name can not be empty", textBox1, BalloonTip.ICON.WARNING); return; } Config.SavedRouteGroup group = new Config.SavedRouteGroup(); group.Name = textBox1.Text; int result = Global.Config.SavedRoutes.AddNode(treeView, group, false); if (result == 1) { new BalloonTip("Error", "Invalid destination", button1, BalloonTip.ICON.ERROR); return; } if (result == 2) { new BalloonTip("Warning", "Group name already used at current destination", textBox1, BalloonTip.ICON.WARNING); return; } Close(); }