コード例 #1
0
        public void SetAutoDetect(XMLDLData data)
        {
            if (data.IsEmpty())
            {
                this.p_ErrorReason(data.GetCode());
                return;
            }
            string ft = ((ToolStripLabel)this.m_FComboBox.SelectedItem).Name;

            if (ft != data.GetLang())
            {
                this.p_SetSelectedItem(data.GetLang(), this.m_FComboBox);
                string tt = ((ToolStripLabel)this.m_TComboBox.SelectedItem).Name;
                if (this.m_TSMIAutoOn.Checked || data.GetLang() == tt)
                {
                    this.p_SetSelectedItem(ft, this.m_TComboBox);
                }
            }
        }
コード例 #2
0
ファイル: MainWindow.cs プロジェクト: gentcp/YAT
        private async void M_ATimer_Tick(object sender, EventArgs e)
        {
            this.m_ATimer.Stop();
            string text = this.m_FRichTextBox.Text;

            if (text.Length <= 0)
            {
                return;
            }
            this.SetStatusText(this.m_CRManager.GetString("AutoDetect"));
            string r = "";

            try
            {
                r = await this.m_APIManager.AutoDetect(text, null);
            }
            catch
            {
            }
            XMLDLData data = new XMLDLData(r);

            this.SetAutoDetect(data);
        }