예제 #1
0
        private void PopulateBigPicList(string iconFile)
        {
            this.secPicListView.Clear();
            this.imageList2.Images.Clear();

            Query.ImageSearch imageSearch = new ImageSearch();
            string[] files = imageSearch.SelectedBestImageChanged(iconFile);
            if (files == null)
            {
                MessageBox.Show("没有搜索到对应的二级图片", "警告");
                return;
            }

            this.secPicListView.Scrollable = true;
            this.secPicListView.MultiSelect = false;
            this.secPicListView.View = View.LargeIcon;
            this.secPicListView.LargeImageList = imageList2;

            for (int i = 0; i < files.Length; i++)
            {
                this.imageList2.Images.Add(Image.FromFile(files[i]));
                string text = System.IO.Path.GetFileName(files[i]);
                ListViewItem item = new ListViewItem()
                {
                    Tag = files[i],
                    Text = text,
                    ImageIndex = i
                };
                this.secPicListView.Items.Add(item);
            }
        }
예제 #2
0
        private void PopulateBigPicList(string iconFile)
        {
            this.secPicListView.Clear();
            this.imageList2.Images.Clear();

            Query.ImageSearch imageSearch = new ImageSearch();
            string[]          files       = imageSearch.SelectedBestImageChanged(iconFile);
            if (files == null)
            {
                MessageBox.Show("没有搜索到对应的二级图片", "警告");
                return;
            }

            this.secPicListView.Scrollable     = true;
            this.secPicListView.MultiSelect    = false;
            this.secPicListView.View           = View.LargeIcon;
            this.secPicListView.LargeImageList = imageList2;


            for (int i = 0; i < files.Length; i++)
            {
                this.imageList2.Images.Add(Image.FromFile(files[i]));
                string       text = System.IO.Path.GetFileName(files[i]);
                ListViewItem item = new ListViewItem()
                {
                    Tag        = files[i],
                    Text       = text,
                    ImageIndex = i
                };
                this.secPicListView.Items.Add(item);
            }
        }
예제 #3
0
        private void bestPicListView_ItemActivate(object sender, System.EventArgs e)
        {
            this.secPicListView.Clear();
            this.imageList2.Images.Clear();

            Query.ImageSearch imageSearch = new ImageSearch();
            string[]          files       = imageSearch.SelectedBestImageChanged(this.bestPicListView.FocusedItem.Text, RemoteImaging.Query.ImageDirSys.BeginDir);
            this.secPicListView.Scrollable     = true;
            this.secPicListView.MultiSelect    = false;
            this.secPicListView.View           = View.LargeIcon;
            this.secPicListView.LargeImageList = imageList2;

            for (int i = 0; i < files.Length; i++)
            {
                this.imageList2.Images.Add(Image.FromFile(files[i]));
                this.secPicListView.Items.Add(System.IO.Path.GetFileNameWithoutExtension(files[i]), i);
            }

            string filePath = RemoteImaging.Query.ImageDirSys.BeginDir + "\\" +
                              this.bestPicListView.FocusedItem.Text.Substring(0, 2) + "\\" +
                              (2000 + int.Parse(this.bestPicListView.FocusedItem.Text.Substring(3, 2))).ToString() + "\\" +
                              this.bestPicListView.FocusedItem.Text.Substring(5, 2) + "\\" +
                              this.bestPicListView.FocusedItem.Text.Substring(7, 2) + "\\" + Query.ImageDirSys.IconPath + "\\" + this.bestPicListView.FocusedItem.Text;

            //show modify icon
            if (File.Exists(filePath))
            {
                this.pictureBox1.Image = Image.FromFile(filePath);
            }
            //

            //detail infomation
            Camera camera = new Camera();

            camera.ID             = 01;
            camera.Name           = "四川大学南大门摄像头";
            this.gotPlaceTxt.Text = "四川大学南大门摄像头";

            string focusedFileName = this.bestPicListView.FocusedItem.Text;

            this.gotTimeTxt.Text = (2000 + int.Parse(focusedFileName.Substring(3, 2))).ToString() + "年" + //year
                                   focusedFileName.Substring(5, 2) + "月" +                                //month
                                   focusedFileName.Substring(7, 2) + "日" +                                //day
                                   focusedFileName.Substring(9, 2) + "时" +                                //hour
                                   focusedFileName.Substring(11, 2) + "分" +                               //minute
                                   focusedFileName.Substring(13, 2) + "妙";                                //second

            //
        }
예제 #4
0
        private void bestPicListView_ItemActivate(object sender, System.EventArgs e)
        {
            this.secPicListView.Clear();
            this.imageList2.Images.Clear();

            Query.ImageSearch imageSearch = new ImageSearch();
            string[] files = imageSearch.SelectedBestImageChanged(this.bestPicListView.FocusedItem.Text, RemoteImaging.Query.ImageDirSys.BeginDir);
            this.secPicListView.Scrollable = true;
            this.secPicListView.MultiSelect = false;
            this.secPicListView.View = View.LargeIcon;
            this.secPicListView.LargeImageList = imageList2;

            for (int i = 0; i < files.Length; i++)
            {
                this.imageList2.Images.Add(Image.FromFile(files[i]));
                this.secPicListView.Items.Add(System.IO.Path.GetFileNameWithoutExtension(files[i]), i);
            }

            string filePath = RemoteImaging.Query.ImageDirSys.BeginDir + "\\" +
                              this.bestPicListView.FocusedItem.Text.Substring(0, 2) + "\\" +
                              (2000 + int.Parse(this.bestPicListView.FocusedItem.Text.Substring(3, 2))).ToString() + "\\" +
                              this.bestPicListView.FocusedItem.Text.Substring(5, 2) + "\\" +
                              this.bestPicListView.FocusedItem.Text.Substring(7, 2) + "\\" + Query.ImageDirSys.IconPath + "\\" + this.bestPicListView.FocusedItem.Text;

            //show modify icon
            if (File.Exists(filePath))
            {
                this.pictureBox1.Image = Image.FromFile(filePath);
            }
            //

            //detail infomation
            Camera camera = new Camera();
            camera.ID = 01;
            camera.Name = "四川大学南大门摄像头";
            this.gotPlaceTxt.Text = "四川大学南大门摄像头";

            string focusedFileName = this.bestPicListView.FocusedItem.Text;
            this.gotTimeTxt.Text = (2000 + int.Parse(focusedFileName.Substring(3, 2))).ToString() + "年" + //year
                                   focusedFileName.Substring(5, 2) + "月" + //month
                                   focusedFileName.Substring(7, 2) + "日" + //day
                                   focusedFileName.Substring(9, 2) + "时" + //hour
                                   focusedFileName.Substring(11, 2) + "分" + //minute
                                   focusedFileName.Substring(13, 2) + "妙";//second

            //
        }
예제 #5
0
        private void PopulateBigPicList(string iconFile)
        {
            this.imageList2.Images.Clear();

            string[] files = ImageSearch.SelectedBestImageChanged(iconFile);
            if (files == null)
            {
                MessageBox.Show("没有搜索到对应的二级图片", "警告");
                return;
            }

            for (int i = 0; i < files.Length; i++)
            {
                this.imageList2.Images.Add(Image.FromFile(files[i]));
                string       text = System.IO.Path.GetFileName(files[i]);
                ListViewItem item = new ListViewItem()
                {
                    Tag        = files[i],
                    Text       = text,
                    ImageIndex = i
                };
            }
        }