public FaceDetectBL() { // check if all libraries were loaded if (DependencyCheck.Execute()) { // does the file exist? if (File.Exists(fileNameHaarCascade)) { this.face = new HaarCascade(fileNameHaarCascade); } else { // the user has entered an invalid file name; let's try the default file name string defaultFileName = @".\haarcascade_frontalface_default.xml"; if (File.Exists(defaultFileName)) { this.face = new HaarCascade(defaultFileName); } else { throw new FaceDetectionException("Error while loading file: " + fileNameHaarCascade); } } } }
public async Task <IActionResult> Check(DependencyCheck value) { if (value == null) { return(BadRequest()); } var result = await _processor.Check(value); return(Ok(result)); }
private static void LoadLsn() { GameFiber.StartNew(delegate { try { "Starting".AddLog(); AppDomain.CurrentDomain.AssemblyResolve += LSPDFRResolveEventHandler; if (!CheckFiles()) { Game.DisplayNotification( "L.S. Noir was missing scene data/service data\nplease reinstall this modification"); return; } "Starting to load L.S. Noir!".AddLog(true); _cData = LoadItemFromXML <CaseData>(Main.CDataPath); PoliceStationCheck.PoliceCheck(); RegisterSAStages.RegisterStages(_cData); Evid_War_TimeChecker.StartChecker(); PrintBanner(); BetterEmsFound = DependencyCheck.BetterEMS(); ("Finished loading L.S. Noir; ComputerAccess = " + _cData.ComputerAccess).AddLog(true); InteriorHelper.IsCoronerInteriorEnabled = true; } catch (Exception ex) { $"Error loading LS Noir; exception: {ex}".AddLog(true); Game.DisplayNotification("3dtextures", "mpgroundlogo_cops", "L.S. Noir", "Created by Fiskey111, LtFlash, Albo1125", "It looks like L.S. Noir ~r~crashed~w~. \nPlease send ~y~Fiskey111~w~ your log."); } }); }
public CameraBL() { try { // check if all libraries were loaded if (DependencyCheck.Execute()) { // init grabber this.grabber = new Capture(); // get current height and width this.FrameWidth = grabber.GetCaptureProperty(CAP_PROP.CV_CAP_PROP_FRAME_WIDTH); this.FrameHeight = grabber.GetCaptureProperty(CAP_PROP.CV_CAP_PROP_FRAME_HEIGHT); } } catch (NullReferenceException) { this.IsCameraAvailable = false; } }
protected virtual Check GetCheck(DependencyCheck dependencyCheck) { return(new Check { CheckType = dependencyCheck.CheckType, Name = dependencyCheck.Name, Value = dependencyCheck.Value }); }