Example #1
0
        public static Size SetFormSize(DataGridView dgv)
        {
            int width  = WinObjFunctions.CountGridWidth(dgv);
            int height = WinObjFunctions.CountGridHeight(dgv);

            return(new Size(width, height));
        }
Example #2
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     if (path != "")
     {
         LoadDocument(path);
     }
     ClientSize                 = new Size(ClientSize.Width, WinObjFunctions.CountGridHeight(DataGrid));
     DataGrid.CellEndEdit      += this.CellEditEndEvent;
     DataGrid.CellClick        += this.CellClickedEvent;
     DataGrid.SelectionChanged += this.CellSelectedEvent;
     FormulaBox.KeyDown        += this.FormulaBoxKeyPressedEvent;
     DataGrid.SelectionChanged += new EventHandler(this.FormulaBoxEditFinished);
     //FormulaBox.LostFocus += this.FormulaBoxLostFocusEvent;
     this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormClosingEvent);
 }