Ejemplo n.º 1
0
 public PluginAttribute(QTPlugin.PluginType pluginType, Type tProvider, int iKey)
 {
     this.PluginType = pluginType;
     if (tProvider.IsSubclassOf(typeof(LocalizedStringProvider)))
     {
         try {
             LocalizedStringProvider provider = (LocalizedStringProvider)Activator.CreateInstance(tProvider);
             provider.SetKey(iKey);
             this.Author      = provider.Author;
             this.Name        = provider.Name;
             this.Description = provider.Description;
         }
         catch (MissingMethodException) {
             this.Author      = string.Empty;
             this.Name        = "Name missing";
             this.Description = "Default constuctor of LocalizedStringProvider is missing. \nContact the author of this plugin.";
         }
     }
     else
     {
         this.Author      = string.Empty;
         this.Name        = "Name missing";
         this.Description = "The type is not subclass of LocalizedStringProvider. \nContact the author of this plugin.";
     }
 }
Ejemplo n.º 2
0
 public PluginAttribute(QTPlugin.PluginType pluginType, string name, string author, string version, string description) {
     this.PluginType = pluginType;
     this.Name = name;
     this.Author = author;
     this.Version = version;
     this.Description = description;
 }
Ejemplo n.º 3
0
 public PluginAttribute(QTPlugin.PluginType pluginType, string name, string author, string version, string description)
 {
     this.PluginType  = pluginType;
     this.Name        = name;
     this.Author      = author;
     this.Version     = version;
     this.Description = description;
 }
Ejemplo n.º 4
0
 public PluginAttribute(QTPlugin.PluginType pluginType, Type tProvider, int iKey) {
     this.PluginType = pluginType;
     if(tProvider.IsSubclassOf(typeof(LocalizedStringProvider))) {
         try {
             LocalizedStringProvider provider = (LocalizedStringProvider)Activator.CreateInstance(tProvider);
             provider.SetKey(iKey);
             this.Author = provider.Author;
             this.Name = provider.Name;
             this.Description = provider.Description;
         }
         catch(MissingMethodException) {
             this.Author = string.Empty;
             this.Name = "Name missing";
             this.Description = "Default constuctor of LocalizedStringProvider is missing. \nContact the author of this plugin.";
         }
     }
     else {
         this.Author = string.Empty;
         this.Name = "Name missing";
         this.Description = "The type is not subclass of LocalizedStringProvider. \nContact the author of this plugin.";
     }
 }
Ejemplo n.º 5
0
 public PluginAttribute(QTPlugin.PluginType pluginType, Type tProvider)
     : this(pluginType, tProvider, -1)
 {
 }
Ejemplo n.º 6
0
 public PluginAttribute(QTPlugin.PluginType pluginType)
 {
     this.PluginType = pluginType;
 }
Ejemplo n.º 7
0
 public PluginAttribute(QTPlugin.PluginType pluginType) {
     this.PluginType = pluginType;
 }