/// <summary> /// Stops currently selected join. /// </summary> public static bool StopJoin(IAttributeTable table, FieldJoin join) { if (table == null) { throw new ArgumentNullException("table"); } if (join == null) { MessageService.Current.Info("No join is selected."); return(false); } string filename = join.Filename; if (!MessageService.Current.Ask("Do you want to stop the join: " + filename + "?")) { return(false); } if (table.StopJoin(join.JoinIndex)) { filename = Path.GetFileName(filename); MessageService.Current.Info("Join was stopped: " + filename); return(true); } return(false); }
public JoinViewModel(IAttributeTable table, FieldJoin editJoin) : this(table) { if (table == null) { throw new ArgumentNullException("table"); } if (editJoin == null) { throw new ArgumentNullException("editJoin"); } _table = table; Join = editJoin; string filename = PathHelper.GetAbsolutePath(editJoin.Filename, table.Filename); OpenDatasource(filename); }
/// <summary> /// Opens dialog to edit currently selected join. /// </summary> public static bool EditJoin(IAppContext context, IAttributeTable table, FieldJoin join) { if (context == null) { throw new ArgumentNullException("context"); } if (table == null) { throw new ArgumentNullException("table"); } if (join == null) { MessageService.Current.Info("No join is selected."); return(false); } var model = new JoinViewModel(table, join); return(context.Container.Run <JoinTablePresenter, JoinViewModel>(model)); }