Chronos Plugins 5.9.0
This documentation covers the plugin interfaces definitions and an example implementation.
Loading...
Searching...
No Matches
AxelSemrau.Chronos.Plugin.FilenameAttribute Class Referenceabstract

State that the task property describes a filename/folder name and should offer a picker dialog in the Chronos method editor. More...

+ Inheritance diagram for AxelSemrau.Chronos.Plugin.FilenameAttribute:
+ Collaboration diagram for AxelSemrau.Chronos.Plugin.FilenameAttribute:

Public Types

enum  TargetMode { FileRead , FileWrite , Folder }
 Dialog type: Open file for reading or for writing? Folder? More...
 

Public Member Functions

virtual string GetCaption ()
 Title of the dialog.
 
virtual string GetFilenamePattern ()
 File type specification as described on MSDN: https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.filedialog.filter?view=netframework-4.8.
 
virtual string GetInitialValue (ITask theTask)
 Override this if the initial value needs to depend on other properties of the task.
 
- Public Member Functions inherited from AxelSemrau.Chronos.Plugin.Columns.RecommendedColumnTypeAttribute
 RecommendedColumnTypeAttribute (string internalColTypeName)
 Recommend the decorated property with this type of column (internal names as used in the method file).
 
 RecommendedColumnTypeAttribute (BuiltinColumnTypeName bcn)
 If using builtin columns, use this constructor to avoid errors because of misspelt names.
 

Protected Member Functions

 FilenameAttribute ()
 Default constructor: Ask for a file that should be read.
 

Properties

TargetMode Mode [get, set]
 File mode for this property.
 
- Properties inherited from AxelSemrau.Chronos.Plugin.Columns.RecommendedColumnTypeAttribute
string InternalColumnTypeName [get, protected set]
 Name of the column type as used internally in the method XML.
 

Private Attributes

TargetMode mMode
 

Detailed Description

State that the task property describes a filename/folder name and should offer a picker dialog in the Chronos method editor.

SimpleFilenameAttribute

Implies that the recommended column type, if converted, should also be for a file/folder

Definition at line 780 of file TaskInterfaces.cs.

Member Enumeration Documentation

◆ TargetMode

Dialog type: Open file for reading or for writing? Folder?

Enumerator
FileRead 

File should be opened for reading.

FileWrite 

File should be opened for writing.

Folder 

Pick a folder, not a file.

Definition at line 787 of file TaskInterfaces.cs.

788 {
792 FileRead,
796 FileWrite,
800 Folder
801 }
@ FileWrite
File should be opened for writing.
@ FileRead
File should be opened for reading.

Constructor & Destructor Documentation

◆ FilenameAttribute()

AxelSemrau.Chronos.Plugin.FilenameAttribute.FilenameAttribute ( )
protected

Default constructor: Ask for a file that should be read.

Definition at line 845 of file TaskInterfaces.cs.

845 : base(BuiltinColumnTypeName.File)
846 {
847 }
BuiltinColumnTypeName
Convenience enumeration to avoid spelling errors.
Definition ColumnType.cs:50

Member Function Documentation

◆ GetCaption()

virtual string AxelSemrau.Chronos.Plugin.FilenameAttribute.GetCaption ( )
virtual

Title of the dialog.

Reimplemented in AxelSemrau.Chronos.Plugin.SimpleFilenameAttribute.

◆ GetFilenamePattern()

virtual string AxelSemrau.Chronos.Plugin.FilenameAttribute.GetFilenamePattern ( )
virtual

◆ GetInitialValue()

virtual string AxelSemrau.Chronos.Plugin.FilenameAttribute.GetInitialValue ( ITask theTask)
virtual

Override this if the initial value needs to depend on other properties of the task.

Parameters
theTask
Returns

Reimplemented in AxelSemrau.Chronos.Plugin.SimpleFilenameAttribute.

Member Data Documentation

◆ mMode

TargetMode AxelSemrau.Chronos.Plugin.FilenameAttribute.mMode
private

Definition at line 782 of file TaskInterfaces.cs.

Property Documentation

◆ Mode

TargetMode AxelSemrau.Chronos.Plugin.FilenameAttribute.Mode
getset

File mode for this property.

Definition at line 806 of file TaskInterfaces.cs.

807 {
808 get => mMode;
809 set
810 {
811 mMode = value;
812 switch (value)
813 {
814 case TargetMode.FileRead:
815 case TargetMode.FileWrite:
817 break;
818 case TargetMode.Folder:
820 break;
821 }
822 }
823 }
string InternalColumnTypeName
Name of the column type as used internally in the method XML.
Definition ColumnType.cs:93
TargetMode
Dialog type: Open file for reading or for writing? Folder?

The documentation for this class was generated from the following file: