private void WinMain_OnLoad(object sender, RoutedEventArgs e) { CConfig.ConfigRead(); initStatusBar(); WinLogin wLogin = new WinLogin(); wLogin.ShowDialog(); Boolean isOK = wLogin.LoginOK; if (isOK) { stbiUserValue.Content = OnixWebServiceAPI.GetLastUserLogin(); isLogin = true; configureMenu(); //Load user variables if (!OnixWebServiceAPI.UserID().Equals("")) { currentUser = new CTable("USER"); currentUser.SetFieldValue("USER_ID", OnixWebServiceAPI.UserID()); currentUser = OnixWebServiceAPI.GetUserInfo(currentUser); CConfig.LoadLastValueSaved(currentUser); } CReportFactory.InitReports(); CMasterReference.LoadCompanyProfile(); CGlobalVariable.InitGlobalVariables(); CMasterReference.LoadAllMasterRefItems(OnixWebServiceAPI.GetAllMasterRefList); CUtil.ExportLoadingImage(); } }