public DreamRadarSearcher(DreamRadarSearchParams searchParams, object threadLock, Form caller)
        {
            this.searchParams = searchParams;
            this.threadLock = threadLock;
            this.caller = caller;

            // need to update this for threaded
            numThreads = 1;
            waitHandle = new EventWaitHandle(true, EventResetMode.ManualReset);

            drFrames = new List<DreamRadarFrame>();
            frameBinding = new BindingSource {DataSource = drFrames};
            searchParams.DataGridView.DataSource = frameBinding;
            btnGenerate = searchParams.GenerateButton;
        }
Exemple #2
0
        public DreamRadarSearcher(DreamRadarSearchParams searchParams, object threadLock, Form caller)
        {
            this.searchParams = searchParams;
            this.threadLock   = threadLock;
            this.caller       = caller;

            // need to update this for threaded
            numThreads = 1;
            waitHandle = new EventWaitHandle(true, EventResetMode.ManualReset);

            drFrames     = new List <DreamRadarFrame>();
            frameBinding = new BindingSource {
                DataSource = drFrames
            };
            searchParams.DataGridView.DataSource = frameBinding;
            btnGenerate = searchParams.GenerateButton;
        }
 private void btnDRGenerate_Click(object sender, EventArgs e)
 {
     var searchParams = new DreamRadarSearchParams
         {
             Year = txtDRYear,
             Months = cbDRMonth,
             MinFrame = txtDRMinFrame,
             MaxFrame = txtDRMaxFrame,
             IVFilters = ivDR,
             Natures = cbDRNature,
             Gender = cbDRGender,
             GenderRatio = cbDRRatio,
             IsShiny = cbDRShiny,
             Shininess = cbDRShinyness,
             DataGridView = gvDreamRadar,
             GenerateButton = btnDRGenerate,
             Profile = (Profile)comboBoxProfiles.SelectedItem
         };
     Searcher searcher = new DreamRadarSearcher(searchParams, new object(), this);
     if (!searcher.ParseInput()) return;
     searcher.RunSearch();
 }