Class BugCreationViewModel
Implementation of IFieldsDataContext used to create a bug.
Inherited Members
Namespace: Phoenix.Aruba
Assembly: Phoenix.Plugin.Aruba.dll
Syntax
public class BugCreationViewModel : FieldsViewModelBase, INotifyPropertyChanged, IFieldsViewModel, IAttachmentsViewModel, IDisposable
Constructors
View SourceBugCreationViewModel(Dispatcher, ViewModelSharedInfo, TokenResolverRegistry, TemplateViewModel, List<string>, Guid, bool)
Initializes a new instance of the BugCreationViewModel class.
Declaration
public BugCreationViewModel(Dispatcher dispatcher, ViewModelSharedInfo sharedInfo, TokenResolverRegistry tokenResolverRegistry, TemplateViewModel templateVM, List<string> tags, Guid bugResolveGuid = default, bool isClone = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Dispatcher | dispatcher | The dispatcher. |
| ViewModelSharedInfo | sharedInfo | The ViewModelSharedInfoto use. |
| TokenResolverRegistry | tokenResolverRegistry | The TokenResolverRegistry to use. |
| TemplateViewModel | templateVM | The template view model for this bug. |
| List<string> | tags | A list of tags that are used in the bug database. |
| Guid | bugResolveGuid | The GUID to identify the bug if non-empty. Otherwise one will be generated. |
| bool | isClone |
Properties
View SourceAddLinkedWorkItemCommand
Gets the command for adding a linked work item.
Declaration
public DelegateCommand AddLinkedWorkItemCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand |
AvailableTemplatesTreeView
Gets the ObservableCollection<T> that the TemplateExplorerViewModel keeps updated inside of the Phoenix.Aruba.ArubaModuleGlobals.
Declaration
public static ObservableCollection<TemplateTreeItemViewModel> AvailableTemplatesTreeView { get; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<TemplateTreeItemViewModel> |
BugDevicesVM
Gets the BugDevicesVM associated with this bug.
Declaration
public BugDevicesViewModel BugDevicesVM { get; }
Property Value
| Type | Description |
|---|---|
| BugDevicesViewModel |
BugLinkTypes
Gets the bug link types that are available.
Declaration
public List<BugLinkType> BugLinkTypes { get; }
Property Value
| Type | Description |
|---|---|
| List<BugLinkType> |
BugResolveGuid
Gets or sets the bug resolve id for the creation of this bug.
Declaration
public Guid BugResolveGuid { get; set; }
Property Value
| Type | Description |
|---|---|
| Guid |
BugTabName
Gets or sets this bugs tab name in the UI.
Declaration
public string BugTabName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
CanEdit
Gets a value indicating whether bug can be edited.
Declaration
public override bool CanEdit { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
View SourceCancelCommand
Gets the Cancel Command.
Declaration
public DelegateCommand<string> CancelCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand<string> |
ChangeTemplateCommand
Gets the command for changing the template the bug is using.
Declaration
public DelegateCommand<TemplateViewModel> ChangeTemplateCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand<TemplateViewModel> |
CloneCurrentBugCommand
Gets the command for cloning this bug to create another.
Declaration
public DelegateCommand CloneCurrentBugCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand |
CreateBugCommand
Gets the command for creating a bug.
Declaration
public DelegateCommand CreateBugCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand |
CurrentBugKey
Gets or sets the current bug key to be added as a linked work item.
Declaration
public string CurrentBugKey { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DockBugCommand
Gets the command for docking a bug to the Phoenix Window.
Declaration
public DelegateCommand DockBugCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand |
DuplicateCheckVM
Gets DuplicateCheckViewModel associated with this bug.
Declaration
public DuplicateCheckViewModel DuplicateCheckVM { get; }
Property Value
| Type | Description |
|---|---|
| DuplicateCheckViewModel |
IsAttachmentCaptureDirty
Gets or sets a value indicating whether an attachment is in the process of being added to the bug. Typically this is set externally by the capture control.
Declaration
public bool IsAttachmentCaptureDirty { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsDocked
Gets or sets a value indicating whether the bug is docked.
Declaration
public bool IsDocked { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
IsInDesignMode
Gets a value indicating whether the module is in design mode.
Declaration
public override bool IsInDesignMode { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
View SourceLinkedItems
Gets the collection of linked items.
Declaration
public ObservableCollection<LinkedBugItem> LinkedItems { get; }
Property Value
| Type | Description |
|---|---|
| ObservableCollection<LinkedBugItem> |
MapFieldNameToImages
Gets a mapping of field name to images.
Declaration
public Dictionary<string, IEnumerable<Image>> MapFieldNameToImages { get; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, IEnumerable<Image>> |
RemoveLinkedWorkItemCommand
Gets the command for removing a linked work item.
Declaration
public DelegateCommand<LinkedBugItem> RemoveLinkedWorkItemCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand<LinkedBugItem> |
SelectedWorkItemLinkType
Gets or sets the selected work item link type for adding a linked item.
Declaration
public BugLinkType SelectedWorkItemLinkType { get; set; }
Property Value
| Type | Description |
|---|---|
| BugLinkType |
TokenActivatorVM
Gets the TokenActivatorViewModel associated with this bug.
Declaration
public TokenActivatorViewModel TokenActivatorVM { get; }
Property Value
| Type | Description |
|---|---|
| TokenActivatorViewModel |
UndockBugCommand
Gets the command for undocking a bug to the Aruba Pop Up window.
Declaration
public DelegateCommand UndockBugCommand { get; }
Property Value
| Type | Description |
|---|---|
| DelegateCommand |
Methods
View SourceAddRequestedAttachments(IGameDevice, IEnumerable<string>)
Adds a set of requested files as attachments to the bug.
Declaration
public void AddRequestedAttachments(IGameDevice gameDevice, IEnumerable<string> requestedAttachmentPaths)
Parameters
| Type | Name | Description |
|---|---|---|
| IGameDevice | gameDevice | Game device to apply attachments for; null if all game devices should have the attachment. |
| IEnumerable<string> | requestedAttachmentPaths | List of file paths pointing to attachments. |
Clone(BugCreationViewModel, ViewModelSharedInfo, TokenResolverRegistry, List<string>)
Initializes a new instance of the BugCreationViewModel class.
Declaration
public static BugCreationViewModel Clone(BugCreationViewModel other, ViewModelSharedInfo sharedInfo, TokenResolverRegistry tokenResolverRegistry, List<string> tags)
Parameters
| Type | Name | Description |
|---|---|---|
| BugCreationViewModel | other | The BugCreationViewModel to copy. |
| ViewModelSharedInfo | sharedInfo | The ViewModelSharedInfoto use. |
| TokenResolverRegistry | tokenResolverRegistry | The TokenResolverRegistry to use. |
| List<string> | tags | A list of tags that are used in the bug database. |
Returns
| Type | Description |
|---|---|
| BugCreationViewModel |
CopyTokensFromBugVMAsync(BugCreationViewModel)
Copy the token values from the given BugCreationViewModel.
Declaration
public Task CopyTokensFromBugVMAsync(BugCreationViewModel bugToCopy)
Parameters
| Type | Name | Description |
|---|---|---|
| BugCreationViewModel | bugToCopy | The BugCreationViewModel to copy. |
Returns
| Type | Description |
|---|---|
| Task | A Task. |
CreateAsync(BugCreationSaveModel, Dispatcher, ViewModelSharedInfo, TemplateViewModel, TokenResolverRegistry)
Initializes a new instance of the BugCreationViewModel class.
Declaration
public static Task<BugCreationViewModel> CreateAsync(BugCreationSaveModel bugCreationSaveModel, Dispatcher dispatcher, ViewModelSharedInfo sharedInfo, TemplateViewModel templateVM, TokenResolverRegistry tokenResolverRegistry)
Parameters
| Type | Name | Description |
|---|---|---|
| BugCreationSaveModel | bugCreationSaveModel | The BugCreationSaveModel to create a view model based off of. |
| Dispatcher | dispatcher | The Dispatcher to copy. |
| ViewModelSharedInfo | sharedInfo | The ViewModelSharedInfoto use. |
| TemplateViewModel | templateVM | The TemplateViewModelto use. |
| TokenResolverRegistry | tokenResolverRegistry | The TokenResolverRegistry to use. |
Returns
| Type | Description |
|---|---|
| Task<BugCreationViewModel> |
Remarks
This constructor is intended to re-create a bug that had its data stored as a BugCreationSaveModel.
DeleteTempFolderContents()
Cleans up the temporary folder that is used to upload images from rich text boxes.
Declaration
public static void DeleteTempFolderContents()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public override void Dispose()
Overrides
View SourceGetBugCreationParams()
Gets the bug creation parameters.
Declaration
public BugCreationParams GetBugCreationParams()
Returns
| Type | Description |
|---|---|
| BugCreationParams | The bug creation parameters. |
InitializeAsync()
Initialize this.
Declaration
public Task InitializeAsync()
Returns
| Type | Description |
|---|---|
| Task | A task. |
OnHasValidDataChanged()
Performed when the validation of the data changes.
Declaration
protected override void OnHasValidDataChanged()
Overrides
View SourceOnSharedInfoChanged(ViewModelSharedInfo, ViewModelSharedInfo)
Updates the shared info when it changes.
Declaration
protected override void OnSharedInfoChanged(ViewModelSharedInfo oldValue, ViewModelSharedInfo newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| ViewModelSharedInfo | oldValue | The old shared info value. |
| ViewModelSharedInfo | newValue | The new shared info value. |
Overrides
View SourceRaiseDeviceCommandsCanExecute()
Inform view model that device changes have occurred.
Declaration
public void RaiseDeviceCommandsCanExecute()
UninitializeAsync()
Uninitialize the Bug Creation View Model.
Declaration
public Task UninitializeAsync()
Returns
| Type | Description |
|---|---|
| Task | A Task. |
UpdateFields()
Updates the fields of the bug view and the duplicate checker view.
Declaration
protected override void UpdateFields()
Overrides
View SourceUpdateSharedInfo(ViewModelSharedInfo)
Updates the ViewModelSharedInfo.
Declaration
public void UpdateSharedInfo(ViewModelSharedInfo sharedInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| ViewModelSharedInfo | sharedInfo | The new ViewModelSharedInfo. |
UpdateTokenResolverRegistry(TokenResolverRegistry)
Updates the TokenResolverRegistry.
Declaration
public void UpdateTokenResolverRegistry(TokenResolverRegistry tokenResolverRegistry)
Parameters
| Type | Name | Description |
|---|---|---|
| TokenResolverRegistry | tokenResolverRegistry | The new TokenResolverRegistry. |