• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Columns类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GetColumns

        private Columns GetColumns(string connectionString, string sqlCmd)
        {
            Columns columns = new Columns(50);
            MySqlDataReader dr = MySqlHelper.ExecuteReader(connectionString, sqlCmd);
            while (dr.Read())
            {
                string id = dr.IsDBNull(2) ? string.Empty : dr.GetString(2);
                string displayName = dr.IsDBNull(2) ? string.Empty : dr.GetString(2);
                string name = dr.IsDBNull(2) ? string.Empty : dr.GetString(2);
                string dataType = dr.IsDBNull(3) ? string.Empty : dr.GetString(3);
                string key = dr.IsDBNull(4) ? string.Empty : dr.GetString(4);
                string defaultValue = dr.IsDBNull(5) ? string.Empty : dr.GetString(5);
                string isNullable = dr.IsDBNull(6) ? string.Empty : dr.GetString(6);
                string length = dr.IsDBNull(7) ? string.Empty : dr.GetString(7);
                string identity = dr.IsDBNull(8) ? string.Empty : dr.GetString(8);
                string comment = dr.IsDBNull(9) ? string.Empty : dr.GetString(9);

                Column column = new Column(id, displayName, name, dataType, comment);
                column.Length = ConvertHelper.GetInt32(length);
                column.IsAutoIncremented = identity.Equals("auto_increment");
                column.IsNullable = isNullable.Equals("YES");
                column.DefaultValue = defaultValue.ToEmpty();
                column.DataType = dataType;
                column.OriginalName = name;
                columns.Add(id, column);
            }
            dr.Close();

            return columns;
        }
开发者ID:xianrendzw,项目名称:CodeBuilder,代码行数:30,代码来源:MySql5Exporter.cs


示例2: CalculateColumns

        public Columns CalculateColumns()
        {
            Columns columns = new Columns();
            Column lastColumn = null;
            Offset lastOffset = Offset.Zero;

            int count = _members.Count;
            for (int i = 0; i < count; i++)
            {
                Offset thisOffset = this[i].TopOffset;
                if (thisOffset.IsLessThanOrEqualTo(lastOffset))
                {
                    if (lastColumn != null)
                    {
                        lastColumn.SetEnd(i);
                    }
                    Column col = new Column(this, i);
                    columns.Add(col);
                    lastColumn = col;
                }
                lastOffset = thisOffset;
            }
            lastColumn.SetEnd(count);

            return columns;
        }
开发者ID:LibreCrops,项目名称:cdef,代码行数:26,代码来源:LeafMembers.cs


示例3: GetColumns

        private Columns GetColumns(string connectionString, string sqlCmd)
        {
            Columns columns = new Columns(50);
            SqlDataReader dr = SqlHelper.ExecuteReader(connectionString, CommandType.Text, sqlCmd);
            while (dr.Read())
            {
                string id = dr.IsDBNull(2) ? string.Empty : dr.GetString(2);
                string displayName = dr.IsDBNull(2) ? string.Empty : dr.GetString(2);
                string name = dr.IsDBNull(2) ? string.Empty : dr.GetString(2);
                int length = dr.IsDBNull(3) ? 0 : dr.GetInt16(3);
                bool identity = dr.IsDBNull(4) ? false : dr.GetBoolean(4);
                bool isNullable = dr.IsDBNull(5) ? false : dr.GetBoolean(5);
                bool isComputed = dr.IsDBNull(6) ? false : dr.GetBoolean(6);
                string dataType = dr.IsDBNull(7) ? string.Empty : dr.GetString(7);
                string comment = dr.IsDBNull(8) ? string.Empty : dr.GetString(8);
                string defaultValue = dr.IsDBNull(9) ? string.Empty : dr.GetString(9);

                Column column = new Column(id, displayName, name, dataType, comment);
                column.Length = length;
                column.IsAutoIncremented = identity;
                column.IsNullable = isNullable;
                column.DefaultValue = defaultValue;
                column.DataType = dataType;
                column.OriginalName = name;
                column.IsComputed = isComputed;
                columns.Add(id, column);
            }
            dr.Close();

            return columns;
        }
开发者ID:xianrendzw,项目名称:CodeBuilder,代码行数:31,代码来源:SqlServer2005Exporter.cs


示例4: GetColumns

        private Columns GetColumns(XmlNode tableOrViewNode)
        {
            XmlNode columnsNode = tableOrViewNode["c:Columns"];
            if (columnsNode == null ||
                columnsNode.ChildNodes.Count == 0) return null;

            XmlNodeList columnNodes = columnsNode.ChildNodes;
            Columns columns = new Columns(columnNodes.Count);
            foreach (XmlNode columnNode in columnNodes)
            {
                string id = columnNode.Attributes["Id"].InnerText;
                string displayName = columnNode["a:Name"].InnerText;
                string name = columnNode["a:Code"].InnerText;
                string comment = columnNode["a:Comment"] != null ? columnNode["a:Comment"].InnerText : string.Empty;
                string dataType = columnNode["a:DataType"] != null ? columnNode["a:DataType"].InnerText : string.Empty;
                string length = columnNode["a:Length"] != null ? columnNode["a:Length"].InnerText : "0";
                string identity = columnNode["a:Identity"] != null ? columnNode["a:Identity"].InnerText : string.Empty;
                string mandatory = columnNode["a:Mandatory"] != null ? columnNode["a:Mandatory"].InnerText : string.Empty;
                string defaultValue = columnNode["a:DefaultValue"] != null ? columnNode["a:DefaultValue"].InnerText : string.Empty;

                Column column = new Column(id, displayName, name, dataType, comment);
                column.Length = Int32.Parse(length);
                column.IsAutoIncremented = identity.Equals("1");
                column.IsNullable = mandatory.Equals("1");
                column.DefaultValue = defaultValue.ToEmpty();
                column.DataType = Regex.Replace(column.DataType, "\\(.*?\\)", "");
                column.OriginalName = name;
                columns.Add(id, column);
            }

            return columns;
        }
开发者ID:xianrendzw,项目名称:CodeBuilder,代码行数:32,代码来源:PowerDesigner12Exporter.cs


示例5: Move

 public Move(Columns column, Rows row, Values value, int score = 0)
     : this()
 {
     Row = row;
     Column = column;
     Value = value;
     Score = score;
 }
开发者ID:ElemarJR,项目名称:Sudoku,代码行数:8,代码来源:Move.cs


示例6: Remove_Column

 public void Remove_Column()
 {
     var test = new Columns();
     var column = new Column("testing", ColumnTypes.Bigint, true);
     test.Add(column);
     test.Remove(column);
     Assert.False(test.Items.Any(item => item.Name == "testing"));
 }
开发者ID:blehnen,项目名称:DotNetWorkQueue,代码行数:8,代码来源:ColumnsTests.cs


示例7: Exporter

 public Exporter(string path, List<Measurement> measurements, Columns[] columns, string lineTerminator, string delimiter, bool header)
 {
     this.path = path;
     this.measurements = measurements;
     this.columns = columns;
     this.lineTerminator = lineTerminator;
     this.delimiter = delimiter;
     this.header = header;
 }
开发者ID:ericrini,项目名称:CSCI7090,代码行数:9,代码来源:Exporter.cs


示例8: AddColumn

        public ViewComponentResult AddColumn(Columns model)
        {
            Columns tempColumn = new Columns(model.Name, model.BoardID); // The model got passed the last column ID

            m_context.Columns.Add(tempColumn);
            m_context.SaveChanges();
            tempColumn.TasksList = new List<Tasks>();
            return ViewComponent("Panel_Lists", tempColumn);
        }
开发者ID:Foysal94,项目名称:Scrum-Tool,代码行数:9,代码来源:ColumnController.cs


示例9: AddGeneralColumn

 public static GeneralColumn AddGeneralColumn(Columns Columns, TableField Field, bool IsEnabled, bool CanDisabled)
 {
     GeneralColumn Column = Columns.CreateGeneralColumn();
     Column.Field = Field;
     Column.IsEnabled = IsEnabled;
     Column.CanDisable = CanDisabled;
     Columns.Add(Column);
     return Column;
 }
开发者ID:vadimbarda,项目名称:pivbank,代码行数:9,代码来源:TSUtils.cs


示例10: GenerateDocument

        public static Document GenerateDocument()
        {
            Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } };
            document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            DocumentBackground documentBackground1 = new DocumentBackground() { Color = "FF0000" };

            V.Background background1 = new V.Background() { Id = "_x0000_s1025", BlackWhiteMode = Ovml.BlackAndWhiteModeValues.GrayScale, TargetScreenSize = Ovml.ScreenSizeValues.Sz1024x768 };
            V.Fill fill1 = new V.Fill() { Type = V.FillTypeValues.Frame, Title = "Wedding_EnclosureCards", Recolor = true, Color = "FF0000" };

            background1.Append(fill1);

            documentBackground1.Append(background1);

            Body body1 = new Body();

            Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "005F6C39", RsidRunAdditionDefault = "005F6C39" };
            BookmarkStart bookmarkStart1 = new BookmarkStart() { Name = "_GoBack", Id = "0" };
            BookmarkEnd bookmarkEnd1 = new BookmarkEnd() { Id = "0" };

            paragraph1.Append(bookmarkStart1);
            paragraph1.Append(bookmarkEnd1);

            SectionProperties sectionProperties1 = new SectionProperties() { RsidR = "005F6C39" };
            PageSize pageSize1 = new PageSize() { Width = (UInt32Value)12240U, Height = (UInt32Value)15840U };
            PageMargin pageMargin1 = new PageMargin() { Top = 1440, Right = (UInt32Value)1440U, Bottom = 1440, Left = (UInt32Value)1440U, Header = (UInt32Value)720U, Footer = (UInt32Value)720U, Gutter = (UInt32Value)0U };
            Columns columns1 = new Columns() { Space = "720" };
            DocGrid docGrid1 = new DocGrid() { LinePitch = 360 };

            sectionProperties1.Append(pageSize1);
            sectionProperties1.Append(pageMargin1);
            sectionProperties1.Append(columns1);
            sectionProperties1.Append(docGrid1);

            body1.Append(paragraph1);
            body1.Append(sectionProperties1);

            document1.Append(documentBackground1);
            document1.Append(body1);
            return document1;
        }
开发者ID:haizhixing126,项目名称:PYSConsole,代码行数:55,代码来源:WordGenerator.cs


示例11: Loader

 public Loader(string file, string delimiter, Columns[] columns, ITimeDomain timeDomain, int skip)
 {
     // Populate fields.
     this.CurrentLine = 1;
     this.Name = new FileInfo(file).Name;
     this.Data = new List<Measurement>();
     this.columns = columns;
     this.delimiter = "\t";
     this.timeDomain = timeDomain;
     this.skip = skip;
     this.file = file;
 }
开发者ID:ericrini,项目名称:CSCI7090,代码行数:12,代码来源:Loader.cs


示例12: AddColumns

        private void AddColumns(SpreadsheetDocument doc, string sheetName)
        {
            var sheetData = doc.GetSheetDataByName(sheetName);
            var headerRow = sheetData.Descendants<Row>().FirstOrDefault();
            if (headerRow == null) return;

            var colCount = headerRow.Descendants<Cell>().Count();
            var columnRange = Enumerable.Range(0, colCount).Select(i => CreateColumn(doc, sheetData, i));
            var columns = new Columns(columnRange);

            var sheet = doc.GetWorksheetByName(sheetName);
            sheet.InsertAt(columns, 0);
        }
开发者ID:echen-mdsol,项目名称:Medidata.Cloud.Tsdv.Loader,代码行数:13,代码来源:AutoFitColumnSheetDecorator.cs


示例13: ZurbPanel

        public ZurbPanel(HtmlHelper html, Columns columnWidth, string cssClass = null)
        {
            _html = html;

            var panel = new TagBuilder("div");
            panel.AddCssClass("panel");
            panel.AddCssClass(String.Format("{0} columns", columnWidth.GetStringValue()));

            if (cssClass != null)
                panel.AddCssClass(cssClass);

            _html.ViewContext.Writer.Write(panel.ToString(TagRenderMode.StartTag));
        }
开发者ID:danielvanhouten,项目名称:MVC-3-Extensions-for-Zurb-Foundation,代码行数:13,代码来源:ZurbPanel.cs


示例14: AddColumns

 private Columns AddColumns(String prefix)
 {
     var columns = new Columns();
     columns.TracerAmountsByAreaColumns = AddDataColumns(prefix, "Tracer % (area)");
     columns.TracerAmountsBySlopeColumns = AddDataColumns(prefix, "Tracer % (slope)");
     columns.PrecursorEnrichmentColumns = AddDataColumns(prefix, "Precursor Enrichment");
     columns.TurnoverColumns = AddDataColumns(prefix, "Turnover");
     columns.AreaUnderCurveColumns = AddDataColumns(prefix, "Area Under Curve");
     dataGridView1.Columns.Add(columns.ReplicateCountColumn = new DataGridViewTextBoxColumn
                                        {
                                            HeaderText = prefix + "Count",
                                        });
     return columns;
 }
开发者ID:lgatto,项目名称:proteowizard,代码行数:14,代码来源:TracerAmountsByCohort.cs


示例15: Create

        public void Create(string fileName)
        {
            FileName = fileName;

            using (SpreadsheetDocument doc = SpreadsheetDocument.Create(FileName, DocumentFormat.OpenXml.SpreadsheetDocumentType.Workbook))
            {
                var workbookPart = doc.AddWorkbookPart();
                var worksheetPart = workbookPart.AddNewPart<WorksheetPart>();

                //	Create Styles
                var stylesPart = doc.WorkbookPart.AddNewPart<WorkbookStylesPart>();
                Style = new CustomStylesheet();
                LoadCustomFonts();
                LoadCustomBorders();
                LoadCustomStyles();
                Style.Save(stylesPart);

                string relId = workbookPart.GetIdOfPart(worksheetPart);

                //	create workbook and sheet
                var workbook = new Workbook();
                var worksheet = new Worksheet();
                var fileVersion = new FileVersion { ApplicationName = "Microsoft Office Excel" };

                //	create columns
                var columns = new Columns();
                CreateColumns(columns);
                worksheet.Append(columns);

                //	create Sheet
                var sheets = new Sheets();
                var sheet = new Sheet { Name = "My sheet", SheetId = 1, Id = relId };
                sheets.Append(sheet);

                workbook.Append(fileVersion);
                workbook.Append(sheets);

                var sheetData = new SheetData();
                LoadData(sheetData);
                worksheet.Append(sheetData);

                worksheetPart.Worksheet = worksheet;
                worksheetPart.Worksheet.Save();

                doc.WorkbookPart.Workbook = workbook;
                doc.WorkbookPart.Workbook.Save();
                //doc.Close();
            }
        }
开发者ID:BadKarmaZen,项目名称:petoeter_work,代码行数:49,代码来源:ExcelFile.cs


示例16: GetRegionValues

 public Values GetRegionValues(Columns oneCellColumn, Rows oneCellRow)
 {
     int column = (int)oneCellColumn;
     int row = (int)oneCellRow;
     return _RegionValues[column / 3, row / 3];
 }
开发者ID:ElemarJR,项目名称:Sudoku,代码行数:6,代码来源:Board.cs


示例17: GenerateMainDocumentPart1Content


//.........这里部分代码省略.........
            text24.Text = ",Row2,Cell2";

            run24.Append(runProperties42);
            run24.Append(text24);

            paragraph15.Append(run23);
            paragraph15.Append(run24);

            tableCell4.Append(tableCellProperties4);
            tableCell4.Append(paragraph15);

            sdtContentCell4.Append(tableCell4);

            sdtCell4.Append(sdtProperties22);
            sdtCell4.Append(sdtEndCharProperties22);
            sdtCell4.Append(sdtContentCell4);

            tableRow2.Append(sdtCell3);
            tableRow2.Append(sdtCell4);

            sdtContentRow3.Append(tableRow2);

            sdtRow3.Append(sdtProperties20);
            sdtRow3.Append(sdtEndCharProperties20);
            sdtRow3.Append(sdtContentRow3);

            sdtContentRow1.Append(sdtRow2);
            sdtContentRow1.Append(sdtRow3);

            sdtRow1.Append(sdtProperties16);
            sdtRow1.Append(sdtEndCharProperties16);
            sdtRow1.Append(sdtContentRow1);

            TableRow tableRow3 = new TableRow(){ RsidTableRowAddition = "00E930A2", RsidTableRowProperties = "00242789" };

            TableCell tableCell5 = new TableCell();

            TableCellProperties tableCellProperties5 = new TableCellProperties();
            TableCellWidth tableCellWidth5 = new TableCellWidth(){ Width = "4788", Type = TableWidthUnitValues.Dxa };
            Shading shading5 = new Shading(){ Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto" };

            tableCellProperties5.Append(tableCellWidth5);
            tableCellProperties5.Append(shading5);
            Paragraph paragraph16 = new Paragraph(){ RsidParagraphAddition = "00E930A2", RsidParagraphProperties = "00242789", RsidRunAdditionDefault = "00E930A2" };

            tableCell5.Append(tableCellProperties5);
            tableCell5.Append(paragraph16);

            TableCell tableCell6 = new TableCell();

            TableCellProperties tableCellProperties6 = new TableCellProperties();
            TableCellWidth tableCellWidth6 = new TableCellWidth(){ Width = "4788", Type = TableWidthUnitValues.Dxa };
            Shading shading6 = new Shading(){ Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto" };

            tableCellProperties6.Append(tableCellWidth6);
            tableCellProperties6.Append(shading6);
            Paragraph paragraph17 = new Paragraph(){ RsidParagraphAddition = "00E930A2", RsidParagraphProperties = "00242789", RsidRunAdditionDefault = "00E930A2" };

            tableCell6.Append(tableCellProperties6);
            tableCell6.Append(paragraph17);

            tableRow3.Append(tableCell5);
            tableRow3.Append(tableCell6);

            table1.Append(tableProperties1);
            table1.Append(tableGrid1);
            table1.Append(sdtRow1);
            table1.Append(tableRow3);
            Paragraph paragraph18 = new Paragraph(){ RsidParagraphAddition = "00E930A2", RsidRunAdditionDefault = "00E930A2" };

            SectionProperties sectionProperties1 = new SectionProperties(){ RsidR = "00E930A2" };
            PageSize pageSize1 = new PageSize(){ Width = (UInt32Value)11906U, Height = (UInt32Value)16838U };
            PageMargin pageMargin1 = new PageMargin(){ Top = 1985, Right = (UInt32Value)1701U, Bottom = 1701, Left = (UInt32Value)1701U, Header = (UInt32Value)851U, Footer = (UInt32Value)992U, Gutter = (UInt32Value)0U };
            Columns columns1 = new Columns(){ Space = "425" };
            DocGrid docGrid1 = new DocGrid(){ Type = DocGridValues.Lines, LinePitch = 360 };

            sectionProperties1.Append(pageSize1);
            sectionProperties1.Append(pageMargin1);
            sectionProperties1.Append(columns1);
            sectionProperties1.Append(docGrid1);

            body1.Append(sdtBlock1);
            body1.Append(sdtBlock2);
            body1.Append(sdtBlock3);
            body1.Append(sdtBlock4);
            body1.Append(sdtBlock5);
            body1.Append(sdtBlock6);
            body1.Append(sdtBlock7);
            body1.Append(sdtBlock8);
            body1.Append(sdtBlock10);
            body1.Append(sdtBlock12);
            body1.Append(sdtBlock14);
            body1.Append(table1);
            body1.Append(paragraph18);
            body1.Append(sectionProperties1);

            document1.Append(body1);

            mainDocumentPart1.Document = document1;
        }
开发者ID:eriawan,项目名称:Open-XML-SDK,代码行数:101,代码来源:GeneratedDocument.cs


示例18: GetColumnValues

 public Values GetColumnValues(Columns column)
 {
     return _ColumnValues[(int)column];
 }
开发者ID:ElemarJR,项目名称:Sudoku,代码行数:4,代码来源:Board.cs


示例19: GetDeniedValues

 public Values GetDeniedValues(Columns column, Rows row)
 {
     return GetRowValues(row) |
         GetColumnValues(column) |
         GetRegionValues(column, row);
 }
开发者ID:ElemarJR,项目名称:Sudoku,代码行数:6,代码来源:Board.cs


示例20: NumberOfSquaresInRegionCouldUseValue

        private int NumberOfSquaresInRegionCouldUseValue(Columns column, Rows row, Values value)
        {
            int r = (int)row / 3;
            int c = (int)column / 3;
            var result = 0;
            for (int i = 0; i < 3; i++)
                for (int j = 0; j < 3; j ++ )
                {
                    Rows ro = (Rows)(r*3+i);
                    Columns co = (Columns)(c * 3 + i);
                    if (CouldPutValueInSquare(co, ro, value)) result++;
                }

            return result;
        }
开发者ID:ElemarJR,项目名称:Sudoku,代码行数:15,代码来源:Board.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ComPort类代码示例发布时间:2022-05-24
下一篇:
C# ColumnValue类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap