コード例 #1
0
 public void InitializeBSpread(BSpread bspread)
 {
     bspread.UseSpreadEdit       = false;
     bspread.AutoGenerateColumns = false;
     bspread.ActiveSheet.DefaultStyle.ResetLocked();
     bspread.UseEdit = true;
     bspread.ClearHead();
     bspread.Locked                  = true;
     bspread.UseHeadColor            = true;
     bspread.EditMode                = false;
     bspread.ActiveSheet.RowCount    = 0;
     bspread.ActiveSheet.ColumnCount = 0;
 }
コード例 #2
0
        private void InitializeBTabControl()
        {
            for (int i = 0; i < this._sSelectedContextKeys.Count; i++)
            {
                TabPage tabPage = new TabPage(this._sSelectedContextKeys[i].ToString());
                BSpread bSpread = new BSpread();
                FarPoint.Win.Spread.SheetView bSpread_Sheet1 = new FarPoint.Win.Spread.SheetView();

                bSpread_Sheet1.Reset();
                bSpread_Sheet1.SheetName = "Sheet1";

                bSpread.About = "3.0.2005.2005";
                bSpread.AccessibleDescription = "";
                bSpread.AllowNewRow           = true;
                bSpread.AutoClipboard         = false;
                bSpread.AutoGenerateColumns   = false;
                bSpread.BssClass             = "";
                bSpread.ClickPos             = new System.Drawing.Point(0, 0);
                bSpread.ColFronzen           = 0;
                bSpread.ComboEnable          = true;
                bSpread.DataAutoHeadings     = false;
                bSpread.DataSet              = null;
                bSpread.DateToDateTimeFormat = false;
                bSpread.DefaultDeleteValue   = true;
                bSpread.DisplayColumnHeader  = true;
                bSpread.DisplayRowHeader     = true;
                bSpread.Dock                      = System.Windows.Forms.DockStyle.Fill;
                bSpread.EditModeReplace           = true;
                bSpread.FilterVisible             = false;
                bSpread.HeadHeight                = 20F;
                bSpread.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded;
                bSpread.IsCellCopy                = false;
                bSpread.IsMultiLanguage           = false;
                bSpread.IsReport                  = false;
                bSpread.Key           = "";
                bSpread.Location      = new System.Drawing.Point(3, 3);
                bSpread.Name          = "bSpread";
                bSpread.RowFronzen    = 0;
                bSpread.RowInsertType = BISTel.PeakPerformance.Client.BISTelControl.InsertType.Current;
                bSpread.Sheets.AddRange(new FarPoint.Win.Spread.SheetView[] { bSpread_Sheet1 });
                bSpread.Size                    = new System.Drawing.Size(550, 283);
                bSpread.StyleID                 = null;
                bSpread.TabIndex                = 0;
                bSpread.UseAutoSort             = false;
                bSpread.UseCheckAll             = false;
                bSpread.UseCommandIcon          = false;
                bSpread.UseFilter               = false;
                bSpread.UseGeneralContextMenu   = false;
                bSpread.UseHeadColor            = false;
                bSpread.UseOriginalEvent        = false;
                bSpread.UseSpreadEdit           = true;
                bSpread.UseWidthMemory          = true;
                bSpread.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded;
                bSpread.WhenDeleteUseModify     = false;

                bSpread.ClearHead();
                bSpread.AddHeadComplete();
                bSpread.UseFilter           = false;
                bSpread.FilterVisible       = true;
                bSpread.UseSpreadEdit       = false;
                bSpread.AutoGenerateColumns = false;
                bSpread.IsMultiLanguage     = false;
                this.InitializeBSpread(ref bSpread, this._sSelectedContextKeys[i].ToString());
                bSpread.ButtonClicked += new FarPoint.Win.Spread.EditorNotifyEventHandler(bSpread_ButtonClicked);
                bSpread.Dock           = DockStyle.Fill;


                tabPage.Controls.Add(bSpread);

                this.bTabControl1.Controls.Add(tabPage);
            }
        }
コード例 #3
0
        private void InitializeBSpreadContxt(string sName, DataTable _dt)
        {
            bool bDesc = false;

            bSpreadContext_Sheet1 = new FarPoint.Win.Spread.SheetView();
            bSpreadContext_Sheet1.Reset();
            bSpreadContext_Sheet1.SheetName = "Sheet1";

            bSpreadContext      = new BSpread();
            bSpreadContext.Name = "bSpreadContext_" + sName;
            bSpreadContext.Sheets.AddRange(new FarPoint.Win.Spread.SheetView[] { bSpreadContext_Sheet1 });
            bSpreadContext.UseSpreadEdit       = false;
            bSpreadContext.AutoGenerateColumns = false;
            bSpreadContext.ActiveSheet.DefaultStyle.ResetLocked();
            bSpreadContext.UseEdit = true;
            bSpreadContext.ClearHead();
            bSpreadContext.Locked                    = true;
            bSpreadContext.UseHeadColor              = true;
            bSpreadContext.EditMode                  = false;
            bSpreadContext.ActiveSheet.RowCount      = 0;
            bSpreadContext.ActiveSheet.ColumnCount   = 0;
            bSpreadContext.VerticalScrollBarPolicy   = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded;
            bSpreadContext.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded;
            bSpreadContext.ButtonClicked            += new FarPoint.Win.Spread.EditorNotifyEventHandler(bSpreadContext_ButtonClicked);

            bSpreadContext.DataSource = null;
            bSpreadContext.ClearHead();

            //SPC-777 Louis ContextMenu 삭제;
            bSpreadContext.UseGeneralContextMenu = false;

            //if (sName == Definition.CHART_COLUMN.OPERATION_ID || sName == Definition.CHART_COLUMN.MEASURE_OPERATION_ID) bDesc = true;

            //if (bDesc)
            //{
            //    bSpreadContext.ActiveSheet.ColumnCount = 3;
            //    bSpreadContext.Width = 300;
            //}
            //else
            //{
            //    bSpreadContext.ActiveSheet.ColumnCount = 2;
            //    bSpreadContext.Width = 180;
            //}

            bSpreadContext.AddHead((int)SPCChartConditionContext.SELECT, this._mlthandler.GetVariable(Definition.SpreadHeaderColKey.V_SELECT), COLUMN.SELECT, 40, 20, null, null, null, ColumnAttribute.Null, ColumnType.CheckBox, null, null, null, false, true);
            bSpreadContext.AddHead(1, sName, COLUMN.CONTEXT_VALUE, 80, 20, null, null, null, ColumnAttribute.Null, ColumnType.String, null, null, null, false, true);

            if (bDesc)
            {
                bSpreadContext.AddHead(2, COLUMN.DESCRIPTION, COLUMN.DESCRIPTION, 120, 20, null, null, null, ColumnAttribute.Null, ColumnType.String, null, null, null, false, true);
            }

            bSpreadContext.DataSource = _dt;

            this.bSpreadContext.Width = 40;

            for (int i = 0; i < bSpreadContext.ActiveSheet.Columns.Count; i++)
            {
                float _fSpreadWidth = bSpreadContext.ActiveSheet.Columns[i].GetPreferredWidth();
                this.bSpreadContext.ActiveSheet.Columns[i].Width = _fSpreadWidth;
                this.bSpreadContext.Width += (int)_fSpreadWidth;
            }
        }