Exemplo n.º 1
0
        /// <summary>
        /// Populate the StackPanel with the classificaitons options then select
        /// whatever the image has been tagged with already.
        /// </summary>
        private void AddPanelItems()
        {
            this.ClassificationPanel.Children.Clear();
            ClassificationCheckboxPanelHelper.PopulateSelectionPanel(
                this.Source,
                this.ClassificationPanel,
                this.Classifications,
                this.OnSelectionsChanged);

            ClassificationCheckboxPanelHelper.MakeSelection(
                this.ClassificationPanel,
                this.Item.CurrentSource);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Populate the panel with the selections for classifications and then hook all of the key bindings
        /// so it can be made with shortcuts.
        /// </summary>
        private void PopulateAnnotationsTabAnnotationsPanel()
        {
            // Clear current bindings
            this.InputBindings.Clear();

            // Set up all the boxes
            List <System.Windows.Controls.Primitives.ToggleButton> boxes = ClassificationCheckboxPanelHelper.PopulateSelectionPanel(
                this.ApplicationContext.SelectedDataSource,
                this.ClassificationTabSelectionPanel,
                this.ApplicationContext.SelectedDataSource.Classifications,
                this.ForceClassificationUpdate);

            // Now set up all of the key bindings
            this.PrepareAllInputBindings(boxes);
        }