/// <summary> /// Reopen the selected trip. /// TODO: Add "confirm" step via standard Prism mechanism /// </summary> /// <param name="arg"></param> private void ReopenTrip(TripSummaryItem arg) { arg = arg ?? this.SelectedTrip; var msg = arg == null ? "ReopenTrip got null" : arg.TripNumber; MessageBox.Show(msg); }
/// <summary> /// /// </summary> /// <param name="arg"></param> /// <returns></returns> private bool CanReopen(TripSummaryItem arg) { arg = arg ?? this.SelectedTrip; return null != arg && !arg.IsOpen; }
private void LoadTrip(TripSummaryItem arg) { arg = arg ?? this.SelectedTrip; var builder = new StringBuilder(); builder.Append("TripView"); var query = new UriQuery(); query.Add("TripId", arg.TripId.ToString()); builder.Append(query); var regionManager = ServiceLocator.Current.GetInstance<IRegionManager>(); regionManager.RequestNavigate("WorkspaceRegion", new Uri(builder.ToString(), UriKind.Relative)); //var msg = arg == null ? "LoadTrip got null" : arg.TripNumber; //MessageBox.Show(msg); }
private void DeleteTrip(TripSummaryItem arg) { }
private bool CanLoad(TripSummaryItem arg) { // This is to work around what looks like a bug in WPF. // I wasted an entire day trying to get command arguments working from // a context menu to no avail. In the best case, I could get it to work // 50-60% of the time. arg = arg ?? this.SelectedTrip; return null != arg && arg.IsOpen; }
private bool CanFinish(TripSummaryItem arg) { arg = arg ?? this.SelectedTrip; return null != arg && arg.IsOpen; }
private bool CanDelete(TripSummaryItem arg) { return false; }