Class FileSystemViewModel
View model for file system.
Inheritance
Namespace: Phoenix.DeviceStorage
Assembly: Phoenix.Plugin.DeviceStorage.dll
Syntax
public class FileSystemViewModel : TabItemViewModel<FileSystemView>, IDeviceStorageViewProvider
Constructors
View SourceFileSystemViewModel(FileSystemView, IWindowingControl, IDeviceStorageManager, IEventAggregator, IPhoenixLogger)
Initializes a new instance of the FileSystemViewModel class.
Declaration
public FileSystemViewModel(FileSystemView view, IWindowingControl windowing, IDeviceStorageManager manager, IEventAggregator eventAggregator, IPhoenixLogger logger)
Parameters
Type | Name | Description |
---|---|---|
FileSystemView | view | The view this view model is driving. |
IWindowingControl | windowing | |
IDeviceStorageManager | manager | The IDeviceStorageManager for the application. |
IEventAggregator | eventAggregator | The event aggregator for the application. |
IPhoenixLogger | logger | The logger for the application. |
Fields
View SourceDisplayName
The tab header name.
Declaration
public const string DisplayName = "Device Storage"
Field Value
Type | Description |
---|---|
System.String |
Properties
View SourceCopyFileSystemItemsCommand
Gets the Command for copying a FileSystemItem to temp directory
Declaration
public DelegateCommand<object> CopyFileSystemItemsCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<System.Object> |
Remarks
The path to the temp files are added to the clipboard
CopyLimitCheckOn
Gets or sets a value indicating whether the copy limit check is on or not.
Declaration
public bool CopyLimitCheckOn { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
CopySizeLimit
Gets the copy size limit in bytes.
Declaration
public long CopySizeLimit { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
CurrentDevice
Gets the current device for the file system view.
Declaration
public IDevice CurrentDevice { get; }
Property Value
Type | Description |
---|---|
IDevice |
CurrentDeviceDisconnected
Gets a value indicating whether or not the current device is disconnected.
Declaration
public bool CurrentDeviceDisconnected { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
DeleteFileSystemItemsCommand
Gets the Command for deleting a FileSystemItem.
Declaration
public DelegateCommand<object> DeleteFileSystemItemsCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<System.Object> |
OpenFileSystemItemBaseCommand
Gets the Command to expand a directory.
Declaration
public DelegateCommand<FileSystemItemBase> OpenFileSystemItemBaseCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<FileSystemItemBase> |
OpenInExplorerCommand
Gets the Command for opening a path in an explorer window
Declaration
public DelegateCommand<object> OpenInExplorerCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<System.Object> |
PasteFileSystemItemsCommand
Gets the Command for pasting a FileSystemItem into the device.
Declaration
public DelegateCommand<FileSystemItemBase> PasteFileSystemItemsCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<FileSystemItemBase> |
RaiseCanExecuteChangedCommand
Gets the Command for raising all the CanExecutes RaiseCanExecuteChange commands.
Declaration
public DelegateCommand RaiseCanExecuteChangedCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand |
RefreshAllChildrenCommand
Gets the Command for refreshing all the children of FileSystem
Declaration
public DelegateCommand<FileSystemItemBase> RefreshAllChildrenCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<FileSystemItemBase> |
SelectFileSystemCommand
Gets the Command for selecting a FileSystem
Declaration
public DelegateCommand<string> SelectFileSystemCommand { get; }
Property Value
Type | Description |
---|---|
DelegateCommand<System.String> |
TopLevelCategories
Gets the top level categories.
Declaration
public ObservableCollection<FileSystemItemBase> TopLevelCategories { get; }
Property Value
Type | Description |
---|---|
System.Collections.ObjectModel.ObservableCollection<FileSystemItemBase> |
Methods
View SourceFileSystemItemsTotalByteSize(ICollection<Object>)
Determines the amount of bytes the FileSystemItems total.
Declaration
public long FileSystemItemsTotalByteSize(ICollection<object> items)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.ICollection<System.Object> | items | The list of items to total. |
Returns
Type | Description |
---|---|
System.Int64 | Total size in bytes of all FileSystemItems in list. |
Initialize()
Called when the view model is ready for initialization.
Declaration
protected override void Initialize()
OnClosing(CancelEventArgs)
Called when the application is closing. Removes the temporary Clipboard folder.
Declaration
protected override void OnClosing(CancelEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.CancelEventArgs | e | Cancellation event args. |
OnViewChanged(Object, DependencyPropertyChangedEventArgs)
Updates the logger with the active tabs.
Declaration
protected override void OnViewChanged(object sender, DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The tab being updated. |
System.Windows.DependencyPropertyChangedEventArgs | e | The tab's status (whether or not it is visible). |
Uninitialize()
Uninitializes phoenix managed resources when closed.
Declaration
protected override void Uninitialize()