using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using RoboticManipulatorTracking;
namespace Testovaci_aplikace_diplomka
{
    
    public partial class SelectDialog : Form
    {
        

        public SelectDialog()
        {
            InitializeComponent();
        }

        private void OpenCVTrackerButton_CheckedChanged(object sender, EventArgs e)
        {
            if (this.OpenCVTrackerButton.Checked == true)
            {
                GlobalTrackerClassSet.trackMethod = TrackingMethod.OpenCV;
                groupBoxOpenCVTracker.Visible = true;
                groupBoxFeatureMatching.Visible = false;
                groupBoxBruteForce.Visible = false;
                groupBoxMarkersType.Visible = false;
                OKbutton.Visible = false;
            }

        }

        private void FMButton_CheckedChanged(object sender, EventArgs e)
        {
            
            if (this.FMButton.Checked == true)
            {
                GlobalTrackerClassSet.trackMethod = TrackingMethod.FeatureMatching;
                groupBoxOpenCVTracker.Visible = false;
                groupBoxFeatureMatching.Visible = true;
                groupBoxMarkersType.Visible = false;
                OKbutton.Visible = false;
            }
        }

        private void MarkerButton_CheckedChanged(object sender, EventArgs e)
        {
            
            if (this.MarkerButton.Checked == true)
            {
                GlobalTrackerClassSet.trackMethod = TrackingMethod.Markers;
                groupBoxOpenCVTracker.Visible = false;
                groupBoxFeatureMatching.Visible = false;
                groupBoxBruteForce.Visible = false;
                groupBoxMarkersType.Visible = true;
                OKbutton.Visible = false;
            }
        }

        private void KCFButton_CheckedChanged(object sender, EventArgs e)
        {
            
            if (this.KCFButton.Checked == true)
            {
                GlobalTrackerClassSet.openCVTracker = Trackers.KCF;
                OKbutton.Visible = true;
            }
        }

        private void CSRTButton_CheckedChanged(object sender, EventArgs e)
        {
            
            if (this.CSRTButton.Checked == true)
            {
                GlobalTrackerClassSet.openCVTracker = Trackers.CSRT;
                OKbutton.Visible = true;
            }
        }

        private void BFButton_CheckedChanged(object sender, EventArgs e)
        {
            if (this.BFButton.Checked == true)
            {
                GlobalTrackerClassSet.matchMakeMethod = MatchMakingMetod.BRUTEFORCE;
                OKbutton.Visible = false;
                groupBoxBruteForce.Visible = true;
                AKAZEButton.Visible = true;
                SIFTButton.Visible = true;
                KAZEButton.Visible = true;
                ORBButton.Visible = true;
                BRISKButton.Visible = true;
            }
        }

        private void FLANNButton_CheckedChanged(object sender, EventArgs e)
        {
            if (this.FLANNButton.Checked == true)
            {
                GlobalTrackerClassSet.matchMakeMethod = MatchMakingMetod.FLANN;
                OKbutton.Visible = false;
                groupBoxBruteForce.Visible = true;
                AKAZEButton.Visible = true;
                SIFTButton.Visible = true;
                KAZEButton.Visible = false;
                ORBButton.Visible = false;
                BRISKButton.Visible = false;
            }
        }

        private void AKAZEButton_CheckedChanged(object sender, EventArgs e)
        {
            if (this.AKAZEButton.Checked == true)
            {
                GlobalTrackerClassSet.detector = FeatureDetectorMetod.AKAZE;
                OKbutton.Visible = true;
            }
        }

        private void SIFTButton_CheckedChanged(object sender, EventArgs e)
        {
            if (this.SIFTButton.Checked == true)
            {
                GlobalTrackerClassSet.detector = FeatureDetectorMetod.SIFT;
                OKbutton.Visible = true;
            }
        }

        private void KAZEButton_CheckedChanged(object sender, EventArgs e)
        {
            if (this.KAZEButton.Checked == true)
            {
                GlobalTrackerClassSet.detector = FeatureDetectorMetod.KAZE;
                OKbutton.Visible = true;
            }
        }

        private void ORBButton_CheckedChanged(object sender, EventArgs e)
        {
            if (this.ORBButton.Checked == true)
            {
                GlobalTrackerClassSet.detector = FeatureDetectorMetod.ORB;
                OKbutton.Visible = true;
            }
        }

        private void BRISKButton_CheckedChanged(object sender, EventArgs e)
        {
            if (this.BRISKButton.Checked == true)
            {
                GlobalTrackerClassSet.detector = FeatureDetectorMetod.BRISK;
                OKbutton.Visible = true;
            }
        }

        private void CirclesButton_CheckedChanged(object sender, EventArgs e)
        {
            if (this.CirclesButton.Checked == true)
            {
                GlobalTrackerClassSet.mType = markersType.Circles;
                OKbutton.Visible = true;
            }
        }

        private void BiggestButton_CheckedChanged(object sender, EventArgs e)
        {
            if (this.BiggestButton.Checked == true)
            {
                GlobalTrackerClassSet.mType = markersType.Biggest;
                OKbutton.Visible = true;
            }
        }
    }

    
}
