/// <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(); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.WindowState = System.Windows.Forms.FormWindowState.Maximized; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); #region Spreadsheet spreadsheet = new Spreadsheet(); GraphicCellHelper.AddSparklineCellRenderer(spreadsheet, new SparklineCellRenderer()); SpreadsheetRibbon ribbon = new SpreadsheetRibbon() { Spreadsheet = spreadsheet }; this.DataBindings.Add("Text", this.spreadsheet, "FileName"); spreadsheet.Dock = DockStyle.Fill; spreadsheet.Anchor = AnchorStyles.Left | AnchorStyles.Top; #if !NETCORE spreadsheet.Open(@"..\..\..\..\..\Common\Data\Spreadsheet\Sparkline.xlsx"); #else spreadsheet.Open(@"..\..\..\..\..\..\Common\Data\Spreadsheet\Sparkline.xlsx"); #endif this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Controls.Add(spreadsheet); this.Controls.Add(ribbon); #endregion }
void GraphicModel_GraphicQueryCellInfo(object sender, GraphicQueryCellInfoEventArgs e) { e.Style.Enabled = isChecked; if (!e.Style.Enabled) { if (e.Style.GraphicCellControl != null && e.Style.GraphicCellControl.IsSelected) { e.Style.GraphicCellControl.IsSelected = false; var spanInfo = GraphicCellHelper.GetCellSpanInfo(e.Style.GraphicCellControl); (sender as GraphicModel).SelectedGraphicCells.Remove(spanInfo); e.Style.GraphicCellControl.InvalidateVisual(); } } }