private void lbxEpBlock_SelectedIndexChanged(object sender, EventArgs e) { EPPolicy ep = lbxBlockEp.SelectedItem as EPPolicy; if (ep != null) { txtEpBlockPattern.Text = ep.EpFormat; cbEpBlockType.SelectedIndex = (int)ep.Type; } }
private void btnDelBlockEp_Click(object sender, EventArgs e) { DomainPolicy d = lbxDomains.SelectedItem as DomainPolicy; EPPolicy ep = lbxBlockEp.SelectedItem as EPPolicy; if (d != null && ep != null) { d.BlockEP.Remove(ep); refreshDomains(); refreshEPs(); } }
private void btnEPBlockApply_Click(object sender, EventArgs e) { EPPolicy ep = lbxBlockEp.SelectedItem as EPPolicy; if (ep != null) { ep.EpFormat = txtEpBlockPattern.Text; ep.Type = (AllowEPType)cbEpBlockType.SelectedIndex; refreshDomains(); refreshEPs(); } }