public AccountManagement(UserManageMode mode) { this._manageMode = mode; InitializeComponent(); if (Directory.Exists(Path.GetDirectoryName(USER_INFO_CONFIG)) == false) { Directory.CreateDirectory(Path.GetDirectoryName(USER_INFO_CONFIG)); } }
public static AccountManagement CreateInstance(UserManageMode mode, string loggedInUsername) { loggedInUserName = loggedInUsername; if (loggedInUserName == null) { log.Error("Logged in user name is null"); } if (_onlyAccountManagement == null) { _currentManageMode = mode; _onlyAccountManagement = new AccountManagement(mode); } else { if (_currentManageMode != mode) { _onlyAccountManagement.Close(); _onlyAccountManagement = new AccountManagement(mode); } } return(_onlyAccountManagement); }