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

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 773 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 780 of file TaskInterfaces.cs.

781 {
785 FileRead,
789 FileWrite,
793 Folder
794 }
@ 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 838 of file TaskInterfaces.cs.

838 : base(BuiltinColumnTypeName.File)
839 {
840 }
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 775 of file TaskInterfaces.cs.

Property Documentation

◆ Mode

TargetMode AxelSemrau.Chronos.Plugin.FilenameAttribute.Mode
getset

File mode for this property.

Definition at line 799 of file TaskInterfaces.cs.

800 {
801 get => mMode;
802 set
803 {
804 mMode = value;
805 switch (value)
806 {
807 case TargetMode.FileRead:
808 case TargetMode.FileWrite:
810 break;
811 case TargetMode.Folder:
813 break;
814 }
815 }
816 }
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: