コード例 #1
0
        public void LaunchAndReadProgressFile(IProgress <int> progress)
        {
            var settings = new SettingsDb();

            var confidenceThreshold     = settings.ConfidenceThreshold;
            var faceConfidenceThreshold = settings.FaceConfidenceThreshold;

            var process = LaunchEngine(confidenceThreshold, faceConfidenceThreshold);

            var progressFile = Path.Combine(analysisEngineDirectory, progressFilename);

            while (!process.HasExited)
            {
                if (File.Exists(progressFile))
                {
                    var progressString = File.ReadAllText(progressFile);
                    var progressInt    = Int32.Parse(progressString);

                    progress.Report(progressInt);
                }

                Thread.Sleep(1000);
            }

            // progress.Report(progressBar.Maximum);
        }
コード例 #2
0
 public void LoadSettings(SettingsDb s)
 {
     DrawPerson      = s.DrawPerson;
     DrawBackground  = s.DrawBackground;
     DrawAeroplane   = s.DrawAeroplane;
     DrawBicycle     = s.DrawBicycle;
     DrawBird        = s.DrawBird;
     DrawBoat        = s.DrawBoat;
     DrawBottle      = s.DrawBottle;
     DrawBus         = s.DrawBus;
     DrawCar         = s.DrawCar;
     DrawCat         = s.DrawCat;
     DrawChair       = s.DrawChair;
     DrawCow         = s.DrawCow;
     DrawDiningtable = s.DrawDiningtable;
     DrawDog         = s.DrawDog;
     DrawHorse       = s.DrawHorse;
     DrawMotorbike   = s.DrawMotorbike;
     DrawPottedplant = s.DrawPottedplant;
     DrawSheep       = s.DrawSheep;
     DrawSofa        = s.DrawSofa;
     DrawTrain       = s.DrawTrain;
     DrawTv          = s.DrawTv;
 }
コード例 #3
0
        public SettingsWindow()
        {
            InitializeComponent();

            settings = new SettingsDb();
        }