Пример #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;
           } }
     });
 }