Exemplo n.º 1
0
        public TableManager(BeamerDisplayUC BeamerScreen, string SettingsPath = "")
        {
            //instances
            _recognitionManager = new RecognitionManager();
            _recognitionManager.OnNewRecognitionPacket += new RecognitionManager.RecognitionEventHandler(_recognitionManager_OnNewRecognitionPacket);
            _objectTracker = new ObjectTracker();
            _displayManager = new DisplayManager(BeamerScreen);

            //Assign the BlackWhiteDetector by default;
            //RotationDetector = new BlackWhiteRotationDetector();
            RotationDetector = new ImprovedBWRotDetector();

            //try to load settings. if the settings don't exist, try to save the default settings to the given path
            //Set to default if not specified
            if (SettingsPath == "")
                SettingsPath = SettingsManager.Path;

            bool loadsuccess = false;
            if (Directory.Exists(SettingsPath))
            {
                //Load
                if (!SettingsManager.LoadSettings(SettingsPath))
                {
                    MessageBox.Show(
                        "Einstellungen konnten nicht geladen werden. Standardeinstellungen werden gespeichert.",
                        "TableManager Init");
                }
                else
                {
                    loadsuccess = true;
                }
            }
            if (!Directory.Exists(SettingsPath) || !loadsuccess)
            {
                //try to save default
                if (!SettingsManager.SaveSettings(SettingsPath))
                {
                    MessageBox.Show("Standardeinstellungen konnten nicht gespeichert werden!", "TableManager Fehler!");
                }
            }
        }
Exemplo n.º 2
0
 public FormSupplier(RecognitionManager recognitionMgr)
 {
     _tmanager = recognitionMgr;
 }