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


C# SourceGrid类代码示例

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


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

示例1: ApplyCondition

        public SourceGrid.Cells.ICellVirtual ApplyCondition(SourceGrid.Cells.ICellVirtual cell)
        {
            SourceGrid.Cells.ICellVirtual copied = cell.Copy();
            copied.View = View;

            return copied;
        }
开发者ID:Xavinightshade,项目名称:ipsimulator,代码行数:7,代码来源:ConditionView.cs

示例2: TSgrdTextColumn

 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="ADataGrid"></param>
 /// <param name="ADataColumn"></param>
 /// <param name="ACaption"></param>
 /// <param name="ADataCell"></param>
 public TSgrdTextColumn(SourceGrid.DataGrid ADataGrid,
     System.Data.DataColumn ADataColumn,
     string ACaption,
     SourceGrid.Cells.ICellVirtual ADataCell) :
     this(ADataGrid, ADataColumn, ACaption, ADataCell, -1, true)
 {
 }
开发者ID:Davincier,项目名称:openpetra,代码行数:14,代码来源:sgrdDataGrid.Columns.cs

示例3: grdOutreachOptionDoubleClick

        private void grdOutreachOptionDoubleClick(System.Object sender, SourceGrid.CellContextEventArgs e)
        {
            int Row = e.CellContext.Position.Row;

            if (Row >= 0)
            {
                FUnitTable.DefaultView[Row]["Is Selected"] = (System.Object)((!(Boolean)(FUnitTable.DefaultView[Row]["Is Selected"])));
            }
        }
开发者ID:Davincier,项目名称:openpetra,代码行数:9,代码来源:SelectOutreachOption.ManualCode.cs

示例4: PrepareView

        protected override void PrepareView(SourceGrid.CellContext context)
        {
            base.PrepareView(context);

            if (Math.IEEERemainder(context.Position.Row, 2) == 0)
                Background = FirstBackground;
            else
                Background = SecondBackground;
        }
开发者ID:Xavinightshade,项目名称:ipsimulator,代码行数:9,代码来源:CellBackColorAlternate.cs

示例5: OnMouseUp

        public override void OnMouseUp(SourceGrid.CellContext sender, MouseEventArgs e)
        {
            base.OnMouseUp(sender, e);

            if (e.Button == MouseButtons.Right)
            {
                sender.Grid.Selection.ResetSelection(true);
                sender.Grid.Selection.SelectRow(sender.CellRange.Start.Row, true);
            }
        }
开发者ID:distagon,项目名称:daemaged.ibnet,代码行数:10,代码来源:CellRenderers.cs

示例6: JudgeVeticalColumnNull

 public bool JudgeVeticalColumnNull(SourceGrid.Grid grid, int nIndexColumn)
 {
     for (int r = grid.FixedRows; r < grid.RowsCount; r++)
     {
         if (grid[r, nIndexColumn].Value != null)
         {
             return false;
         }
     }
     return true;
 }
开发者ID:wangjidilidun,项目名称:UIInterFace,代码行数:11,代码来源:DataEntryRules.cs

示例7: RefreshGrid

		private void RefreshGrid(SourceGrid.DataGrid grid, AbstractBoundList<_TradeInfo> source) {
			if (!this.IsDisposed) {
				if (grid.Visible) {
					if (grid.InvokeRequired) {
						grid.Invoke((MethodInvoker) delegate {
							source.Refresh();
						});
					} else {
						source.Refresh();
					}
				}
			}
		}
开发者ID:Zeghs,项目名称:ZeroSystem,代码行数:13,代码来源:frmSignalViewer.cs

示例8: BindSourceGrid

        /// <summary>
        /// 为SourceGrid绑定数据源
        /// </summary>
        /// <param name="grid"></param>
        /// <param name="data"></param>
        public void BindSourceGrid(SourceGrid.Grid grid, DataTable data, string colName)
        {
            int[] ColumnWidth = new int[] { 40, 200};
            //PopupMenu menuController = new PopupMenu();
            if (grid.RowsCount > 0)
            {
                //清除原表格内容
                grid.Rows.RemoveRange(0, grid.RowsCount);
            }
            grid.SelectionMode = SourceGrid.GridSelectionMode.Row;//选行模式
            grid.Selection.EnableMultiSelection = false; //行不允许多选
            grid.BorderStyle = BorderStyle.FixedSingle;
            grid.ColumnsCount = 2;
            grid.FixedRows = 1;
            BuildGridColumnWidth(grid, ColumnWidth);
            grid.Rows.Insert(0);
            grid[0, 0] = new SourceGrid.Cells.ColumnHeader("ID");
            grid[0, 1] = new SourceGrid.Cells.ColumnHeader(colName);

            grid[0, 1].View.Font = new Font("宋体", 10, FontStyle.Bold);

            //隐藏列
            grid[0, 0].Column.Visible = false;

            grid[0, 0].View.TextAlignment = DevAge.Drawing.ContentAlignment.MiddleCenter;

            for (int i = 1; i < data.Rows.Count + 1; i++)
            {
                grid.Rows.Insert(i);
                //设置行高
                grid.Rows.SetHeight(i, 30);

                #region 表体塞值

                //表体塞值
                grid[i, 0] = new SourceGrid.Cells.Cell(data.Rows[i - 1][0], typeof(int)); //id
                grid[i, 1] = new SourceGrid.Cells.Cell(data.Rows[i - 1][1], typeof(string));//名称

                #endregion

                //设置单元格不可编辑
                grid[i, 0].Editor.EnableEdit = false;
                grid[i, 1].Editor.EnableEdit = false;

            }
            grid.Refresh();
        }
开发者ID:liwei5946,项目名称:CEMS,代码行数:52,代码来源:EqstatusForm.cs

示例9: OnValueChanged

            public override void OnValueChanged(SourceGrid.CellContext sender, EventArgs e)
            {
                base.OnValueChanged(sender, e);

                //I use the OnValueChanged to link the value of 2 cells
                // changing the value of the other cell

                SourceGrid.Position otherCell = new SourceGrid.Position(sender.Position.Row, mDependencyColumn);
                SourceGrid.CellContext otherContext = new SourceGrid.CellContext(sender.Grid, otherCell);

                object newVal = sender.Value;
                if (ConvertFunction != null)
                    newVal = ConvertFunction(newVal);

                if (!object.Equals(otherContext.Value, newVal))
                    otherContext.Value = newVal;
            }
开发者ID:wsrf2009,项目名称:KnxUiEditor,代码行数:17,代码来源:frmSample51.cs

示例10: AlternateView

        public static SourceGrid.Conditions.ICondition AlternateView(
                                            SourceGrid.Cells.Views.IView view,
                                            System.Drawing.Color alternateBackcolor,
                                            System.Drawing.Color alternateForecolor)
        {
            SourceGrid.Cells.Views.IView viewAlternate = (SourceGrid.Cells.Views.IView)view.Clone();
            viewAlternate.BackColor = alternateBackcolor;
            viewAlternate.ForeColor = alternateForecolor;

            SourceGrid.Conditions.ConditionView condition =
                        new SourceGrid.Conditions.ConditionView(viewAlternate);

            condition.EvaluateFunction = delegate(SourceGrid.DataGridColumn column, int gridRow, object itemRow)
                                    {
                                        return (gridRow & 1) == 1;
                                    };

            return condition;
        }
开发者ID:Xavinightshade,项目名称:ipsimulator,代码行数:19,代码来源:ConditionBuilder.cs

示例11: GetValue

        public virtual object GetValue(SourceGrid.CellContext cellContext)
        {
            AddressInstance adr = (cellContext.Grid as FRomGrid).DataSource.Address;

            //Порядковый номер с нуля
            int n = cellContext.Position.Column - cellContext.Grid.FixedColumns;

            //Если фиксированных больше одной и сейчас проходим по первой,
            //заполняем ее порядковым номером
            if (cellContext.Grid.FixedRows > 1 && cellContext.Position.Row == 0)
                return n + 1;
            if (adr.XMapConstName.Length != 0)
            {
                From f = (cellContext.Grid as FRomGrid).DataSource.GetFRom();
                return f.GetMap(adr.XMapConstName)[n, 0, ViewEnum.Scale];
            }
            else
                return n + 1;
        }
开发者ID:vc,项目名称:from-editor,代码行数:19,代码来源:FRomColumnHeaderModel.cs

示例12: OnClick

 public override void OnClick(SourceGrid.CellContext sender, EventArgs e)
 {
     this.G.SortRowsByCount();
 }
开发者ID:knackwurst,项目名称:tvrename,代码行数:4,代码来源:ActorsGrid.cs

示例13: OnSortingRangeRows

        /// <summary>
        /// when sorting
        /// </summary>
        /// <param name="e"></param>
        protected override void OnSortingRangeRows(SourceGrid.SortRangeRowsEventArgs e)
        {
            base.OnSortingRangeRows(e);

            if (!FPerformFullLoadOnDataGridSort)
            {
                FPerformFullLoadOnDataGridSort = true;
                LoadAllDataPages();
            }
        }
开发者ID:Davincier,项目名称:openpetra,代码行数:14,代码来源:sgrdDataGridPaged.cs

示例14: OnValueChanged

        public override void OnValueChanged(SourceGrid.CellContext sender, EventArgs e)
        {
            base.OnValueChanged(sender, e);

            string val = "Value of cell {0} is '{1}'";

            MessageBox.Show(sender.Grid, string.Format(val, sender.Position, sender.Value));
        }
开发者ID:Xavinightshade,项目名称:ipsimulator,代码行数:8,代码来源:frmSample26.cs

示例15: OnMouseUp

		public override void OnMouseUp(SourceGrid.CellContext sender, MouseEventArgs e)
		{
			base.OnMouseUp (sender, e);

			if (e.Button == MouseButtons.Right)
				menu.Show(sender.Grid, new Point(e.X, e.Y));
		}
开发者ID:Xavinightshade,项目名称:ipsimulator,代码行数:7,代码来源:frmSample26.cs


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