public async Task OpenProfile() { if (!_context.IsAuthorized) { return; } await _context.LoadMarks(); var prev = _currentWindow; _currentWindow = new ProfileWindow(); _currentWindow.DataContext = _context; _currentWindow.Show(); prev.Close(); }