Пример #1
0
 private void InitializeAllLanguages()
 {
     InitializeLanguage();
     MainWindow.InitializeLanguage();
     AdvancedSettings.InitializeLanguage();
     SoundfontDialog.InitializeLanguage();
     AdvancedVoices.InitializeLanguage();
     NotifyArea.ExitItem.Text = Languages.Parse("Exit");
 }
Пример #2
0
        public AdvancedSettings()
        {
            InitializeComponent();
            Delegate = this;
            InitializeLanguage();

            try
            {
                // W8
                if (MainWindow.KMCStatus.IsKMCBusy == true && MainWindow.KMCStatus.RenderingMode == false)
                {
                    AudioFreqLabel.Enabled = false;
                    FrequencyBox.Enabled   = false;
                    Label6.Enabled         = false;
                }
                else
                {
                    AudioFreqLabel.Enabled = true;
                    FrequencyBox.Enabled   = true;
                    Label6.Enabled         = true;
                }
                // K DONE
                MaxVoices.Value         = Properties.Settings.Default.Voices.LimitToRange(0, (Int32)MaxVoices.Maximum);
                OverrideTempoNow.Text   = String.Format(Languages.Parse("OverrideTempo"), MainWindow.KMCGlobals.OriginalTempo.ToString());
                FrequencyBox.Text       = Convert.ToString(Properties.Settings.Default.AudioFreq);
                SincInter.Checked       = Properties.Settings.Default.SincInter;
                BitrateBox.Text         = Convert.ToString(Properties.Settings.Default.Bitrate);
                RTFPS.Value             = Convert.ToDecimal(Properties.Settings.Default.RealTimeFPS);
                IgnoreNotes1.Checked    = Properties.Settings.Default.IgnoreNotes1;
                LoVel.Value             = Properties.Settings.Default.IgnoreNotesLow;
                HiVel.Value             = Properties.Settings.Default.IgnoreNotesHigh;
                Limit88.Checked         = Properties.Settings.Default.Limit88;
                Noteoff1.Checked        = Properties.Settings.Default.NoteOff1;
                FXDisable.Checked       = Properties.Settings.Default.DisableEffects;
                ConstantBitrate.Checked = Properties.Settings.Default.OverrideBitrate;
                TempoValue.Enabled      = OverrideTempoNow.Checked = Properties.Settings.Default.OverrideTempo;
                //
            }
            catch (Exception ex)
            {
                ErrorHandler errordialog = new KeppyMIDIConverter.ErrorHandler(Languages.Parse("FatalError"), ex.ToString(), 1, 0);
            }
        }
 // Language overrides
 private void ChangeLanguage(string selectedlanguage)
 {
     try
     {
         Registry.CurrentUser.CreateSubKey("SOFTWARE\\Keppy's MIDI Converter\\Languages", Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree);
         RegistryKey Settings = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Keppy's MIDI Converter\\Languages", true);
         Settings.SetValue("selectedlanguage", selectedlanguage, Microsoft.Win32.RegistryValueKind.String);
         Settings.Close();
         AdvancedSettings example = new AdvancedSettings();
         InitializeLanguage();
     }
     catch (Exception exception)
     {
         KeppyMIDIConverter.ErrorHandler errordialog = new KeppyMIDIConverter.ErrorHandler("Error", exception.Message.ToString(), 0, 0);
         errordialog.ShowDialog();
     }
 }