Esempio n. 1
0
        private void StartSearch(Darwin.Enum.SearchType t = Enum.SearchType.Normal)
        {
            int statusin = -1;
            try
            {
                statusin = Int32.Parse(cbStatus.SelectedValue.ToString());
            }
            catch { }

            SearchResults s = new SearchResults(t, cbKingdom.SelectedValue, cbPhylum.SelectedValue, cbClass.SelectedValue, cbOrder.SelectedValue, cbFamily.SelectedValue, cbGenus.SelectedValue, txtName.Text, txtAnySearch.Text, monthPicker1.GetMonthsInformation(), speciesFlags1.GetSpeciesInformation(), distributionPicker1.GetDistributionInformation(), speciesColourUC1.GetSelectedColour(), cbYVP.Checked, statusin);
            s.StartPosition = FormStartPosition.CenterScreen;
            s.Show();
        }
Esempio n. 2
0
        private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            SearchResults s;
            SpeciesEnumFlags senf = new SpeciesEnumFlags();
            DistributionFlags df = new DistributionFlags();
            MonthEumFlags mef = new MonthEumFlags();
            SpeciesColour sc = new SpeciesColour();

            switch (e.Node.Level)
            {
                case 0:
                    s = new SearchResults(int.Parse(e.Node.Name), null, null, null, null, null, "", "", mef, senf, df, sc);
                    break;
                case 1:
                    s = new SearchResults(null,int.Parse(e.Node.Name),  null, null, null, null, "", "", mef, senf, df, sc);
                    break;
                case 2:
                    s = new SearchResults(null, null,int.Parse(e.Node.Name),  null, null, null, "", "", mef, senf, df, sc);
                    break;
                case 3:
                    s = new SearchResults(null, null, null,int.Parse(e.Node.Name),  null, null, "", "", mef, senf, df, sc);
                    break;
                case 4:
                    s = new SearchResults(null, null, null, null,int.Parse(e.Node.Name),  null, "", "", mef, senf, df, sc);
                    break;
                case 5:
                    s = new SearchResults(null, null, null, null, null,int.Parse(e.Node.Name),  "", "", mef, senf, df, sc);
                    break;
                default:
                    s = new SearchResults(null, null, null, null, null, null, "", "", mef, senf, df, sc);
                    break;
            }
            s.StartPosition = FormStartPosition.CenterScreen;
            s.Show(this);
        }