¾È³çÇϼ¼¿ä
Á¦°¡ ´ÙÁß À̹ÌÁö¸¦ ȸ鿡 Ç¥½ÃÇÒ·Á°í ÇÕ´Ï´Ù. À̹ÌÁö°¡ 1800Àå Á¤µµ µË´Ï´Ù.(200*200 bmp)
À̹ÌÁö¸¦ Ãâ·ÂÇÒ¶§¿¡´Â ½º·¹µå¸¦ »ç¿ëÇÏ¿© Ãâ·ÂÇÏ´Â µ¿¾È ÇÁ·Î±×·¥ ȸéÀ» ¿òÁ÷À̰ųª ´Ù¸¥ ¹öÆ°À» ´·¯µµ Àß µ¿ÀÛÀ» ÇÕ´Ï´Ù.
±×·¯³ª 1800ÀåÀÇ À̹ÌÁö°¡ Ãâ·ÂÀÌ ´Ù ¿Ï·áµÇ°í PanelÀÇ ½ºÅ©·Ñ¹Ù¸¦ ÀÌ¿ëÇÏ¿© ¿òÁ÷ÀÌ´Ùº¸¸é °©ÀÚ±â ÇÁ·Î±×·¥ÀÌ ¸Ôµ¿ÀÌ µË´Ï´Ù.
±×¸®°í »çÁøÀÌ ´Ù Æгο¡ Ãß°¡µÈ ÈÄ¿¡µµ ½ºÅ©·ÑÀ» ¿òÁ÷ÀÏ ¶§ ȸéÀÌ Àá±ñ ÇϾé°Ô µÇ¾ú´Ù°¡ »çÁøÀÌ º¸À̴µ¥ À̺κеµ ÇØ°á¹æ¹ýÀÌ
¾øÀ»±î¿ä
´äº¯ ºÎŹµå¸³´Ï´Ù. °¨»çÇÕ´Ï´Ù.
Thread thread;
List<string> files = new List<string>();
private volatile Boolean isFinish = false;
public cSelectingForm()
{
InitializeComponent();
}
private void worker_DoWork()
{
for (int index = 0; index < files.Count; index++)
{
if (isFinish == false)
{
PictureBox pcb = new PictureBox();
pcb.SizeMode = PictureBoxSizeMode.StretchImage;
pcb.ImageLocation = files[index];
pcb.Width = 170;
pcb.Height = 170;
pcb.Margin = new Padding(15, 20, 15, 20);
this.Invoke(new Action(delegate () /
{
fpanel.Controls.Add(pcb);
fpanel.Refresh();
}));
Thread.Sleep(1);
}
}
isFinish = true;
this.Invoke(new Action(delegate ()
{
textBox3.Text = "Finish";
textBox3.Refresh();
}));
}
private void button2_Click(object sender, EventArgs e)
{
FolderBrowserDialog folder = new FolderBrowserDialog();
if(folder.ShowDialog() != DialogResult.OK)
{
return;
}
files.AddRange(Directory.GetFiles(folder.SelectedPath, "*.bmp"));
thread = new Thread(worker_DoWork);
thread.Start();
}
private void Scroll(object sender, ScrollEventArgs e)
{
fpanel.Refresh();
}
°¨»çÇÕ´Ï´Ù. |
°Ô´Ù°¡ ´ÙÁß ÇÈÃĹڽºÀÇÁ¶ÇÕÀ¸·Î »Ñ·ÁÁÙ »ý°¢À» ÇÏ¸é ±×°Ç ¾î¶»°Ô µÆµç ¼Óµµ ¹®Á¦°¡ ³ª¿Ã ¼ö ¹Û¿¡ ¾ø½À´Ï´Ù.
ÀÏ´Ü ±âº»ÀûÀ¸·Î GDI+ ¸¦ »ç¿ëÇؼ Á÷Á¢ ±×·ÁÁà¾ß ÇÕ´Ï´Ù. ±×·¡µµ ¹®Á¦°¡ ÀÖÀ¸¸é À̹ÌÁö¸¦ ·ÎµåÇÏ¿© ³»ºÎ¿¡¼ 1°³ÀÇ À̹ÌÁö·Î ÇÕÄ£µÚ Çѹø¿¡ ±×·Á³»°Å³ª ´õºí¹öÆÛ¸µÀ» ÀÌ¿ëÇÏ´ø°¡ ÇÏ´Â Ãß°¡ÀûÀÎ ±â¹ýÀ» µ¿¿øÇØ¾ß ÇÕ´Ï´Ù.