Chronos Plugins 5.4.0
This documentation covers the plugin interfaces definitions and an example implementation.
Loading...
Searching...
No Matches
ColumnType.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Runtime.InteropServices;
4
6{
16 [Guid("41652B4C-8A50-4A17-AF30-04684ABDE447")]
17 public interface IColumnTypeDefinition
18 {
23 string InternalName { get; }
27 string VisibleName { get; }
35 IEnumerable<object> ComboboxItems { get; }
39 Type ValueType { get; }
43 IEnumerable<IColumnMenu> ColumnHeaderMenu { get; }
44 }
45
50 {
51#pragma warning disable CS1591
52 File,
53 Folder,
58 Tray,
63 Tool,
65#pragma warning restore CS1591
66 }
67
71 [AttributeUsage(AttributeTargets.Property)]
72 public class RecommendedColumnTypeAttribute : Attribute
73 {
78 public RecommendedColumnTypeAttribute(string internalColTypeName)
79 {
80 InternalColumnTypeName = internalColTypeName;
81 }
82
87 public RecommendedColumnTypeAttribute(BuiltinColumnTypeName bcn) : this(bcn.ToString())
88 {}
89
93 public string InternalColumnTypeName { get; protected set; }
94 }
95}
Interfaces for custom sample list column type definitions. These interfaces allow you to define new c...
Definition: ColumnMenu.cs:4
BuiltinColumnTypeName
Convenience enumeration to avoid spelling errors.
Definition: ColumnType.cs:50
Implement this interface on a class that defines a custom column that can be used just like a builtin...
Definition: ColumnType.cs:18
string InternalName
Nametag that will be used internally for storing a column of this type in the method....
Definition: ColumnType.cs:23
string VisibleName
Column type name that will be presented to the user in the method editor in the "Cell Type" column....
Definition: ColumnType.cs:27
Type ValueType
Used for getting information which UITypeEditor, TypeConverter etc to use for your column.
Definition: ColumnType.cs:39
IEnumerable< object > ComboboxItems
List of possible values that can be presented to the user in a drop-down list.
Definition: ColumnType.cs:35
IEnumerable< IColumnMenu > ColumnHeaderMenu
If this is not null, it declares column header menu entries that can be used for "Autofill" like feat...
Definition: ColumnType.cs:43
Decorate a task property with this attribute to recommend a specific column type for the "convert to ...
Definition: ColumnType.cs:73
string InternalColumnTypeName
Name of the column type as used internally in the method XML.
Definition: ColumnType.cs:93
RecommendedColumnTypeAttribute(BuiltinColumnTypeName bcn)
If using builtin columns, use this constructor to avoid errors because of misspelt names.
Definition: ColumnType.cs:87
RecommendedColumnTypeAttribute(string internalColTypeName)
Recommend the decorated property with this type of column (internal names as used in the method file)...
Definition: ColumnType.cs:78