public static IAsyncResult GetIconAsync(string path, double size, Func <ImageSource, int> cb) { IconExtract iconExtract = new IconExtract(ImgFunc.GetIcon); return(iconExtract.BeginInvoke(path, size, new AsyncCallback((IAsyncResult asyncResult) => { ImageSource icon = (asyncResult.AsyncState as IconExtract).EndInvoke(asyncResult); cb(icon); }), iconExtract)); }
public virtual void work(FileInfo file) { Debug.Print(file.FullName); MyLib.IconExtract new_Extract = new IconExtract(file.FullName); ausfuellen(file, i); i++; //Icons holen und speichern //Ergebnisse in Excel speichern }
private void big_icon_CheckedChanged(object sender, EventArgs e) { IconExtract test = new IconExtract(tbt_Filaname.Text); if (small_icon.Checked) { pictureBox1.Image = test.GetIconAt(Convert.ToInt32(numericUpDown1.Value)).ToBitmap(); } else { pictureBox1.Image = test.GetIconAt(Convert.ToInt32(numericUpDown1.Value), false).ToBitmap(); } }
private void numericUpDown1_ValueChanged(object sender, EventArgs e) { test = new IconExtract(tbt_Filaname.Text); if (numericUpDown1.Value < test.NumberOfIcons) { pictureBox1.Image = test.m_lagerIcons[Convert.ToInt32(numericUpDown1.Value)].ToBitmap(); } else { numericUpDown1.Value = test.NumberOfIcons - 1; } }
private void button3_Click(object sender, EventArgs e) { IconExtract test = new IconExtract(tbt_Filaname.Text); pictureBox1.Image = test.m_lagerIcons[0].ToBitmap(); }