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(); }