Exemple #1
0
        private void FormDomains_Load(object sender, EventArgs e)
        {
            PlugInManager compMan = new PlugInManager();

            cmbDomains.Items.Add(new DomainItem(null));
            cmbDomains.SelectedIndex = 0;

            foreach (XmlNode domainNode in compMan.GetPluginNodes(gView.Framework.system.Plugins.Type.IFieldDomain))
            {
                IFieldDomain fDomain = compMan.CreateInstance(domainNode) as IFieldDomain;
                if (fDomain == null)
                {
                    continue;
                }

                if (_domain != null && fDomain.GetType().Equals(_domain.GetType()))
                {
                    cmbDomains.Items.Add(new DomainItem(_domain));
                    cmbDomains.SelectedIndex = cmbDomains.Items.Count - 1;
                }
                else
                {
                    cmbDomains.Items.Add(new DomainItem(fDomain));
                }
            }
        }
Exemple #2
0
 public Field(IField field)
 {
     m_name         = field.name;
     m_aliasname    = field.aliasname;
     m_type         = field.type;
     m_precision    = field.precision;
     m_size         = field.size;
     m_isRequired   = field.IsRequired;
     m_isEditable   = field.IsEditable;
     m_defaultValue = field.DefautValue;
     _domain        = field.Domain;
     if (field is Field)
     {
         _save_type = ((Field)field).SaveType;
     }
 }
Exemple #3
0
        public void Load(IPersistStream stream)
        {
            m_name      = (string)stream.Load("Name", "");
            m_aliasname = (string)stream.Load("Alias", "");
            m_type      = (FieldType)stream.Load("Type", (int)FieldType.unknown);

            //m_precision = (int)stream.Load("Precision", 0);
            //m_size = (int)stream.Load("Size", 0);

            m_visible    = (bool)stream.Load("Visible", true);
            m_isEditable = (bool)stream.Load("Editable", true);
            m_isRequired = (bool)stream.Load("Required", false);

            _domain   = stream.Load("Domain", null) as IFieldDomain;
            _priority = (int)stream.Load("Priority", (int)-1);
        }
Exemple #4
0
 public DomainItem(IFieldDomain domain)
 {
     _domain = domain;
 }
Exemple #5
0
        public FormDomains(IFieldDomain domain)
        {
            InitializeComponent();

            _domain = domain;
        }