private void SaveFormDataToModel() { _tabPageDataCollection.ActiveTabIndex = tabControlNotepad.SelectedIndex; _memoStorageService.SaveTabPageCollection(_tabPageDataCollection, _passwordStorage.Get(PwdKey)); _applicationState.TabIndexChanged = false; _applicationState.TabTextDataChanged = false; UpdateApplicationState(); }
public bool SaveBookmarks(bool savedAsync = false) { bool result = true; lock (LockObj) { if (_bookmarkManager.IsModified) { string password = _passwordStorage.Get(_protectedMemoryStorageKey); result = _bookmarkManager.SaveToFile(Path.Combine(_directory, BookmarkFileName), password); Log.Debug("SaveBookmarks called with Result: {result}, SavedAsync: {savedAsync}, ManagedThreadId: {ManagedThreadId}", result, savedAsync, Thread.CurrentThread.ManagedThreadId); } return(result); } }
public string GetPassword(string key) => _passwordStorage.Get(key);