public HiddenGrottoSearcher(HiddenGrottoSearchParams searchParams, object threadLock, Form caller)
        {
            this.searchParams = searchParams;
            this.threadLock = threadLock;
            this.caller = caller;

            numThreads = 1;
            waitHandle = new EventWaitHandle(true, EventResetMode.ManualReset);

            hollowFrames = new List<Hollow>();
            frameBinding = new BindingSource {DataSource = hollowFrames};
            searchParams.DataGridView.DataSource = frameBinding;
            btnGenerate = searchParams.GenerateButton;
        }
        public HiddenGrottoSearcher(HiddenGrottoSearchParams searchParams, object threadLock, Form caller)
        {
            this.searchParams = searchParams;
            this.threadLock   = threadLock;
            this.caller       = caller;

            numThreads = 1;
            waitHandle = new EventWaitHandle(true, EventResetMode.ManualReset);

            hollowFrames = new List <Hollow>();
            frameBinding = new BindingSource {
                DataSource = hollowFrames
            };
            searchParams.DataGridView.DataSource = frameBinding;
            btnGenerate = searchParams.GenerateButton;
        }
Ejemplo n.º 3
0
 private void btnHHGenerate_Click(object sender, EventArgs e)
 {
     var searchParams = new HiddenGrottoSearchParams
         {
             GenerateButton = btnHHGenerate,
             DataGridView = dgvHiddenGrottos,
             MaxAdvances = txtHHAdvances,
             Year = txtHHYear,
             OpenHollows = txtHHOpenHollows,
             Months = cbHHMonth,
             Profile = (Profile) comboBoxProfiles.SelectedItem,
             Slots = cbHHSlot,
             SubSlots = cbHHSubSlot,
             Hollows = cbHHHollowNumber,
             Gender = cbHHGender,
             GenderRatio = cbHHGenderRatio
         };
     Searcher searcher = new HiddenGrottoSearcher(searchParams, threadLock, this);
     if (!searcher.ParseInput()) return;
     searcher.RunSearch();
 }