/// <summary> /// /// </summary> /// <param name="store"></param> public PeripheralMgmtForm( ref StoreSetupVO store) { this.mode = PeripheralMgmtMode.INITIAL; this.AddPeripheral = new PeripheralVO(); this.EditPeripheral = new PeripheralVO(); this.ViewPeripheral = new PeripheralVO(); this.DeletePeripheral = new PeripheralVO(); this.pendingChanges = false; this.storeData = null; InitializeComponent(); if (store == null) { return; } this.storeData = store; this.peripheralSelectedIndex = -1; }
public PawnSecSetupForm( DataAccessTools dA, SecurityAccessor pSecAccess, StoreSetupVO sConfig, PawnSecVO pSecVo, EncryptedConfigContainer pEnc, string clientKey, string storeNum, bool initCreate) { InitializeComponent(); this.logLevel = LogLevel.DEBUG; this.storeNumber = storeNum; GlobalChangesMade = false; StoreChangesMade = false; MachineChangesMade = false; initialCreation = initCreate; this.storeData = sConfig; pawnSecAccessor = pSecAccess; pawnSecVo = pSecVo; //CreatingWorkstation = false; this.dAPawnSec = dA; ResourceProperties resourceProperties = new ResourceProperties(); resourceProperties.PrivateKey = clientKey; if (initCreate) { if (!pawnSecAccessor.InitializeSecurityData(resourceProperties, clientKey, storeNum, pSecVo, out this.machineName, out this.ipAddress, out this.macAddress)) { throw new ApplicationException( "Cannot initialize encryption portion of PAWNSEC™."); } this.pSec = pawnSecAccessor.EncryptConfig; } else { this.pSec = pEnc; } }