Пример #1
0
 private void InitiDialects()
 {
     cbxDialect.Items.Add("(" + Texts.Get("s_default") + ")");
     foreach (var dialect in DialectAddonType.GetAllDialects(false))
     {
         cbxDialect.Items.Add(dialect);
     }
     cbxDialect.SelectedIndex = 0;
 }
Пример #2
0
        public override System.ComponentModel.TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            bool expandVersions = false;

            foreach (var attr in context.PropertyDescriptor.Attributes)
            {
                if (attr is ExpandDialectVersionsAttribute)
                {
                    expandVersions = true;
                }
            }
            List <ISqlDialect> dials = DialectAddonType.GetAllDialects(expandVersions);

            System.ComponentModel.TypeConverter.StandardValuesCollection svc = new System.ComponentModel.TypeConverter.StandardValuesCollection(dials);
            return(svc);
        }
        public DialectObjectFilterItemFrame(DialectObjectFilterItem item)
        {
            InitializeComponent();
            m_item             = item;
            chbEnabled.Checked = m_item.Enabled;
            chbEnabled.Text    = Texts.Get(m_item.PropertyTitle);
            var dials = DialectAddonType.GetAllDialects(false);

            foreach (var dialect in dials)
            {
                cbxDialect.Items.Add(dialect);
            }
            if (m_item.DialectName != null)
            {
                cbxDialect.SelectedIndex = dials.IndexOfIf(d => d.DialectName == m_item.DialectName);
            }
            chbEnabled_CheckedChanged(this, EventArgs.Empty);
        }