protected override EncoderParameter[] GetEncoderParams(ref ScrapBase scrap) { List <EncoderParameter> list = new List <EncoderParameter>(); if (this.ShowPreview) { ImageJpegPreviewPanel panel; if (base.HaveMargin) { panel = new ImageJpegPreviewPanel(this, scrap.GetViewImage(), base.GetImageCodecInfo()); } else { panel = new ImageJpegPreviewPanel(this, (Bitmap)scrap.Image.Clone(), base.GetImageCodecInfo()); } if (panel.ShowDialog(scrap) != DialogResult.OK) { return(null); } CImageJpegStyleItem styleItem = (CImageJpegStyleItem)panel.StyleItem; list.Add(new EncoderParameter(Encoder.Quality, (long)styleItem.Quality)); } else { list.Add(new EncoderParameter(Encoder.Quality, (long)this.Quality)); } return(list.ToArray()); }
// Token: 0x060004D7 RID: 1239 RVA: 0x000227FC File Offset: 0x000209FC protected override object GetStyleFromForm() { var cimageJpegStyleItem = new CImageJpegStyleItem { SaveFolder = txtFolder.Text, Quality = barQuality.Value, ShowPreview = chkShowParam.Checked, HaveMargin = chkWindow.Checked, CopyPath = chkCopy.Checked }; if (rdoSaveAs.Checked) { cimageJpegStyleItem.FileNameType = CImageStyleItem.EnumFileName.SaveAs; } else if (rdoScrapName.Checked) { cimageJpegStyleItem.FileNameType = CImageStyleItem.EnumFileName.ScrapName; } else { cimageJpegStyleItem.FileNameType = CImageStyleItem.EnumFileName.UseName; } cimageJpegStyleItem.DupliType = (CImageStyleItem.EnumDupliType)cmbDupli.SelectedIndex; cimageJpegStyleItem.FileName = txtName.Text; return(cimageJpegStyleItem); }
protected override void SetStyleToForm(object style) { CImageJpegStyleItem item = (CImageJpegStyleItem)style; this.InitializeComponent(); this.Text = item.GetDisplayName(); this.txtFolder.Text = item.SaveFolder; this.barQuality.Value = item.Quality; this.chkShowParam.Checked = item.ShowPreview; this.chkWindow.Checked = item.HaveMargin; this.chkCopy.Checked = item.CopyPath; switch (item.FileNameType) { case CImageStyleItem.EnumFileName.SaveAs: this.rdoSaveAs.Checked = true; break; case CImageStyleItem.EnumFileName.ScrapName: this.rdoScrapName.Checked = true; break; case CImageStyleItem.EnumFileName.UseName: this.rdoName.Checked = true; break; } this.cmbDupli.SelectedIndex = (int)item.DupliType; this.txtName.Text = item.FileName; }
protected override void SetTunedStyleItem(CStyleItem newOwn) { CImageJpegStyleItem item = (CImageJpegStyleItem)newOwn; base.SaveFolder = item.SaveFolder; this.Quality = item.Quality; this.ShowPreview = item.ShowPreview; base.HaveMargin = item.HaveMargin; base.CopyPath = item.CopyPath; base.FileNameType = item.FileNameType; base.DupliType = item.DupliType; base.FileName = item.FileName; }
protected override void SetStyleToForm(object style) { CImageJpegStyleItem item = (CImageJpegStyleItem)style; this.InitializeComponent(); this.Text = item.GetDisplayName(); this.barQuality.Value = item.Quality; this.lastqvalue = this.barQuality.Value; try { this.tempimg = Path.GetTempFileName(); } catch { this.tempimg = ""; } this.timer1.Start(); }
// Token: 0x060004D5 RID: 1237 RVA: 0x00022712 File Offset: 0x00020912 public ImageJpegStyleItemPanel(CImageJpegStyleItem item) : base(item) { }
public ImageJpegPreviewPanel(CImageJpegStyleItem item, Image img, ImageCodecInfo icodec) : base(item) { this._img = img; this._icodec = icodec; this.UpdatePreview(); }