Beispiel #1
0
 public Setup1(frmMain Main)
 {
     parentForm = Main;
     this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
     InitializeComponent();
     sqlite_conn = sqlite_conn = new SQLiteConnection("Data Source=database.db;Version=3;Compress=True;");
     txtPassword.Text = parentForm.school.password;
     txtPassConfirm.Text = parentForm.school.password;
     txtAdminEmail.Text= parentForm.school.email;
     txtSchoolName.Text= parentForm.school.name;
     txtAddress.Text= parentForm.school.address;
     txtCity.Text= parentForm.school.city;
     txtState.Text= parentForm.school.state;
     txtZip.Text= parentForm.school.zip;
 }
Beispiel #2
0
        public Reports(frmMain Main)
        {
            parentForm = Main;
            sqlite_conn = new SQLiteConnection("Data Source=database.db;Version=3;Compress=True;");

            aTimer = new System.Timers.Timer(60000);
            aTimer.Start();
            aTimer.Elapsed += OnTimedEvent;

            try
            {
                // open the connection:
                sqlite_conn.Open();
            }
            catch
            {
                Console.WriteLine("Database is unavailable for reports");
                bEnabled = false;
            }
        }
Beispiel #3
0
 public Setup3(frmMain Main)
 {
     parentForm = Main;
     this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
     InitializeComponent();
 }
Beispiel #4
0
        public Setup2(frmMain Main)
        {
            geoCode = new GeoCode();

            geoReader = geoCode.GetGeoCode(Main.school.GetGeoCodeAddress());

            string sLine = "";
            string jsonReturn ="";

            int i = 0;

            while (sLine != null)
            {
                i++;
                sLine = geoReader.ReadLine();
                if (sLine != null)
                {
                    jsonReturn += sLine;
                    Console.WriteLine("{0}:{1}", i, sLine);
                }
            }

            JArray array = new JArray();
            GoogleGeoCodeResponse m = JsonConvert.DeserializeObject<GoogleGeoCodeResponse>(jsonReturn);

            Main.school.latitude = m.results[0].geometry.location.lat;
            Main.school.longitude = m.results[0].geometry.location.lng;

            parentForm = Main;
            this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
            InitializeComponent();

            txtLat.Text = Main.school.latitude;
            txtLng.Text = Main.school.longitude;
            txtFilePath.Text = Main.school.ImageFile;
            if(!txtFilePath.Text.Equals(""))
            {
                radioButton2.Checked = true;
                radioButton1.Checked = false;
                pbImage.ImageLocation = txtFilePath.Text;
            }
        }
Beispiel #5
0
 public PasswordPrompt(frmMain fParent)
 {
     InitializeComponent();
     parent = fParent;
 }
Beispiel #6
0
 public Setup3(frmMain Main)
 {
     parentForm = Main;
     this.Icon  = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
     InitializeComponent();
 }