Esempio n. 1
0
        private void RuleLayout_DragDrop(object sender, DragEventArgs e)
        {
            RuleButton      button       = (RuleButton)e.Data.GetData(typeof(RuleButton));
            FlowLayoutPanel destination  = (FlowLayoutPanel)sender;
            Point           target_spot  = destination.PointToClient(new Point(e.X, e.Y));
            int             target_index = destination.Controls.GetChildIndex(destination.GetChildAtPoint(target_spot));

            destination.Controls.SetChildIndex(button, target_index);
            destination.Refresh();
        }
Esempio n. 2
0
 public void DeleteRuleButton(RuleButton rule_button)
 {
     Secretary.DeleteRule(Secretary.GetRule(rule_button.GetRuleName()));
     RuleLayout.Controls.Remove(rule_button);
 }
Esempio n. 3
0
 public void RemoveRuleButton(RuleButton rule_button)
 {
     Secretary.RemoveRuleFromProfile(rule_button.GetRuleName());
     RuleLayout.Controls.Remove(rule_button);
 }