Example #1
0
        public RuleEditorForm(ProjectItem item, ConfigControl oCon, ItemControl oItem)
        {
            InitializeComponent();
            configCon       = oCon;
            itemCon         = oItem;
            this.pageOutSet = new List <OutSet>();

            this.proItem              = item;
            this.ProName.Text         = item.ProName;
            this.UserAgent.Text       = item.UserAgent;
            this.InURL.Text           = item.InURL;
            this.WhenEnabled.Checked  = item.WhenEnabled != null && Boolean.Parse(item.WhenEnabled);
            this.WhenContents.Enabled = this.WhenEnabled.Checked;
            this.WhenContents.Text    = item.WhenContents;
            this.AttachedCookie.Text  = item.AttachedCookie;
            this.CookieHost.Text      = item.CookieHost;
            this.RequestCookies.Text  = item.RequestCookies;
            for (int i = 0, k = item.OutURLList.Count; i < k; i++)
            {
                OutSet set = new  OutSet();
                set.Enabled = item.OutURLList[i].Enabled;
                set.Order   = item.OutURLList[i].Order;
                set.OutURL  = item.OutURLList[i].OutURL;
                this.pageOutSet.Add(set);
            }
            //this.OutList.DroppedDown = true;
            bindOutList();
        }
Example #2
0
 public void RefleshCookieLabel()
 {
     for (int i = 0; i < this.flowLayoutPanel1.Controls.Count; i++)
     {
         ItemControl control = (ItemControl)this.flowLayoutPanel1.Controls[i];
         control.refleshCookieLabel();
     }
 }
Example #3
0
 public void Edit(ProjectItem item, ItemControl itemCon)
 {
     if (itemCon == null)
     {
         ItemControl control = new ItemControl(item, this);
         this.flowLayoutPanel1.Controls.Add(control);
         this.proList.Add(item);
     }
     else
     {
         itemCon.loadData(item);
     }
 }
Example #4
0
        public ConfigControl()
        {
            InitializeComponent();

            this.flowLayoutPanel1.FlowDirection = FlowDirection.TopDown;

            this.contraConfig     = ProjectItemManager.Instance().contraConfig;
            this.proList          = this.contraConfig.ProjectItemList;
            this.allCheck.Checked = this.contraConfig.Enabled != null && Boolean.Parse(this.contraConfig.Enabled);
            for (int i = 0; i < this.proList.Count; i++)
            {
                ItemControl control = new ItemControl(this.proList[i], this);
                this.flowLayoutPanel1.Controls.Add(control);
            }
            ChangeLabelColor();
        }
Example #5
0
 public void Remove(ProjectItem item, ItemControl itemCon)
 {
     this.flowLayoutPanel1.Controls.Remove(itemCon);
     this.proList.Remove(item);
 }