Esempio n. 1
0
 private void TestCustomLang(string what)
 {
     if (Files.GetFilePath(what) == null)
     {
         using (OpenFileDialog dialog = new OpenFileDialog())
         {
             dialog.Multiselect     = false;
             dialog.Title           = "Choose Cliloc file to open";
             dialog.CheckFileExists = true;
             dialog.Filter          = "cliloc files (cliloc.*)|cliloc.*";
             if (dialog.ShowDialog() == DialogResult.OK)
             {
                 Files.SetMulPath(dialog.FileName, what);
                 LangComboBox.BeginUpdate();
                 if (what == "cliloc.custom1")
                 {
                     LangComboBox.Items[2] = String.Format("Custom 1 ({0})", Path.GetExtension(dialog.FileName));
                 }
                 else
                 {
                     LangComboBox.Items[3] = String.Format("Custom 2 ({0})", Path.GetExtension(dialog.FileName));
                 }
                 LangComboBox.EndUpdate();
             }
         }
     }
 }
Esempio n. 2
0
 void ApplyBtnClick(object sender, EventArgs e)
 {
     if (LangComboBox.SelectedIndex == -1)
     {
         MessageBox.Show("Выберите язык из списка.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning);
         LangComboBox.Focus();
     }
     else
     {
         m_ApplyData          = true;
         ControlPanel.Enabled = false;
         LangsPanel.Enabled   = false;
         if (!m_bw.IsBusy)
         {
             m_bw.RunWorkerAsync();
         }
     }
 }