// Methods public PrintToolControl(PrintToolComponent component) { this._component = component; this.InitializeComponent(); this.printPreviewControl1.Component = PrintToolComponent.TilesComponent; this.cmbFilmType.SetDataSouce("FilmType"); this.cmbFilmSize.SetDataSouce("FilmSize"); this.cmbLayout.SetDataSouce("PrintLayout"); this.cmbFilmOrientation.SetDataSouce("FilmOrientation"); BindingSource dataSource = new BindingSource { DataSource = this._component }; this.cmbPrinter.DataSource = this._component.PrintersView; this.cmbPrinter.SelectedItem = this._component.CurrentPrinterValue; this.cmbPrinter.DataBindings.Add("SelectedValue", dataSource, "CurrentPrinterValue", true, DataSourceUpdateMode.OnPropertyChanged); this.nupdPrintCount.DataBindings.Add("Value", dataSource, "NumberOfCopies", true, DataSourceUpdateMode.OnPropertyChanged); this.filmsControl.GridLayoutChange += new EventHandler(this.filmsControl_GridLayoutChange); List <Film> films = this._component.GetFilms(); if (films.Count > 0) { this.filmsControl.CreateFilmButton(films); this.UpdateFilmView(films[0]); } ////this.BuildActionButtons(this._component.FreeRadioPrintAction, this._component.FixedRadioPrintAction); //this._component.ActionChanged += new EventHandler(this.OnActionChanged); //this.btnExport.Visible = PrintToolSettings.Default.ExportImage; }
private void ibImport_Click(object sender, EventArgs e) { IPresentationImage selectedPI = this._component.GetSelectedPI(); if (selectedPI != null) { PrintToolComponent.AddToClipboard(selectedPI); } }
private void btnExport_Click(object sender, EventArgs e) { //if (this.saveFileDialog.ShowDialog() == DialogResult.OK) //{ // string fileName = this.saveFileDialog.FileName; // PrintToolComponent.TilesComponent.ExportSelectedImage(fileName); //} IEnumerable <IPresentationImage> images = this._component.GetSelectedImages(); foreach (IPresentationImage image in images) { PrintToolComponent.AddToClipboard(image); } }
// Methods public void SetComponent(IApplicationComponent component) { this._component = (PrintToolComponent)component; }