Table of Contents

Class PersistedDocument

Namespace
Gemini.Framework
Assembly
Gemini.dll
public abstract class PersistedDocument : Document, IViewAware, IChild, ICommandHandler<UndoCommandDefinition>, ICommandHandler<RedoCommandDefinition>, ICommandHandler<SaveFileCommandDefinition>, ICommandHandler<SaveFileAsCommandDefinition>, ICommandHandler, IPersistedDocument, IDocument, ILayoutItem, IScreen, IHaveDisplayName, IActivate, IDeactivate, IGuardClose, IClose, INotifyPropertyChangedEx, INotifyPropertyChanged, IPersistedElement
Inheritance
PropertyChangedBase
ViewAware
Screen
PersistedDocument
Implements
IViewAware
IChild
IScreen
IHaveDisplayName
IActivate
IDeactivate
IGuardClose
IClose
INotifyPropertyChangedEx
Inherited Members
Screen.OnInitialize()
Screen.OnActivate()
Screen.Parent
Screen.DisplayName
Screen.IsActive
Screen.IsInitialized
Screen.Activated
Screen.AttemptingDeactivation
Screen.Deactivated
ViewAware.DefaultContext
ViewAware.Views
ViewAware.ViewAttached
PropertyChangedBase.Refresh()
PropertyChangedBase.IsNotifying
PropertyChangedBase.PropertyChanged

Properties

FileName

public virtual string FileName { get; }

Property Value

string

FilePath

public virtual string FilePath { get; }

Property Value

string

IsDirty

public bool IsDirty { get; set; }

Property Value

bool

IsNew

public bool IsNew { get; }

Property Value

bool

Methods

CanClose(Action<bool>)

Called to check whether or not this instance can close.

public override void CanClose(Action<bool> callback)

Parameters

callback Action<bool>

The implementor calls this action with the result of the close check.

DoLoad(string)

protected abstract Task DoLoad(string filePath)

Parameters

filePath string

Returns

Task

DoNew()

protected abstract Task DoNew()

Returns

Task

DoSave(string)

protected abstract Task DoSave(string filePath)

Parameters

filePath string

Returns

Task

Load(string)

public Task Load(string filePath)

Parameters

filePath string

Returns

Task

New(string)

public Task New(string fileName)

Parameters

fileName string

Returns

Task

OnViewLoaded(object)

Called when an attached view's Loaded event fires.

protected override void OnViewLoaded(object view)

Parameters

view object

Save(string)

public Task Save(string filePath)

Parameters

filePath string

Returns

Task

TryClose(bool?)

Tries to close and opens a dialog if there are unsaved changes.

public override void TryClose(bool? dialogResult = null)

Parameters

dialogResult bool?

Result from a dialog

UpdateDisplayName()

protected void UpdateDisplayName()