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


C# Row.Contains方法代码示例

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


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

示例1: GetSubOperation

        protected IOperation GetSubOperation(Row row)
        {
            Guard.Against(!row.Contains(COLUMN_WITH_CONNECTION_STRING), string.Format("Rows must contain \"{0}\" key.", COLUMN_WITH_CONNECTION_STRING));
            Guard.Against(!row.Contains(_columnWithSql), string.Format("Rows must contain \"{0}\" key.", _columnWithSql));

            var connectionString = row[COLUMN_WITH_CONNECTION_STRING].ToString();
            var sql = row[_columnWithSql].ToString();
            return new SqlOperation(connectionString, sql);
        }
开发者ID:modulexcite,项目名称:SQLoogle,代码行数:9,代码来源:SqlSubOperation.cs

示例2: IsEmptyRow

 private static bool IsEmptyRow(Row row)
 {
     return row.Contains(IsEmptyRowMarker);
 }
开发者ID:hoffmanc,项目名称:rhino-etl,代码行数:4,代码来源:NestedLoopsJoinOperation.cs

示例3: DrawGraph

        /// <summary>
        /// Отрисовка графика
        /// </summary>
        /// <param name="gr"></param>
        private void DrawGraph(Graphics gr)
        {
            // не рисуем ничего, если нет элементов
            if (items == null)
                return;
            if (items.Count == 0)
                return;

            float CurrentPoint = AxesYZeroPoint;
            StringFormat format = new StringFormat();
            format.LineAlignment = StringAlignment.Center;
            format.Alignment = StringAlignment.Far;
            format.FormatFlags = StringFormatFlags.FitBlackBox;
            for (int i = 0; i < items.Count; i++)
            {
                gr.DrawString(items[i].Text, base.Font, new SolidBrush(Color.Black), new RectangleF(rowIndentHor, CurrentPoint, strSize.Width, rowHeight), format);
                CurrentPoint += rowHeight;
            }

            // отрисовка горизонтальных линий
            float CurrentLine = AxesYZeroPoint + rowHeight;
            for (int i = 0; i < items.Count - 1; i++)
            {
                gr.DrawLine(axesHorizontalPen, new PointF(AxesXZeroPoint, CurrentLine), new PointF(Width - rowIndentHor, CurrentLine));
                CurrentLine += (int)rowHeight;
            }

            StringFormat RegionFormat = new StringFormat();
            RegionFormat.LineAlignment = StringAlignment.Center;
            RegionFormat.Alignment = StringAlignment.Center;
            RegionFormat.FormatFlags = StringFormatFlags.NoWrap;

            // отрисовка прямоугольников
            if (RegionItem != null)
            {
                Row SelectedRegions = new Row("");

                // находим первый регион
                RowItem FirstItem = RegionItem;
                while (FirstItem.Prev != null)
                    FirstItem = FirstItem.Prev;
                // формируем список выделенных регионов
                while (FirstItem != null)
                {
                    SelectedRegions.Add(FirstItem);
                    FirstItem = FirstItem.Next;
                }

                // рисуем затемнённые регионы
                for (int i = 0; i < items.Count; i++)
                {
                    for (int j = 0; j < items[i].Count; j++)
                    {
                        if (!SelectedRegions.Contains(items[i][j]))
                        {
                            if (items[i][j].Index >= 0)
                            {
                                if (items[i][j].OrderIndex == LightedOrderId)
                                    gr.FillRectangle(shadowBrushOrder, items[i][j].DrawRegion);
                                else
                                    gr.FillRectangle(shadowBrush, items[i][j].DrawRegion);
                            }
                            else if (items[i][j].Index == -1)
                            {
                                gr.FillRectangle(shadowBrushConf, items[i][j].DrawRegion);
                            }
                            else
                            {
                                gr.FillRectangle(shadowBrushServ, items[i][j].DrawRegion);
                            }

                            gr.DrawRectangle(shadowPen, items[i][j].DrawRegion);
                        }
                    }
                }

                // рисуем выделенные регионы
                Pen ConnectionPen = new Pen(Color.Blue, 1);
                for (int i = 0; i < SelectedRegions.Count; i++)
                {
                    if (SelectedRegions[i].Index >= 0)
                    {
                        gr.FillRectangle(selectBrush, SelectedRegions[i].DrawRegion);

                    }
                    else if (SelectedRegions[i].Index == -1)
                    {
                        gr.FillRectangle(selectBrushConf, SelectedRegions[i].DrawRegion);
                    }
                    else
                    {
                        gr.FillRectangle(selectBrushServ, SelectedRegions[i].DrawRegion);
                    }

                    gr.DrawRectangle(selectPen, SelectedRegions[i].DrawRegion);
                    if (drawItemText)
//.........这里部分代码省略.........
开发者ID:rustamz,项目名称:ProductionSchedule,代码行数:101,代码来源:GraphField.cs


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