public bool TrySetPcBase(String path) { if (_userPasses == null) { return(false); } var newPcBase = new FileRepository(_userPasses.BasePassword); var connectResult = newPcBase.Connect(path); if (connectResult == ConnectResult.WrongPath) { return(false); } if (connectResult == ConnectResult.Success) { PcBase = newPcBase; } if (connectResult == ConnectResult.Success) { MainBase = PcBase.Base; return(true); } return(false); }
public bool SetPhoneBase(String path) { if (PcBase == null && UserPasses == null) { throw new Exception("You need to set PC base or specify passes first"); } PhoneBase = new FileRepository(UserPasses.PhonePassword); return(PhoneBase.Connect(path)); }
public bool SetPCBase(String path) { PcBase = new FileRepository(UserPasses.BasePassword); bool success = PcBase.Connect(path); //update phone base and psd base return(success); }
public bool TryCreateAndSetPhoneBase(String path) { if (_userPasses == null) { return(false); } var newPhoneBase = new FileRepository(_userPasses.PhonePassword); var connectResult = newPhoneBase.Connect(path); if (!newPhoneBase.Create(path)) { return(false); } return(TrySetPhoneBase(path)); }