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


C# Column.AddVersion方法代码示例

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


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

示例1: addVersion

            public void addVersion(VersionInfo version)
            {
                if (PointFromVersion.ContainsKey(version.versionName))
                {
                    return;
                }

                int colNum = -1;
                int row = calcRow(version.versionName);
                string g = DeCostaNumbers.GetMother(version.versionName);
                List<VersionInfo> CallBe = new List<VersionInfo>();

                while (PointFromVersion.ContainsKey(g) == false && version.versionName.Equals("0") == false && g.Equals("0") == false)
                {
                    CallBe.Add(new VersionInfo(g));
                    g = DeCostaNumbers.GetMother(g);
                }
                if (CallBe.Count > 0)
                {
                    CallBe.Reverse();
                    addVersion(CallBe);
                }

                if (DaughtersFrom.ContainsKey(g) == false)
                {
                    DaughtersFrom[g] = new List<string>();
                }
                DaughtersFrom[g].Add(version.versionName);
                List<Column> ColList;
                int potentColm;
                int potentCols;
                if (row > rowMax)
                {
                    rowMax = row;
                }
                foreach (KeyValuePair<int, List<Column>> k in ColumnListFromColumnNumber)
                {
                    foreach (Column c in k.Value)
                    {
                        //will reject the add and return false
                        // if version is not a first daugher
                        //decendant in this column
                        if (c.AddVersion(version))
                        {
                            colNum = k.Key;
                            break;
                        }
                    }
                    if (colNum != -1)
                    {
                        break;
                    }
                }

                if (colNum == -1)
                {
                    Column c = new Column(this.PointFromVersion);
                    c.AddVersion(version);
                    int start = NumberOfDot(version.versionName);
                    potentColm = -1;
                    potentCols = -1;

                    string moth = DeCostaNumbers.GetMother(version.versionName);
                    string sis = DeCostaNumbers.GetBigSister(version.versionName);

                    int mothR = calcRow(moth);
                    int sisR = -1;
                    if (sis != DeCostaNumbers.AUNT && sis != DeCostaNumbers.NONE)
                    {
                        sisR = calcRow(sis);
                    }

                    if (ColumnListFromColumnNumber.ContainsKey(start) == false)
                    {
                        ColumnListFromColumnNumber[start] = new List<Column>();
                        if (start > largestColumnNumber)
                        {
                            largestColumnNumber = start;
                        }
                    }

                    VersionInfo vers;
                    //
                    for (int i = start, cols = 0; cols < ColumnListFromColumnNumber.Count & i <= largestColumnNumber; i++)
                    {
                        if(ColumnListFromColumnNumber.ContainsKey(i) == true)
                        {
                            cols++;
                            foreach (Column co in ColumnListFromColumnNumber[i])
                            {
                                if (sis != DeCostaNumbers.AUNT && sis != DeCostaNumbers.NONE)
                                {
                                    if (co.TryGetValue(sisR, out vers))
                                    {
                                        if (vers.versionName.Equals(sis))
                                        {
                                            potentCols = i + 1;
                                            break;

                                        }
//.........这里部分代码省略.........
开发者ID:LucindaInc,项目名称:FolderTrack,代码行数:101,代码来源:RelationshipPanel.cs


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