Exemplo n.º 1
0
 public SortImgSettings( string ap, Logging log)
 {
     apppath = ap;
     logger = log;
     INI = new IniFile(apppath + "\\Settings.ini");
 }
Exemplo n.º 2
0
        private string[] workingFolders = new string[64]; // 0-31 are source folders, 32 is dup folder, 33-63 are destination folders

        #endregion Fields

        #region Constructors

        //Main constructor for the form
        public SortImg()
        {
            InitializeComponent();

            string version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
            this.Text = String.Format("SortImg (Ver. {0})", version);

            DoubleBuffered = true;
            is64bit = Utils.Is64BitOperatingSystem(); //Check address space for recycle bin strut construction diffrences.
            if (is64bit)
            {
                util64 = new Utils64();
            }
            else
            {
                util32 = new Utils32();
            }
            pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
            tnb = new ThumbnailBuilder();
            addImage = new DelegateAddImage(this.AddImage);
            thumbController = new ThumbnailController();
            thumbController.OnStart += new ThumbnailControllerEventHandler(thumbControllerStart);
            thumbController.OnAdd += new ThumbnailControllerEventHandler(thumbControllerAdd);
            thumbController.OnEnd += new ThumbnailControllerEventHandler(thumbControllerEnd);

            this.KeyUp += new KeyEventHandler(Key);
            ImageInfo = new ToolTip();
            imageMatcher = new ImageMatcherSpeed();
            logger = new Logging();
            buttonbuilder = new DynamicButtons();
            this.Closing += new CancelEventHandler(SortImg_Closing);
            FileCopyedsource = new ArrayList();
            FileCopyeddest = new ArrayList();
            ButtonDispose = new ArrayList();
            fileNameCreator = new FileNameBuilder(false);
            checkedTags = new List<string>();
            currentTagsList = new List<string>();
            selected = new List<ImageViewer>();
            storedSettings = new SortImgSettings(Application.StartupPath, logger);
            storedSettings.loadSettings(true, true);
            sourceAdd = new SourceDialog(storedSettings);
        }
Exemplo n.º 3
0
 // Build new ini settings file
 private void saveNewSettings(string apppath, Logging logger)
 {
     //  INI = new IniFile(apppath + "\\Settings.ini");
     INI.IniWriteValue("directories", "lastimage", "null");
     INI.IniWriteValue("keybindings", "Delete", "110");
     INI.IniWriteValue("keybindings", "Delete Alt", "46");
     INI.IniWriteValue("keybindings", "Undo", "109");
     INI.IniWriteValue("keybindings", "Dir 1", "103");
     INI.IniWriteValue("keybindings", "Dir 2", "104");
     INI.IniWriteValue("keybindings", "Dir 3", "100");
     INI.IniWriteValue("keybindings", "Dir 4", "101");
     INI.IniWriteValue("keybindings", "Dir 5", "97");
     INI.IniWriteValue("keybindings", "Dir 6", "98");
     INI.IniWriteValue("options", "Log", "true");
     INI.IniWriteValue("options", "DupMode", "0");
 }
Exemplo n.º 4
0
 // Triggered when picking the duplicate folder thus the finalfold
 private void finalFold()
 {
     try
     {
         processImageDirectory();
         lineCount++;
         // Recreate the logger with the new paras
         logger = new Logging(workingFolders[dupFold], storedSettings.LogValue);
         SetPicture();
     }
     catch (Exception ex)
     {
         ErrorDialog exp = new ErrorDialog(ex, "ERROR:");
         exp.StartPosition = FormStartPosition.CenterParent;
         if (exp.ShowDialog() == DialogResult.OK){}
     }
 }