Example #1
0
 private void ChkShortcut_Click(object sender, EventArgs e)
 {
     if (DesktopShortcut.Exists())
     {
         DesktopShortcut.Delete();
     }
     else
     {
         DesktopShortcut.Create();
     }
 }
Example #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     DesktopShortcut.CreateCustomShortcut();
 }
Example #3
0
        public SettingsForm()
        {
            InitializeComponent();

            Localise();
            labVer.Text = Localisation.Get("Your Version: {0}\n" +
                                           "Build: {1}", Utilities.GetVersion(true), Updates.version);

            //tabControl.ItemSize = new Size((tabControl.Width / tabControl.TabCount) - 1, 30);

            // Adding already translates elementr to youtube-dl update frequency setting
            cbYoutubeDlUpdateFrequency.Items.Add(Localisation.Get("Upon every start"));
            cbYoutubeDlUpdateFrequency.Items.Add(Localisation.Get("Daily"));
            cbYoutubeDlUpdateFrequency.Items.Add(Localisation.Get("Weekly"));
            cbYoutubeDlUpdateFrequency.Items.Add(Localisation.Get("Monthly"));
            cbYoutubeDlUpdateFrequency.Items.Add(Localisation.Get("Never"));

            chkAutoSort.Checked    = Settings.AutoSort;
            chkNoMetafiles.Checked = Settings.DisableMetaFiles;
            chkAutoUpdates.Checked = !Settings.NoUpdates;
            radOfficial.Checked    = !Settings.Preview;
            radPreview.Checked     = Settings.Preview;
            chkCrashLog.Checked    = Settings.Logs;
            chkHistory.Checked     = Settings.History;
            cbYoutubeDlUpdateFrequency.SelectedIndex = Settings.YouTubeDlUpdateFrequency;
            chkShortcut.Checked         = DesktopShortcut.Exists();
            chkNoSteam.Checked          = Settings.NoSteam;
            chkShowFfmpegOutput.Checked = Settings.ShowFfmpegOutput;
            chkIgnoreLimits.Checked     = Settings.IgnoreLimitations;

            radQualityBest.Checked       = Settings.YoutubeDlDownloadQuality == 0;
            radQualityAverage.Checked    = Settings.YoutubeDlDownloadQuality == 1;
            radQualityCompressed.Checked = Settings.YoutubeDlDownloadQuality == 2;

            txtAudacity.Text = Settings.AudacityPath;
            chkRecommendedFrequency.Checked = Settings.UseRecommendedFrequency;
            chkMono.Checked = Settings.ConvertToMono;

            chkTranslatorMode.Checked        = Settings.TranslatorMode;
            chkCreateLocaleErrorLogs.Checked = Settings.CreateLocaleErrorLogs;

            if (Directory.Exists("locales"))
            {
                DirectoryInfo di    = new DirectoryInfo("locales");
                FileInfo[]    files = di.GetFiles("*.po");
                foreach (FileInfo file in files)
                {
                    comboLang.Items.Add(file.Name.Replace(file.Extension, ""));
                }
            }

            comboLang.Text = Settings.Language;

            // Tooltips
            ToolTip toolTip = new ToolTip
            {
                AutoPopDelay = 5000,
                InitialDelay = 1000,
                ReshowDelay  = 500,
                ShowAlways   = true
            };

            toolTip.SetToolTip(chkAutoSort, Localisation.Get("After each file change, all songs will be sorted (ex. if you remove the track2, there won't be a gap between track1 and track3)."));
            toolTip.SetToolTip(chkNoMetafiles, Localisation.Get("Disables song name saving into songnames.xml. Only file name will be used."));
            toolTip.SetToolTip(chkAutoUpdates, Localisation.Get("On each start, the program will connect to the server and check if the new updates are available."));
            toolTip.SetToolTip(radOfficial, Localisation.Get("Official update channel is the most stable one and is recommended for most users."));
            toolTip.SetToolTip(radPreview, Localisation.Get("Preview update channel offers you an early access to new updates and improvements. Only for advanced users."));
            toolTip.SetToolTip(cbYoutubeDlUpdateFrequency, Localisation.Get("Set how often does youtube-dl start in order to check for updates."));
            toolTip.SetToolTip(chkCrashLog, Localisation.Get("The program after each crash causing error will try to save the crash info to log folder."));
            toolTip.SetToolTip(chkHistory, Localisation.Get("All operations on songs will be saved into history file - converting, moving, deleting and more."));
            toolTip.SetToolTip(chkShortcut, Localisation.Get("Create desktop shortcut to MSCMM."));
            toolTip.SetToolTip(chkNoSteam, Localisation.Get("Uppon pressing 'Launch Game', the program won't use Steam, and rather start the game through exe."));
            toolTip.SetToolTip(chkIgnoreLimits, Localisation.Get("Normally the program will show a warning during conversion, " +
                                                                 "when there are more files than the folder allows (99 for Radio, 15 for CDs). If this setting is enabled, " +
                                                                 "it will be ignored."));
            toolTip.SetToolTip(chkTranslatorMode, Localisation.Get("When enabled, it enables you to reload the translation and reloads current window's translations by pressing F5."));

            txtChangelog.Text = Properties.Resources.changelog;
            btnAudacity.Text  = char.ConvertFromUtf32(0x1F4C1);

            txtAudacity.ContextMenu = new ContextMenu();

            if (!File.Exists("youtube-dl.exe"))
            {
                cbYoutubeDlUpdateFrequency.Enabled = false;
                btnCheckYTDLUpdates.Enabled        = false;
            }
        }