Beispiel #1
0
        private void RefreshData()
        {
            // Clear the textboxes
            achTextBox.Clear();
            datesTextBox.Clear();

            // Initialize GuardTime.
            GuardTime guard = new GuardTime();

            // Issue a new SELECT query for the Achievements table.
            SQLize refreshAch = new SQLize("SELECT * FROM (SELECT * FROM Achievements ORDER BY ach_id DESC LIMIT 17) ORDER BY ach_id");

            // Call Read_Ach to read the data.
            refreshAch.Read_Ach();

            // Set the output of SQLize's Get_Out method to the Achievements textbox.text
            achTextBox.Text = refreshAch.Get_Out();

            // Issue a new SELECT query for the Dates table.
            SQLize refreshDates = new SQLize("SELECT datetime FROM (SELECT * FROM Dates ORDER BY date_id DESC LIMIT 17) ORDER BY date_id");

            // Call Read_Dates to read the data.
            refreshDates.Read_Dates();

            // Set the output of SQLize's Get_Out method to the Dates textbox.text
            datesTextBox.Text = refreshDates.Get_Out();
        }
Beispiel #2
0
        // Refreshes Some Stats
        private void RefreshStats()
        {
            // Issue a COUNT query for the Dates table.
            SQLize countDates = new SQLize("SELECT COUNT(date_id) FROM Dates");

            // Run that command
            countDates.Count_Query();

            // Set the output of SQLize's Get_Out method to the numEntries Label.text
            numEntriesLabel.Text = countDates.Get_Out();
        }