Show / Hide Table of Contents

Class TemplateExplorerViewModel

View model representing the list of templates.

Inheritance
object
BindableBase
TemplateExplorerViewModel
Implements
INotifyPropertyChanged
ITemplateExplorerViewModel
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 TemplateExplorerViewModel : BindableBase, INotifyPropertyChanged, ITemplateExplorerViewModel

Constructors

View Source

TemplateExplorerViewModel(Dispatcher)

Initializes a new instance of the TemplateExplorerViewModel class.

Declaration
public TemplateExplorerViewModel(Dispatcher dispatcher)
Parameters
Type Name Description
Dispatcher dispatcher

The dispatcher.

Properties

View Source

AccessLevel

Gets or sets the access level of the user to determine what commands they have access to.

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

AddQueryCommand

Gets a command for setting up the duplicate checking queries for a template.

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

AddTemplateAsFavoriteCommand

Gets a command to set a template as one of the user's favorites.

Declaration
public DelegateCommand<string> AddTemplateAsFavoriteCommand { get; }
Property Value
Type Description
DelegateCommand<string>
View Source

ApplyTemplateToCurrentBugCommand

Gets a command to apply the currently selected template to the bug that is currently open.

Declaration
public DelegateCommand<string> ApplyTemplateToCurrentBugCommand { get; }
Property Value
Type Description
DelegateCommand<string>
View Source

ChangeParentTemplateCommand

Gets a command for changing the parent of a template.

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

ClearDefaultTemplateUserPreferenceCommand

Gets the command to clear default template user preference.

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

CloneExistingBugVM

Gets the CloneExistingBugViewModel.

Declaration
public CloneExistingBugViewModel CloneExistingBugVM { get; }
Property Value
Type Description
CloneExistingBugViewModel
View Source

CloneTemplateCommand

Gets the command to clone a template.

Declaration
public DelegateCommand<string> CloneTemplateCommand { get; }
Property Value
Type Description
DelegateCommand<string>
View Source

DefaultTemplateUserPreference

Gets or sets the default template user preference.

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

DeleteTemplateCommand

Gets the command to delete the template.

Declaration
public DelegateCommand<string> DeleteTemplateCommand { get; }
Property Value
Type Description
DelegateCommand<string>
View Source

EditTemplateCommand

Gets the command to edit the template.

Declaration
public DelegateCommand<string> EditTemplateCommand { get; }
Property Value
Type Description
DelegateCommand<string>
View Source

EventAggregator

Gets the Prism.Events.IEventAggregator to use to publish and subscribe to view-related events.

Declaration
public IEventAggregator EventAggregator { get; }
Property Value
Type Description
IEventAggregator
View Source

FavoriteTemplateVMs

Gets the favorite template view models.

Declaration
public ObservableCollection<TemplateViewModel> FavoriteTemplateVMs { get; }
Property Value
Type Description
ObservableCollection<TemplateViewModel>
View Source

FavoritesIsActive

Gets or sets a value indicating whether the 'Favorites' tab is currently active (the selected tab).

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

HasUnsavedChanges

Gets a value indicating whether any template has unsaved changes.

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

ImportTemplatesCommand

Gets the command to import templates from the file system.

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

IsSelectedTemplateValid

Gets a value indicating whether the selected template is valid.

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

MoveSelectedFavoriteDownCommand

Gets a command for moving the selected favorite down in the listed order.

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

MoveSelectedFavoriteUpCommand

Gets a command for moving the selected favorite up in the listed order.

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

MoveSelectedTemplateDownCommand

Gets a command for moving the selected template down in the listed order.

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

MoveSelectedTemplateUpCommand

Gets a command for moving the selected template up in the listed order.

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

NewBugCommand

Gets a command for creating a new bug.

Declaration
public DelegateCommand<string> NewBugCommand { get; }
Property Value
Type Description
DelegateCommand<string>
View Source

NewTemplateCommand

Gets a command for creating a new template.

Declaration
public DelegateCommand<string> NewTemplateCommand { get; }
Property Value
Type Description
DelegateCommand<string>
View Source

OnTemplateNameEditingChangedCommand

Gets a command for editing a template.

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

OpenCloneExistingBugUICommand

Gets a command for opening the 'clone existing bug' pop-up.

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

PromptToChangeParentTemplateCommand

Gets a command for changing the parent of a template by launching a prompt for user to fill out.

Declaration
public DelegateCommand<string> PromptToChangeParentTemplateCommand { get; }
Property Value
Type Description
DelegateCommand<string>
View Source

RemoveTemplateAsFavoriteCommand

Gets a command to remove a template from a user's favorites.

Declaration
public DelegateCommand<string> RemoveTemplateAsFavoriteCommand { get; }
Property Value
Type Description
DelegateCommand<string>
View Source

RenameTemplateCommand

Gets a command for renaming a template.

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

ResetFavoritesToDefaultSortOrderCommand

Gets a command for resetting the favorites to their default sort order.

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

ResetTemplatesToDefaultSortOrderCommand

Gets a command for resetting the templates to their default sort order.

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

RevertTemplateCommand

Gets a command for reverting changes to a template.

Declaration
public DelegateCommand<string> RevertTemplateCommand { get; }
Property Value
Type Description
DelegateCommand<string>
View Source

SaveAllTemplatesCommand

Gets a command for saving all templates.

Declaration
public DelegateCommand<string> SaveAllTemplatesCommand { get; }
Property Value
Type Description
DelegateCommand<string>
View Source

SaveTemplateCommand

Gets a command for saving a template.

Declaration
public DelegateCommand<string> SaveTemplateCommand { get; }
Property Value
Type Description
DelegateCommand<string>
View Source

SelectedFavoriteTemplateNode

Gets or sets the selected node in the 'Favorites' tab.

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

SelectedTemplateNode

Gets or sets the selected template node.

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

SelectedTreeItem

Gets or sets the selected tree item.

Declaration
public TemplateTreeItemViewModel SelectedTreeItem { get; set; }
Property Value
Type Description
TemplateTreeItemViewModel
View Source

SetDefaultTemplateUserPreferenceCommand

Gets a command to set a user preferred default template.

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

SharedInfo

Gets or sets the shared info view model.

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

TemplateExplorerCommands

Gets the containing object that holds all of the commands used by the view model.

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

TemplateTreeItems

Gets the template tree items.

Declaration
public ObservableCollection<TemplateTreeItemViewModel> TemplateTreeItems { get; }
Property Value
Type Description
ObservableCollection<TemplateTreeItemViewModel>
View Source

TemplateVMs

Gets the list of templates.

Declaration
public ObservableCollection<TemplateViewModel> TemplateVMs { get; }
Property Value
Type Description
ObservableCollection<TemplateViewModel>

Methods

View Source

ClearAllTemplates()

Clears out the templates and resets the selected template.

Declaration
public void ClearAllTemplates()
View Source

ClearAllTemplatesAsync()

Clears out the templates and resets the selected template.

Declaration
public Task ClearAllTemplatesAsync()
Returns
Type Description
Task

A Task representing the asynchronous operation.

View Source

FlattenTemplateDefinitionData()

Flattens template definition data.

Declaration
public void FlattenTemplateDefinitionData()
View Source

MoveFavoritePosition(TemplateViewModel, TemplateViewModel)

Moves the specified favorite to, or as close to, the target's location in the collection.

Declaration
public void MoveFavoritePosition(TemplateViewModel source, TemplateViewModel target)
Parameters
Type Name Description
TemplateViewModel source

The favorite to move.

TemplateViewModel target

The target to try and move the favorite to.

View Source

MoveTemplatePosition(TemplateTreeItemViewModel, TemplateTreeItemViewModel)

Moves the specified template to, or as close to, the target's location in the collection.

Declaration
public void MoveTemplatePosition(TemplateTreeItemViewModel source, TemplateTreeItemViewModel target)
Parameters
Type Name Description
TemplateTreeItemViewModel source

The template to move.

TemplateTreeItemViewModel target

The target to try and move the template to.

View Source

OnSelectedItemChanged(object)

Called when a selected item is changed to refresh which commands are available.

Declaration
public void OnSelectedItemChanged(object item)
Parameters
Type Name Description
object item

The selected item.

View Source

ReadTemplateDefinitionsAsync()

Read all template definitions from the store location.

Declaration
public Task ReadTemplateDefinitionsAsync()
Returns
Type Description
Task

A Task representing the asynchronous operation.

View Source

SortTemplatesByUserPreferenceOrDefault(IList<TemplateViewModel>, UserPreferences)

Attempts to sort the templates by user preferences. Any templates not found in the user preferences will be sorted alphabetically.

Declaration
public static List<TemplateViewModel> SortTemplatesByUserPreferenceOrDefault(IList<TemplateViewModel> templatesToSort, UserPreferences userPreferences)
Parameters
Type Name Description
IList<TemplateViewModel> templatesToSort

The list of templates to sort.

UserPreferences userPreferences

The preferences to use to sort the templates.

Returns
Type Description
List<TemplateViewModel>

A sorted list of templates.

View Source

UninitializeAsync()

Declaration
public Task UninitializeAsync()
Returns
Type Description
Task
View Source

UpdateGlobalTemplateList()

Updates the global template list with the cached template tree items.

Declaration
public void UpdateGlobalTemplateList()

Implements

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