Moderátor: Moderátoři Živě.cz
public AveragePlugin()
{
}
string myName = "Get Average";
public List<Attribut> pluginList = new List<Attribut>();
public void getData(List<Attribut> a)
{
pluginList = a;
}
public double getAverage()
{
double average = 0;
int count = 0;
foreach (var item in pluginList)
{
average = item.Sum / item.Count;
count++;
}
return average / count;
}
IPluginHost myHost = null;
System.Windows.Forms.UserControl myMainInterface = new ctlAverage();
/// <summary>
/// Description of the Plugin's purpose
/// </summary>
///
/// <summary>
/// Host of the plugin.
/// </summary>
public IPluginHost Host
{
get
{
return myHost;
}
set
{
myHost = value;
ctlAverage avgControl = (ctlAverage)myMainInterface;
avgControl.PluginHost = this.Host;
avgControl.Plugin = this;
}
}
public string Name
{
get {return myName;}
}
public System.Windows.Forms.UserControl MainInterface
{
get {return myMainInterface;}
}
public void Initialize()
{
}
public void Dispose()
{
}
newPlugin.Instance =(IPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()))
Uživatelé procházející toto fórum: Žádní registrovaní uživatelé a 0 návštevníků