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


C# GridPanel类代码示例

本文整理汇总了C#中GridPanel的典型用法代码示例。如果您正苦于以下问题:C# GridPanel类的具体用法?C# GridPanel怎么用?C# GridPanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: Run

 public override void Run()
 {
     if (this.Owner is GridPanel)
     {
         object focusRow = (this.Owner as GridPanel).GetFocusRow();
         if (focusRow != null)
         {
             PropertyInfo property = focusRow.GetType().GetProperty(this.PropertyName);
             if (property != null)
             {
                 GridAttribute ga = null;
                 DisplayNameAttribute attribute2 = null;
                 foreach (Attribute attribute3 in property.GetCustomAttributes(false))
                 {
                     if (attribute3 is GridAttribute)
                     {
                         ga = (GridAttribute) attribute3;
                     }
                     if (attribute3 is DisplayNameAttribute)
                     {
                         attribute2 = (DisplayNameAttribute) attribute3;
                     }
                 }
                 if (ga != null)
                 {
                     GridPanel gp = new GridPanel(ga, property.GetValue(focusRow, null));
                     GridDialog dialog = new GridDialog(gp);
                     dialog.Text = attribute2.DisplayName;
                     dialog.Show();
                 }
             }
         }
     }
 }
开发者ID:vanloc0301,项目名称:mychongchong,代码行数:34,代码来源:GridShowDetailCommand.cs

示例2: CreateControls

        private void CreateControls(Item item, string fields = "")
        {
            var textfields = GetTextFields(item);
            Fields.Controls.Clear();
            
            foreach (var field in textfields)
            {
                var border = new GridPanel()
                {
                    Width = Unit.Percentage(90),
                    Columns = 2
                };
                var checkbox = new Checkbox()
                {                    
                    Header = field.DisplayName,
                    HeaderStyle = "font-weight:bold",                    
                    ID = Control.GetUniqueID("ctl_cb"),                    
                    Checked = fields.Contains(string.Concat("|", field.Name, "|"))
                };
                border.Controls.Add(checkbox);
                border.Controls.Add(new Literal { Text = "<br/>" });
                border.Controls.Add(new HtmlTextArea()
                    {
                        ID = checkbox.ID.Replace("cb","ta"),
                        Rows = 5,
                        Cols = 27,
                        Value = field.Value,
                    }
                    );
                
                Fields.Controls.Add(border);
            }

        }
开发者ID:Sitecore,项目名称:Sitecore.Labs.Snippets,代码行数:34,代码来源:SnippetDialog.cs

示例3: GetFilterData

        ///<summary>
        /// GetFilterData
        ///</summary>
        ///<returns></returns>
        static public List<UserFilterData> GetFilterData(GridPanel gridPanel)
        {
            if (_filterData != null)
                return (_filterData);

            return (LoadFilterData(gridPanel));
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:11,代码来源:FilterUserData.cs

示例4: EditValue

 public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
 {
     IWindowsFormsEditorService service = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
     if (service != null)
     {
         GridAttribute ga = null;
         DisplayNameAttribute attribute2 = null;
         foreach (Attribute attribute3 in context.PropertyDescriptor.Attributes)
         {
             if (attribute3 is GridAttribute)
             {
                 ga = (GridAttribute) attribute3;
             }
             if (attribute3 is DisplayNameAttribute)
             {
                 attribute2 = (DisplayNameAttribute) attribute3;
             }
         }
         if (ga != null)
         {
             GridPanel gp = new GridPanel(ga, value);
             GridDialog dialog = new GridDialog(gp);
             dialog.Text = attribute2.DisplayName;
             service.ShowDialog(dialog);
         }
     }
     return value;
 }
开发者ID:vanloc0301,项目名称:mychongchong,代码行数:28,代码来源:GridEditor.cs

示例5: BuildGrid

        public void BuildGrid(System.Web.UI.Control parent)
        {
            Assert.ArgumentNotNull(parent, "parent");

            LayoutDefinition layout = null;

            var gridPanel = new GridPanel
            {
                RenderAs = RenderAs.Literal,
                Width = Unit.Parse("100%")
            };

            gridPanel.Attributes["Class"] = Class;
            gridPanel.Attributes["CellSpacing"] = "2";
            gridPanel.Attributes["id"] = ID;
            parent.Controls.Add(gridPanel);

            string @string = StringUtil.GetString(Value);

            if (@string.Length > 0)
            {
                layout = LayoutDefinition.Parse(@string);
            }

            foreach (DeviceItem deviceItem in Client.ContentDatabase.Resources.Devices.GetAll())
            {
                BuildDevice(gridPanel, layout, deviceItem);
            }
        }
开发者ID:MartinMiles,项目名称:SitecoreImprovements,代码行数:29,代码来源:LayoutGridBuilder.cs

示例6: GridSquare

        public GridSquare(Point Location, Colors TileColor, Status Occupied)
        {
            panel = new GridPanel(this);
            this.Location = Location;
            this.TileColor = TileColor;
            this.Occupied = Occupied;

            this.Size = defaultTileSize;
        }
开发者ID:endamccormack,项目名称:draughts-checkers-game,代码行数:9,代码来源:GridSquare.cs

示例7: RenderBorder

 protected override void RenderBorder(Graphics g,
     GridPanel panel, GridPanelVisualStyle pstyle, Rectangle r)
 {
     using (Pen pen = new Pen(pstyle.HeaderLineColor))
     {
         r.Height--;
         g.DrawLine(pen, r.X, r.Bottom, r.Right - 1, r.Bottom);
     }
 }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:9,代码来源:GridCaption.cs

示例8: EEval

	    private EEval(GridCell cell, string source, List<GridCell> usedCells)
        {
            _Cell = cell;
            _UsedCells = usedCells;

            if (_Cell != null)
                _GridPanel = cell.GridPanel;

            Source = source;
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:10,代码来源:EEval.cs

示例9: CustomFilter

        ///<summary>
        /// CustomFilter
        ///</summary>
        public CustomFilter(GridPanel gridPanel, GridColumn gridColumn, string filterText)
        {
            _GridPanel = gridPanel;
            _GridColumn = gridColumn;

            InitializeComponent();
            InitializeText();
            InitializeFilter(filterText);

            PositionWindow(_GridPanel.SuperGrid);
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:14,代码来源:CustomFilter.cs

示例10: CreateSubPanel

        private GridPanel CreateSubPanel(int begin, int end)
        {
            GridPanel backgroundPanel = new GridPanel(Simulator.Scene, Vector3.Zero, new Vector2(500, 500), Preferences.PrioriteGUIPanneauGeneral, Color.White)
            {
                NbColumns = 4,
                OnlyShowWidgets = true
            };

            for (int i = begin; i <= end; i++)
                backgroundPanel.AddWidget("background" + i, new ImageWidget("background" + i, 0.1f));

            return backgroundPanel;
        }
开发者ID:jodigiordano,项目名称:commander,代码行数:13,代码来源:BackgroundsPanel.cs

示例11: FilterPopup

        /// <summary>
        /// Constructor
        /// </summary>
        public FilterPopup(GridPanel panel)
        {
            _Panel = panel;

            _PopupControl = new PopupControl();

            _PopupControl.Opened += PopupControlOpened;
            _PopupControl.Closed += PopupControlClosed;

            _PopupControl.UserResize += PopupControlUserResize;

            _PopupControl.PreRenderGripBar += PopupControlPreRenderGripBar;
            _PopupControl.PostRenderGripBar += PopupControlPostRenderGripBar;
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:17,代码来源:FilterPopup.cs

示例12: LevelsPanel

        public LevelsPanel(Scene scene, Vector3 position, Vector2 size, double visualPriority, Color color)
            : base(scene, position, size, visualPriority, color)
        {
            SelectedLevelLabel = new Label(new Text("Selected level: none", @"Pixelite") { SizeX = 2 });
            PushButtons = new Dictionary<LevelDescriptor, PushButton>();

            Levels = new GridPanel(scene, position, size, visualPriority, color)
            {
                NbColumns = 10
            };
            Levels.OnlyShowWidgets = true;

            AddWidget("SelectedLevel", SelectedLevelLabel);
            AddWidget("Levels", Levels);
        }
开发者ID:jodigiordano,项目名称:commander,代码行数:15,代码来源:LevelsPanel.cs

示例13: BuildRelatedCategories

    private void BuildRelatedCategories(IOrderedEnumerable<RelationInfo> categories, GridPanel categoriesPanel, RelationInfo originCategory)
    {
        IEnumerable<RelationInfo> calculatedCategories = (from category in categories
                                                          where
                                                            (
                                                             (category.RelatedCategory.IndexOf(originCategory.Category) > -1))
                                                          select category);

      foreach (RelationInfo calculatedCategory in calculatedCategories)
      {
        categoriesPanel.Controls.Add(GetSeparator());
        categoriesPanel.Controls.Add(GetCategoryPanel(calculatedCategory));
        BuildRelatedCategories(categories, categoriesPanel, calculatedCategory);
      }
    }
开发者ID:aokour,项目名称:sitecore.taxonomy,代码行数:15,代码来源:RelatedScreenForm.cs

示例14: GetCategoryPanel

 private static GridPanel GetCategoryPanel(RelationInfo link)
 {
   CategoryItem categoryItem = new CategoryItem(Client.ContentDatabase.GetItem(link.Category));
   GridPanel categoryPanel = new GridPanel();
   string categoryFullName = categoryItem.CategoryName;
   string categoryName = categoryItem.DisplayName;
   categoryPanel.Controls.Add(new Literal(string.Format("{0} ({1:F0}%)", categoryName, link.Weight))
                                {Class = "categoryName"});
   categoryPanel.Controls.Add(
     new Literal(string.Format("{0}",
                               categoryFullName.Substring(0, categoryFullName.Length - categoryName.Length - 1)))
       {Class = "categoryPath"});
   categoryPanel.Attributes["class"] = "categoryPanel";
   return categoryPanel;
 }
开发者ID:aokour,项目名称:sitecore.taxonomy,代码行数:15,代码来源:RelatedScreenForm.cs

示例15: CustomFilterEx

        ///<summary>
        /// CustomFilter
        ///</summary>
        public CustomFilterEx(GridPanel gridPanel,
            GridColumn gridColumn, string filterText)
        {
            _GridPanel = gridPanel;
            _GridColumn = gridColumn;

            InitializeComponent();
            InitializeText();
            InitializeFilter(filterText);

            PositionWindow(_GridPanel.SuperGrid);

            FormClosing += CustomFilterExFormClosing;

            filterExprEdit1.InputTextChanged += FilterExprEdit1InputTextChanged;
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:19,代码来源:CustomFilterEx.cs


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