Chronos Plugins  5.2.0
This documentation covers the plugin interfaces definitions and an example implementation.
AxelSemrau.Chronos.Plugin.ISampleListAccessor Interface Reference

Provides basic sample list information and lets you iterate over all lines. More...

Public Member Functions

void Save (string filename)
 Save to a file. More...
 
void Load (string filename)
 Load from a file. More...
 
ISampleListLine Insert (int index=-1)
 Inserts a new line into the sample list. More...
 
void RemoveAt (int index)
 Removes a line from the list at the specified index. More...
 
void BeginUpdate ()
 Blocks all GUI updates to speed up batch operations. More...
 
void EndUpdate ()
 
void Clear ()
 Removes all lines from the sample list, except the one empty line always present in a new list. More...
 
IList< string > LoadSilently (string filename)
 Like Load, but does not show message boxes when there are problems. More...
 
void Load (string[] filenames)
 Loads multiple files in one go, concatenating them. More...
 
IList< string > LoadSilently (string[] filenames)
 Same as LoadSilently(string), just for multiple files. More...
 
bool Close ()
 Try to close this list, asking the user in case there are unsaved changes. More...
 
void CloseSilently ()
 Close this list, discarding any unsaved changes. More...
 
bool Equals (ISampleListAccessor someAccessor)
 overloading equals function More...
 

Properties

string DefaultMethodPath [get]
 User's default method path or null. More...
 
string DefaultSampleListPath [get]
 User's default sample list path or null. More...
 
IEnumerable< ISampleListLineLines [get]
 Gives access to all currently available lines. More...
 
bool IsFocused [get, set]
 Read: Find out if this list is currently on top and visible to the user. Write: Try to make the list visible in case it is hidden behind another one. More...
 
string Name [get]
 Name of the list More...
 

Detailed Description

Provides basic sample list information and lets you iterate over all lines.

Definition at line 149 of file SampleListWorkerInterfaces.cs.

Member Function Documentation

◆ BeginUpdate()

void AxelSemrau.Chronos.Plugin.ISampleListAccessor.BeginUpdate ( )

Blocks all GUI updates to speed up batch operations.

There must be a matching call to EndUpdate() for every BeginUpdate(). Please use try... finally to make sure this happens even if you trigger exceptions.

◆ Clear()

void AxelSemrau.Chronos.Plugin.ISampleListAccessor.Clear ( )

Removes all lines from the sample list, except the one empty line always present in a new list.

◆ Close()

bool AxelSemrau.Chronos.Plugin.ISampleListAccessor.Close ( )

Try to close this list, asking the user in case there are unsaved changes.

Returns
true if the list was closed. Do not use the accessor for a closed list any more.

◆ CloseSilently()

void AxelSemrau.Chronos.Plugin.ISampleListAccessor.CloseSilently ( )

Close this list, discarding any unsaved changes.

◆ EndUpdate()

void AxelSemrau.Chronos.Plugin.ISampleListAccessor.EndUpdate ( )

◆ Equals()

bool AxelSemrau.Chronos.Plugin.ISampleListAccessor.Equals ( ISampleListAccessor  someAccessor)

overloading equals function

◆ Insert()

ISampleListLine AxelSemrau.Chronos.Plugin.ISampleListAccessor.Insert ( int  index = -1)

Inserts a new line into the sample list.

Parameters
indexInsert position or -1 to append.
Returns
The new line

Please note that there is always one (empty) line left when you try to remove all. It must be kept this way for backwards compatibility. So, if you start with an "empty" list, insert one line less than you actually need.

◆ Load() [1/2]

void AxelSemrau.Chronos.Plugin.ISampleListAccessor.Load ( string  filename)

Load from a file.

Parameters
filename

◆ Load() [2/2]

void AxelSemrau.Chronos.Plugin.ISampleListAccessor.Load ( string[]  filenames)

Loads multiple files in one go, concatenating them.

Parameters
filenames

◆ LoadSilently() [1/2]

IList<string> AxelSemrau.Chronos.Plugin.ISampleListAccessor.LoadSilently ( string  filename)

Like Load, but does not show message boxes when there are problems.

Parameters
filename
Returns
A list of complaints if there were problems while loading

◆ LoadSilently() [2/2]

IList<string> AxelSemrau.Chronos.Plugin.ISampleListAccessor.LoadSilently ( string[]  filenames)

Same as LoadSilently(string), just for multiple files.

Parameters
filenames
Returns
List of complaints

◆ RemoveAt()

void AxelSemrau.Chronos.Plugin.ISampleListAccessor.RemoveAt ( int  index)

Removes a line from the list at the specified index.

Parameters
index

Unfortunately, removing the only line will immediately create an empty line. This is a bit cumbersome for creating lists starting from nothing, but in order not to break things unneccessarily this will not be changed anytime soon.

◆ Save()

void AxelSemrau.Chronos.Plugin.ISampleListAccessor.Save ( string  filename)

Save to a file.

Parameters
filename

Property Documentation

◆ DefaultMethodPath

string AxelSemrau.Chronos.Plugin.ISampleListAccessor.DefaultMethodPath
get

User's default method path or null.

Definition at line 155 of file SampleListWorkerInterfaces.cs.

155 { get; }

◆ DefaultSampleListPath

string AxelSemrau.Chronos.Plugin.ISampleListAccessor.DefaultSampleListPath
get

User's default sample list path or null.

Definition at line 160 of file SampleListWorkerInterfaces.cs.

160 { get; }

◆ IsFocused

bool AxelSemrau.Chronos.Plugin.ISampleListAccessor.IsFocused
getset

Read: Find out if this list is currently on top and visible to the user. Write: Try to make the list visible in case it is hidden behind another one.

Definition at line 242 of file SampleListWorkerInterfaces.cs.

242 { get; set; }

◆ Lines

IEnumerable<ISampleListLine> AxelSemrau.Chronos.Plugin.ISampleListAccessor.Lines
get

Gives access to all currently available lines.

Definition at line 177 of file SampleListWorkerInterfaces.cs.

177 { get; }

◆ Name

string AxelSemrau.Chronos.Plugin.ISampleListAccessor.Name
get

Name of the list

Definition at line 246 of file SampleListWorkerInterfaces.cs.

246 { get; }

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