-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Core] More MVVM-ish way to manage documents
- Loading branch information
Showing
21 changed files
with
279 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,33 @@ | ||
using Prism.Commands; | ||
using System.Windows.Input; | ||
using Prism.Mvvm; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using WDE.Common.History; | ||
using WDE.Common.Managers; | ||
using WDE.Common.Utils; | ||
|
||
namespace WDE.SQLEditor.ViewModels | ||
{ | ||
public class SqlEditorViewModel : BindableBase | ||
public class SqlEditorViewModel : BindableBase, IDocument | ||
{ | ||
public string Code { get; set; } | ||
|
||
public SqlEditorViewModel(string sql) | ||
{ | ||
Code = sql; | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
} | ||
|
||
public string Title { get; } = "SQL Output"; | ||
public ICommand Undo { get; } = AlwaysDisabledCommand.Command; | ||
public ICommand Redo { get; } = AlwaysDisabledCommand.Command; | ||
public ICommand Copy { get; } = AlwaysDisabledCommand.Command; | ||
public ICommand Cut { get; } = AlwaysDisabledCommand.Command; | ||
public ICommand Paste { get; } = AlwaysDisabledCommand.Command; | ||
public ICommand Save { get; } = AlwaysDisabledCommand.Command; | ||
public ICommand CloseCommand { get; set; } = null; | ||
public bool CanClose { get; } = true; | ||
public IHistoryManager History { get; } = null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule WoWDatabaseEditor.Common
updated
8 files
Oops, something went wrong.