Beispiel #1
0
        private void Window_ContentRendered(object sender, EventArgs e)
        {
            CTextLabel.SetLanguage(CConfig.GetLanguage());
            String lng = CTextLabel.GetLanguage();

            //CConfig.SetLanguage(lng);

            if (lng.Equals("TH"))
            {
                radThai.IsChecked = true;
            }
            else
            {
                radEng.IsChecked = true;
            }

            OnixWebServiceAPI.Init(CConfig.GetKey(), CConfig.GetUrl());

            CUtil.EnableForm(false, this);
            if (OnixWebServiceAPI.Patch(new CTable("DUMMY")) == null)
            {
                CUtil.EnableForm(true, this);
                CMessageBox.Show(OnixWebServiceAPI.GetLastErrorDescription(), "ERROR", MessageBoxButton.OK);

                WinServerSetting w = new WinServerSetting();
                w.ShowDialog();
            }

            CUtil.EnableForm(true, this);

            if (CHelper.VerifyVersion())
            {
                //Comment this line below in order to test auto update from IDE
                return;
            }

            String api = CConfig.APIVersion;

            if (!api.Equals(""))
            {
                CUtil.AutoUpdateProgram("OnixClientCenter.exe", "OnixCenter.zip");
            }

            isLogin = false;
            this.Close();
        }
Beispiel #2
0
 private void radEng_Checked(object sender, RoutedEventArgs e)
 {
     CTextLabel.SetLanguage("EN");
 }
Beispiel #3
0
 private void radThai_Checked(object sender, RoutedEventArgs e)
 {
     CTextLabel.SetLanguage("TH");
 }