示例#1
0
        //图片全参考排序
        private void imageSort_FR_Click(object sender, EventArgs e)
        {
            resetSortPanel();
            this.Refresh();
            int picNum = 0;

            for (int i = 0; i < MainInfo.tot; i++)
            {
                if (MainInfo.selected[i])
                {
                    picNum++;
                }
            }
            if (picNum == 0)
            {
                MessageBox.Show("请选择至少一张图片");
                return;
            }
            if (referenceImage == null)
            {
                MessageBox.Show("请至少选择一张图片作为参考图像");
                return;
            }
            int standard_width  = MainInfo.picInfo[referenceImage].width;
            int standard_height = MainInfo.picInfo[referenceImage].height;

            for (int i = 0; i < MainInfo.tot; i++)
            {
                if (MainInfo.selected[i])
                {
                    if (MainInfo.picInfo[MainInfo.path_name[i]].width != standard_width || MainInfo.picInfo[MainInfo.path_name[i]].height != standard_height)
                    {
                        MessageBox.Show("所选图像与参考图像尺寸不一致,无法进行全参考排序");
                        return;
                    }
                }
            }
            previous_pic = referenceImage;
            SortingResult sr = new SortingResult(referenceImage);

            sr.Show();
        }
示例#2
0
        //图片无参考排序
        private void imageSort_NR_Click(object sender, EventArgs e)
        {
            resetSortPanel();
            this.Refresh();
            int picNum = 0;

            for (int i = 0; i < MainInfo.tot; i++)
            {
                if (MainInfo.selected[i])
                {
                    picNum++;
                }
            }
            if (picNum == 0)
            {
                MessageBox.Show("请选择至少一张图片");
                return;
            }
            SortingResult sr = new SortingResult();

            sr.Show();
        }