コード例 #1
0
ファイル: Form1.cs プロジェクト: gogasan24ru/oho1.1
        public Form1()
        {
            InitializeComponent();
            trackBar1.Value = 1;

            pictureBox1.Width  = Width - pictureBox1.Left;
            pictureBox1.Height = Height - pictureBox1.Top;
            r = new Random();
            pictureBox1.Image = new Bitmap(Width - pictureBox1.Left, Height - pictureBox1.Top);
            gr = Graphics.FromImage(pictureBox1.Image);
            gr.Clear(Color.White);

            string[] files =
                Directory.GetFiles("./", "*.png");

            foreach (string file in files)
            {
                Image temp = Image.FromFile(file);
//                img.Add(Image.FromFile(file));
                imgs.Add(new imageContainer(file.Split('/')[file.Split('/').Length - 1], temp));
            }

            t = new texture_selector(imgs);
            t.Show();
            pictureBox1.Focus();
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: gogasan24ru/oho1.1
 private void checkBox4_CheckedChanged(object sender, EventArgs e)
 {
     if (checkBox4.Checked)
     {
         if (t != null)
         {
             t.Close();
         }
         t = new texture_selector(imgs);
         t.Show();
         return;
     }
     //if (t != null && (!t.Visible && checkBox4.Checked)) t.Visible = true;
 }