Пример #1
0
 public ProviderType Clone(Provider p)
 {
     ProviderType t = new ProviderType();
     t.SetProperties(this);
     t.Provider = p;
     return t;
 }
Пример #2
0
 public static Provider GetProviderByXML(XmlNode node)
 {
     Provider _provider = new Provider();
     _provider.Name = node.Attributes[ConfigurationNames.ProviderName].Value;
     _provider.TemplateName = node.Attributes[ConfigurationNames.ProviderDirectory].Value;
     XmlNodeList typesNode = node.SelectNodes("Type");
     foreach (XmlNode subnode in typesNode)
     {
         ProviderType pType = new ProviderType();
         pType.SetXML(subnode, _provider);
         _provider.AddType(pType);
     }
     return _provider;
 }
Пример #3
0
 public Provider Clone(string name, string template)
 {
     Provider p = new Provider();
     p.Name = name;
     p.TemplateName = template;
     foreach (var type in this.Types)
     { p.AddType(type.Clone(p)); type.CopyFiles(p.TemplateDirectory); }
     return p;
 }
Пример #4
0
 public void SetXML(System.Xml.XmlNode node, Provider p)
 {
     this.Name = GetValueString(node, ConfigurationNames.Name);
     this.Template = GetValueString(node, ConfigurationNames.Template);
     this.Header = GetValueString(node, ConfigurationNames.Header);
     this.Email = GetValueString(node, ConfigurationNames.Email);
     this.ToButton = GetValueBool(node, ConfigurationNames.ToButton, false);
     this.Parameter = new TypeParams(GetValueString(node, ConfigurationNames.Parameter, "Text"), GetValueString(node, ConfigurationNames.Parameter, "Value"));
     this.Parameter2 = new TypeParams(GetValueString(node, ConfigurationNames.Parameter2, "Text"), GetValueString(node, ConfigurationNames.Parameter2, "Value"));
     this.ServiceFromText = GetValueString(node, ConfigurationNames.ServiceFromText);
     this.IsNumberOnly = GetValueBool(node, ConfigurationNames.IsNumberOnly, true);
     this.ComboBoxParameters = ComboParams.GetData(node);
     this.Provider = p;
 }