1
0
Fork 0

In progress...

This commit is contained in:
Kolan Sh 2016-04-02 01:57:39 +03:00
parent b88477150b
commit 62717b85b3
1 changed files with 36 additions and 4 deletions

View File

@ -34,12 +34,44 @@ public class PluginDataExample : PluginData {
* Any abstract method realization for PluginData.
*/
public override string get_readable_name () {
//stdout.puts ("PluginDataExample.get_readable_name () called\n");
//stdout.puts ("Call IHostCore.get_cache_dir () from PluginDataExample:\n ");
//var cache_dir = (host as IHostCore).get_cache_dir ();
//stdout.printf ("cache_dir = %s\n", cache_dir);
return _("Data Example");
}
/**
* transfer string data
*/
public string get_string_data (string id) {
switch (id) {
case "SampleRequest": return "Sample Answer";
case "AnotherRequest": return "Another Answer";
case "Manual.SampleRequest": return "Manual Sample Answer";
case "MainChart":
var cache_dir = (host as IHostCore).get_cache_dir ();
// TODO: save picture in path: cache_dir + "MainChart.png";
return "MainChart";
}
return "";
}
/**
* transfer array1D data
*/
public string[] get_array1d_data (string id) {
return { "A1d", "B1d", "C1d", "D1d", "E1d" };
}
/**
* transfer array1D data
*/
public string[,] get_array2d_data (string id) {
return { { "A2d", "B2d", "C2d", "D2d", "E2d"},
{ "F2d", "G2d", "H2d", "I2d", "J2d"},
{ "K2d", "L2d", "M2d", "N2d", "O2d"},
{ "P2d", "Q2d", "R2d", "S2d", "T2d"},
{ "U2d", "V2d", "W2d", "X2d", "Y2d"},
};
}
}
[ModuleInit]