Exemplo n.º 1
0
 public ServerObjectFilter()
 {
     ServerName = new StringObjectFilterItem {
         PropertyName = "server", PropertyTitle = "s_server"
     };
     DialectName = new DialectObjectFilterItem {
         PropertyName = "dialect", PropertyTitle = "s_dialect"
     };
 }
        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);
        }