当前位置: 首页>>代码示例>>C#>>正文


C# Panel.GetType方法代码示例

本文整理汇总了C#中System.Web.UI.WebControls.Panel.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# Panel.GetType方法的具体用法?C# Panel.GetType怎么用?C# Panel.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Web.UI.WebControls.Panel的用法示例。


在下文中一共展示了Panel.GetType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InitDnnPageDropDownList

        /// <summary>
        /// Append DnnPageDropDownList to pnlDnnPageDropDownList with Reflection
        /// </summary>
        private void InitDnnPageDropDownList(int portalId)
        {
            if (IsPostBack)
                return;

            ObjectHandle dnnPageDropDownListHandle;
            try
            {
                dnnPageDropDownListHandle = Activator.CreateInstance("DotNetNuke.Web", "DotNetNuke.Web.UI.WebControls.DnnPageDropDownList");
            }
            catch (TypeLoadException) { return; }

            _dnnPageDropDownList = (Panel)dnnPageDropDownListHandle.Unwrap();
            _dnnPageDropDownList.ID = "PagePicker";
            _dnnPageDropDownList.Width = Unit.Pixel(498);

            var undefinedItem = new ListItem(Localization.GetString("None_Specified"), String.Empty);

            // Set Control Properties
            var dnnPageDropDownListType = _dnnPageDropDownList.GetType();
            dnnPageDropDownListType.GetProperty("UndefinedItem").SetValue(_dnnPageDropDownList, undefinedItem, null);
            dnnPageDropDownListType.GetProperty("PortalId").SetValue(_dnnPageDropDownList, portalId, null);

            // "IncludeDisabledTabs" is only available on newer DNN 7 (~7.2)
            if (dnnPageDropDownListType.GetProperty("IncludeDisabledTabs") != null)
                dnnPageDropDownListType.GetProperty("IncludeDisabledTabs").SetValue(_dnnPageDropDownList, true, null);

            // "IncludeActiveTab" is only available on newer DNN 7 (~7.2.1+)
            if (dnnPageDropDownListType.GetProperty("IncludeActiveTab") != null)
                dnnPageDropDownListType.GetProperty("IncludeActiveTab").SetValue(_dnnPageDropDownList, true, null);

            if(dnnPageDropDownListType.GetProperty("IncludeAllTabTypes") != null)
                dnnPageDropDownListType.GetProperty("IncludeAllTabTypes").SetValue(_dnnPageDropDownList, true, null);

            var onClientSelectionChanged = (List<string>)dnnPageDropDownListType.GetProperty("OnClientSelectionChanged").GetValue(_dnnPageDropDownList, null);
            onClientSelectionChanged.Add("ToSexyContent.ItemForm.Hyperlink._pagePicker.dnn71PickerSelectionChanged");

            pnlDnnPageDropDownList.Controls.Add(_dnnPageDropDownList);
        }
开发者ID:BravoSierra,项目名称:2sxc,代码行数:42,代码来源:Hyperlink_Edit.ascx.cs

示例2: CaricaTabella


//.........这里部分代码省略.........
                                            break;
                                        }
                                    }

                                    myGiorniCheckBoxList.Items.FindByText("Lu").Selected = (Boolean)myOrarioAperturaDataTable.Rows[blocco - 1]["Lun"];
                                    myGiorniCheckBoxList.Items.FindByText("Ma").Selected = (Boolean)myOrarioAperturaDataTable.Rows[blocco - 1]["Mar"];
                                    myGiorniCheckBoxList.Items.FindByText("Me").Selected = (Boolean)myOrarioAperturaDataTable.Rows[blocco - 1]["Mer"];
                                    myGiorniCheckBoxList.Items.FindByText("Gi").Selected = (Boolean)myOrarioAperturaDataTable.Rows[blocco - 1]["Gio"];
                                    myGiorniCheckBoxList.Items.FindByText("Ve").Selected = (Boolean)myOrarioAperturaDataTable.Rows[blocco - 1]["Ven"];
                                    myGiorniCheckBoxList.Items.FindByText("Sa").Selected = (Boolean)myOrarioAperturaDataTable.Rows[blocco - 1]["Sab"];
                                    myGiorniCheckBoxList.Items.FindByText("Do").Selected = (Boolean)myOrarioAperturaDataTable.Rows[blocco - 1]["Dom"];
                                }

                            }
                                #endregion
                            #endregion
                            break;
                    }
                    #region RenderingControl
                    List<AutorizzazioneCampi> filteredList;
                    filteredList = myAutorizzazioneCampiList.Where(x => x.Visibile == true && x.TipoDato != "OrarioApertura" && x.TipoDato != "Note").ToList();

                    if (myTable.Rows.Count < Math.Ceiling(filteredList.Count / 2.0))
                    {
                        TableRow tRow = new TableRow();
                        myTable.Rows.Add(tRow);

                        TableCell tCell1 = new TableCell();
                        tCell1.CssClass = "tableColumn1DD";
                        tRow.Cells.Add(tCell1);

                        TableCell tCell2 = new TableCell();
                        tCell2.CssClass = "tableColumn2DD";
                        tRow.Cells.Add(tCell2);

                        TableCell tCell3 = new TableCell();
                        tCell3.CssClass = "tableColumn3DD";
                        tRow.Cells.Add(tCell3);

                        TableCell tCell4 = new TableCell();
                        tCell4.CssClass = "tableColumn1DD";
                        tRow.Cells.Add(tCell4);

                        TableCell tCell5 = new TableCell();
                        tCell5.CssClass = "tableColumn2DD";
                        tRow.Cells.Add(tCell5);

                        tCell1.Controls.Add(myLabel);
                        tCell2.Controls.Add(myRuntimeControl);
                        if (myAutorizzazioneCampi.ValidaControlli)
                        {
                            tCell2.Controls.Add(myRegularExpressionValidator);
                            if (myAutorizzazioneCampi.ValidaData)
                            {
                                tCell2.Controls.Add(myTextBoxWatermarkExtender);
                                tCell2.Controls.Add(myCalendarExtender);
                            }
                        }
                    }
                    else
                    {
                        if (myRuntimeControl.GetType() == typeof(Panel) || myAutorizzazioneCampi.TipoDato == "Note")
                        {
                            TableRow tRow = new TableRow();
                            myTable.Rows.Add(tRow);

                            TableCell tCell1 = new TableCell();
                            tCell1.CssClass = "tableColumn1DD";
                            tRow.Cells.Add(tCell1);

                            TableCell tCell2 = new TableCell();
                            //tCell2.CssClass = "tableColumn2DD";
                            tCell2.ColumnSpan = 4;
                            tRow.Cells.Add(tCell2);

                            tCell1.Controls.Add(myLabel);
                            tCell2.Controls.Add(myRuntimeControl);
                        }
                        else
                        {
                            Int32 riga = i - myTable.Rows.Count;
                            myTable.Rows[riga].Cells[3].Controls.Add(myLabel);
                            myTable.Rows[riga].Cells[4].Controls.Add(myRuntimeControl);
                            if (myAutorizzazioneCampi.ValidaControlli)
                            {
                                myTable.Rows[riga].Cells[4].Controls.Add(myRegularExpressionValidator);
                                if (myAutorizzazioneCampi.ValidaData)
                                {
                                    myTable.Rows[riga].Cells[4].Controls.Add(myTextBoxWatermarkExtender);
                                    myTable.Rows[riga].Cells[4].Controls.Add(myCalendarExtender);
                                }
                            }
                        }
                    }
                    i++;
                    #endregion
                }
            }
            return myTable;
        }
开发者ID:walkstudio,项目名称:Anagrafica-Dealer,代码行数:101,代码来源:DettaglioDealer.aspx.cs


注:本文中的System.Web.UI.WebControls.Panel.GetType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。