Class TypeDataEditorViewModel
- Namespace
- Loehnert.Lisrt.TypeAndResult.TypeDataEditor.ViewModels
- Assembly
- Loehnert.Lisrt.TypeAndResult.dll
View model for a type data editor tool.
[Export]
public class TypeDataEditorViewModel : Document, IViewAware, IChild, IDocument, ILayoutItem, IScreen, IHaveDisplayName, IActivate, IDeactivate, IGuardClose, IClose, INotifyPropertyChangedEx, INotifyPropertyChanged, ICommandHandler<UndoCommandDefinition>, ICommandHandler<RedoCommandDefinition>, ICommandHandler<SaveFileCommandDefinition>, ICommandHandler<SaveFileAsCommandDefinition>, ICommandHandler
- Inheritance
-
PropertyChangedBaseViewAwareScreenTypeDataEditorViewModel
- Implements
-
IViewAwareIChildIScreenIHaveDisplayNameIActivateIDeactivateIGuardCloseICloseINotifyPropertyChangedEx
- Inherited Members
-
Screen.OnActivate()Screen.ParentScreen.IsActiveScreen.IsInitializedScreen.ActivatedScreen.AttemptingDeactivationScreen.DeactivatedViewAware.DefaultContextViewAware.ViewsViewAware.ViewAttachedPropertyChangedBase.Refresh()PropertyChangedBase.IsNotifyingPropertyChangedBase.PropertyChanged
Constructors
TypeDataEditorViewModel(IUserManager)
Initializes a new instance of the TypeDataEditorViewModel class.
public TypeDataEditorViewModel(IUserManager userManager)
Parameters
userManagerIUserManagerManager for the users.
Exceptions
- ArgumentNullException
Thrown when
userManageris null.
TypeDataEditorViewModel(IUserManager, GeminiTypeDataModule, IWindowManager)
Initializes a new instance of the TypeDataEditorViewModel class.
[ImportingConstructor]
public TypeDataEditorViewModel(IUserManager userManager, GeminiTypeDataModule geminiTypeDataModule, IWindowManager windowManager)
Parameters
userManagerIUserManagerManager for the users.
geminiTypeDataModuleGeminiTypeDataModuleGets the type data module.
windowManagerIWindowManagerWindow manager.
Exceptions
- ArgumentNullException
Thrown when
userManageris null.
Properties
CloseCommand
Gets a command for closing this document.
public override ICommand CloseCommand { get; }
Property Value
DisplayName
Gets the display name.
public override string DisplayName { get; }
Property Value
IconSource
Gets the icon.
public override Uri IconSource { get; }
Property Value
IsBusy
Gets a value indicating whether the editor is busy.
public bool IsBusy { get; }
Property Value
IsDirty
Gets a value indicating whether data on the editor are unsaved.
public bool IsDirty { get; }
Property Value
TypeData
Gets the loaded type data.
public TypeData TypeData { get; }
Property Value
TypeDataViewModel
Gets the view model for the type data.
public TypeDataViewModel TypeDataViewModel { get; }
Property Value
Methods
Load(ITypeDataProvider, string)
Loads the type data.
public void Load(ITypeDataProvider provider, string typeIdentifier)
Parameters
providerITypeDataProviderProvider for loading.
typeIdentifierstringIdentifier of the type data.
Exceptions
- ArgumentNullException
Thrown if
provideris null.
New(string)
Creates a new type data.
public void New(string typeIdentifier)
Parameters
typeIdentifierstringType identifier.
OnInitialize()
Called when initializing.
protected override void OnInitialize()
Save(ITypeDataProvider)
Saves the type data.
public void Save(ITypeDataProvider provider)
Parameters
providerITypeDataProviderProvider for saving.