Example #1
0
        public RibbonForm1()
        {
            InitializeComponent();
            _fm = new FaceSystem.Manager(
                    Properties.Settings.Default.Connection,
                    Properties.Settings.Default.ImportDropZone,
                    Properties.Settings.Default.ImageStorage,
                    Properties.Settings.Default.ScannerDropZone,
                    Properties.Settings.Default.TrainerDropZone,
                    Properties.Settings.Default.TempImageDirectory);

            pictureBrowserControl1._fm = _fm;

            personBrowserControl1._fm = _fm;

            faceGridControl1._fm = _fm;
            faceGridControl1.initColumns(1);

            var trainingRunNames = _fm.GetTrainingRunNames();
            foreach (String name in trainingRunNames)
                repositoryItemSavedRunComboBox.Items.Add(name);
            if (trainingRunNames.Count() > 0)
                SavedRunEditItem.EditValue = trainingRunNames.Last();

            var methodologies = _fm.GetMethodologyNames();
            foreach (String name in methodologies)
                repositoryItemMethodologyComboBox.Items.Add(name);
            if (methodologies.Count() > 0)
                MethodologyComboEdit.EditValue = _fm.MatchingMethodology;

            Ribbon.SelectedPage = DetectionPage;
            ribbon_SelectedPageChanged(null, null);

            showMarkupCheckItem.Checked = pictureBrowserControl1._showMarkup;
            showAcceptedCheckItem.Checked = pictureBrowserControl1._showAccept;
            showRejectedCheckItem.Checked = pictureBrowserControl1._showRejected;
            showPicturesWithFacesCheckItem.Checked = pictureBrowserControl1._showPicturesWithFaces;
            showPicturesWithoutFacesCheckItem.Checked = pictureBrowserControl1._showPicturesWithoutFaces;
            this.showMarkupCheckItem.CheckedChanged += new DevExpress.XtraBars.ItemClickEventHandler(this.showMarkupCheckItem_CheckedChanged);
            this.showAcceptedCheckItem.CheckedChanged += new DevExpress.XtraBars.ItemClickEventHandler(this.showAcceptedCheckItem_CheckedChanged);
            this.showRejectedCheckItem.CheckedChanged += new DevExpress.XtraBars.ItemClickEventHandler(this.showRejectedCheckItem_CheckedChanged);
            this.showPicturesWithFacesCheckItem.CheckedChanged += new DevExpress.XtraBars.ItemClickEventHandler(this.showPicturesWithFacesCheckItem_CheckedChanged);
            this.showPicturesWithoutFacesCheckItem.CheckedChanged += new DevExpress.XtraBars.ItemClickEventHandler(this.showPicturesWithoutFacesCheckItem_CheckedChanged);

            var faceSetNames = _fm.GetAvailableFaceSetNames();
            foreach (var fs in faceSetNames)
                repositoryItemFaceSetComboBox.Items.Add(fs);
            if (faceSetNames.Count() > 0)
                FaceSetComboBox.EditValue = faceSetNames.Last();

            foreach (var xmlFile in Directory.GetFiles(".", "*.xml"))
                repositoryItemXMLFileComboBox.Items.Add(xmlFile);

            Text = ModelInfo == null ? "Nothing Loaded" : ModelInfo.DescriptionText;
        }
        public AssignFacesDialogBox(List<api.Face> unassignedFaces, 
            FaceSystem.Manager dbm)
        {
            InitializeComponent();
            _unassignedFaces = unassignedFaces;
            _fm = dbm;

            _pictureIndex = 0;
            ShowFace();
            RefreshDropDown();
        }