本文整理汇总了C#中GridPanel类的典型用法代码示例。如果您正苦于以下问题:C# GridPanel类的具体用法?C# GridPanel怎么用?C# GridPanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GridPanel类属于命名空间,在下文中一共展示了GridPanel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: FilterData
///<summary>
/// FilterData
///</summary>
///<param name="panel"></param>
internal static void FilterData(GridPanel panel)
{
if (_lockFilter == true)
return;
if (panel.SuperGrid.DoDataFilteringStartEvent(panel) == false)
{
_lockFilter = true;
try
{
if (panel.EnableFiltering == true &&
panel.FilterLevel != FilterLevel.None)
{
bool rowFiltered = IsRowFiltered(panel);
bool colFiltered = IsColumnFiltered(panel);
if (rowFiltered == true || colFiltered == true)
{
if (rowFiltered == true)
rowFiltered = UpdateRowFilter(panel);
if (colFiltered == true)
UpdateColumnFilter(panel);
UpdateFilterState(panel, rowFiltered, colFiltered);
return;
}
}
UpdateFilterState(panel, false, false);
}
finally
{
_lockFilter = false;
panel.UpdateVisibleRowCount();
panel.SuperGrid.DoDataFilteringCompleteEvent(panel);
}
}
else
{
panel.UpdateVisibleRowCount();
}
}
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:50,代码来源:DataFilter.cs
示例17: UpdateRowFilter
private static bool UpdateRowFilter(GridPanel panel)
{
if (panel.FilterEval == null)
{
try
{
panel.FilterEval = new FilterEval(
panel, null, panel.GetFilterMatchType(), panel.FilterExpr);
}
catch
{
return (false);
}
}
return (true);
}
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:17,代码来源:DataFilter.cs
示例18: GridDialog
public GridDialog(GridPanel gp)
{
try
{
base.Icon = ResourceService.GetIcon("Icons.SkyMapSoftIcon");
}
catch
{
try
{
base.Icon = ResourceService.GetIcon("Dialog.Grid.Icon");
}
catch
{
}
}
gp.Dock = DockStyle.Fill;
base.Size = new Size((3 * Screen.PrimaryScreen.WorkingArea.Width) / 4, (2 * Screen.PrimaryScreen.WorkingArea.Height) / 3);
base.Controls.Add(gp);
}
开发者ID:vanloc0301,项目名称:mychongchong,代码行数:20,代码来源:GridDialog.cs
示例19: GetGrid
public ActionResult GetGrid(string id)
{
List<object> data = new List<object>();
for (int i = 1; i <= 10; i++)
{
data.Add(new { ID = "P" + i, Name = "Product " + i });
}
GridPanel grid = new GridPanel
{
Height = 200,
EnableColumnHide = false,
Store =
{
new Store
{
Model =
{
new Model {
IDProperty = "ID",
Fields = {
new ModelField("ID"),
new ModelField("Name")
}
}
},
DataSource = data
}
},
ColumnModel =
{
Columns =
{
new Column { Text = "Products's Name", DataIndex = "Name", Width = 150 }
}
}
};
return this.ComponentConfig(grid);
}
开发者ID:extnet,项目名称:Ext.NET.Examples.MVC,代码行数:40,代码来源:Dynamic_GridPanelsController.cs
示例20: OnLoad
protected override void OnLoad(System.EventArgs e)
{
base.OnLoad(e);
UrlHandle handle = UrlHandle.Get();
string itemId = handle["itemId"];
string taxonomyValue = handle["taxonomyValue"];
List<string> listValue = taxonomyValue.Split("|".ToCharArray(), StringSplitOptions.RemoveEmptyEntries).ToList();
listValue.RemoveAll(str => str.Contains(Sitecore.Data.ID.Null.ToString()));
taxonomyValue = String.Join("|", listValue.ToArray<string>());
if (!string.IsNullOrEmpty(taxonomyValue) && !string.IsNullOrEmpty(itemId) && Sitecore.Data.ID.IsID(itemId))
{
Item currentItem = Client.ContentDatabase.GetItem(new ID(itemId));
IOrderedEnumerable<RelationInfo> categories =
TaxonomyEngine.GetAllCategories(currentItem, taxonomyValue).Values.OrderBy(info => info.Weight);
IEnumerable<RelationInfo> setCategories = (from category in categories
where !category.Calculated
select category);
foreach (RelationInfo link in setCategories)
{
GridPanel categoriesPanel = new GridPanel();
ResultBox.Controls.Add(categoriesPanel);
categoriesPanel.Attributes["class"] = "categoriesPanel";
categoriesPanel.Columns = 100;
categoriesPanel.Controls.Add(GetCategoryPanel(link));
BuildRelatedCategories(categories, categoriesPanel, link);
}
}
else
{
Literal noDataLiteral = new Literal("No taxonomy data could be retrieved.");
ResultBox.Controls.Add(noDataLiteral);
}
}
开发者ID:aokour,项目名称:sitecore.taxonomy,代码行数:36,代码来源:RelatedScreenForm.cs
注:本文中的GridPanel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论