/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.Globalization.CultureInfo cultureInfo = new System.Globalization.CultureInfo("en-US", false); FarPoint.Win.Spread.CellType.ButtonCellType buttonCellType1 = new FarPoint.Win.Spread.CellType.ButtonCellType(); FarPoint.Win.Spread.CellType.TextCellType textCellType1 = new FarPoint.Win.Spread.CellType.TextCellType(); FarPoint.Win.Spread.CellType.TextCellType textCellType2 = new FarPoint.Win.Spread.CellType.TextCellType(); FarPoint.Win.Spread.CellType.TextCellType textCellType3 = new FarPoint.Win.Spread.CellType.TextCellType(); FarPoint.Win.Spread.CellType.ComboBoxCellType comboBoxCellType1 = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form2)); this.fpSpread1 = new FarPoint.Win.Spread.FpSpread(); this.sheet1 = new FarPoint.Win.Spread.SheetView(); this.tmTick = new System.Windows.Forms.Timer(this.components); ((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.sheet1)).BeginInit(); this.SuspendLayout(); // // fpSpread1 // this.fpSpread1.AccessibleDescription = "fpSpread1, Sheet1, Row 0, Column 0, "; this.fpSpread1.AllowUndo = false; this.fpSpread1.AllowUserZoom = false; this.fpSpread1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.fpSpread1.AutoClipboard = false; this.fpSpread1.BorderCollapse = FarPoint.Win.Spread.BorderCollapse.Collapse; this.fpSpread1.BorderStyle = System.Windows.Forms.BorderStyle.None; this.fpSpread1.CellNoteIndicatorVisible = false; this.fpSpread1.ColumnSplitBoxPolicy = FarPoint.Win.Spread.SplitBoxPolicy.Never; this.fpSpread1.EnableCrossSheetReference = false; this.fpSpread1.HorizontalScrollBar.Buttons = new FarPoint.Win.Spread.FpScrollBarButtonCollection(""); this.fpSpread1.HorizontalScrollBar.Name = ""; this.fpSpread1.HorizontalScrollBar.TabIndex = 8; this.fpSpread1.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never; this.fpSpread1.Location = new System.Drawing.Point(0, 0); this.fpSpread1.Margin = new System.Windows.Forms.Padding(0); this.fpSpread1.MoveActiveOnFocus = false; this.fpSpread1.Name = "fpSpread1"; this.fpSpread1.RowSplitBoxPolicy = FarPoint.Win.Spread.SplitBoxPolicy.Never; this.fpSpread1.SelectionBlockOptions = FarPoint.Win.Spread.SelectionBlockOptions.None; this.fpSpread1.Sheets.AddRange(new FarPoint.Win.Spread.SheetView[] { this.sheet1}); this.fpSpread1.Size = new System.Drawing.Size(399, 499); this.fpSpread1.SpreadScaleMode = FarPoint.Win.Spread.ScaleMode.ZoomDpiSupport; this.fpSpread1.TabIndex = 0; this.fpSpread1.TabStrip.ButtonPolicy = FarPoint.Win.Spread.TabStripButtonPolicy.Never; this.fpSpread1.VerticalScrollBar.Buttons = new FarPoint.Win.Spread.FpScrollBarButtonCollection(""); this.fpSpread1.VerticalScrollBar.Name = ""; this.fpSpread1.VerticalScrollBar.TabIndex = 9; this.fpSpread1.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never; this.fpSpread1.CellClick += new FarPoint.Win.Spread.CellClickEventHandler(this.fpSpread1_CellClick); this.fpSpread1.CellDoubleClick += new FarPoint.Win.Spread.CellClickEventHandler(this.fpSpread1_CellDoubleClick); this.fpSpread1.ButtonClicked += new FarPoint.Win.Spread.EditorNotifyEventHandler(this.fpSpread1_ButtonClicked); this.fpSpread1.ComboCloseUp += new FarPoint.Win.Spread.EditorNotifyEventHandler(this.fpSpread1_ComboCloseUp); this.fpSpread1.ComboSelChange += new FarPoint.Win.Spread.EditorNotifyEventHandler(this.fpSpread1_ComboSelChange); this.fpSpread1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.fpSpread1_KeyDown); // // sheet1 // this.sheet1.Reset(); this.sheet1.SheetName = "Sheet1"; // Formulas and custom names must be loaded with R1C1 reference style this.sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.R1C1; this.sheet1.ColumnCount = 20; this.sheet1.RowCount = 25; this.sheet1.AllowNoteEdit = false; this.sheet1.AutoCalculation = false; this.sheet1.AutoGenerateColumns = false; this.sheet1.AutoUpdateNotes = false; this.sheet1.Cells.Get(0, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 0).ForeColor = System.Drawing.Color.Black; this.sheet1.Cells.Get(0, 0).Locked = true; this.sheet1.Cells.Get(0, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 1).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 1).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 1).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 2).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 2).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 2).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 3).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 3).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 3).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 4).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 4).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 4).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 5).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 5).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 5).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 6).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 6).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 6).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 7).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 7).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 7).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 8).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 8).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 8).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 9).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 9).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 9).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 10).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 10).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 10).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 11).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 11).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 11).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 12).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 12).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 12).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 13).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 13).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 13).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 14).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 14).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 14).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 15).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 15).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 15).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 16).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 16).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 16).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 17).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 17).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 17).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 18).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 18).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 18).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(0, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(0, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(0, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 1).BackColor = System.Drawing.SystemColors.ControlLight; buttonCellType1.ButtonColor2 = System.Drawing.SystemColors.ButtonFace; buttonCellType1.HotkeyPrefix = System.Drawing.Text.HotkeyPrefix.Show; buttonCellType1.Text = "&New Game"; this.sheet1.Cells.Get(1, 1).CellType = buttonCellType1; this.sheet1.Cells.Get(1, 1).ColumnSpan = 3; this.sheet1.Cells.Get(1, 1).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 1).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 2).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 2).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 2).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 3).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 3).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 3).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 4).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 4).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 4).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 5).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 5).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 5).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 6).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 6).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 6).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 7).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 7).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 7).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 8).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 8).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 8).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 9).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 9).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 9).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 10).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 10).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 10).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 11).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 11).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 11).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 12).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 12).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 12).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 13).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 13).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 13).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 14).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 14).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 14).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 15).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 15).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 15).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(1, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(1, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(1, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(2, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(2, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 1).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(2, 1).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(2, 1).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 2).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(2, 2).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(2, 2).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 3).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(2, 3).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(2, 3).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 4).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(2, 4).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(2, 4).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 5).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(2, 5).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(2, 5).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 6).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(2, 6).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(2, 6).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 7).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(2, 7).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(2, 7).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 8).BackColor = System.Drawing.SystemColors.ControlLight; textCellType1.ReadOnly = true; this.sheet1.Cells.Get(2, 8).CellType = textCellType1; this.sheet1.Cells.Get(2, 8).ColumnSpan = 2; this.sheet1.Cells.Get(2, 8).ForeColor = System.Drawing.Color.Black; this.sheet1.Cells.Get(2, 8).Value = "Score:"; this.sheet1.Cells.Get(2, 8).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 9).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(2, 9).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(2, 9).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 10).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(2, 10).ColumnSpan = 5; this.sheet1.Cells.Get(2, 10).ForeColor = System.Drawing.Color.Black; this.sheet1.Cells.Get(2, 10).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left; this.sheet1.Cells.Get(2, 10).ParseFormatInfo = ((System.Globalization.NumberFormatInfo)(cultureInfo.NumberFormat.Clone())); ((System.Globalization.NumberFormatInfo)(this.sheet1.Cells.Get(2, 10).ParseFormatInfo)).NumberDecimalDigits = 0; ((System.Globalization.NumberFormatInfo)(this.sheet1.Cells.Get(2, 10).ParseFormatInfo)).NumberGroupSizes = new int[] { 0}; this.sheet1.Cells.Get(2, 10).ParseFormatString = "n"; this.sheet1.Cells.Get(2, 10).Value = 0; this.sheet1.Cells.Get(2, 10).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 11).BackColor = System.Drawing.SystemColors.ControlLight; textCellType2.ReadOnly = true; this.sheet1.Cells.Get(2, 11).CellType = textCellType2; this.sheet1.Cells.Get(2, 11).ForeColor = System.Drawing.Color.Black; this.sheet1.Cells.Get(2, 11).Value = "Score:"; this.sheet1.Cells.Get(2, 11).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 13).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(2, 13).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(2, 13).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 14).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(2, 14).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(2, 14).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 15).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(2, 15).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(2, 15).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(2, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(2, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(2, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(3, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(3, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 1).BackColor = System.Drawing.SystemColors.ControlLight; textCellType3.HotkeyPrefix = System.Drawing.Text.HotkeyPrefix.Show; textCellType3.ReadOnly = true; this.sheet1.Cells.Get(3, 1).CellType = textCellType3; this.sheet1.Cells.Get(3, 1).ColumnSpan = 2; this.sheet1.Cells.Get(3, 1).ForeColor = System.Drawing.Color.Black; this.sheet1.Cells.Get(3, 1).Value = "&Level"; this.sheet1.Cells.Get(3, 1).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 2).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(3, 2).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(3, 2).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 3).BackColor = System.Drawing.Color.White; comboBoxCellType1.AutoSearch = FarPoint.Win.AutoSearch.None; comboBoxCellType1.ButtonAlign = FarPoint.Win.ButtonAlign.Right; comboBoxCellType1.EditorValue = FarPoint.Win.Spread.CellType.EditorValue.ItemData; comboBoxCellType1.ItemData = new string[] { "1", "2", "3"}; comboBoxCellType1.Items = new string[] { "Slow", "Normal", "Fast"}; this.sheet1.Cells.Get(3, 3).CellType = comboBoxCellType1; this.sheet1.Cells.Get(3, 3).ColumnSpan = 3; this.sheet1.Cells.Get(3, 3).ForeColor = System.Drawing.Color.Black; this.sheet1.Cells.Get(3, 3).Value = "2"; this.sheet1.Cells.Get(3, 3).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 4).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(3, 4).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(3, 4).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 5).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(3, 5).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(3, 5).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 6).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(3, 6).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(3, 6).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 7).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(3, 7).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(3, 7).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 8).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(3, 8).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(3, 8).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 9).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(3, 9).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(3, 9).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 10).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(3, 10).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(3, 10).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 11).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(3, 11).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(3, 11).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 12).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(3, 12).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(3, 12).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 13).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(3, 13).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(3, 13).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 14).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(3, 14).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(3, 14).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 15).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(3, 15).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(3, 15).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(3, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(3, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(3, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 1).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 1).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 1).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 2).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 2).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 2).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 3).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 3).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 3).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 4).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 4).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 4).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 5).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 5).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 5).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 6).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 6).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 6).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 7).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 7).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 7).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 8).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 8).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 8).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 9).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 9).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 9).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 10).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 10).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 10).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 11).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 11).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 11).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 12).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 12).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 12).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 13).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 13).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 13).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 14).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 14).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 14).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 15).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 15).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 15).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 16).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 16).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 16).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 17).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 17).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 17).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 18).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(4, 18).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(4, 18).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(4, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(5, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(5, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(5, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(5, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(5, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(5, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(6, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(6, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(6, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(6, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(6, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(6, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(7, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(7, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(7, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(7, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(7, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(7, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(8, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(8, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(9, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(9, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(9, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(9, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(9, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(9, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(10, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(10, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(10, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(10, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(10, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(10, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(11, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(11, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(11, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(11, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(11, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(11, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(12, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(12, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(12, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(12, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(12, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(12, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(13, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(13, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(14, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(14, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(14, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(14, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(14, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(14, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(15, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(15, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(15, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(15, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(15, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(15, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(16, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(16, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(16, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(16, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(16, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(16, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(17, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(17, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(17, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(17, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(17, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(17, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(18, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(18, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(19, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(19, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(19, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(19, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(19, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(19, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(20, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(20, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(20, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(20, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(20, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(20, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(21, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(21, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(21, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(21, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(21, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(21, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(22, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(22, 0).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(22, 0).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(22, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(22, 19).ForeColor = System.Drawing.Color.Silver; this.sheet1.Cells.Get(22, 19).VisualStyles = FarPoint.Win.VisualStyles.Off; this.sheet1.Cells.Get(23, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(23, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(24, 0).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(24, 1).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.Cells.Get(24, 1).ColumnSpan = 18; this.sheet1.Cells.Get(24, 19).BackColor = System.Drawing.SystemColors.ControlLight; this.sheet1.ColumnFooter.Columns.Default.Width = 20F; this.sheet1.ColumnHeader.Visible = false; this.sheet1.Columns.Default.Width = 20F; this.sheet1.DataAutoCellTypes = false; this.sheet1.DataAutoHeadings = false; this.sheet1.DataAutoSizeColumns = false; this.sheet1.DrawingContainer.ContainedObjects.AddRange(new object[] { ((object)(resources.GetObject("resource.ContainedObjects")))}); this.sheet1.DrawingContainer.FlipHorizontal = false; this.sheet1.DrawingContainer.FlipVertical = false; this.sheet1.DrawingContainer.IgnoreUpdateShapeLocation = false; this.sheet1.HorizontalGridLine = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, System.Drawing.SystemColors.ControlLight); this.sheet1.RowHeader.Columns.Default.Resizable = false; this.sheet1.RowHeader.Visible = false; this.sheet1.SelectionStyle = FarPoint.Win.Spread.SelectionStyles.None; this.sheet1.SheetCornerHorizontalGridLine = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Raised, System.Drawing.SystemColors.ControlLight, System.Drawing.SystemColors.ControlLight, System.Drawing.SystemColors.ControlLight); this.sheet1.VerticalGridLine = new FarPoint.Win.Spread.GridLine(FarPoint.Win.Spread.GridLineType.Flat, System.Drawing.SystemColors.ControlLight, System.Drawing.SystemColors.ControlLight, System.Drawing.SystemColors.ControlLight); this.sheet1.ReferenceStyle = FarPoint.Win.Spread.Model.ReferenceStyle.A1; // // tmTick // this.tmTick.Interval = 400; this.tmTick.Tick += new System.EventHandler(this.tmTick_Tick); // // Form2 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoValidate = System.Windows.Forms.AutoValidate.Disable; this.ClientSize = new System.Drawing.Size(398, 499); this.Controls.Add(this.fpSpread1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "Form2"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Form2"; ((System.ComponentModel.ISupportInitialize)(this.fpSpread1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.sheet1)).EndInit(); this.ResumeLayout(false); }
private void frmPageSize_Load(object sender, System.EventArgs e) { Neusoft.HISFC.BizLogic.Manager.Department dept = new Neusoft.HISFC.BizLogic.Manager.Department(); ArrayList al = dept.GetDeptmentAll(); Neusoft.FrameWork.Models.NeuObject objAll = new Neusoft.FrameWork.Models.NeuObject(); objAll.ID = "ALL"; objAll.Name = "全部"; al.Add(objAll); helper = new Neusoft.FrameWork.Public.ObjectHelper(al); FarPoint.Win.Spread.CellType.ComboBoxCellType c = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); string[] s = new string[al.Count + 1]; int i = 0; foreach (Neusoft.FrameWork.Models.NeuObject obj in al) { s[i] = obj.Name; i++; } s[i] = "ALL"; c.Items = s; this.fpSpread1.Sheets[0].Columns[8].CellType = c; dept = null; this.Retrieve(); //MessageBox.Show(manager.GetPageSize("operation1").Name); }
private void InitSheetUser(FarPoint.Win.Spread.FpSpread spreadUser) { FarPoint.Win.Spread.FpSpread spread = spreadUser; spread.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded; spread.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded; spread.CellClick += SpreadUser_CellClick; FarPoint.Win.Spread.SheetView sheet = spread.Sheets[0]; sheet.DefaultStyle.HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; sheet.DefaultStyle.VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center; sheet.Rows.Count = 0; sheet.Columns.Count = Enum.GetNames(typeof(E_USER)).Length; sheet.ColumnHeader.Rows[0].Height = 35; sheet.ColumnHeader.Cells[0, (int)E_USER.USER_SEQ].Value = "SEQ"; sheet.ColumnHeader.Cells[0, (int)E_USER.USER_ID].Value = "ID"; sheet.ColumnHeader.Cells[0, (int)E_USER.USER_PWD].Value = "PASSOWRD"; sheet.ColumnHeader.Cells[0, (int)E_USER.USER_NAME].Value = "NAME"; sheet.ColumnHeader.Cells[0, (int)E_USER.USER_TYPE].Value = "TYPE"; sheet.ColumnHeader.Cells[0, (int)E_USER.USER_PROGRAM].Value = "PROGRAM"; sheet.Columns[(int)E_USER.USER_SEQ].Visible = false; sheet.Columns[(int)E_USER.USER_PROGRAM].Visible = false; sheet.Columns.Default.Width = 120; FarPoint.Win.Spread.CellType.ComboBoxCellType cbCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType() { Items = new string[] { E_AUTHORITY.Administrator.ToString(), E_AUTHORITY.Member.ToString() }, Editable = false }; sheet.Columns[(int)E_USER.USER_TYPE].CellType = cbCellType; }
private void setGrdViewHM20() { FarPoint.Win.Spread.CellType.CurrencyCellType ctest = new FarPoint.Win.Spread.CellType.CurrencyCellType(); FarPoint.Win.Spread.CellType.TextCellType objTextCell = new FarPoint.Win.Spread.CellType.TextCellType(); FarPoint.Win.Spread.CellType.ButtonCellType buttencell = new FarPoint.Win.Spread.CellType.ButtonCellType(); FarPoint.Win.Spread.CellType.ComboBoxCellType combocell = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); combocell.Items = sC.mHisDB.fm20; grdView.Sheets[2].ColumnCount = colBMCnt; grdView.Sheets[2].OperationMode = FarPoint.Win.Spread.OperationMode.RowMode; grdView.Sheets[2].ColumnHeader.Cells[0, colBMedit].Text = "edit"; grdView.Sheets[2].ColumnHeader.Cells[0, colBMsave].Text = "save"; grdView.Sheets[2].ColumnHeader.Cells[0, colBMCode].Text = "code"; grdView.Sheets[2].ColumnHeader.Cells[0, colBMDesc].Text = "Description"; //grdView.Sheets[1].ColumnHeader.Cells[0, colM06Grpss2].Text = "edit"; grdView.Sheets[2].Columns[colBMedit].Width = 50; grdView.Sheets[2].Columns[colBMsave].Width = 50; grdView.Sheets[2].Columns[colBMCode].Width = 80; grdView.Sheets[2].Columns[colBMDesc].Width = 200; //grdView.Sheets[1].Columns[colM06Grpss2].Width = 50; //grdView.Sheets[0].Columns[colE].Width = 50; grdView.Sheets[2].Columns[colBMedit].CellType = buttencell; grdView.Sheets[2].Columns[colBMsave].CellType = buttencell; grdView.Sheets[2].Columns[colBMCode].CellType = objTextCell; grdView.Sheets[2].Columns[colBMDesc].CellType = objTextCell; //grdView.Sheets[1].Columns[colM06Grpss2].CellType = objTextCell; }
/// <summary> /// 初始化 /// </summary> private void Initialize() { //初始化comboxCellType //参数管理类 Neusoft.HISFC.BizLogic.Manager.Constant constant = new Neusoft.HISFC.BizLogic.Manager.Constant(); alUsage = constant.GetList(Neusoft.HISFC.Models.Base.EnumConstant.USAGE); string [] s = new string[alUsage.Count + 1]; s[0] = "全部"; for (int i = 0; i < alUsage.Count; i++) { s[i + 1] = ((Neusoft.FrameWork.Models.NeuObject)alUsage[i]).Name; } try { comboBox = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); comboBox.Items = s; } catch (Exception a) { MessageBox.Show(a.Message); } ; constantData = InitialDataSet();//初始化数据集 //根据科室编码填充数据到数据集 LoadData(this.DeptCode); this.neuSpread1_Sheet1.DataSource = constantData; this.neuSpread1_Sheet1.SelectionBackColor = Color.YellowGreen; this.neuSpread1_Sheet1.Columns[-1].AllowAutoSort = true; //是否自动排序 this.neuSpread1_Sheet1.Columns[2].Visible = false; //用法编码隐藏 this.neuSpread1_Sheet1.Columns[3].CellType = comboBox; //用法名称 FarPoint.Win.Spread.CellType.TextCellType t = new FarPoint.Win.Spread.CellType.TextCellType(); t.SubEditor = new ucFrequencyTimeEdit(); this.neuSpread1_Sheet1.Columns[4].CellType = t; }
private void neuSpread1_EditModeOff(object sender, EventArgs e) { if (!this.inited) { return; } int activeRowIndex = this.neuSpread1_Sheet1.ActiveRowIndex; int activeColumnIndex = this.neuSpread1_Sheet1.ActiveColumnIndex; ReportPrint reportPrint = this.neuSpread1_Sheet1.Rows[activeRowIndex].Tag as ReportPrint; if (this.neuSpread1_Sheet1.ActiveColumnIndex == 0) { reportPrint.ContainerDllName = this.neuSpread1_Sheet1.Cells[activeRowIndex, 0].Text; string[] r = this.GetControlNames(this.neuSpread1_Sheet1.Cells[activeRowIndex, activeColumnIndex].Text, typeof(IInterfaceContainer)); if (r == null) { return; } FarPoint.Win.Spread.CellType.ComboBoxCellType comboBoxCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); comboBoxCellType.Items = r; this.neuSpread1_Sheet1.Cells[activeRowIndex, 1].CellType = comboBoxCellType; } }
/// <summary> /// 初始化 /// </summary> public void Init() { Neusoft.HISFC.BizLogic.Manager.Constant consManager = new Neusoft.HISFC.BizLogic.Manager.Constant(); System.Collections.ArrayList alTypelist = consManager.GetList(Neusoft.HISFC.Models.Base.EnumConstant.ITEMTYPE); if (alTypelist == null) { MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("加载药品列表失败") + consManager.Err); return; } this.itemTypeHelper = new Neusoft.FrameWork.Public.ObjectHelper(alTypelist); FarPoint.Win.Spread.CellType.ComboBoxCellType cmbCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); string[] strItemType = new string[alTypelist.Count]; for (int i = 0; i < strItemType.Length; i++) { Neusoft.HISFC.Models.Base.Const tempCons = alTypelist[i] as Neusoft.HISFC.Models.Base.Const; strItemType[i] = "<" + tempCons.ID + ">" + tempCons.Name; } cmbCellType.Items = strItemType; this.neuSpread1_Sheet1.Columns[0].CellType = cmbCellType; Neusoft.HISFC.BizLogic.Manager.Person personManager = new Neusoft.HISFC.BizLogic.Manager.Person(); this.alPerson = personManager.GetEmployeeAll(); if (this.alPerson == null) { MessageBox.Show(Neusoft.FrameWork.Management.Language.Msg("加载人员列表失败") + personManager.Err); return; } }
private void ucSubtblManagement_Load(object sender, EventArgs e) { //{24F859D1-3399-4950-A79D-BCCFBEEAB939} this.neuSpread1_Sheet1.ColumnCount = 6; FarPoint.Win.Spread.CellType.ComboBoxCellType cbxItemType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); cbxItemType.Items = new string[] { " ", "24H" }; this.neuSpread1_Sheet1.Columns[5].CellType = cbxItemType; this.neuSpread1_Sheet1.RowCount = 0; this.neuSpread1_Sheet1.Columns[5].Label = "间隔"; this.neuSpread1_Sheet1.Columns[0].Label = "项目名称"; this.neuSpread1_Sheet1.Columns[1].Label = "数量"; this.neuSpread1_Sheet1.Columns[2].Label = "单位"; try { this.neuRadioButton1.Checked = true; this.InitControl(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
/// <summary> /// 向Fp内加入数据 /// </summary> /// <param name="msCustomLis">药品设置信息</param> /// <returns>成功返回1 失败返回-1</returns> protected int AddDataToFp(List <Neusoft.HISFC.Models.Pharmacy.MSCustom> msCustomLis) { this.neuSpread1_Sheet1.Rows.Count = 0; foreach (Neusoft.HISFC.Models.Pharmacy.MSCustom info in msCustomLis) { this.neuSpread1_Sheet1.Rows.Add(0, 1); this.neuSpread1_Sheet1.Cells[0, 0].Text = info.CustomItem.ID; this.neuSpread1_Sheet1.Cells[0, 1].Text = info.CustomItem.Name; this.neuSpread1_Sheet1.Cells[0, 2].Text = Neusoft.HISFC.Models.Base.EnumMSCustomTypeService.GetNameFromEnum(info.CustomType); this.neuSpread1_Sheet1.Cells[0, 3].Text = info.CustomType.ToString(); this.neuSpread1_Sheet1.Cells[0, 6].Text = info.Trans == Neusoft.HISFC.Models.Base.TransTypes.Positive ? "收入" : "支出"; this.neuSpread1_Sheet1.Cells[0, 4].Text = info.TypeItem; FarPoint.Win.Spread.CellType.ComboBoxCellType cmbCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); cmbCellType.Items = this.GetDescriptionFromType(info.CustomType, info.Trans); this.neuSpread1_Sheet1.Cells[0, 5].CellType = cmbCellType; this.neuSpread1_Sheet1.Cells[0, 5].Text = this.GetDescriptionFromTypeItem(info.CustomType, info.TypeItem, info.Trans); this.neuSpread1_Sheet1.Cells[0, 7].Text = info.ID; this.neuSpread1_Sheet1.Rows[0].Tag = info; } return(1); }
/// <summary> /// Fp格式化 /// </summary> private void SetCol() { FarPoint.Win.Spread.CellType.ComboBoxCellType cel = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); ArrayList alQuality = Neusoft.HISFC.Models.Pharmacy.DrugQualityEnumService.List(); //定义字符串数组,保存系统药品性质 string[] item = new string[alQuality.Count]; int index = 0; //取药品性质列表,保存在字符串数组中 foreach (Neusoft.FrameWork.Models.NeuObject info in alQuality) { item[index] = (info.ID + info.Name); index++; } cel.Items = item; this.neuSpread1_Sheet1.Columns[(int)ColumnSet.ColSysType].CellType = cel; for (int i = 0; i < this.neuSpread1_Sheet1.Rows.Count; i++) { if (this.neuSpread1_Sheet1.Cells[i, (int)ColumnSet.ColFlag].Text == "Old") { this.neuSpread1_Sheet1.Cells[i, (int)ColumnSet.ColID].Locked = true; this.neuSpread1_Sheet1.Cells[i, (int)ColumnSet.ColSysType].Locked = true; } else { this.neuSpread1_Sheet1.Cells[i, (int)ColumnSet.ColID].Locked = false; this.neuSpread1_Sheet1.Cells[i, (int)ColumnSet.ColSysType].Locked = false; } } }
/// <summary> /// 显示三级权限 /// </summary> public void ShowClass3() { //{42AB2AC3-EAC6-4b7d-9102-4997B2E9AAAA} 增加二级权限报错 if (this.operClass2Priv == null || string.IsNullOrEmpty(this.operClass2Priv.Class2Code)) { this.fpClass3_Sheet1.RowCount = 0; return; } //取三级权限 ArrayList al = class3Manager.LoadLevel3ByLevel2(this.operClass2Priv.Class2Code); if (al == null) { MessageBox.Show(Language.Msg(class2Manager.Err)); return; } string[] class3JoinCollection = this.ShowClass3JoinPriv(); if (class3JoinCollection != null) { //创建ComboBoxCellType,填充系统类型列 FarPoint.Win.Spread.CellType.ComboBoxCellType combo = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); //将ComboBoxCellType付给三级权限的对应列 combo.Items = class3JoinCollection; this.fpClass3_Sheet1.Columns[5].CellType = combo; } else { //创建ComboBoxCellType,填充系统类型列 FarPoint.Win.Spread.CellType.ComboBoxCellType combo = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); //将ComboBoxCellType付给三级权限的对应列 combo.Items = new string[1]; this.fpClass3_Sheet1.Columns[5].CellType = combo; } //显示三级权限 this.fpClass3_Sheet1.RowCount = al.Count; for (int i = 0; i < al.Count; i++) { Neusoft.HISFC.Models.Admin.PowerLevelClass3 info = al[i] as Neusoft.HISFC.Models.Admin.PowerLevelClass3; this.fpClass3_Sheet1.Cells[i, 0].Text = info.ID; this.fpClass3_Sheet1.Cells[i, 1].Text = info.Name; this.fpClass3_Sheet1.Cells[i, 2].Text = info.Class3MeaningCode; this.fpClass3_Sheet1.Cells[i, 3].Text = info.Class3MeaningName; this.fpClass3_Sheet1.Cells[i, 4].Text = info.Class3JoinCode; if (this.hsClass3JoinCode.ContainsKey(info.Class3JoinCode)) { this.fpClass3_Sheet1.Cells[i, 5].Text = this.hsClass3JoinCode[info.Class3JoinCode] as string; } this.fpClass3_Sheet1.Cells[i, 6].Text = info.Memo; this.fpClass3_Sheet1.Rows[i].Tag = info; } }
/// <summary> /// 双击鼠标增加当前财务组内人员信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void fpEmployee_CellDoubleClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e) { try { int ActiveFinance; //当前财务组行 int ActiveEmployee; //当前人员行 ActiveFinance = 0; ActiveEmployee = 0; //提取人员列表活动行索引 if (fpEmployee_Sheet1.RowCount > 0) { ActiveEmployee = fpEmployee_Sheet1.ActiveRow.Index; } else { MessageBox.Show("当前人员列表中没有记录,请检查!"); } //提取财务组列表活动行索引 if (fpGroup_Sheet1.RowCount > 0) { ActiveFinance = fpGroup_Sheet1.ActiveRow.Index; if (ActiveFinance == null) { ActiveFinance = 1; } } else { MessageBox.Show("当前财务组列表中没有记录,请检查!"); } feeFinanceGroup.Employee.ID = fpEmployee_Sheet1.Cells[ActiveEmployee, 0].Text.Trim().ToString(); feeFinanceGroup.Employee.Name = fpEmployee_Sheet1.Cells[ActiveEmployee, 1].Text.Trim().ToString(); feeFinanceGroup.ID = fpGroup_Sheet1.Cells[ActiveFinance, 0].Text.Trim().ToString(); feeFinanceGroup.Name = fpGroup_Sheet1.Cells[ActiveFinance, 1].Text.Trim().ToString(); string pkId = Convert.ToString(feeEmplFinanceGroup.GetMaxPkID()); dtFinanceEmployee.Rows.Add(new object[] { feeFinanceGroup.ID, feeFinanceGroup.Name, feeFinanceGroup.Employee.ID, feeFinanceGroup.Employee.Name, "有效", "0", pkId }); FarPoint.Win.Spread.CellType.ComboBoxCellType comboValidState = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); comboValidState.Items = new String[] { "有效", "停用", "废弃" }; fpGroupEmployee_Sheet1.Cells[dtFinanceEmployee.Rows.Count - 1, 4].CellType = comboValidState; } catch (Exception ee) { MessageBox.Show(ee.Message); } }
private void setGrdViewH() { FarPoint.Win.Spread.EnhancedInterfaceRenderer outlinelook = new FarPoint.Win.Spread.EnhancedInterfaceRenderer(); outlinelook.RangeGroupBackgroundColor = Color.LightGreen; outlinelook.RangeGroupButtonBorderColor = Color.Red; outlinelook.RangeGroupLineColor = Color.Blue; grdView.InterfaceRenderer = outlinelook; grdView.BorderStyle = BorderStyle.None; grdView.Sheets[0].Columns[2, colgrd].AllowAutoFilter = true; grdView.Sheets[0].Columns[2, colgrd].AllowAutoSort = true; grdView.Sheets[0].AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu; FarPoint.Win.Spread.CellType.NumberCellType objNumCell = new FarPoint.Win.Spread.CellType.NumberCellType(); objNumCell.DecimalPlaces = 0; objNumCell.MinimumValue = 1; objNumCell.MaximumValue = 9999; objNumCell.ShowSeparator = false; FarPoint.Win.Spread.CellType.DateTimeCellType datecell = new FarPoint.Win.Spread.CellType.DateTimeCellType(); datecell.DateSeparator = " | "; datecell.TimeSeparator = "."; datecell.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.ShortDateWithTime; FarPoint.Win.Spread.CellType.CurrencyCellType ctest = new FarPoint.Win.Spread.CellType.CurrencyCellType(); FarPoint.Win.Spread.CellType.TextCellType objTextCell = new FarPoint.Win.Spread.CellType.TextCellType(); FarPoint.Win.Spread.CellType.ButtonCellType buttencell = new FarPoint.Win.Spread.CellType.ButtonCellType(); FarPoint.Win.Spread.CellType.ComboBoxCellType combocell = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); combocell.Items = sC.mHisDB.fm20; //grdView.Sheets.Count = 1; grdView.Sheets[0].ColumnCount = colCnt; grdView.Sheets[0].OperationMode = FarPoint.Win.Spread.OperationMode.RowMode; grdView.Sheets[0].ColumnHeader.Cells[0, colE].Text = "edit"; grdView.Sheets[0].ColumnHeader.Cells[0, colS].Text = "save"; grdView.Sheets[0].ColumnHeader.Cells[0, colCode].Text = "FN_CD"; grdView.Sheets[0].ColumnHeader.Cells[0, colDesc].Text = "Description"; grdView.Sheets[0].ColumnHeader.Cells[0, colGrpss2].Text = "grd_ss_2"; grdView.Sheets[0].ColumnHeader.Cells[0, colgrd].Text = "GRD_CD"; grdView.Sheets[0].Columns[colE].Width = 50; grdView.Sheets[0].Columns[colS].Width = 50; grdView.Sheets[0].Columns[colCode].Width = 80; grdView.Sheets[0].Columns[colDesc].Width = 250; grdView.Sheets[0].Columns[colGrpss2].Width = 250; grdView.Sheets[0].Columns[colgrd].Width = 300; grdView.Sheets[0].Columns[colE].CellType = buttencell; grdView.Sheets[0].Columns[colS].CellType = buttencell; grdView.Sheets[0].Columns[colCode].CellType = objTextCell; grdView.Sheets[0].Columns[colDesc].CellType = objTextCell; grdView.Sheets[0].Columns[colgrd].CellType = objTextCell; grdView.Sheets[0].Columns[colGrpss2].CellType = combocell; grdView.Sheets[0].Columns[coledit].Visible = false; }
/// <summary> /// cell에 지정한 combobox에 값을 넣어준다. /// </summary> /// <param name="comboItems"></param> /// <param name="comboItemData"></param> /// <returns></returns> private FarPoint.Win.Spread.CellType.ComboBoxCellType MakeComboBoxCellType(string[] comboItems, string[] comboItemData) { FarPoint.Win.Spread.CellType.ComboBoxCellType comboBoxCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); comboBoxCellType.Items = comboItems; comboBoxCellType.ItemData = comboItemData; comboBoxCellType.MaxDrop = 20; // default 8을 늘림 comboBoxCellType.EditorValue = FarPoint.Win.Spread.CellType.EditorValue.ItemData; // 이 부분이 빠지면 안됨 // comboBoxCellType.Editable = true; // 이러면 combobox에 입력이 가능해진다 return(comboBoxCellType); }
/// <summary> /// 设置Fp分类内容 /// </summary> /// <param name="iRow"></param> private void SetTypeItem(int iRow) { EnumMSCustomType customType = EnumMSCustomTypeService.GetEnumFromName(this.neuSpread1_Sheet1.Cells[iRow, 2].Text); TransTypes trans = this.neuSpread1_Sheet1.Cells[iRow, 6].Text.Trim() == "收入" ? TransTypes.Positive : TransTypes.Negative; FarPoint.Win.Spread.CellType.ComboBoxCellType typeItemCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); typeItemCellType.Items = this.GetDescriptionFromType(customType, trans); this.neuSpread1_Sheet1.Cells[iRow, 5].CellType = typeItemCellType; }
/// <summary> /// 显示系统权限 /// </summary> public void ShowClass3Meaning() { //{42AB2AC3-EAC6-4b7d-9102-4997B2E9AAAA} 增加二级权限报错 //if (this.operClass2Priv == null) if (this.operClass2Priv == null || string.IsNullOrEmpty(this.operClass2Priv.Class2Code)) { this.fpClass3Meaning_Sheet1.RowCount = 0; return; } //取系统权限 alClass3Meaning = class3Manager.LoadLevel3Meaning(this.operClass2Priv.Class2Code); if (alClass3Meaning == null) { MessageBox.Show(Language.Msg(class3Manager.Err)); return; } //取系统权限数组 string[] items = new string[this.alClass3Meaning.Count]; int index = 0; //显示系统权限 this.fpClass3Meaning_Sheet1.RowCount = alClass3Meaning.Count; Neusoft.FrameWork.Models.NeuObject info; for (int i = 0; i < alClass3Meaning.Count; i++) { info = alClass3Meaning[i] as Neusoft.FrameWork.Models.NeuObject; this.fpClass3Meaning_Sheet1.Cells[i, 0].Text = info.ID; this.fpClass3Meaning_Sheet1.Cells[i, 1].Text = info.Name; this.fpClass3Meaning_Sheet1.Cells[i, 2].Text = info.Memo; this.fpClass3Meaning_Sheet1.Rows[i].Tag = info; items[index] = info.Name; index++; } //如果此二级权限下没有系统权限,则默认二级权限名称,编码为01 if (alClass3Meaning.Count == 0) { items = new string[1]; items[0] = this.operClass2Priv.Class2Name; } //创建ComboBoxCellType,填充系统类型列 FarPoint.Win.Spread.CellType.ComboBoxCellType combo = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); //将ComboBoxCellType付给三级权限的对应列 combo.Items = items; this.fpClass3_Sheet1.Columns[3].CellType = combo; }
protected void Init() { this.neuSpread1_Sheet1.GrayAreaBackColor = System.Drawing.Color.White; //生成性别下拉列表 FarPoint.Win.Spread.CellType.ComboBoxCellType celType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); objSex.ArrayObject = Neusoft.HISFC.Models.Base.SexEnumService.List(); string[] str = new string[objSex.ArrayObject.Count]; for (int i = 0; i < objSex.ArrayObject.Count; i++) { str[i] = this.objSex.ArrayObject[i].ToString(); } celType.Items = str; this.neuSpread1_Sheet1.Columns[7].CellType = celType; //生成计划生育下拉列表 FarPoint.Win.Spread.CellType.ComboBoxCellType celType1 = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); this.familyPlanning.ArrayObject = this.constant.GetConstantList("FAMILYPLANNING"); string[] str1 = new string[this.familyPlanning.ArrayObject.Count]; for (int i = 0; i < this.familyPlanning.ArrayObject.Count; i++) { str1[i] = this.familyPlanning.ArrayObject[i].ToString(); } celType1.Items = str1; this.neuSpread1_Sheet1.Columns[2].CellType = celType1; //生成产妇类型下拉列表 FarPoint.Win.Spread.CellType.ComboBoxCellType celType2 = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); this.womenKind.ArrayObject = this.constant.GetConstantList("WOMENKIND"); string[] str2 = new string[this.womenKind.ArrayObject.Count]; for (int i = 0; i < this.womenKind.ArrayObject.Count; i++) { str2[i] = this.womenKind.ArrayObject[i].ToString(); } celType2.Items = str2; this.neuSpread1_Sheet1.Columns[4].CellType = celType2; //生成破裂程度下拉列表 FarPoint.Win.Spread.CellType.ComboBoxCellType celType3 = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); this.breakLevel.ArrayObject = this.constant.GetConstantList("BREAKLEVEL"); string[] str3 = new string[this.breakLevel.ArrayObject.Count]; for (int i = 0; i < this.breakLevel.ArrayObject.Count; i++) { str3[i] = this.breakLevel.ArrayObject[i].ToString(); } celType3.Items = str3; this.neuSpread1_Sheet1.Columns[6].CellType = celType3; }
/// <summary> /// Set Status Combobox (if status is '0' or '2' hide '1' , if status is '2' hide others) /// </summary> /// <param name="iRow">Row in SpreadSheet that want to set.</param> private void SetComboBoxInSpreadSheet(int iRow) { DataTable dt = (new LookupDataBIZ().LoadLookupClassType(DataDefine.PO_STATUS.ToNZString())).DataSource; if (dt != null && dt.Rows.Count > 0) { FarPoint.Win.Spread.CellType.ComboBoxCellType cboCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); FarPoint.Win.Spread.Cell fpCell; // declare variable cell int iNoofRow = 0; switch (Convert.ToString(shtView.Cells[iRow, (int)eColumn.KeptStatus].Value)) { case "": case "00": iNoofRow = 2; break; case "01": iNoofRow = 3; break; case "02": iNoofRow = 1; break; } string[] strValue = new string[iNoofRow]; string[] strItem = new string[iNoofRow]; int j = 0; for (int i = 0; i < dt.Rows.Count; i++) { string str = Convert.ToString(shtView.Cells[iRow, (int)eColumn.KeptStatus].Value); bool bCase00 = (str == "00" || str == ""); bool bCase01 = (str == "01"); bool bCase02 = (str == "02"); if ((bCase00 && dt.Rows[i]["CLS_CD"].ToString() != "01") || (bCase01) || (bCase02 && dt.Rows[i]["CLS_CD"].ToString() == "02")) { strValue[j] = dt.Rows[i]["CLS_CD"].ToString().Trim() == string.Empty ? "" : dt.Rows[i]["CLS_CD"].ToString().Trim(); strItem[j] = strValue[j] + " : " + dt.Rows[i]["CLS_DESC"].ToString(); j++; } } cboCellType.ItemData = strValue; cboCellType.Items = strItem; // add item to cbo cell cboCellType.EditorValue = FarPoint.Win.Spread.CellType.EditorValue.ItemData; // set cell of ComboBox fpCell = shtView.Cells[iRow, (int)eColumn.STATUS]; fpCell.CellType = cboCellType; } shtView.Cells[iRow, (int)eColumn.STATUS].Value = shtView.Cells[iRow, (int)eColumn.STATUS].Value == null ? "00" : shtView.Cells[iRow, (int)eColumn.STATUS].Value; }
/// <summary> /// 表格设置 /// </summary> protected virtual void SetColumnType() { Neusoft.HISFC.Models.Material.MaterialAddRate addRate = new Neusoft.HISFC.Models.Material.MaterialAddRate(); FarPoint.Win.Spread.CellType.ComboBoxCellType cmbAddRuleCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); cmbAddRuleCellType.Items = addRate.RateKind.StringItems; this.FpMetItemAddRule_Sheet1.Columns[5].CellType = cmbAddRuleCellType; this.FpMetItemAddRule_Sheet1.Columns[0].Visible = false; this.FpMetItemAddRule_Sheet1.Columns[1].Locked = true; this.FpMetItemAddRule_Sheet1.Columns[2].Locked = true; this.FpMetItemAddRule_Sheet1.Columns[3].Locked = true; this.FpMetItemAddRule_Sheet1.Columns[4].Locked = true; this.FpMetItemAddRule_Sheet1.Columns[8].Visible = false; }
private void Init() { // 필터 등록 fpSpread설비등록.ActiveSheet.Columns[0, 12].AllowAutoFilter = true; // 범위지정시는 [x, y]로 fpSpread설비등록.Sheets[0].AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu; // 시작할 때 전체 data 조회 ShowData(); string[] 등급str = { "A", "B", "C" }; // 등급에 COMBOBOX 코딩 넣기 FarPoint.Win.Spread.CellType.ComboBoxCellType comboBoxCellType = MakeComboBoxCellType(등급str, 등급str); int 등급col = FindColumnIndex("등급"); fpSpread설비등록.ActiveSheet.Columns[등급col].CellType = comboBoxCellType; }
/// <summary> /// 设置Farpoint显示格式 /// </summary> private void SetFarPointFormat() { Neusoft.FrameWork.WinForms.Classes.MarkCellType.NumCellType numbType = new Neusoft.FrameWork.WinForms.Classes.MarkCellType.NumCellType(); FarPoint.Win.Spread.CellType.TextCellType txtonly = new FarPoint.Win.Spread.CellType.TextCellType(); FarPoint.Win.Spread.CellType.TextCellType txttype = new FarPoint.Win.Spread.CellType.TextCellType(); FarPoint.Win.Spread.CellType.ComboBoxCellType cmbType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); FarPoint.Win.Spread.CellType.DateTimeCellType dtimeType = new FarPoint.Win.Spread.CellType.DateTimeCellType(); // 有效无效 string[] items = new string[] { "有效", "无效" }; numbType.DecimalPlaces = 0; numbType.MaximumValue = 99999; numbType.MinimumValue = 0; txtonly.ReadOnly = true; cmbType.AcceptsArrowKeys = FarPoint.Win.SuperEdit.AcceptsArrowKeys.CtrlArrows; cmbType.Items = items; this.neuSpread1_Sheet1.Columns[0].CellType = txtonly; this.neuSpread1_Sheet1.Columns[0].Width = 100; this.neuSpread1_Sheet1.Columns[0].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left; this.neuSpread1_Sheet1.Columns[1].CellType = txtonly; this.neuSpread1_Sheet1.Columns[1].Width = 140; this.neuSpread1_Sheet1.Columns[1].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left; this.neuSpread1_Sheet1.Columns[2].CellType = txtonly; this.neuSpread1_Sheet1.Columns[2].Width = 100; this.neuSpread1_Sheet1.Columns[2].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left; this.neuSpread1_Sheet1.Columns[2].Resizable = false; this.neuSpread1_Sheet1.Columns[3].CellType = numbType; this.neuSpread1_Sheet1.Columns[4].CellType = numbType; this.neuSpread1_Sheet1.Columns[5].CellType = txttype; this.neuSpread1_Sheet1.Columns[5].Width = 70; this.neuSpread1_Sheet1.Columns[6].CellType = cmbType; this.neuSpread1_Sheet1.Columns[6].Width = 80; this.neuSpread1_Sheet1.Columns[7].CellType = txttype; this.neuSpread1_Sheet1.Columns[7].Width = 200; this.neuSpread1_Sheet1.Columns[7].HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Left; this.neuSpread1_Sheet1.Columns[8].Visible = false; }
/// <summary> /// 初始化 /// </summary> public void Init() { Neusoft.FrameWork.WinForms.Classes.Function.ShowWaitForm("正在加载基础数据 请稍候..."); Application.DoEvents(); Neusoft.HISFC.BizProcess.Integrate.Pharmacy pharmacyIntegrate = new Neusoft.HISFC.BizProcess.Integrate.Pharmacy(); List <Neusoft.HISFC.Models.Pharmacy.Item> phaList = pharmacyIntegrate.QueryItemList(true); if (phaList == null) { MessageBox.Show(Language.Msg("加载药品列表发生错误!") + pharmacyIntegrate.Err); return; } foreach (Neusoft.HISFC.Models.Pharmacy.Item info in phaList) { info.Memo = info.Specs; } this.alDrugList = new ArrayList(phaList.ToArray()); this.drugHelper = new Neusoft.FrameWork.Public.ObjectHelper(this.alDrugList); Neusoft.FrameWork.WinForms.Classes.MarkCellType.NumCellType markNumCell = new Neusoft.FrameWork.WinForms.Classes.MarkCellType.NumCellType(); this.fsStencil_Sheet1.Columns[4].CellType = markNumCell; this.fsStencil_Sheet1.Columns[5].CellType = markNumCell; this.stencilItemTypeList = Neusoft.HISFC.Models.Preparation.EnumStencilItemTypeService.List(); string[] strItemType = new string[this.stencilItemTypeList.Count]; int i = 0; foreach (Neusoft.FrameWork.Models.NeuObject tempItemType in this.stencilItemTypeList) { strItemType[i] = tempItemType.Name; i++; } FarPoint.Win.Spread.CellType.ComboBoxCellType itemTypeCombo = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); itemTypeCombo.Items = strItemType; this.fsStencil_Sheet1.Columns[2].CellType = itemTypeCombo; Neusoft.FrameWork.WinForms.Classes.Function.HideWaitForm(); FarPoint.Win.Spread.InputMap im; im = this.fsStencil.GetInputMap(FarPoint.Win.Spread.InputMapMode.WhenAncestorOfFocused); im.Put(new FarPoint.Win.Spread.Keystroke(Keys.Enter, Keys.None), FarPoint.Win.Spread.SpreadActions.None); }
private void initFP() { //<PAD NAME="科室患者" PARENT="MAINTOP" DLLNAME="WorkStation" CONTROLNAME="WorkStation.Controls.ucPatientList" ISALLOWMOVE="false" TITLECOLOR="" BACKCOLOR=""> // <PROPERTY ID ="name">value</PROPERTY> //</PAD> this.fpSpread1_Sheet1.ColumnCount = 9; this.fpSpread1_Sheet1.RowCount = 4; FarPoint.Win.Spread.CellType.ComboBoxCellType combo = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); FarPoint.Win.Spread.CellType.ButtonCellType button = new FarPoint.Win.Spread.CellType.ButtonCellType(); FarPoint.Win.Spread.CellType.RichTextCellType rich = new FarPoint.Win.Spread.CellType.RichTextCellType(); rich.Multiline = true; String[] ss = new String[7]; ss[0] = "MAIN"; ss[1] = "MAINTOP"; ss[2] = "MAINTOP.LEFT"; ss[3] = "MAINTOP.RIGHT"; ss[4] = "MAINBOTTOM"; ss[5] = "MAINBOTTOM.LEFT"; ss[6] = "MAINBOTTOM.RIGHT"; combo.Items = ss; this.fpSpread1_Sheet1.Rows.Default.Height = 150; this.fpSpread1_Sheet1.Columns[1].CellType = combo; this.fpSpread1_Sheet1.Columns[0].Label = "NAME"; this.fpSpread1_Sheet1.Columns[0].Width = 80; this.fpSpread1_Sheet1.Columns[1].Label = "PARENT"; this.fpSpread1_Sheet1.Columns[1].Width = 80; this.fpSpread1_Sheet1.Columns[2].Label = "DLLNAME"; this.fpSpread1_Sheet1.Columns[2].Width = 80; this.fpSpread1_Sheet1.Columns[3].Label = "CONTROLNAME"; this.fpSpread1_Sheet1.Columns[3].Width = 150; this.fpSpread1_Sheet1.Columns[4].Label = "ISALLOWMOVE"; this.fpSpread1_Sheet1.Columns[5].Label = "TITLECOLOR"; this.fpSpread1_Sheet1.Columns[5].Width = 80; this.fpSpread1_Sheet1.Columns[6].Label = "BACKCOLOR"; this.fpSpread1_Sheet1.Columns[6].Width = 80; this.fpSpread1_Sheet1.Columns[7].Label = "PROPERTY"; //属性 this.fpSpread1_Sheet1.Columns[7].CellType = rich; this.fpSpread1_Sheet1.Columns[7].Width = 200; this.fpSpread1_Sheet1.Columns[8].Label = "属性"; //属性 this.fpSpread1_Sheet1.Columns[8].CellType = button; }
private void InitSpread() { FarPoint.Win.Spread.CellType.ButtonCellType buttonCellType = new FarPoint.Win.Spread.CellType.ButtonCellType(); buttonCellType.Text = "..."; FarPoint.Win.Spread.CellType.CheckBoxCellType checkBoxCellType = new FarPoint.Win.Spread.CellType.CheckBoxCellType(); FarPoint.Win.Spread.CellType.ComboBoxCellType comboBoxCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); FarPoint.Win.Spread.CellType.TextCellType textCellType = new FarPoint.Win.Spread.CellType.TextCellType(); Neusoft.FrameWork.WinForms.Classes.MarkCellType.NumCellType numCellType = new Neusoft.FrameWork.WinForms.Classes.MarkCellType.NumCellType(); numCellType.DecimalPlaces = 0; comboBoxCellType.Items = new string[] { "TextBox", "CheckBox", "ComboBox", "EditableComboBox", "DateTimePicker", "NumberCellType" }; this.neuSpread1_Sheet1.OperationMode = FarPoint.Win.Spread.OperationMode.RowMode; this.neuSpread1_Sheet1.RowCount = 0; this.neuSpread1_Sheet1.ColumnCount = 12; this.neuSpread1_Sheet1.Columns[0].Label = "字段"; this.neuSpread1_Sheet1.Columns[1].Label = "名称"; this.neuSpread1_Sheet1.Columns[2].Label = "主键"; this.neuSpread1_Sheet1.Columns[3].Label = "过滤条件"; this.neuSpread1_Sheet1.Columns[4].Label = "锁定"; this.neuSpread1_Sheet1.Columns[5].Label = "排序"; this.neuSpread1_Sheet1.Columns[6].Label = "显示"; this.neuSpread1_Sheet1.Columns[7].Label = "显示类型"; this.neuSpread1_Sheet1.Columns[8].Label = "下拉框"; this.neuSpread1_Sheet1.Columns[9].Label = "数据类型"; this.neuSpread1_Sheet1.Columns[10].Label = "默认值"; this.neuSpread1_Sheet1.Columns[11].Label = "长度"; this.neuSpread1_Sheet1.Columns[0].Locked = true; this.neuSpread1_Sheet1.Columns[2].Locked = true; this.neuSpread1_Sheet1.Columns[9].Locked = true; this.neuSpread1_Sheet1.Columns[11].Locked = true; this.neuSpread1_Sheet1.Columns[2].CellType = checkBoxCellType; this.neuSpread1_Sheet1.Columns[3].CellType = checkBoxCellType; this.neuSpread1_Sheet1.Columns[4].CellType = checkBoxCellType; this.neuSpread1_Sheet1.Columns[5].CellType = checkBoxCellType; this.neuSpread1_Sheet1.Columns[6].CellType = checkBoxCellType; this.neuSpread1_Sheet1.Columns[7].CellType = comboBoxCellType; this.neuSpread1_Sheet1.Columns[8].CellType = buttonCellType; this.neuSpread1_Sheet1.Columns[10].CellType = textCellType; this.neuSpread1_Sheet1.Columns[11].CellType = numCellType; this.neuSpread1_Sheet1.Columns[0].Width = 120; this.neuSpread1_Sheet1.Columns[1].Width = 200; this.neuSpread1_Sheet1.Columns[7].Width = 120; }
private void fpSpread_Info_EditModeOff(object sender, EventArgs e) { int activeRowIndex = this.fpSpread_Info_Sheet1.ActiveRowIndex; int activeColumnIndex = this.fpSpread_Info_Sheet1.ActiveColumnIndex; if (activeColumnIndex == 1) { Type t = this.fpSpread_Info_Sheet1.Cells[activeRowIndex, 0].Tag as Type; string[] r = this.GetControlNames(this.fpSpread_Info_Sheet1.Cells[activeRowIndex, activeColumnIndex].Text, t); if (r == null) { return; } FarPoint.Win.Spread.CellType.ComboBoxCellType comboBoxCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); comboBoxCellType.Items = r; this.fpSpread_Info_Sheet1.Cells[activeRowIndex, 2].CellType = comboBoxCellType; } }
/// <summary> /// 表格列设置 /// </summary> protected virtual void SetColumnType() { Neusoft.HISFC.Models.Material.MaterialAddRate addRate = new Neusoft.HISFC.Models.Material.MaterialAddRate(); FarPoint.Win.Spread.CellType.ComboBoxCellType cmbRateKindCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); FarPoint.Win.Spread.CellType.NumberCellType numType = new FarPoint.Win.Spread.CellType.NumberCellType(); FarPoint.Win.Spread.CellType.DateTimeCellType dtType = new FarPoint.Win.Spread.CellType.DateTimeCellType(); cmbRateKindCellType.Items = addRate.RateKind.StringItems; this.FpAddRate_Sheet1.Columns[0].Visible = false; this.FpAddRate_Sheet1.Columns[1].Visible = false; this.FpAddRate_Sheet1.Columns[2].CellType = cmbRateKindCellType; this.FpAddRate_Sheet1.Columns[2].Locked = true; this.FpAddRate_Sheet1.Columns[4].CellType = numType; this.FpAddRate_Sheet1.Columns[5].CellType = numType; this.FpAddRate_Sheet1.Columns[6].CellType = numType; this.FpAddRate_Sheet1.Columns[7].CellType = numType; this.FpAddRate_Sheet1.Columns[8].Visible = false; this.FpAddRate_Sheet1.Columns[9].CellType = dtType; this.FpAddRate_Sheet1.Columns[10].Visible = false; }
private void PaintGrdPrice() { GrdPriceList.Visible = false; GrdPriceList.Reset(); GrdPriceList.BorderStyle = BorderStyle.None; GrdPriceList.ActiveSheet.RowCount = 1; GrdPriceList.ActiveSheet.ColumnCount = 6; GrdPriceList.ActiveSheet.SetColumnWidth(0, 100); GrdPriceList.ActiveSheet.SetColumnWidth(1, 85); GrdPriceList.ActiveSheet.SetColumnWidth(2, 85); GrdPriceList.ActiveSheet.SetColumnWidth(3, 100); GrdPriceList.ActiveSheet.SetColumnWidth(5, 65); GrdPriceList.ActiveSheet.SetColumnLabel(0, 0, "»ÃÐàÀ·Ëéͧ"); GrdPriceList.ActiveSheet.SetColumnLabel(0, 1, "ÃÒ¤ÒàÃÔèÁµé¹"); GrdPriceList.ActiveSheet.SetColumnLabel(0, 2, "ÃÒ¤ÒÊÔé¹ÊØ´"); GrdPriceList.ActiveSheet.SetColumnLabel(0, 3, " "); GrdPriceList.ActiveSheet.SetColumnLabel(0, 4, "plcode"); GrdPriceList.ActiveSheet.SetColumnLabel(0, 5, "ʶҹÐ"); FarPoint.Win.Spread.Column col; FarPoint.Win.Spread.CellType.TextCellType cell = new FarPoint.Win.Spread.CellType.TextCellType(); col = GrdPriceList.ActiveSheet.Columns[0, 2]; col.Locked = true; col.CellType = cell; col = GrdPriceList.ActiveSheet.Columns[4]; col.Locked = true; col.CellType = cell; FarPoint.Win.Spread.CellType.CheckBoxCellType cell3 = new FarPoint.Win.Spread.CellType.CheckBoxCellType(); col = GrdPriceList.ActiveSheet.Columns[3]; cell3.TextTrue = "Gen Text File"; cell3.TextFalse = "Gen Text File"; col.CellType = cell3; FarPoint.Win.Spread.CellType.ComboBoxCellType cell5 = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); cell5.Items = new string[] { "ãËÁè", "á¡éä¢" }; col = GrdPriceList.ActiveSheet.Columns[5]; col.CellType = cell5; GrdPriceList.ScrollBarTrackPolicy = FarPoint.Win.Spread.ScrollBarTrackPolicy.Off; GrdPriceList.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never; GrdPriceList.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never; GrdPriceList.Visible = true; }
private void neuSpread2_EditModeOff(object sender, EventArgs e) { int activeRowIndex = this.neuSpread2_Sheet1.ActiveRowIndex; int activeColumnIndex = this.neuSpread2_Sheet1.ActiveColumnIndex; if (activeColumnIndex == 1) { Type t = this.neuSpread2_Sheet1.Cells[activeRowIndex, 0].Tag as Type; string[] r = this.GetControlNames(this.neuSpread2_Sheet1.Cells[activeRowIndex, activeColumnIndex].Text, t); if (r == null) { return; } FarPoint.Win.Spread.CellType.ComboBoxCellType comboBoxCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); comboBoxCellType.Items = r; this.neuSpread2_Sheet1.Cells[activeRowIndex, 2].CellType = comboBoxCellType; this.SetInterfaceInstanceLocked(activeRowIndex, false); } }
/// <summary> /// 设置Fp显示格式 /// </summary> private void SetFpValueType() { if (this.noSplitAtAll) { this.drugSplitPropertyList.Add("0不可拆分"); } if (this.splitAndNoInteger) { this.drugSplitPropertyList.Add("1可拆分不取整"); } if (this.splitAndUpperToInteger) { this.drugSplitPropertyList.Add("2可拆分上取整"); } if (this.nosplitAndDayToInteger) { this.drugSplitPropertyList.Add("3不可拆分当日取整"); } if (this.splitAndDeptToInteger) { this.drugSplitPropertyList.Add("4可拆分按科室取整"); } if (this.splitAndNurceCellToInteger) { this.drugSplitPropertyList.Add("5可拆分按病区取整"); } //生成下拉列表 string[] str = new string[this.drugSplitPropertyList.Count]; for (int i = 0; i < this.drugSplitPropertyList.Count; i++) { str[i] = this.drugSplitPropertyList[i].ToString(); } FarPoint.Win.Spread.CellType.ComboBoxCellType cel = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); cel.Items = str; this.neuSpread1_Sheet1.Columns[5].CellType = cel; this.neuSpread1_Sheet2.Columns[1].CellType = cel; }
private void fpSpread1_Sheet1_CellChanged(object sender, FarPoint.Win.Spread.SheetViewEventArgs e) { if (e.Column == 2) { string dllname = this.fpSpread1_Sheet1.Cells[e.Row, 2].Text; if (dllname == "") { return; } try { System.Reflection.Assembly assembly = System.Reflection.Assembly.LoadFrom(dllname + ".dll"); Type[] type = assembly.GetTypes(); FarPoint.Win.Spread.CellType.ComboBoxCellType funCellType = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); string[] ss = new string[type.Length + 1]; int i = 0; foreach (Type mytype in type) { if (mytype.IsPublic && mytype.IsClass) { ss[i] = mytype.ToString(); i++; } } ss[i] = ""; funCellType.Editable = true; funCellType.Items = ss; this.fpSpread1_Sheet1.Cells[e.Row, 3].CellType = funCellType; } catch (Exception ex) { MessageBox.Show(ex.Message); } } this.richTextBox2.Text = this.getRight(); }
private void PaintGrdMain() { GrdView.Left = 12; GrdView.Height = this.Height - 150; GrdView.Width = this.Width - 80; GrdView.Top = 88; GrdView.Left = 12; GrdView.Sheets[0].ColumnCount = 13; GrdView.Sheets[0].RowCount = 1; GrdView.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never; GrdView.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.Never; GrdView.Sheets[0].SetColumnWidth(liColMainHotelCode, 82); GrdView.Sheets[0].SetColumnWidth(liColMainMemNamee1, 250); GrdView.Sheets[0].SetColumnWidth(liColMainVoucher, 60); GrdView.Sheets[0].SetColumnWidth(liColMainDays, 60); GrdView.Sheets[0].SetColumnWidth(liColMainPax, 60); GrdView.Sheets[0].SetColumnWidth(liColMainDepositAMT, 80); GrdView.Sheets[0].SetColumnWidth(liColMainDepositPay, 80); GrdView.Sheets[0].SetColumnWidth(liColMainGenPDF, 80); GrdView.Sheets[0].SetColumnWidth(liColMainSendEMail, 80); GrdView.Sheets[0].SetColumnWidth(colSendcomp, 80); GrdView.Sheets[0].SetColumnWidth(liColMainTypeGen, 70); GrdView.Sheets[0].SetColumnWidth(liColMainEMail, 220); GrdView.Sheets[0].SetColumnWidth(liColMainFileName, 250); FarPoint.Win.Spread.Column col; FarPoint.Win.Spread.CellType.TextCellType cell = new FarPoint.Win.Spread.CellType.TextCellType(); col = GrdView.Sheets[0].Columns[liColMainHotelCode, liColMainPax]; col.CellType = cell; FarPoint.Win.Spread.CellType.NumberCellType celldeposit = new FarPoint.Win.Spread.CellType.NumberCellType(); GrdView.Sheets[0].Columns[liColMainDepositAMT].CellType = celldeposit; GrdView.Sheets[0].Columns[liColMainMemNamee1, liColMainDepositAMT].Locked = true; FarPoint.Win.Spread.CellType.NumberCellType celldepositpay = new FarPoint.Win.Spread.CellType.NumberCellType(); GrdView.Sheets[0].Columns[liColMainDepositPay].CellType = celldepositpay; FarPoint.Win.Spread.CellType.CheckBoxCellType cellgenpdf = new FarPoint.Win.Spread.CellType.CheckBoxCellType(); cellgenpdf.TextTrue = "gen DOC"; cellgenpdf.TextFalse = "gen DOC"; GrdView.Sheets[0].Columns[liColMainGenPDF].CellType = cellgenpdf; FarPoint.Win.Spread.CellType.CheckBoxCellType cellsendemail = new FarPoint.Win.Spread.CellType.CheckBoxCellType(); cellsendemail.TextTrue = "send E-Mail"; cellsendemail.TextFalse = "send E-Mail"; GrdView.Sheets[0].Columns[liColMainSendEMail].CellType = cellsendemail; FarPoint.Win.Spread.CellType.CheckBoxCellType cellsendemailcomp = new FarPoint.Win.Spread.CellType.CheckBoxCellType(); cellsendemailcomp.TextTrue = "Sended"; cellsendemailcomp.TextFalse = "Sended"; GrdView.Sheets[0].Columns[colSendcomp].CellType = cellsendemailcomp; FarPoint.Win.Spread.CellType.ComboBoxCellType cellTypeGen = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); cellTypeGen.Items = new string[] { Convert.ToString(TypeGen.PDF), Convert.ToString(TypeGen.Excel), Convert.ToString(TypeGen.HTML), Convert.ToString(TypeGen.RTF), Convert.ToString(TypeGen.Word) }; GrdView.Sheets[0].Columns[liColMainTypeGen].CellType = cellTypeGen; FarPoint.Win.Spread.CellType.TextCellType cellEMail = new FarPoint.Win.Spread.CellType.TextCellType(); GrdView.Sheets[0].Columns[liColMainEMail].CellType = cellEMail; FarPoint.Win.Spread.CellType.TextCellType cellFilename = new FarPoint.Win.Spread.CellType.TextCellType(); GrdView.Sheets[0].Columns[liColMainFileName].CellType = cellFilename; GrdView.Sheets[0].SetColumnLabel(0, liColMainHotelCode, "hotelcode"); GrdView.Sheets[0].SetColumnLabel(0, liColMainMemNamee1, "Member Name E"); GrdView.Sheets[0].SetColumnLabel(0, liColMainVoucher, "Vou NO"); GrdView.Sheets[0].SetColumnLabel(0, liColMainDays, "Days"); GrdView.Sheets[0].SetColumnLabel(0, liColMainPax, "PAX"); GrdView.Sheets[0].SetColumnLabel(0, liColMainDepositAMT, "Deposit"); GrdView.Sheets[0].SetColumnLabel(0, liColMainDepositPay, "Pay/Rec" + ldoAccountMemberRate.ToString() + "%"); GrdView.Sheets[0].SetColumnLabel(0, liColMainGenPDF, " PDF "); GrdView.Sheets[0].SetColumnLabel(0, liColMainSendEMail, " "); GrdView.Sheets[0].SetColumnLabel(0, liColMainTypeGen, " "); GrdView.Sheets[0].SetColumnLabel(0, liColMainEMail, "E-Mail Name"); GrdView.Sheets[0].SetColumnLabel(0, liColMainFileName, "Attachment FileName"); GrdView.AllowColumnMove = true; GrdView.Sheets[0].Columns[0].Visible = false; }
private void btnUserSelect_Click(object sender, EventArgs e) { //DataSet ds = new DataSet(); DataTable dt = new DataTable(); string sql = "select * from MCT_USER"; dt = throwSelect(sql); fpSpread1_Sheet1.Rows.Count = 0; if (dt.Rows.Count > 0) { fpSpread1_Sheet1.Rows.Count = dt.Rows.Count; //쿼리 결과 검사 for (int i = 0; i < dt.Rows.Count; i++) { string[] CUD_items = new string[4]; CUD_items[0] = ""; CUD_items[1] = "C"; CUD_items[2] = "U"; CUD_items[3] = "D"; FarPoint.Win.Spread.CellType.ComboBoxCellType CUD_Combo = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); CUD_Combo.Items = CUD_items; fpSpread1_Sheet1.SetText(i, 1, dt.Rows[i]["USER_ID"].ToString()); fpSpread1_Sheet1.SetText(i, 2, dt.Rows[i]["USER_NAME"].ToString()); fpSpread1_Sheet1.SetText(i, 3, dt.Rows[i]["PASSWORD"].ToString()); fpSpread1_Sheet1.SetText(i, 4, dt.Rows[i]["USER_LEVEL"].ToString()); FarPoint.Win.Spread.CellType.ComboBoxCellType method_Combo = new FarPoint.Win.Spread.CellType.ComboBoxCellType(); string[] method_items = new string[4]; method_items[0] = "0"; method_items[1] = "1"; method_items[2] = "2"; method_items[3] = "3"; method_Combo.Items = method_items; fpSpread1_Sheet1.Cells[i, 4].CellType = method_Combo; fpSpread1_Sheet1.SetText(i, 5, dt.Rows[i]["UPDATE_DATE"].ToString()); } } //foreach (DataRow r in ds.Tables[0].Rows) foreach (DataRow r in dt.Rows) { Console.WriteLine(r["PLANT"]); //Console.WriteLine(r.ItemArray.ToArray()); string plant = r["PLANT"].ToString(); string userId = r["USER_ID"].ToString(); string userName = r["USER_NAME"].ToString(); string password = r["PASSWORD"].ToString(); string userLevel = r["USER_LEVEL"].ToString(); string chUserId = r["CH_USER_ID"].ToString(); string updateDate = r["UPDATE_DATE"].ToString(); string[] row = { plant, userId, userName, password, userLevel, chUserId, updateDate }; //DataGridViewCheckBoxColumn checkBoxColumn = new DataGridViewCheckBoxColumn(); this.gridData.Rows.Add(row); } //MessageBox.Show("조회된 레코드 개수는 총 : " + dt.Rows.Count + "개 입니다"); //MessageBox.Show("조회된 레코드 개수는 총 : " + ds.Tables[0].Rows.Count + "개 입니다"); }