Example #1
0
        public DetectorOptions(TimelapseState timelapseState, FileDatabase fileDataBase, Window owner)
        {
            this.InitializeComponent();
            this.Owner          = owner;
            this.timelapseState = timelapseState;
            this.fileDatabase   = fileDataBase;
            List <string> dataLabels = this.fileDatabase.GetDataLabelsExceptIDInSpreadsheetOrder();

            this.useSpeciesDetected = dataLabels.Contains(Constant.Recognition.SpeciesDetectedDataLabel);
        }
Example #2
0
        public AdvancedTimelapseOptions(TimelapseState timelapseState, MarkableCanvas markableCanvas, Window owner)
        {
            this.InitializeComponent();
            this.Owner = owner;

            // Check the arguments for null
            ThrowIf.IsNullArgument(timelapseState, nameof(timelapseState));
            ThrowIf.IsNullArgument(markableCanvas, nameof(markableCanvas));

            this.markableCanvas = markableCanvas;
            this.timelapseState = timelapseState;

            // Tab Order - set to current state.
            this.CheckBoxTabOrderDateTime.IsChecked     = this.timelapseState.TabOrderIncludeDateTime;
            this.CheckBoxTabOrderDeleteFlag.IsChecked   = this.timelapseState.TabOrderIncludeDeleteFlag;
            this.CheckBoxTabOrderImageQuality.IsChecked = this.timelapseState.TabOrderIncludeImageQuality;

            // Deletion Management
            this.RadioButtonDeletionManagement_Set(this.timelapseState.DeleteFolderManagement);

            // Throttles
            this.ImageRendersPerSecond.Minimum       = Constant.ThrottleValues.DesiredMaximumImageRendersPerSecondLowerBound;
            this.ImageRendersPerSecond.Maximum       = Constant.ThrottleValues.DesiredMaximumImageRendersPerSecondUpperBound;
            this.ImageRendersPerSecond.Value         = this.timelapseState.Throttles.DesiredImageRendersPerSecond;
            this.ImageRendersPerSecond.ValueChanged += this.ImageRendersPerSecond_ValueChanged;
            this.ImageRendersPerSecond.ToolTip       = this.timelapseState.Throttles.DesiredImageRendersPerSecond;

            // The Max Zoom Value
            this.MaxZoom.Value   = this.markableCanvas.ZoomMaximum;
            this.MaxZoom.ToolTip = this.markableCanvas.ZoomMaximum;
            this.MaxZoom.Maximum = Constant.MarkableCanvas.ImageZoomMaximumRangeAllowed;
            this.MaxZoom.Minimum = 2;

            // Image Differencing Thresholds
            this.DifferenceThreshold.Value   = this.timelapseState.DifferenceThreshold;
            this.DifferenceThreshold.ToolTip = this.timelapseState.DifferenceThreshold;
            this.DifferenceThreshold.Maximum = Constant.ImageValues.DifferenceThresholdMax;
            this.DifferenceThreshold.Minimum = Constant.ImageValues.DifferenceThresholdMin;

            // Detections
            this.CheckBoxUseDetections.IsChecked       = this.timelapseState.UseDetections;
            this.CheckBoxBoundingBoxAnnotate.IsChecked = this.timelapseState.BoundingBoxAnnotate;
            this.CheckBoxBoundingBoxColorBlindFriendlyColors.IsChecked = this.timelapseState.BoundingBoxColorBlindFriendlyColors;
        }
 public FilePlayerOptions(TimelapseState state, Window owner)
 {
     this.InitializeComponent();
     this.Owner = owner;
     this.state = state;
 }
 public DialogsHideOrShow(TimelapseState state, Window owner)
 {
     this.InitializeComponent();
     this.Owner = owner;
     this.state = state;
 }
        public AdvancedTimelapseOptions(TimelapseState timelapseState, MarkableCanvas markableCanvas, Window owner, bool detectionsLoaded)
        {
            this.InitializeComponent();
            this.Owner            = owner;
            this.detectionsLoaded = detectionsLoaded;

            // Check the arguments for null
            ThrowIf.IsNullArgument(timelapseState, nameof(timelapseState));
            ThrowIf.IsNullArgument(markableCanvas, nameof(markableCanvas));

            this.markableCanvas = markableCanvas;
            this.timelapseState = timelapseState;

            // Metadata Populate On Load
            this.CheckBoxEnablePopulateMetadataOnLoad.IsChecked = this.timelapseState.MetadataAskOnLoad;

            // Tab Order - set to current state.
            this.CheckBoxTabOrderDateTime.IsChecked     = this.timelapseState.TabOrderIncludeDateTime;
            this.CheckBoxTabOrderDeleteFlag.IsChecked   = this.timelapseState.TabOrderIncludeDeleteFlag;
            this.CheckBoxTabOrderImageQuality.IsChecked = this.timelapseState.TabOrderIncludeImageQuality;

            // Deletion Management
            this.RadioButtonDeletionManagement_Set(this.timelapseState.DeleteFolderManagement);

            // CSV DateTime options
            if (this.timelapseState.CSVDateTimeOptions == CSVDateTimeOptionsEnum.DateAndTimeColumns)
            {
                this.RadioButtonCSVDateAndTimeColumns.IsChecked = true;
            }
            else if (this.timelapseState.CSVDateTimeOptions == CSVDateTimeOptionsEnum.DateTimeColumnWithTSeparator)
            {
                this.RadioButtonCSVLocalDateTimeColumn.IsChecked = true;
            }
            else if (this.timelapseState.CSVDateTimeOptions == CSVDateTimeOptionsEnum.DateTimeWithoutTSeparatorColumn)
            {
                this.RadioButtonCSVLocalDateTimeColumnWithoutT.IsChecked = true;
            }
            else // if (this.timelapseState.CSVDateTimeOptions == CSVDateTimeOptionsEnum.UTCWithOffsetDateTimeColumn)
            {
                this.RadioButtonCSVUTCWithOffsetDateTimeColumn.IsChecked = true;
            }

            this.CheckBoxCSVInsertSpaceBeforeDates.IsChecked = this.timelapseState.CSVInsertSpaceBeforeDates == true;

            // Throttles
            this.ImageRendersPerSecond.Minimum       = Constant.ThrottleValues.DesiredMaximumImageRendersPerSecondLowerBound;
            this.ImageRendersPerSecond.Maximum       = Constant.ThrottleValues.DesiredMaximumImageRendersPerSecondUpperBound;
            this.ImageRendersPerSecond.Value         = this.timelapseState.Throttles.DesiredImageRendersPerSecond;
            this.ImageRendersPerSecond.ValueChanged += this.ImageRendersPerSecond_ValueChanged;
            this.ImageRendersPerSecond.ToolTip       = this.timelapseState.Throttles.DesiredImageRendersPerSecond;

            // The EpisodeMaxRangeToSearch Threshold values
            this.SliderSetEpisodeMaxRange.Value = this.timelapseState.EpisodeMaxRangeToSearch;
            this.SetSliderSetEpisodeMaxRangeFeedack(this.timelapseState.EpisodeMaxRangeToSearch);
            this.SliderSetEpisodeMaxRange.Maximum = Constant.EpisodeDefaults.MaximumRangeToSearch;
            this.SliderSetEpisodeMaxRange.Minimum = 50;

            // The Max Zoom Value
            this.MaxZoom.Value   = this.markableCanvas.ZoomMaximum;
            this.MaxZoom.ToolTip = this.markableCanvas.ZoomMaximum;
            this.MaxZoom.Maximum = Constant.MarkableCanvas.ImageZoomMaximumRangeAllowed;
            this.MaxZoom.Minimum = 2;

            // Image Differencing Thresholds
            this.DifferenceThreshold.Value   = this.timelapseState.DifferenceThreshold;
            this.DifferenceThreshold.ToolTip = this.timelapseState.DifferenceThreshold;
            this.DifferenceThreshold.Maximum = Constant.ImageValues.DifferenceThresholdMax;
            this.DifferenceThreshold.Minimum = Constant.ImageValues.DifferenceThresholdMin;

            // Detections

            this.CheckBoxUseDetections.IsChecked       = true;
            this.CheckBoxBoundingBoxAnnotate.IsChecked = this.timelapseState.BoundingBoxAnnotate;
            this.CheckBoxBoundingBoxColorBlindFriendlyColors.IsChecked = this.timelapseState.BoundingBoxColorBlindFriendlyColors;
            this.AutomatedImageRecognitionPanel.IsEnabled = detectionsLoaded;
        }