Class AttachmentViewModel
View model for the attachment
Inherited Members
Namespace: Phoenix.Aruba
Assembly: Phoenix.Plugin.Aruba.dll
Syntax
public class AttachmentViewModel : BindableBase, INotifyPropertyChanged, IDisposable
Constructors
View SourceAttachmentViewModel()
Initializes a new instance of the AttachmentViewModel class.
Declaration
public AttachmentViewModel()
AttachmentViewModel(ViewModelSharedInfo, IMediaProvider, TemplateViewModel, IGameDevice, string, Guid)
Initializes a new instance of the AttachmentViewModel class.
Declaration
public AttachmentViewModel(ViewModelSharedInfo sharedInfo, IMediaProvider mediaProvider, TemplateViewModel template, IGameDevice gameDevice, string path, Guid bugResolveGuid)
Parameters
Type | Name | Description |
---|---|---|
ViewModelSharedInfo | sharedInfo | The shared info view model. |
IMediaProvider | mediaProvider | A media provider. |
TemplateViewModel | template | The template view model. |
IGameDevice | gameDevice | The device to capture the attachment on. |
string | path | The file path. |
Guid | bugResolveGuid | GUID of a resolved bug |
AttachmentViewModel(ViewModelSharedInfo, IMediaProvider, TemplateViewModel, TemplateAttachmentDefinition, IGameDevice, bool, bool, bool, string, Guid)
Initializes a new instance of the AttachmentViewModel class.
Declaration
public AttachmentViewModel(ViewModelSharedInfo sharedInfo, IMediaProvider mediaProvider, TemplateViewModel template, TemplateAttachmentDefinition definition, IGameDevice gameDevice, bool inDesignMode, bool isAutoAttachment, bool disableCommandsOnReplace, string customName, Guid bugResolveGuid)
Parameters
Type | Name | Description |
---|---|---|
ViewModelSharedInfo | sharedInfo | The shared info view model. |
IMediaProvider | mediaProvider | A media provider. |
TemplateViewModel | template | The template view model. |
TemplateAttachmentDefinition | definition | The template attachment definition. |
IGameDevice | gameDevice | The device to capture the attachment on. |
bool | inDesignMode | Whether the module is in design mode. |
bool | isAutoAttachment | Whether this was an auto attachment. |
bool | disableCommandsOnReplace | Whether to disable commands while replacing attachment. |
string | customName | Custom name to use for file. |
Guid | bugResolveGuid | GUID of a resolved bug |
AttachmentViewModel(ViewModelSharedInfo, IMediaProvider, TemplateViewModel, TemplateAttachmentDefinition, IGameDevice, Guid)
Initializes a new instance of the AttachmentViewModel class.
Declaration
public AttachmentViewModel(ViewModelSharedInfo sharedInfo, IMediaProvider mediaProvider, TemplateViewModel template, TemplateAttachmentDefinition definition, IGameDevice gameDevice, Guid bugResolveGuid)
Parameters
Type | Name | Description |
---|---|---|
ViewModelSharedInfo | sharedInfo | The shared info view model. |
IMediaProvider | mediaProvider | A media provider. |
TemplateViewModel | template | The template view model. |
TemplateAttachmentDefinition | definition | The template attachment definition. |
IGameDevice | gameDevice | The device to capture the attachment on. |
Guid | bugResolveGuid | GUID of a resolved bug |
AttachmentViewModel(ViewModelSharedInfo, AttachmentViewModel)
Initializes a new instance of the AttachmentViewModel class.
Declaration
public AttachmentViewModel(ViewModelSharedInfo sharedInfo, AttachmentViewModel other)
Parameters
Type | Name | Description |
---|---|---|
ViewModelSharedInfo | sharedInfo | The shared info view model. |
AttachmentViewModel | other | The AttachmentViewModel to copy. |
Properties
View SourceAddPostCaptureCommandCommand
Gets the command for adding post-capture command.
Declaration
public ICommand AddPostCaptureCommandCommand { get; }
Property Value
Type | Description |
---|---|
ICommand |
AddPreCaptureCommandCommand
Gets the command for adding a pre-capture command.
Declaration
public ICommand AddPreCaptureCommandCommand { get; }
Property Value
Type | Description |
---|---|
ICommand |
AttachmentFileValid
Gets a value indicating whether the physical file for the attachment is valid.
Declaration
public bool AttachmentFileValid { get; }
Property Value
Type | Description |
---|---|
bool |
AttachmentType
Gets or sets gets/Sets attachment's type. Used in the Create Bug dialog.
Declaration
public IAttachmentType AttachmentType { get; set; }
Property Value
Type | Description |
---|---|
IAttachmentType |
AttachmentTypes
Gets all supported attachment types.
Declaration
public IEnumerable<IAttachmentType> AttachmentTypes { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IAttachmentType> |
BugResolveGuid
Gets the Bug Id for the attachment's bug.
Declaration
public Guid BugResolveGuid { get; }
Property Value
Type | Description |
---|---|
Guid |
CompleteRenameCommand
Gets attachment's complete rename command.
Declaration
public DelegateCommand CompleteRenameCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
CustomName
Gets or sets a value indicating the user customized name for the attachment.
Declaration
public string CustomName { get; set; }
Property Value
Type | Description |
---|---|
string |
DefaultIsCapturable
Gets a value indicating whether the default attachment type is capturable for the current media provider.
Declaration
public bool DefaultIsCapturable { get; }
Property Value
Type | Description |
---|---|
bool |
DefaultName
Gets or sets default name of the attachment. Also used as DisplayName if not overridden.
Declaration
public string DefaultName { get; set; }
Property Value
Type | Description |
---|---|
string |
DefaultType
Gets or sets gets/Sets attachment's type in DefaultValue. Used in the Template Editor.
Declaration
public IAttachmentType DefaultType { get; set; }
Property Value
Type | Description |
---|---|
IAttachmentType |
DefaultValue
Gets the attachment's definition values. Used in the Template Editor.
Declaration
public AttachmentDefinition DefaultValue { get; }
Property Value
Type | Description |
---|---|
AttachmentDefinition |
Definition
Gets the template attachment definition.
Declaration
public TemplateAttachmentDefinition Definition { get; }
Property Value
Type | Description |
---|---|
TemplateAttachmentDefinition |
DisableCommandsOnReplace
Gets a value indicating whether to disable commands in order to replace a failed capture.
Declaration
public bool DisableCommandsOnReplace { get; }
Property Value
Type | Description |
---|---|
bool |
DisplayName
Gets attachment's display name. Used in the Create Bug dialog.
Declaration
public string DisplayName { get; }
Property Value
Type | Description |
---|---|
string |
EditCommand
Gets attachment's context menu command.
Declaration
public DelegateCommand EditCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
EffectiveTemplateDefinition
Gets returns the influencing TemplateAttachmentDefinition. Can be attachment's own definition or a definition from it's inheriting ancestor.
Declaration
public TemplateAttachmentDefinition EffectiveTemplateDefinition { get; }
Property Value
Type | Description |
---|---|
TemplateAttachmentDefinition |
FailedDueToExceptionInCommand
Gets a value indicating whether capture failed due to an exception while executing a command.
Declaration
public bool FailedDueToExceptionInCommand { get; }
Property Value
Type | Description |
---|---|
bool |
FailedDueToExceptionString
Gets the string to display when a command failed due to an exception.
Declaration
public string FailedDueToExceptionString { get; }
Property Value
Type | Description |
---|---|
string |
FailedDueToInvalidCommands
Gets a value indicating whether capture failed due to invalid commands.
Declaration
public bool FailedDueToInvalidCommands { get; }
Property Value
Type | Description |
---|---|
bool |
FileExtension
Gets or sets the file extension used for this attachment.
Declaration
public string FileExtension { get; set; }
Property Value
Type | Description |
---|---|
string |
GameDevice
Gets or sets the game device to capture the attachment on.
Declaration
public IGameDevice GameDevice { get; set; }
Property Value
Type | Description |
---|---|
IGameDevice |
ID
Gets attachment's unique identifier. Used to establish dependency chain.
Declaration
public Guid ID { get; }
Property Value
Type | Description |
---|---|
Guid |
InDesignMode
Gets a value indicating whether the attachment view model is in design mode.
Declaration
public bool InDesignMode { get; }
Property Value
Type | Description |
---|---|
bool |
IsCapturing
Gets or sets a value indicating whether this attachment is currently being captured.
Declaration
public bool IsCapturing { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsDefaultValueOverridden
Gets or sets a value indicating whether the default value is overridden depends on whether the attachment's definition is inherited and whether it's values differ from that of it's ancestor. Used in the Template Editor.
Declaration
public bool IsDefaultValueOverridden { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsRenaming
Gets or sets a value indicating whether if the attachment is currently in the renaming process.
Declaration
public bool IsRenaming { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsRootTemplateAttachment
Gets a value indicating whether this attachment is part of a template at the root of the hierarchy.
Declaration
public bool IsRootTemplateAttachment { get; }
Property Value
Type | Description |
---|---|
bool |
IsUrgencyLevelOverridden
Gets or sets a value indicating whether the urgency level is overridden depends on whether the attachment's definition is inherited and whether it's value differs from that of it's ancestor. Used in the Template Editor.
Declaration
public bool IsUrgencyLevelOverridden { get; set; }
Property Value
Type | Description |
---|---|
bool |
MovePostCaptureCommandDownCommand
Gets the command for moving post-capture command down.
Declaration
public DelegateCommand<ArubaCommandItemViewModel> MovePostCaptureCommandDownCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<ArubaCommandItemViewModel> |
MovePostCaptureCommandUpCommand
Gets the command for move a post-capture command up.
Declaration
public DelegateCommand<ArubaCommandItemViewModel> MovePostCaptureCommandUpCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<ArubaCommandItemViewModel> |
MovePreCaptureCommandDownCommand
Gets the command for moving pre-capture command down.
Declaration
public DelegateCommand<ArubaCommandItemViewModel> MovePreCaptureCommandDownCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<ArubaCommandItemViewModel> |
MovePreCaptureCommandUpCommand
Gets the command for move a pre-capture command up.
Declaration
public DelegateCommand<ArubaCommandItemViewModel> MovePreCaptureCommandUpCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<ArubaCommandItemViewModel> |
Parameters
Gets or sets attachment's capture options. Used both in Create Bug dialog and Template editor.
Declaration
public IEnumerable<AttachmentParameterViewModel> Parameters { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<AttachmentParameterViewModel> |
PostCaptureCommandParameters
Gets or sets the parameters string for the selected post-capture command.
Declaration
public string PostCaptureCommandParameters { get; set; }
Property Value
Type | Description |
---|---|
string |
PostCaptureCommands
Gets the collection of post-capture commands.
Declaration
public ObservableCollection<ArubaCommandItemViewModel> PostCaptureCommands { get; }
Property Value
Type | Description |
---|---|
ObservableCollection<ArubaCommandItemViewModel> |
PreCaptureCommandParameters
Gets or sets the parameters string for the selected pre-capture command.
Declaration
public string PreCaptureCommandParameters { get; set; }
Property Value
Type | Description |
---|---|
string |
PreCaptureCommands
Gets the collection pre-capture commands.
Declaration
public ObservableCollection<ArubaCommandItemViewModel> PreCaptureCommands { get; }
Property Value
Type | Description |
---|---|
ObservableCollection<ArubaCommandItemViewModel> |
RecaptureCommand
Gets attachment's command to attempt a recapture.
Declaration
public DelegateCommand RecaptureCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
RemovePostCaptureCommandCommand
Gets the command for removing post-capture command.
Declaration
public DelegateCommand<ArubaCommandItemViewModel> RemovePostCaptureCommandCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<ArubaCommandItemViewModel> |
RemovePreCaptureCommandCommand
Gets the command for removing a pre-capture command.
Declaration
public DelegateCommand<ArubaCommandItemViewModel> RemovePreCaptureCommandCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<ArubaCommandItemViewModel> |
RenameCommand
Gets attachment's rename menu command.
Declaration
public DelegateCommand RenameCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
RenameDisplayName
Gets or sets the attachment's rename display name.
Declaration
public string RenameDisplayName { get; set; }
Property Value
Type | Description |
---|---|
string |
SecondarySourceFilesPath
Gets a list of secondary files that start with the same name as the primary SourceFile.
Declaration
public List<string> SecondarySourceFilesPath { get; }
Property Value
Type | Description |
---|---|
List<string> |
SelectedPostCaptureCommand
Gets or sets the currently selected command for adding post-capture commands.
Declaration
public ArubaCommand SelectedPostCaptureCommand { get; set; }
Property Value
Type | Description |
---|---|
ArubaCommand |
SelectedPreCaptureCommand
Gets or sets the currently selected command for adding pre-capture commands.
Declaration
public ArubaCommand SelectedPreCaptureCommand { get; set; }
Property Value
Type | Description |
---|---|
ArubaCommand |
SharedInfo
Gets the SharedInfo provided for this AttachmentViewModel.
Declaration
public ViewModelSharedInfo SharedInfo { get; }
Property Value
Type | Description |
---|---|
ViewModelSharedInfo |
ShouldAutoCapture
Gets or sets a value indicating whether this attachment should automatically capture.
Declaration
public bool ShouldAutoCapture { get; set; }
Property Value
Type | Description |
---|---|
bool |
Size
Gets memory of the attached file.
Declaration
public long Size { get; }
Property Value
Type | Description |
---|---|
long |
SourcePath
Gets or sets gets/Sets a path to an attachment file.
Declaration
public string SourcePath { get; set; }
Property Value
Type | Description |
---|---|
string |
SourceUri
Gets used as a source parameter for UI controls.
Declaration
public Uri SourceUri { get; }
Property Value
Type | Description |
---|---|
Uri |
Template
Gets or sets the template view model associated with this attachment.
Declaration
public TemplateViewModel Template { get; set; }
Property Value
Type | Description |
---|---|
TemplateViewModel |
TryChangeAttachmentType
Gets this command helps get around the problem with backing out combo box selection
Declaration
public DelegateCommand<IAttachmentType> TryChangeAttachmentType { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<IAttachmentType> |
UrgencyLevel
Gets or sets gets/Sets the urgency of the attachment. Used in the Template Editor.
Declaration
public UrgencyLevel UrgencyLevel { get; set; }
Property Value
Type | Description |
---|---|
UrgencyLevel |
Methods
View SourceCaptureAsync()
Attempts to capture an attachment.
Declaration
public Task CaptureAsync()
Returns
Type | Description |
---|---|
Task | A Task representing the asynchronous operation. |
CompleteRename(string)
Completes the rename process.
Declaration
public void CompleteRename(string renameDisplayName)
Parameters
Type | Name | Description |
---|---|---|
string | renameDisplayName | Filename to rename file as. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Edit()
Attachment's edit wrapper.
Declaration
public void Edit()
GetFileExtensionOptions()
Static method returning the preset extensions for metadata screen captures.
Declaration
public static IEnumerable<ScreenCaptureFileExtension> GetFileExtensionOptions()
Returns
Type | Description |
---|---|
IEnumerable<ScreenCaptureFileExtension> | Returns the screen capture file extension options. |
GetMetadataStorageOptions()
Static method returning the preset metadata storage options.
Declaration
public static IEnumerable<MetadataStorageType> GetMetadataStorageOptions()
Returns
Type | Description |
---|---|
IEnumerable<MetadataStorageType> | Returns the metadata storage options. |
GetRecordingDurations()
Static method returning the preset video capture durations.
Declaration
public static IEnumerable<TimeSpan> GetRecordingDurations()
Returns
Type | Description |
---|---|
IEnumerable<TimeSpan> | Returns the recording durations. |
Rename()
Starts or cancels the rename process.
Declaration
public void Rename()
Save()
Attachment's save wrapper.
Declaration
public void Save()
TryCaptureAsync()
Attachment's capture wrapper.
Declaration
public Task TryCaptureAsync()
Returns
Type | Description |
---|---|
Task | A Task that represents the asynchronous operation. |
Update(AttachmentViewModel)
Updates attachment's properties with values from another.
Declaration
public void Update(AttachmentViewModel other)
Parameters
Type | Name | Description |
---|---|---|
AttachmentViewModel | other | The AttachmentViewModel to copy properties from. |