Esempio n. 1
0
        private void p2StartBtn_Click_1(object sender, EventArgs e)
        {
            allControlClear();
            allControlAdd();

            int imageNumber = 0;

            System.IO.DirectoryInfo   di = new System.IO.DirectoryInfo(".");
            System.IO.DirectoryInfo[] fi = di.GetDirectories("*");

            while (imageNumber < fi.Length)
            {
                if (fin)
                {
                    return;
                }

                if (fi[imageNumber].Name == "imgFile")
                {
                    continue;
                }

                ImagePage page = new ImagePage(this);
                page.makePage(imageNumber);

                page.panel.Location   = new Point(0, 35 + imageNumber * 290);
                page.panel.Size       = new Size(1620, 280);
                page.panel.AutoScroll = true;
                tabPage2.Controls.Add(page.panel);

                String searchText = "";
                int    index      = fi[imageNumber].Name.IndexOf("[");
                if (p2Check1.Checked && index >= 0)
                {
                    searchText  = (p2SearchText.Text == "") ? "" : (p2SearchText.Text + " ");
                    searchText += fi[imageNumber].Name.Replace("-", "+").Substring(fi[imageNumber].Name.IndexOf("["));
                }
                else
                {
                    searchText  = (p2SearchText.Text == "") ? "" : (p2SearchText.Text + " ");
                    searchText += fi[imageNumber].Name.Replace("-", "+");
                }

                page.getPage(searchText);

                imageNumber++;

                Thread.Sleep(10);
                if (close)
                {
                    break;
                }
            }
        }
Esempio n. 2
0
        void getPage()
        {
            mainpage = new ImagePage(this);

            mainpage.makePage(0, 1);

            mainpage.panel.Location   = new Point(0, 35);
            mainpage.panel.Size       = new Size(1620, 280);
            mainpage.panel.AutoScroll = true;
            tabPage1.Controls.Add(mainpage.panel);

            mainpage.fileName.Text = p1SearchText.Text;
            mainpage.getPage(mainpage.fileName.Text);
        }