Show / Hide Table of Contents

Class AttachmentViewModel

View model for the attachment

Inheritance
object
BindableBase
AttachmentViewModel
Implements
INotifyPropertyChanged
IDisposable
Inherited Members
BindableBase.SetProperty<T>(ref T, T, string)
BindableBase.SetProperty<T>(ref T, T, Action, string)
BindableBase.RaisePropertyChanged(string)
BindableBase.OnPropertyChanged(PropertyChangedEventArgs)
BindableBase.PropertyChanged
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Phoenix.Aruba
Assembly: Phoenix.Plugin.Aruba.dll
Syntax
public class AttachmentViewModel : BindableBase, INotifyPropertyChanged, IDisposable

Constructors

View Source

AttachmentViewModel()

Initializes a new instance of the AttachmentViewModel class.

Declaration
public AttachmentViewModel()
View Source

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

View Source

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

View Source

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

View Source

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 Source

AddPostCaptureCommandCommand

Gets the command for adding post-capture command.

Declaration
public ICommand AddPostCaptureCommandCommand { get; }
Property Value
Type Description
ICommand
View Source

AddPreCaptureCommandCommand

Gets the command for adding a pre-capture command.

Declaration
public ICommand AddPreCaptureCommandCommand { get; }
Property Value
Type Description
ICommand
View Source

AttachmentFileValid

Gets a value indicating whether the physical file for the attachment is valid.

Declaration
public bool AttachmentFileValid { get; }
Property Value
Type Description
bool
View Source

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
View Source

AttachmentTypes

Gets all supported attachment types.

Declaration
public IEnumerable<IAttachmentType> AttachmentTypes { get; }
Property Value
Type Description
IEnumerable<IAttachmentType>
View Source

BugResolveGuid

Gets the Bug Id for the attachment's bug.

Declaration
public Guid BugResolveGuid { get; }
Property Value
Type Description
Guid
View Source

CompleteRenameCommand

Gets attachment's complete rename command.

Declaration
public DelegateCommand CompleteRenameCommand { get; }
Property Value
Type Description
DelegateCommand
View Source

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
View Source

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
View Source

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
View Source

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
View Source

DefaultValue

Gets the attachment's definition values. Used in the Template Editor.

Declaration
public AttachmentDefinition DefaultValue { get; }
Property Value
Type Description
AttachmentDefinition
View Source

Definition

Gets the template attachment definition.

Declaration
public TemplateAttachmentDefinition Definition { get; }
Property Value
Type Description
TemplateAttachmentDefinition
View Source

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
View Source

DisplayName

Gets attachment's display name. Used in the Create Bug dialog.

Declaration
public string DisplayName { get; }
Property Value
Type Description
string
View Source

EditCommand

Gets attachment's context menu command.

Declaration
public DelegateCommand EditCommand { get; }
Property Value
Type Description
DelegateCommand
View Source

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
View Source

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
View Source

FailedDueToExceptionString

Gets the string to display when a command failed due to an exception.

Declaration
public string FailedDueToExceptionString { get; }
Property Value
Type Description
string
View Source

FailedDueToInvalidCommands

Gets a value indicating whether capture failed due to invalid commands.

Declaration
public bool FailedDueToInvalidCommands { get; }
Property Value
Type Description
bool
View Source

FileExtension

Gets or sets the file extension used for this attachment.

Declaration
public string FileExtension { get; set; }
Property Value
Type Description
string
View Source

GameDevice

Gets or sets the game device to capture the attachment on.

Declaration
public IGameDevice GameDevice { get; set; }
Property Value
Type Description
IGameDevice
View Source

ID

Gets attachment's unique identifier. Used to establish dependency chain.

Declaration
public Guid ID { get; }
Property Value
Type Description
Guid
View Source

InDesignMode

Gets a value indicating whether the attachment view model is in design mode.

Declaration
public bool InDesignMode { get; }
Property Value
Type Description
bool
View Source

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
View Source

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
View Source

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
View Source

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
View Source

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
View Source

MovePostCaptureCommandDownCommand

Gets the command for moving post-capture command down.

Declaration
public DelegateCommand<ArubaCommandItemViewModel> MovePostCaptureCommandDownCommand { get; }
Property Value
Type Description
DelegateCommand<ArubaCommandItemViewModel>
View Source

MovePostCaptureCommandUpCommand

Gets the command for move a post-capture command up.

Declaration
public DelegateCommand<ArubaCommandItemViewModel> MovePostCaptureCommandUpCommand { get; }
Property Value
Type Description
DelegateCommand<ArubaCommandItemViewModel>
View Source

MovePreCaptureCommandDownCommand

Gets the command for moving pre-capture command down.

Declaration
public DelegateCommand<ArubaCommandItemViewModel> MovePreCaptureCommandDownCommand { get; }
Property Value
Type Description
DelegateCommand<ArubaCommandItemViewModel>
View Source

MovePreCaptureCommandUpCommand

Gets the command for move a pre-capture command up.

Declaration
public DelegateCommand<ArubaCommandItemViewModel> MovePreCaptureCommandUpCommand { get; }
Property Value
Type Description
DelegateCommand<ArubaCommandItemViewModel>
View Source

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>
View Source

PostCaptureCommandParameters

Gets or sets the parameters string for the selected post-capture command.

Declaration
public string PostCaptureCommandParameters { get; set; }
Property Value
Type Description
string
View Source

PostCaptureCommands

Gets the collection of post-capture commands.

Declaration
public ObservableCollection<ArubaCommandItemViewModel> PostCaptureCommands { get; }
Property Value
Type Description
ObservableCollection<ArubaCommandItemViewModel>
View Source

PreCaptureCommandParameters

Gets or sets the parameters string for the selected pre-capture command.

Declaration
public string PreCaptureCommandParameters { get; set; }
Property Value
Type Description
string
View Source

PreCaptureCommands

Gets the collection pre-capture commands.

Declaration
public ObservableCollection<ArubaCommandItemViewModel> PreCaptureCommands { get; }
Property Value
Type Description
ObservableCollection<ArubaCommandItemViewModel>
View Source

RecaptureCommand

Gets attachment's command to attempt a recapture.

Declaration
public DelegateCommand RecaptureCommand { get; }
Property Value
Type Description
DelegateCommand
View Source

RemovePostCaptureCommandCommand

Gets the command for removing post-capture command.

Declaration
public DelegateCommand<ArubaCommandItemViewModel> RemovePostCaptureCommandCommand { get; }
Property Value
Type Description
DelegateCommand<ArubaCommandItemViewModel>
View Source

RemovePreCaptureCommandCommand

Gets the command for removing a pre-capture command.

Declaration
public DelegateCommand<ArubaCommandItemViewModel> RemovePreCaptureCommandCommand { get; }
Property Value
Type Description
DelegateCommand<ArubaCommandItemViewModel>
View Source

RenameCommand

Gets attachment's rename menu command.

Declaration
public DelegateCommand RenameCommand { get; }
Property Value
Type Description
DelegateCommand
View Source

RenameDisplayName

Gets or sets the attachment's rename display name.

Declaration
public string RenameDisplayName { get; set; }
Property Value
Type Description
string
View Source

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>
View Source

SelectedPostCaptureCommand

Gets or sets the currently selected command for adding post-capture commands.

Declaration
public ArubaCommand SelectedPostCaptureCommand { get; set; }
Property Value
Type Description
ArubaCommand
View Source

SelectedPreCaptureCommand

Gets or sets the currently selected command for adding pre-capture commands.

Declaration
public ArubaCommand SelectedPreCaptureCommand { get; set; }
Property Value
Type Description
ArubaCommand
View Source

SharedInfo

Gets the SharedInfo provided for this AttachmentViewModel.

Declaration
public ViewModelSharedInfo SharedInfo { get; }
Property Value
Type Description
ViewModelSharedInfo
View Source

ShouldAutoCapture

Gets or sets a value indicating whether this attachment should automatically capture.

Declaration
public bool ShouldAutoCapture { get; set; }
Property Value
Type Description
bool
View Source

Size

Gets memory of the attached file.

Declaration
public long Size { get; }
Property Value
Type Description
long
View Source

SourcePath

Gets or sets gets/Sets a path to an attachment file.

Declaration
public string SourcePath { get; set; }
Property Value
Type Description
string
View Source

SourceUri

Gets used as a source parameter for UI controls.

Declaration
public Uri SourceUri { get; }
Property Value
Type Description
Uri
View Source

Template

Gets or sets the template view model associated with this attachment.

Declaration
public TemplateViewModel Template { get; set; }
Property Value
Type Description
TemplateViewModel
View Source

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>
View Source

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 Source

CaptureAsync()

Attempts to capture an attachment.

Declaration
public Task CaptureAsync()
Returns
Type Description
Task

A Task representing the asynchronous operation.

View Source

CompleteRename(string)

Completes the rename process.

Declaration
public void CompleteRename(string renameDisplayName)
Parameters
Type Name Description
string renameDisplayName

Filename to rename file as.

View Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()
View Source

Edit()

Attachment's edit wrapper.

Declaration
public void Edit()
View Source

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.

View Source

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.

View Source

GetRecordingDurations()

Static method returning the preset video capture durations.

Declaration
public static IEnumerable<TimeSpan> GetRecordingDurations()
Returns
Type Description
IEnumerable<TimeSpan>

Returns the recording durations.

View Source

Rename()

Starts or cancels the rename process.

Declaration
public void Rename()
View Source

Save()

Attachment's save wrapper.

Declaration
public void Save()
View Source

TryCaptureAsync()

Attachment's capture wrapper.

Declaration
public Task TryCaptureAsync()
Returns
Type Description
Task

A Task that represents the asynchronous operation.

View Source

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.

Implements

INotifyPropertyChanged
IDisposable
  • View Source
In this article
Back to top Generated by DocFX