/// <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;
 }
示例#3
0
        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);
        }
示例#4
0
 private void DeleteTrip(TripSummaryItem arg)
 {
 }
示例#5
0
 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;
 }
示例#6
0
 private bool CanFinish(TripSummaryItem arg)
 {
     arg = arg ?? this.SelectedTrip;
     return null != arg && arg.IsOpen;
 }
示例#7
0
 private bool CanDelete(TripSummaryItem arg)
 {
     return false;
 }