Ejemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Previous startup      = new Previous();
            mutual   mutual       = new mutual();
            string   startupsave  = startup.checkPreviousDB();
            string   startupsave2 = startup.checkPreviousDB2();
            DB       thefile      = new DB();

            subMain(startupsave, startup, thefile, startupsave2, mutual);
        }
Ejemplo n.º 2
0
 public Form8(BeetleBase.DB thefile, BeetleBase.mutual mutual)
 {
     InitializeComponent();
     //            this.SendToBack();
     this.Hide();
     this.form2      = new BeetleBase.Form2(thefile, mutual);
     this.form4      = new BeetleBase.Form4(mutual, thefile);
     this.form4.aa   = this.form2;
     this.form2.vial = this.form4;
     this.form2.initializeComponent();
     this.form4.initializeComponent();
     this.form2.Show();
     this.form4.Show();
 }
Ejemplo n.º 3
0
        public Form2(DB thefile, mutual mutual)
        {
            //            InitializeComponent();

            //           this.vial = form4;
            this.thefile = thefile;
            this.mutual  = mutual;

            this.watcher = new FileSystemWatcher();
            this.watcher.SynchronizingObject = this;
            this.watcher.Path         = Path.GetDirectoryName(thefile.watch);
            this.watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite
                                        | NotifyFilters.FileName | NotifyFilters.DirectoryName;
            this.watcher.Filter              = Path.GetFileName(thefile.watch);
            this.watcher.Changed            += new FileSystemEventHandler(OnChange);
            this.watcher.EnableRaisingEvents = true;
        }
Ejemplo n.º 4
0
        public Form3(DB thefile, mutual mutual)
        {
            this.mutual = mutual;
            InitializeComponent();

            this.nextbutton.Enabled = false;
            this.prevbutton.Enabled = false;

            this.thefile = thefile;
            OleDbCommand     tribesearch  = new OleDbCommand(@" SELECT DISTINCT Tribe FROM [Species_table];", this.thefile.dbo);
            OleDbDataAdapter tribeadapter = new OleDbDataAdapter(tribesearch);
            DataSet          tribeset     = new DataSet();

            tribeadapter.Fill(tribeset, "TRIBE");
            tribeadapter.SelectCommand.CommandText = @"SELECT DISTINCT [Genus] FROM [Species_table];";
            tribeadapter.Fill(tribeset, "GENUS");
            tribeadapter.SelectCommand.CommandText = @"SELECT DISTINCT [species] FROM [Species_table];";
            tribeadapter.Fill(tribeset, "SPECIES");
            tribeadapter.Dispose();
            //            MessageBox.Show(tribeset.Tables["SPECIES"].Columns[0].ColumnName);
            int triberowcount   = tribeset.Tables["TRIBE"].Rows.Count;
            int genusrowcount   = tribeset.Tables["GENUS"].Rows.Count;
            int speciesrowcount = tribeset.Tables["SPECIES"].Rows.Count;

            for (int tribei = 0; tribei < triberowcount; tribei++)
            {
                this.comboBox1.Items.Add(tribeset.Tables["TRIBE"].Rows[tribei][0]);
            }
            for (int genusi = 0; genusi < genusrowcount; genusi++)
            {
                this.comboBox2.Items.Add(tribeset.Tables["GENUS"].Rows[genusi][0]);
            }
            for (int speciesi = 0; speciesi < speciesrowcount; speciesi++)
            {
                this.comboBox3.Items.Add(tribeset.Tables["SPECIES"].Rows[speciesi][0]);
            }
        }
Ejemplo n.º 5
0
 public Form4(mutual mutual, DB thefile)
 {
     this.mutual  = mutual;
     this.thefile = thefile;
 }
Ejemplo n.º 6
0
        static void subMain(string startupsave, Previous startup, DB thefile, string startupsave2, mutual mutual)
        {
            thefile.exitloop = true;

            Form a = new Form1(startupsave, startup, thefile, startupsave2);

            a.StartPosition = FormStartPosition.CenterScreen;
            Application.Run(a);
            if (thefile.OK == 1 && thefile.goahead)
            {
                //                formholder formhold = new BeetleBase.formholder();
                //                formhold.form2 = new Form2(thefile, mutual, formhold);
                //this.vial = new Form4(mutual, thefile, formhold.form2);
                //formhold.form2.StartPosition = FormStartPosition.Manual;
                //formhold.form2.Location = new System.Drawing.Point(0, 320);
                //formhold.form2.formhold = formhold;
                //                Application.Run(formhold.form2);
                //                Application.Run(this.vial);
//                Application.Run(new Scolytos2.Form8(thefile, mutual));
                Scolytos2.Form8 mainform = new Scolytos2.Form8(thefile, mutual);
                Application.Run();
            }
            else if (thefile.exitloop)
            {
                Application.Exit();
            }
            else
            {
                subMain(startupsave, startup, thefile, startupsave2, mutual);
            }
        }