private void menuAdd_Click(object sender, EventArgs e) { var fm = new RoutingRuleSettingDetailsForm(); fm.rulesItem = new RulesItem(); if (fm.ShowDialog() == DialogResult.OK) { routingItem.rules.Insert(0, fm.rulesItem); RefreshRoutingsView(); } }
private void lvRoutings_DoubleClick(object sender, EventArgs e) { int index = GetLvSelectedIndex(); if (index < 0) { return; } var fm = new RoutingRuleSettingDetailsForm(); fm.rulesItem = routingItem.rules[index]; if (fm.ShowDialog() == DialogResult.OK) { RefreshRoutingsView(); } }