private void printButton_Click(object sender, EventArgs e) { try { streamToPrint = new StreamReader("C:\\MyFile.txt"); try { //var pd = new PrintDocument(); //pd.PrintPage += PdPrintPage; //pd.Print(); var gridControlBase = new GridControlBase(); var gpd = new GridPrintDocument(gridControlBase); gpd.PrintPage += PdPrintPage; gpd.Print(); } finally { streamToPrint.Close(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public едакторЯчеек_МногострочныйРедактор_Renderer(GridControlBase grid, GridCellModelBase cellModel) : base(grid, cellModel) { this.drawПолеМногострРедактора = new ВыпадающийТекст(); this.editПолеМногострРедактора = new ВыпадающийТекст(); this.editПолеМногострРедактора.EditValueChanged += new EventHandler(this.editПолеМногострРедактора_EditValueChanged); base.SupportsFocusControl = true; base.FixControlParent(this.drawПолеМногострРедактора); base.SetControl(this.editПолеМногострРедактора); }
public едакторЯчеек_РедакторВремени_Renderer(GridControlBase grid, GridCellModelBase cellModel) : base(grid, cellModel) { this.drawРедакторВремени = new TimeEdit(); this.editРедакторВремени = new TimeEdit(); this.editРедакторВремени.EditValueChanged += new EventHandler(this.editПолеВыбораДаты_EditValueChanged); base.SupportsFocusControl = true; base.FixControlParent(this.drawРедакторВремени); base.SetControl(this.editРедакторВремени); }
protected override void Invoke(object parameter) { var selectionchkbox = this.AssociatedObject as CheckBox; selectionchkbox.Checked += new System.Windows.RoutedEventHandler(selectionchkbox_Checked); selectionchkbox.Unchecked += new System.Windows.RoutedEventHandler(selectionchkbox_Unchecked); this.grid = ((this.AssociatedObject as CheckBox).DataContext as SpreadsheetControl).GridProperties.ActiveSpreadsheetGrid; this.grid.Model.GraphicModel.GraphicQueryCellInfo += new GraphicQueryCellInfoEventHandler(GraphicModel_GraphicQueryCellInfo); }
public TreeCellRenderer(GridControlBase grid, GridCellModelBase cellModel) : base(grid, cellModel) { _indentSize = 20; bitmapWidth = 20; bitmapHeight = 17; nodeList = new Hashtable(); nodeList.Add(this.Grid.Model[1, 3].Text, "Added"); }
private void gridDataBoundGrid1_CurrentCellActivated(object sender, EventArgs e) { GridControlBase grid = sender as GridControlBase; if (grid != null) { grid.CurrentCell.ScrollInView(); } }
/// <summary> /// Initializes a new <see cref="GridCellRendererBase"/> object for the given GridControlBase /// and <see cref="GridCellModelBase"/>. /// </summary> /// <param name="grid">The <see cref="GridControlBase"/> that display this cell renderer.</param> /// <param name="cellModel">The <see cref="GridCellModelBase"/> that holds data for this cell renderer that should /// be shared among views.</param> /// <remarks>References to GridControlBase, /// and GridCellModelBase will be saved.</remarks> public GridDataBoundTreeCellRenderer(GridControlBase grid, GridCellModelBase cellModel, TreeGridHelper helper) : base(grid, cellModel) { AddButton(new GridDataBoundTreeCellButton(this, helper)); lineColor = Color.Black; this.treeHelper = helper; }
private void Hook(GridControlBase grid) { if (!Grids.Contains(grid)) { Grids.Add(grid); grid.CurrentCellChanged += new GridRoutedEventHandler(grid_CurrentCellChanged); grid.CurrentCellMoved += new GridCurrentCellMovedEventHandler(grid_CurrentCellMoved); grid.IsVisibleChanged += new DependencyPropertyChangedEventHandler(grid_IsVisibleChanged); } }
public override void InvokeAction(object sender, EventArgs e) { GridControlBase grid = ActiveGrid; if (grid != null) { GridRangeInfo range = grid.Model.Selections.Ranges.ActiveRange; grid.Model.CoveredRanges.Add(range); } }
public override void InvokeAction(object sender, EventArgs e) { GridControlBase grid = ActiveGrid; if (grid != null) { PropertyForm form = new PropertyForm(grid.Model.Properties); form.ShowDialog(); grid.Model.Refresh(); } }
public override void InvokeAction(object sender, EventArgs e) { GridControlBase grid = ActiveGrid; if (grid != null) { GridBaseStylesMap.ShowGridBaseStylesMapDialog(grid.Model, "BaseStylesMap"); grid.Model.Refresh(); } }
void tb_GotFocus(object sender, System.Windows.RoutedEventArgs e) { GridControlBase grid = lastGridWithFocus; if (grid != null) { GridCurrentCell cc = grid.CurrentCell; cc.BeginEdit(); } }
void tb_LostFocus(object sender, RoutedEventArgs e) { GridControlBase grid = lastGridWithFocus; if (grid != null) { GridCurrentCell cc = grid.CurrentCell; cc.EndEdit(); } }
public void Unwire() { GridControlBase[] allGrids = new GridControlBase[Grids.Count]; allGrids = Grids.ToArray(); foreach (GridControlBase grid in allGrids) { Unhook(grid); } UnhookTextBox(); }
public override void InvokeAction(object sender, EventArgs e) { GridControlBase grid = ActiveGrid; if (grid != null) { grid.Selections.Clear(); grid.Selections.Add(GridRangeInfo.Table()); } }
public override void InvokeAction(object sender, EventArgs e) { GridControlBase grid = ActiveGrid; if (grid != null) { grid.Model.Properties.BlackWhite = !grid.Model.Properties.BlackWhite; grid.Model.Refresh(); } }
void grid_CurrentCellActivated(object sender, SyncfusionRoutedEventArgs args) { GridControlBase current_cell = args.Source as GridControlBase; if (grid.Model[current_cell.CurrentCell.RowIndex, current_cell.CurrentCell.ColumnIndex].CellType == "IntegerEdit") { g = grid.Model[current_cell.CurrentCell.RowIndex, current_cell.CurrentCell.ColumnIndex]; SetSeperatorText(); SetNumberOfDigitsText(); } }
public override void InvokeAction(object sender, EventArgs e) { GridControlBase grid = ActiveGrid; if (grid != null) { foreach (GridRangeInfo range in grid.Model.Selections) { grid.Model.RowHeights.ResizeToFit(range, GridResizeToFitOptions.ResizeCoveredCells); } } }
public LinkLabelCellRenderer(GridControlBase grid, GridCellModelBase cellModel) : base(grid, cellModel) { _isMouseDown = false; _drawHotLink = false; _hotColor = Color.Red; _visitedColor = Color.Purple; _EXEname = "iexplore.exe"; }
public override void InvokeAction(object sender, EventArgs e) { GridControlBase grid = ActiveGrid; if (grid != null) { grid.Model.Options.TransparentBackground = false; grid.SupportsTransparentBackColor = false; grid.BackgroundImage = null; grid.BackColor = Color.White; } }
void grid_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) { GridControlBase grid = sender as GridControlBase; if (grid != null) { lastGridWithFocus = grid; GridCurrentCell cc = grid.CurrentCell; FormulaBox.Text = grid.Model[cc.CellRowColumnIndex.RowIndex, cc.CellRowColumnIndex.ColumnIndex].Text; } }
void grid_CurrentCellActivated(object sender, SyncfusionRoutedEventArgs args) { GridControlBase current_cell = args.Source as GridControlBase; if (grid.Model[current_cell.CurrentCell.RowIndex, current_cell.CurrentCell.ColumnIndex].CellType == "DateTimeEdit") { g = grid.Model[current_cell.CurrentCell.RowIndex, current_cell.CurrentCell.ColumnIndex]; SetTheDateTimeFormatCombo(); SetTheCultureInfoFormatCombo(); } }
public SliderCellRenderer(GridControlBase grid, GridCellModelBase cellModel) : base(grid, cellModel) { cm = (SliderCellModel)cellModel; SupportsFocusControl = true; FixControlParent(drawSlider); SetControl(editSlider); editSlider.AutoSize = false; editSlider.ValueChanged += new EventHandler(trackBar_ValueChanged); cm.trackBarControlSize = drawSlider.Size; }
public GridFillSeriesMouseController(GridControlBase grid) { this.grid = grid; this.Filltype = SeriesType.FillSeries | SeriesType.CopySeries | SeriesType.FillFormatOnly | SeriesType.FillWithoutFormat; this.InnerFillType = SeriesType.CopySeries; this.Gridmodel.Options.ExcelLikeCurrentCell = true; this.Gridmodel.Options.ExcelLikeSelectionFrame = true; this.Gridmodel.Options.AllowSelection = GridSelectionFlags.Any; this.Gridmodel.Options.ListBoxSelectionMode = GridSelectionMode.None; this.grid.SelectionChanged += new GridSelectionChangedEventHandler(grid_SelectionChanged); }
public едакторЯчеек_ВыборДаты_Renderer(GridControlBase grid, GridCellModelBase cellModel) : base(grid, cellModel) { this.drawПолеВыбораДаты = new ПолеВыбораДаты(); this.editПолеВыбораДаты = new ПолеВыбораДаты(); this.drawПолеВыбораДаты.НазначитьКнопки(); this.editПолеВыбораДаты.EditValueChanged += new EventHandler(this.editПолеВыбораДаты_EditValueChanged); this.editПолеВыбораДаты.НазначитьКнопки(); base.SupportsFocusControl = true; base.FixControlParent(this.drawПолеВыбораДаты); base.SetControl(this.editПолеВыбораДаты); }
public override void InvokeAction(object sender, EventArgs e) { GridControlBase grid = ActiveGrid; if (grid != null) { int rowIndex, colIndex; if (grid.CurrentCell.GetCurrentCell(out rowIndex, out colIndex)) { grid.Model.Cols.InsertRange(colIndex, 1, null); } } }
public DropDownUserCellRenderer(GridControlBase grid, GridCellModelBase cellModel) : base(grid, cellModel) { this.ddUser = ((DropDownUserCellModel)this.Model).ddUser; this.ddUser.Visible = false; DropDownPart = new GridDropDownCellImp(this); DropDownButton = new GridCellComboBoxButton(this); //hook the usercontrol save and cancel events... this.ddUser.UserControlSave += new EventHandler(user_Save); this.ddUser.UserControlCancel += new EventHandler(user_Cancel); }
public DragButtonCellRenderer(GridControlBase grid, GridCellModelBase cellModel) : base(grid, cellModel) { mybuttons = new CellDragButton[3]; for (int n = 0; n < 3; n++) { mybuttons[n] = new CellDragButton(this); AddButton(mybuttons[n]); } mybuttons[1].Interior = new BrushInfo(GradientStyle.PathEllipse, Color.FromArgb(0xde, 0x64, 0x13), Color.White); mybuttons[2].Interior = new BrushInfo(PatternStyle.SmallCheckerBoard, Color.FromArgb(255, 187, 111), Color.White); //.FromArgb( 0xff, 0xbf, 0x34 )); }
private GridStyleInfo GetStyle(GridCellInfo cellInfo) { var currentCellRowIndex = new RowColumnIndex(cellInfo.RowIndex, cellInfo.ColumnIndex); this.grid = GetGrid(cellInfo.GridName); var cc = this.grid.CoveredCells.GetCellSpan(cellInfo.RowIndex, cellInfo.ColumnIndex); if (cc != null) { currentCellRowIndex = new RowColumnIndex(cellInfo.RowIndex, cc.Left); } return(this.grid.GetRenderStyleInfo(currentCellRowIndex.RowIndex, currentCellRowIndex.ColumnIndex)); }
void grid_CurrentCellMoved(object sender, GridCurrentCellMovedEventArgs e) { inCurrentCellMoved = true; GridControlBase grid = sender as GridControlBase; if (grid != null) { lastGridWithFocus = grid; GridCurrentCell cc = grid.CurrentCell; FormulaBox.Text = grid.Model[cc.CellRowColumnIndex.RowIndex, cc.CellRowColumnIndex.ColumnIndex].Text; } inCurrentCellMoved = false; }
public override void InvokeAction(object sender, EventArgs e) { GridControlBase grid = ActiveGrid; if (grid != null) { grid.SupportsTransparentBackColor = !grid.SupportsTransparentBackColor; if (grid.SupportsTransparentBackColor) grid.Model.TableStyle.Interior = new BrushInfo(Color.FromArgb(50, Color.White)); else grid.Model.TableStyle.ResetInterior(); grid.Model.Options.TransparentBackground = !grid.SupportsTransparentBackColor && grid.BackgroundImage == null; } }