コード例 #1
0
 private void BuildCondition(FilterOptionsCollectionView c, bool isAndCondition, string controlID)
 {
     if (isAndCondition)
     {
         FilterOptionsCollectionView foc = new FilterOptionsCollectionView();
         foc = Page.LoadControl("~/Views/FilterOptionsCollectionView.ascx") as FilterOptionsCollectionView;
         if (c == null)
         {
             OptionControls.Add((FilterOptionsCollectionView)foc);
             foc.ID = "options" + controlID;
         }
         else
         {
             foc.ID = c.ID;
         }
         foc.Visible = true;
         phConditions.Controls.Add(foc);
     }
     else
     {
         FilterOptionsCollectionView foc = new FilterOptionsCollectionView();
         foc = Page.LoadControl("~/Views/FilterOptionsCollectionView.ascx") as FilterOptionsCollectionView;
         if (c == null)
         {
             OrControls.Add((FilterOptionsCollectionView)foc);
             foc.ID = "orConditions" + controlID;
         }
         else
         {
             foc.ID = c.ID;
         }
         foc.Visible = true;
         phOrConditions.Controls.Add(foc);
     }
 }
コード例 #2
0
 private void AddControlsForOptions(IList <UciOption> options)
 {
     foreach (var opt in options)
     {
         var control = opt.CreateLinkedControl();
         OptionControls.Add(control);
         optionsFlowLayoutPanel.Controls.Add(control.GetPanel());
     }
 }