我在工作中被分配了一项任务,作为实习生,一切都是新的哈哈。我被要求做以下事情:
//To test this you will need to update the code CoreModuleDesktop.cs.
this.NavManager.RegisterCommonActionItem("History Audit Log", "AuditLog", 110,
new BitmapImage(new Uri("pack://application:,,,/Core;component/Resources/maintenance.png")),
new Action(() => _regionManager.RequestNavigate(RegionNames.MainRegion, typeof(Views.HistoryAuditLogView).FullName)));
//The part inside the action will need to be changed to look something like this
//where you specify the parameters. Then you can pull them out OnNavigateTo method
//like in the ServiceOrderMaintenanceViewModel. For this step just pass in the
//Table and Key ID, leave the connection string hard coded.
IRegionManager regionManager = AllianceApp.Container.GetExportedValue<IRegionManager>();
UriQuery query = new UriQuery();
query.Add("AccountID", accountID.ToString());
query.Add("ServiceOrderID", serviceOrderID.ToString());
regionManager.RequestNavigate(RegionNames.MainRegion, new Uri(typeof(ServiceOrderMaintenanceView).FullName + query.ToString(), UriKind.Relative));
它们在 Action 内部的部分是什么意思?以及提供的查询到底是如何工作的。任何帮助,将不胜感激!