Beispiel #1
0
 private void FormStart_KeyDown(object sender, KeyEventArgs e)
 {
     if (!e.Shift && e.Control && !e.Alt && e.KeyCode == Keys.T)
     {
         TestUtil.RunTests();
         Utils.MessageBox("Tests complete.");
     }
     else if (!e.Shift && e.Control && !e.Alt && e.KeyCode == Keys.L)
     {
         bool nextState = !Configs.Current.GetBool(ConfigKey.EnableVerboseLogging);
         Configs.Current.SetBool(ConfigKey.EnableVerboseLogging, nextState);
         Utils.MessageBox("verbose logging set to " + nextState);
     }
     else if (!e.Shift && e.Control && e.Alt && e.KeyCode == Keys.E)
     {
         bool nextState = !Configs.Current.GetBool(ConfigKey.EnablePersonalFeatures);
         Configs.Current.SetBool(ConfigKey.EnablePersonalFeatures, nextState);
         Utils.MessageBox("personal features set to " + nextState);
         HideOrShowMenus();
     }
 }
Beispiel #2
0
        public FormStart()
        {
            InitializeComponent();
            HideOrShowMenus();

            // provide Click events for menu items (set dirs).
            setDirectoryForDeletedToolStripMenuItem.Click += (o, e) => OnSetConfigsDir(
                "When pressing Delete to 'move to trash', files will be moved to this directory.",
                o, ConfigKey.FilepathDeletedFilesDir);
            setSortmusicStagingLocationToolStripMenuItem.Click += (o, e) => OnSetConfigsDir(
                "(Optional) Set sortmusic staging directory.",
                o, ConfigKey.FilepathSortMusicToLibraryStagingDir);
            setSorttwitterSourceLocationToolStripMenuItem.Click += (o, e) => OnSetConfigsDir(
                "(Optional) Set sorttwitter input directory.",
                o, ConfigKey.FilepathSortTwitterImagesSourceDir);
            setSorttwitterDestinationLocationToolStripMenuItem.Click += (o, e) =>
                                                                        OnSetConfigsDir(
                "(Optional) Set sorttwitter output directory.",
                o, ConfigKey.FilepathSortTwitterImagesDestinationDir);

            // provide Click events for menu items (set files).
            setAudioCropStripMenuItem.Click += (o, e) => OnSetConfigsFile(
                "(Optional) Select an audio cropping tool, such as mp3directcut.exe.",
                o, ConfigKey.FilepathAudioCrop);
            setAudioEditorToolStripMenuItem.Click += (o, e) => OnSetConfigsFile(
                "(Optional) Select an application for editing audio, such as Audacity.",
                o, ConfigKey.FilepathAudioEditor);
            setAudioPlayerToolStripMenuItem.Click += (o, e) => OnSetConfigsFile(
                "(Optional) Select an application for playing audio.",
                o, ConfigKey.FilepathAudioPlayer);
            setCreateSyncToolStripMenuItem.Click += (o, e) => OnSetConfigsFile(
                "(Optional) Locate 'create synchronicity.exe'",
                o, ConfigKey.FilepathCreateSync);
            setCoordmusicLocationToolStripMenuItem.Click += (o, e) => OnSetConfigsFile(
                "(Optional) Locate coordinate_music directory's 'main.py'",
                o, ConfigKey.FilepathCoordMusicMainPy);
            setImageEditorLocationToolStripMenuItem.Click += (o, e) => OnSetConfigsFile(
                "(Optional) Select an application for editing images.",
                o, ConfigKey.FilepathImageEditor);
            setAltImageEditorToolStripMenuItem.Click += (o, e) => OnSetConfigsFile(
                "(Optional) Select another application for editing images.",
                o, ConfigKey.FilepathImageEditorAlt);
            setImageEditorJpegToolStripMenuItem.Click += (o, e) => OnSetConfigsFile(
                "(Optional) Select an application for editing jpgs, such as jpegcrop.exe.",
                o, ConfigKey.FilepathImageEditorJpeg);
            setImageEditorCropLocationToolStripMenuItem.Click += (o, e) => OnSetConfigsFile(
                "(Optional) Select an application for cropping jpgs, such as jpegcrop.exe.",
                o, ConfigKey.FilepathImageEditorCrop);
            setM4aEncoderLocationToolStripMenuItem.Click += (o, e) => OnSetConfigsFile(
                "(Optional) Locate 'qaac.exe'; directory should also contain 'dropq128.py'.",
                o, ConfigKey.FilepathM4aEncoder);
            setPythonLocationToolStripMenuItem.Click += (o, e) => OnSetConfigsFile(
                "Locate 'python.exe' from Python 3.",
                o, ConfigKey.FilepathPython);
            setWinMergeToolStripMenuItem.Click += (o, e) => OnSetConfigsFile(
                "(Optional) Select a diff/merge application, such as 'winmerge.exe'.",
                o, ConfigKey.FilepathWinMerge);

            categorizeAndRenamePicturesToolStripMenuItem.Click += (o, e) =>
                                                                  OpenForm(new ModeCategorizeAndRename(), InputBoxHistory.OpenImageDirectory);
            checkFilesizesToolStripMenuItem.Click += (o, e) =>
                                                     OpenForm(new ModeCheckFilesizes(), InputBoxHistory.OpenImageDirectory);
            resizePhotosKeepingExifsToolStripMenuItem.Click += (o, e) =>
                                                               OpenForm(new ModeResizeKeepExif(), InputBoxHistory.OpenImageKeepExifDirectory);
            markwavQualityToolStripMenuItem.Click += (o, e) =>
                                                     OpenForm(new ModeMarkWavQuality(), InputBoxHistory.OpenWavAudioDirectory);
            markmp3QualityToolStripMenuItem.Click += (o, e) =>
                                                     OpenForm(new ModeMarkMp3Quality(), InputBoxHistory.OpenAudioDirectory);

            if (Utils.IsDebug())
            {
                TestUtil.RunTests();
            }

            if (Configs.Current.GetBool(ConfigKey.EnablePersonalFeatures))
            {
                this.label1.Text += "\r\n\r\n\r\nDrag/drop your music or images here.";
            }
        }