コード例 #1
0
		public static IDictionary<string, Func<IDataPageRow, bool>> SetupActions( ) {
			return new Dictionary<string, Func<IDataPageRow, bool>> {{@"Shutdown", delegate( IDataPageRow rowObj ) {
				var row = rowObj as DprComputerInfo;
				Helpers.AssertNotNull( row, @"PtComputerSoftware Action called with another class as second parameter" );
				using( var csd = new ConfirmShutdownDialog( new ShutdownComputerParameters( row.ComputerName ) ) ) {
					csd.ShowDialog( );
				}
				return false;
			}}};
		}
コード例 #2
0
 public static IDictionary <string, Func <IDataPageRow, bool> > SetupActions( )
 {
     return(new Dictionary <string, Func <IDataPageRow, bool> > {
         { @"Shutdown", delegate(IDataPageRow rowObj) {
               var row = rowObj as DprComputerInfo;
               Helpers.AssertNotNull(row, @"PtComputerSoftware Action called with another class as second parameter");
               using (var csd = new ConfirmShutdownDialog(new ShutdownComputerParameters(row.ComputerName))) {
                   csd.ShowDialog( );
               }
               return false;
           } }
     });
 }