コード例 #1
0
        private int buildGeoPiece(ArrayList fileContent, int index, System.Windows.Forms.TreeView tv, System.Windows.Forms.TreeNode pTn)
        {
            GeoPiece gPiece = new GeoPiece(fileContent, index, fileName, tv, pTn);

            geoPiecesArrayList.Add(gPiece);

            return(gPiece.getLastIndex());
        }
コード例 #2
0
ファイル: GeoPiece.cs プロジェクト: LowerCode/coh-score
        public object Clone(int startInd, int lastInd)
        {
            GeoPiece clone = (GeoPiece)this.Clone();

            clone.startIndex = startInd;

            clone.lastIndex = lastInd;

            return(clone);
        }
コード例 #3
0
        private void updateMElements(ArrayList elements)
        {
            bool isEnd = false;

            GeoPiece gp = (GeoPiece)this.Tag;

            int start = gp.getStartIndex();

            int last = gp.getLastIndex();

            int len = last - start + 1;

            if (isEdit)
            {
                this.mElements.RemoveRange(start, len);
            }

            else
            {
                start = getInsertionPos(start);
            }

            string testStr = (string)mElements[start];

            testStr = common.COH_IO.stripWS_Tabs_newLine_Qts(testStr, false);


            if (testStr.ToLower().Contains("end"))
            {
                isEnd  = true;
                start += 1;
                this.mElements.Insert(start++, "");
            }

            foreach (object obj in elements)
            {
                this.mElements.Insert(start++, obj);
            }
        }
コード例 #4
0
        public void pasteCostume_Piece(System.Windows.Forms.TreeNode copySource,
                                       System.Windows.Forms.TreeNode tn,
                                       System.Windows.Forms.TreeView tv,
                                       System.Windows.Forms.TreeNodeMouseClickEventHandler tNmouseClickEH)
        {
            GeoPiece srcGP   = (GeoPiece)copySource.Tag;
            int      len     = srcGP.getLastIndex() - srcGP.getStartIndex();
            int      start   = ((GeoPiece)tn.Tag).getStartIndex();
            int      lastInd = start + len;

            GeoPiece gp = (GeoPiece)srcGP.Clone(start, lastInd);

            System.Windows.Forms.TreeNode ctn = (System.Windows.Forms.TreeNode)copySource.Clone();
            ctn.Tag = gp;

            AddCostumePiece acp = new AddCostumePiece(this.filePath, ref this.fileContent, ctn, 0, false, true);

            if (acp.showAddWindow())
            {
                buildTree(tv, tNmouseClickEH);
            }
            acp.Dispose();
        }
コード例 #5
0
        private int buildGeoPiece(int index, System.Windows.Forms.TreeView tv)
        {
            GeoPiece gPiece = new GeoPiece(fileContent, index, filePath, tv);

            return(gPiece.getLastIndex());
        }