예제 #1
0
        public async Task SelectWorkspaceItem(Guid key, bool isFavorite = false)
        {
            if (isFavorite)
            {
                await ExecuteFavoriteItemViewModel(key);
            }
            else
            {
                var prevSelected = Selected;
                await SetSelected(key);

                if (prevSelected != default(Guid) && prevSelected != Selected && GetTextEditorText != null)
                {
                    var content = await GetTextEditorText.Invoke();

                    await FileSystemRepository.SetFileContent(prevSelected, content);
                }

                SelectedChanged?.Invoke();
            }
        }
예제 #2
0
        public async Task SaveTextEditorContent()
        {
            var content = await GetTextEditorText.Invoke();

            await FileSystemRepository.SetFileContent(Selected, content);
        }