예제 #1
0
파일: Setup1.cs 프로젝트: Vectar/InSession
 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;
 }
예제 #2
0
파일: Reports.cs 프로젝트: Vectar/InSession
        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;
            }
        }
예제 #3
0
파일: Setup3.cs 프로젝트: Vectar/InSession
 public Setup3(frmMain Main)
 {
     parentForm = Main;
     this.Icon = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
     InitializeComponent();
 }
예제 #4
0
파일: Setup2.cs 프로젝트: Vectar/InSession
        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;
            }
        }
예제 #5
0
 public PasswordPrompt(frmMain fParent)
 {
     InitializeComponent();
     parent = fParent;
 }
예제 #6
0
 public Setup3(frmMain Main)
 {
     parentForm = Main;
     this.Icon  = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
     InitializeComponent();
 }