public static extern bool EnumDisplaySettingsEx([Optional] string lpszDeviceName, uint iModeNum, ref DEVMODE lpDevMode, EDS dwFlags);
public static extern bool EnumDisplaySettingsEx(string lpszDeviceName, uint iModeNum, ref DevMode lpDevMode, EDS dwFlags);
public void HandleQuery(string sEDSQuery, QueryableTypes type, EDS client, int PageSize, Action <int, int, int> Progress) { try { int recordsRemaining = 0; int offset = 0; bool bFirstTime = true; int iTotalRecords = 0; do { QueryRequestType req = null; if (bFirstTime) { req = new QueryRequestType() { QueryItems = new QueryItemType[] { ConstructQueryItem(sEDSQuery, type, PageSize, offset) }, itemID = Guid.NewGuid(), TimeoutOverride = m_edsRequestTimeout }; } else { List <QueryItemType> qItems = new List <QueryItemType>(); req = new QueryRequestType() { itemID = Guid.NewGuid(), TimeoutOverride = m_edsRequestTimeout }; for (int i = 0; i < m_iBatchSize; i++) { qItems.Add(ConstructQueryItem(sEDSQuery, type, PageSize, offset + (PageSize * i))); } req.QueryItems = qItems.ToArray(); } DateTime start = DateTime.Now; var EDSResponse = client.Query(req); TimeSpan timespan = DateTime.Now.Subtract(start); string sError = ""; bool bError = ValidateResponse(EDSResponse, sEDSQuery, type, req.QueryItems, out sError); if (!bError && EDSResponse != null && EDSResponse.Data != null) { if (bFirstTime) { DataType d = EDSResponse.Data.First(); iTotalRecords = d.remaining + d.nextOffset; bFirstTime = false; } HandleData(EDSResponse); var data = EDSResponse.Data.AsQueryable(); recordsRemaining = data.Min(d => d.remaining); offset = data.Max(d => d.nextOffset); if (Progress != null) { int iTotal = recordsRemaining + offset; if (iTotal == 0) { Progress(100, iTotalRecords, iTotalRecords); } else { float percentage = ((float)offset / (float)iTotal) * 100; Progress((int)percentage, offset, iTotal); } } } else { if (bError && Progress != null) { throw new Exception(sError); } break; } } while (recordsRemaining > 0); } catch (Exception _ex) { Log.Exception(_ex, LogSource); throw; } }
private static string RetrieveReports(Clearinghouse clearinghouseClin, bool isAutomaticMode, IODProgressExtended progress = null) { progress = progress ?? new ODProgressExtendedNull(); progress.UpdateProgress(Lans.g(progress.LanThis, "Beginning report retrieval..."), "reports", "0%"); if (progress.IsPauseOrCancel()) { return(Lans.g(progress.LanThis, "Process canceled by user.")); } if (clearinghouseClin.ISA08 == "113504607") //TesiaLink //But the import will still happen { return(""); } if (clearinghouseClin.CommBridge == EclaimsCommBridge.None || clearinghouseClin.CommBridge == EclaimsCommBridge.Renaissance || clearinghouseClin.CommBridge == EclaimsCommBridge.RECS) { return(""); } if (clearinghouseClin.CommBridge == EclaimsCommBridge.WebMD) { if (!WebMD.Launch(clearinghouseClin, 0, isAutomaticMode, progress)) { return(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + WebMD.ErrorMessage); } } else if (clearinghouseClin.CommBridge == EclaimsCommBridge.BCBSGA) { if (!BCBSGA.Retrieve(clearinghouseClin, true, new TerminalConnector(), progress)) { return(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + BCBSGA.ErrorMessage); } } else if (clearinghouseClin.CommBridge == EclaimsCommBridge.ClaimConnect) { if (!Directory.Exists(clearinghouseClin.ResponsePath)) { //The clearinghouse report path is not setup. Therefore, the customer does not use ClaimConnect reports via web services. if (isAutomaticMode) //The user opened FormClaimsSend, or FormOpenDental called this function automatically. { return(""); //Suppress error message. } else //The user pressed the Get Reports button manually. //This cannot happen, because the user is blocked by the UI before they get to this point. { } } else if (!ClaimConnect.Retrieve(clearinghouseClin, progress)) { if (ClaimConnect.ErrorMessage.Contains(": 150\r\n")) //Error message 150 "Service Not Contracted" { if (isAutomaticMode) //The user opened FormClaimsSend, or FormOpenDental called this function automatically. { return(""); //Pretend that there is no error when loading FormClaimsSend for those customers who do not pay for ERA service. } else //The user pressed the Get Reports button manually. //The old way. Some customers still prefer to go to the dentalxchange web portal to view reports because the ERA service costs money. { try { Process.Start(@"http://www.dentalxchange.com"); } catch (Exception ex) { ex.DoNothing(); return(Lans.g("FormClaimReports", "Could not locate the site.")); } return(""); } } return(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + ClaimConnect.ErrorMessage); } } else if (clearinghouseClin.CommBridge == EclaimsCommBridge.AOS) { try { //This path would never exist on Unix, so no need to handle back slashes. Process.Start(@"C:\Program files\AOS\AOSCommunicator\AOSCommunicator.exe"); } catch { return(Lans.g("FormClaimReports", "Could not locate the file.")); } } else if (clearinghouseClin.CommBridge == EclaimsCommBridge.MercuryDE) { if (!MercuryDE.Launch(clearinghouseClin, 0, progress)) { return(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + MercuryDE.ErrorMessage); } } else if (clearinghouseClin.CommBridge == EclaimsCommBridge.EmdeonMedical) { if (!EmdeonMedical.Retrieve(clearinghouseClin, progress)) { return(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + EmdeonMedical.ErrorMessage); } } else if (clearinghouseClin.CommBridge == EclaimsCommBridge.DentiCal) { if (!DentiCal.Launch(clearinghouseClin, 0, progress)) { return(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + DentiCal.ErrorMessage); } } else if (clearinghouseClin.CommBridge == EclaimsCommBridge.EDS) { List <string> listEdsErrors = new List <string>(); if (!EDS.Retrieve277s(clearinghouseClin, progress)) { listEdsErrors.Add(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + EDS.ErrorMessage); } if (!EDS.Retrieve835s(clearinghouseClin, progress)) { listEdsErrors.Add(Lans.g("FormClaimReports", "Error retrieving.") + "\r\n" + EDS.ErrorMessage); } if (listEdsErrors.Count > 0) { return(string.Join("\r\n", listEdsErrors)); } } return(""); }
private void OnGUI() { #region On GUI Loaded `Home activated` if (_pInfor) { if (m_Scen != null) { GUI.Label(new Rect(1f, 1f, 100f, 20f), "."); if (m_Scen.isLoaded) { if (m_Scen_name != "EnvironmentUIScene" && m_Scen_name != "MenuUIScene") { if (AllowEFunc == false) { AllowEFunc = true; } GUI.color = Color.red; EDS.P(new Vector2(1f, 1f), Color.red, 1f); // Update Main Struct if (AllowEFunc == true && Time.time >= _plyR) { if (_ply != FindObjectsOfType <Player>()) { _ply = null; _ply = FindObjectsOfType <Player>(); } _plyR = Time.time + __plyUpdate; } // Update GLPB if (AllowEFunc == true && _ply != null && Time.time >= _lpR) { LPBFunc.GLPB(_ply, ref _lP); _lpR = Time.time + __lPUpdate; } // recoil controller draw blue if ON if (_rec && _lP != null) { GUI.color = Color.blue; EDS.P(new Vector2(2f, 1f), Color.blue, 1f); _lP.ProceduralWeaponAnimation.Shootingg.Intensity = 0.5f; } else { _lP.ProceduralWeaponAnimation.Shootingg.Intensity = 1.0f; } // draw yellow dotter if in ads if (_cH && _lP != null) { if (!_lP.ProceduralWeaponAnimation.IsAiming) { GUI.color = Color.yellow; EDS.P(new Vector2(Screen.width / 2f - 1f, Screen.height / 2f - 1f), Color.yellow, 2f); } } EFunc.DrawError(_ply, _lP, _viewdistance); } else { if (AllowEFunc == true) { _pInfor = false; _lP.ProceduralWeaponAnimation.Shootingg.Intensity = 1.0f; Clear(); AllowEFunc = false; } } } } } else { GUI.color = Color.white; EDS.P(new Vector2(1f, 1f), Color.white, 1f); } #endregion #region Log is off? FLAG if (Debug.logger.logEnabled == false) { GUI.Label(new Rect(1f, 5f, 100f, 20f), "off"); } #endregion }