Esempio n. 1
0
        internal void PopulateRetractionStops()
        {
            //List<string> retractionStartLines = bfbObject.generateRetractionStartList();

            SourceGrid.Cells.Editors.TextBox retractCountEditor = new SourceGrid.Cells.Editors.TextBox(typeof(int));
            retractCountEditor.EditableMode = SourceGrid.EditableMode.None;


            int gridRow = 1;
            RetractionStopChangedEvent valueChangedController = new RetractionStopChangedEvent(this);


            foreach (string keyLine in bfbObject.RetractionStopLineList.Keys)
            {
                int        index      = bfbObject.RetractionStopLineList[keyLine][0];
                Retraction retraction = bfbObject.RetractionStopDictionary[index];

                gridRetractionStop.Rows.Insert(gridRow);
                gridRetractionStop[gridRow, 0] = new SourceGrid.Cells.Cell(retraction.P, typeof(int));
                gridRetractionStop[gridRow, 0].AddController(valueChangedController);
                gridRetractionStop[gridRow, 1] = new SourceGrid.Cells.Cell(retraction.S, typeof(int));
                gridRetractionStop[gridRow, 1].AddController(valueChangedController);
                gridRetractionStop[gridRow, 2] = new SourceGrid.Cells.Cell(index, retractCountEditor);

                gridRow++;
            }
        }
Esempio n. 2
0
        internal void PopulateRetractionStarts()
        {
            //List<string> retractionStartLines = bfbObject.generateRetractionStartList();

            SourceGrid.Cells.Editors.TextBox retractCountEditor = new SourceGrid.Cells.Editors.TextBox(typeof(int));
            retractCountEditor.EditableMode = SourceGrid.EditableMode.None;


            int gridRow = 1;
            RetractionStartChangedEvent valueChangedController = new RetractionStartChangedEvent(this);


            foreach (string keyLine in bfbObject.RetractionStartLineList.Keys)
            {
                int        index      = bfbObject.RetractionStartLineList[keyLine][0];
                Retraction retraction = bfbObject.RetractionStartDictionary[index];

                gridRetractionStart.Rows.Insert(gridRow);
                gridRetractionStart[gridRow, 0] = new SourceGrid.Cells.Cell(retraction.P, typeof(int));
                gridRetractionStart[gridRow, 0].AddController(valueChangedController);
                gridRetractionStart[gridRow, 1] = new SourceGrid.Cells.Cell(retraction.S, typeof(int));
                gridRetractionStart[gridRow, 1].AddController(valueChangedController);
                if (retraction.G != -1)
                {
                    gridRetractionStart[gridRow, 2] = new SourceGrid.Cells.Cell(retraction.G, typeof(int));
                    gridRetractionStart[gridRow, 2].AddController(valueChangedController);
                }
                else
                {
                    gridRetractionStart[gridRow, 2] = new SourceGrid.Cells.Cell(" ", retractCountEditor);
                }
                if (retraction.F != -1)
                {
                    gridRetractionStart[gridRow, 3] = new SourceGrid.Cells.Cell(retraction.F, typeof(int));
                    gridRetractionStart[gridRow, 3].AddController(valueChangedController);
                }
                else
                {
                    gridRetractionStart[gridRow, 3] = new SourceGrid.Cells.Cell(" ", retractCountEditor);
                }
                gridRetractionStart[gridRow, 4] = new SourceGrid.Cells.Cell(index, retractCountEditor);

                //gridLeftTemps[gridRow, 1] = new SourceGrid.Cells.CellControl();
                gridRow++;
            }
        }