Ejemplo n.º 1
0
 private void LangSel_SelectedIndexChanged(object sender, EventArgs e)
 {
     Properties.Settings.Default.SelectedLang = Languages.LanguagesCodes[LangSel.SelectedIndex];
     Languages.ChangeLanguage(Languages.LanguagesCodes[LangSel.SelectedIndex]);
     Properties.Settings.Default.Save();
     InitializeLanguage();
 }
Ejemplo n.º 2
0
 private void OverrideLanguageCheck_CheckedChanged(object sender, EventArgs e)
 {
     LangSel.Enabled = OverrideLanguageCheck.Checked;
     Properties.Settings.Default.LangOverride = OverrideLanguageCheck.Checked;
     Properties.Settings.Default.Save();
     Languages.ChangeLanguage(OverrideLanguageCheck.Checked ? Languages.LanguagesCodes[LangSel.SelectedIndex] : Languages.ReturnCulture(false, null).Name);
     InitializeAllLanguages();
 }
Ejemplo n.º 3
0
 private void LangSel_SelectedIndexChanged(object sender, EventArgs e)
 {
     Flag.BackgroundImage = Languages.LanguagesFlags[LangSel.SelectedIndex];
     if (LangSel.Enabled)
     {
         Languages.ChangeLanguage(Languages.LanguagesCodes[LangSel.SelectedIndex]);
         InitializeAllLanguages();
     }
 }
Ejemplo n.º 4
0
        public static void CheckUp(String[] args)
        {
            bool FailedOnce = false;

            bool Okay;

ReTest:
            m = new EventWaitHandle(false, EventResetMode.ManualReset, String.Format("KepMIDIConv{0}", Session), out Okay);
            if (!Okay)
            {
                if (!FailedOnce)
                {
                    FailedOnce = true;
                }

                var bytes = new byte[16];
                rnd.NextBytes(bytes);
                Session = Convert.ToBase64String(bytes).Replace("=", "").Replace("+", "").Replace("/", "").ToString();

                goto ReTest;
            }

            if (FailedOnce)
            {
                try
                {
                    string OriginalPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

                    Program.OGGEnc = String.Format("{0}kmcogg{1}.exe", Path.GetTempPath(), Session);
                    Program.MP3Enc = String.Format("{0}kmcmp3{1}.exe", Path.GetTempPath(), Session);
                    File.Copy(String.Format("{0}\\{1}", OriginalPath, "kmcogg.exe"), Program.OGGEnc);
                    File.Copy(String.Format("{0}\\{1}", OriginalPath, "kmcmp3.exe"), Program.MP3Enc);

                    Program.DeleteEncoder = true;
                }
                catch { Program.DeleteEncoder = false; }
            }

            Languages.DC = Languages.ReturnCulture(false, null);
            Languages.ChangeLanguage(Languages.ReturnCulture(false, null).Name);
            CheckStartUpArguments(args);

            if (!SkipUpdate)
            {
                PerformUpdate();
            }
            if (!SkipTrigger)
            {
                TriggerDate();
            }
        }