Example #1
0
        public override void Execute(GrapeCity.Documents.Excel.Workbook workbook)
        {
            IWorksheet worksheet = workbook.Worksheets[0];

            //Worksheet view settings.
            IWorksheetView sheetView = worksheet.SheetView;

            sheetView.DisplayFormulas    = false;
            sheetView.DisplayRightToLeft = true;
            sheetView.GridlineColor      = Color.Red;
            sheetView.Zoom = 200;
        }
    /// <summary>
    /// Set the member variables to default values. Intended only for use in constructors and deserialization code.
    /// </summary>
    protected virtual void SetMemberVariablesToDefault()
    {
      m_DeserializationSurrogate=null;

      m_Table=null;
      m_TableLayout=null;
      m_View = null;
    
      // The main menu of this controller.
      m_MainMenu = null; 
      m_MenuItemEditRemove = null;
      m_MenuItemColumnSetColumnValues = null;

      // Which selection was done last: selection (i) a data column, (ii) a data row, or (iii) a property column.</summary>
      m_LastSelectionType = SelectionType.Nothing;

    
      // holds the positions (int) of the right boundarys of the __visible__ (!) columns
      m_ColumnStyleCache = new ColumnStyleCache();
    
    
      // Horizontal scroll position; number of first column that is shown.
      m_HorzScrollPos=0;
    
      // Vertical scroll position; Positive values: number of first data column
      m_VertScrollPos=0;
      m_HorzScrollMax=1;
      m_VertScrollMax=1;

      m_LastVisibleColumn=0;
      m_LastFullyVisibleColumn=0;

    
      // Holds the indizes to the selected data columns.
      m_SelectedDataColumns = new Altaxo.Worksheet.IndexSelection(); // holds the selected columns
    
      // Holds the indizes to the selected rows.
      m_SelectedDataRows    = new Altaxo.Worksheet.IndexSelection(); // holds the selected rows
    
      // Holds the indizes to the selected property columns.
      m_SelectedPropertyColumns = new Altaxo.Worksheet.IndexSelection(); // holds the selected property columns

      // Holds the indizes to the selected property columns.
      m_SelectedPropertyRows = new Altaxo.Worksheet.IndexSelection(); // holds the selected property columns

      // Cached number of table rows.
      m_NumberOfTableRows=0; // cached number of rows of the table

      // Cached number of table columns.
      m_NumberOfTableCols=0;
    
      // Cached number of property columns.
      m_NumberOfPropertyCols=0; // cached number of property  columnsof the table
    
        

      m_MouseDownPosition = new Point(0,0); // holds the position of a double click
      m_DragColumnWidth_ColumnNumber=int.MinValue; // stores the column number if mouse hovers over separator
      m_DragColumnWidth_OriginalPos = 0;
      m_DragColumnWidth_OriginalWidth=0;
      m_DragColumnWidth_InCapture=false;
  

      m_CellEdit_IsArmed=false;
      m_CellEdit_EditedCell = new ClickedCellInfo();


      m_CellEditControl = new System.Windows.Forms.TextBox();
      m_CellEditControl.AcceptsTab = true;
      m_CellEditControl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
      m_CellEditControl.Location = new System.Drawing.Point(392, 0);
      m_CellEditControl.Multiline = true;
      m_CellEditControl.Name = "m_CellEditControl";
      m_CellEditControl.TabIndex = 0;
      m_CellEditControl.Text = "";
      m_CellEditControl.Hide();
      m_CellEdit_IsArmed = false;
      m_CellEditControl.KeyDown += new System.Windows.Forms.KeyEventHandler(this.OnCellEditControl_KeyDown);
      m_CellEditControl.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.OnCellEditControl_KeyPress);
      //m_View.TableViewWindow.Controls.Add(m_CellEditControl);

    }