protected override void BeginProcessing() { var style = TypeAdaptors.Style.ConvertFrom(Style); var grid = new GridView(style); grid.AddModels(Models); if (MyInvocation.BoundParameters.ContainsKey("Widths")) { grid.SetWidths(Widths); } if (MyInvocation.BoundParameters.ContainsKey("Heights")) { grid.SetHeights(Heights); } if (MyInvocation.BoundParameters.ContainsKey("ColumnCount")) { grid.SetWidths(Enumerable.Range(0, ColumnCount).Select(x => 1.0).ToArray()); } if (MyInvocation.BoundParameters.ContainsKey("RowCount")) { grid.SetHeights(Enumerable.Range(0, RowCount).Select(x => 1.0).ToArray()); } if (MyInvocation.BoundParameters.ContainsKey("OutFile")) { GridViewExporter.Export(grid, OutFile, OutWidth, OutHeight, SvgIsDocument); } if (Show) { var control = grid.ToGridControl(); var window = CreateWindow(ReuseWindow); window.Dispatcher.Invoke(() => { window.Content = control; if (string.IsNullOrEmpty(window.Title)) { window.Title = MyInvocation.Line; } }); } if (!MyInvocation.BoundParameters.ContainsKey("OutFile") && !Show) { WriteObject(grid); } }
/* * protected void HallComboBox_OnCallback(object sender, CallbackEventArgsBase e) * { * HallComboBox.DataBind(); * } * * protected void TheatersComboBox_OnDataBound(object sender, EventArgs e) * { * TheatersComboBox.Items.Insert(0, new ListEditItem("All",null)); * } * * protected void HallComboBox_OnDataBound(object sender, EventArgs e) * { * HallComboBox.Items.Insert(0, new ListEditItem("All", null)); * } * */ protected void GridExporterLinkButton_OnClick(object sender, EventArgs e) { GridViewExporter.WriteXlsxToResponse(); }