Пример #1
0
        public void SetBlockList(List <PatternBlock> flatBlockList, PatternArgs patternArgs)
        {
            this.patternArgs = patternArgs;
            blockList.Clear();
            List <PatternBlock> singeList = new List <PatternBlock>();

            //int blockId = -1;
            for (int i = 0; i < flatBlockList.Count; ++i)
            {
                PatternBlock block = flatBlockList[i];
                singeList.Add(block);
                //if (block.blockId != blockId)
                //{
                //  singeList = new List<PatternBlock>();
                //  PatternBlock selfRefBlock = new PatternBlock();
                //  selfRefBlock.targetStart = block.startLine;
                //  selfRefBlock.targetEnd = block.endLine;
                //  selfRefBlock.blockId = block.blockId;
                //  singeList.Add(selfRefBlock);
                //  singeList.Add(block);
                //  this.blockList.Add(singeList);
                //  blockId = block.blockId;
                //}
                //else
                //{
                //  singeList.Add(block);
                //}
            }
            this.blockList.Add(singeList);
            this.Invoke(new MethodInvoker(SetBlockListGuiStuff));
        }
Пример #2
0
 private void patternHitsDataGridView_CurrentCellChanged(object sender, EventArgs e)
 {
     if (this.currentList == null || patternHitsDataGridView.CurrentRow == null)
     {
         return;
     }
     if (patternHitsDataGridView.CurrentRow.Index > this.currentList.Count - 1)
     {
         return;
     }
     this.contentDataGridView.RowCount = 0;
     this.currentBlock = this.currentList[patternHitsDataGridView.CurrentRow.Index];
     this.contentDataGridView.RowCount = this.currentBlock.targetEnd - this.currentBlock.targetStart + 1;
     this.contentDataGridView.Refresh();
     this.contentDataGridView.CurrentCell = this.contentDataGridView.Rows[0].Cells[0];
     this.blockLinesLabel.Text            = "" + this.contentDataGridView.RowCount;
 }
Пример #3
0
		private void patternHitsDataGridView_CurrentCellChanged(object sender, EventArgs e)
		{
			if (this.currentList == null || patternHitsDataGridView.CurrentRow == null)
				return;
			if (patternHitsDataGridView.CurrentRow.Index > this.currentList.Count - 1)
				return;
			this.contentDataGridView.RowCount = 0;
			this.currentBlock = this.currentList[patternHitsDataGridView.CurrentRow.Index];
			this.contentDataGridView.RowCount = this.currentBlock.targetEnd - this.currentBlock.targetStart + 1;
			this.contentDataGridView.Refresh();
			this.contentDataGridView.CurrentCell = this.contentDataGridView.Rows[0].Cells[0];
			this.blockLinesLabel.Text = "" + this.contentDataGridView.RowCount;
		}