public void Run() { if (dialog.Run() == (int)ResponseType.Ok) { station.ClearLinks(); foreach (Link link in link_store) { station.AddLink(link); } station.Title = title_entry.Text; station.Description = description_entry.Text; station.Group = group_combo.Entry.Text; if (is_new) { stations.Add(station); } stations.Save(); StationSavedHandler handler = Saved; if (handler != null) { StationSavedArgs args = new StationSavedArgs(); args.Station = station; handler(this, args); } } dialog.Destroy(); }
public void RemoveStation(Station station) { StationGroup group = station.Parent as StationGroup; if (group == null) { return; } group.RemoveChild(station); if (group.ChildCount == 0) { RemoveNode(group); } stations.Remove(station); stations.Save(); }