예제 #1
0
        /// <summary>
        /// Form is being loaded
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FormMain_Load(object sender, EventArgs e)
        {
            // save states
            new WindowProperties(this);

            // Refresh contacts first
            buttonRefreshContacts_Click(sender, e);
            _FaceVisualiser = new FaceToPictureBox(pictureBoxPreview);
            toolStripStatusLabelInfo.Text = "";

            // update the file list settings
            bool onlyChanged = (PicFaceConfig.FileView == PicFaceConfig.FileViewSettings.OnlyChanged);

            allFilesToolStripMenuItem.Checked = !onlyChanged;
            filesWithChangedFaceInformationToolStripMenuItem.Checked = onlyChanged;

#if DEBUG
            //// ###############
            _CurrentDirectory     = @"D:\Users\Christian.CPC\Pictures\Tests";
            textBoxDirectory.Text = _CurrentDirectory;

            ImageInfoList list = new ImageInfoList(ExifToolPictureData.Collect(_CurrentDirectory));

            LoadPictureIndex();
            //// ###############
#endif
        }
예제 #2
0
        /// <summary>
        /// Loading the Form, do some initialisation
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FormMain_Load(object sender, EventArgs e)
        {
#if DEBUG
            //// ###############
            CurrentDirectory = @"D:\Users\Christian.CPC\Pictures\Tests";

            ImageInfoList list = new ImageInfoList(CurrentDirectory);
            foreach (KeyValuePair <string, ImageInfo> entry in list)
            {
                listBoxImages.Items.Add(entry.Value);
            }
            //// ###############
#endif
        }
예제 #3
0
파일: FormMain.cs 프로젝트: TagerW/picface
        /// <summary>
        /// Loading the Form, do some initialisation
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FormMain_Load(object sender, EventArgs e)
        {
            #if DEBUG
             //// ###############
             CurrentDirectory = @"D:\Users\Christian.CPC\Pictures\Tests";

             ImageInfoList list = new ImageInfoList(CurrentDirectory);
             foreach (KeyValuePair<string, ImageInfo> entry in list)
             {
            listBoxImages.Items.Add(entry.Value);
             }
             //// ###############
            #endif
        }
예제 #4
0
파일: Form1.cs 프로젝트: YDEKQ/ImageSorter
        private void btn_FreshInput_Click(object sender, EventArgs e)
        {
            string inputPath = this.txt_InputPath.Text;

            if (Directory.Exists(inputPath) == true)
            {
                List <string> filePathList = Directory.GetFiles(inputPath, "*.*", SearchOption.TopDirectoryOnly).ToList();
                if ((filePathList != null) && (filePathList.Count > 0))
                {
                    foreach (var imageInfo in ImageInfoList)
                    {
                        if (filePathList.Contains(imageInfo.File.FullName) == false)
                        {
                            imageInfo.Selected = true;
                        }
                    }
                    ImageInfoList.RemoveAll(imageInfo => imageInfo.Selected == true);

                    LoadImagesFromPath(filePathList);
                }
            }
        }
예제 #5
0
파일: Form1.cs 프로젝트: YDEKQ/ImageSorter
        private void btn_OK_Click(object sender, EventArgs e)
        {
            string destPath = this.txt_OutputPath.Text;

            if (Directory.Exists(destPath) == true)
            {
                if (ImageInfoList.Count > 0)
                {
                    decimal startIndex = this.numericUpDown1.Value;
                    foreach (var imageInfo in ImageInfoList)
                    {
                        FileInfo file = imageInfo.File;
                        if (file != null)
                        {
                            string newFilePath = Path.Combine(destPath, string.Format("{0:D3}_{1}", (int)(startIndex + ImageInfoList.IndexOf(imageInfo)), imageInfo.Name));
                            file.CopyTo(newFilePath, true);
                        }
                    }
                    System.Diagnostics.Process.Start("explorer.exe", destPath);
                }
                else
                {
                    MessageBox.Show("根本就没有图好吗??哼!(@ ̄ー ̄@)");
                }
            }
            else
            {
                MessageBox.Show("输出文件夹不存在??你让我往哪儿存?!\n(╯‵□′)╯︵┻━┻");
            }
        }
예제 #6
0
파일: FormMain.cs 프로젝트: TagerW/picface
        /// <summary>
        /// Form is being loaded
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FormMain_Load(object sender, EventArgs e)
        {
            // save states
             new WindowProperties(this);

             // Refresh contacts first
             buttonRefreshContacts_Click(sender, e);
             _FaceVisualiser = new FaceToPictureBox(pictureBoxPreview);
             toolStripStatusLabelInfo.Text = "";

             // update the file list settings
             bool onlyChanged = (PicFaceConfig.FileView == PicFaceConfig.FileViewSettings.OnlyChanged);
             allFilesToolStripMenuItem.Checked = !onlyChanged;
             filesWithChangedFaceInformationToolStripMenuItem.Checked = onlyChanged;

            #if DEBUG
             //// ###############
             _CurrentDirectory = @"D:\Users\Christian.CPC\Pictures\Tests";
             textBoxDirectory.Text = _CurrentDirectory;

             ImageInfoList list = new ImageInfoList(ExifToolPictureData.Collect(_CurrentDirectory));

             LoadPictureIndex();
             //// ###############
            #endif
        }