Esempio n. 1
0
        private void Main_Form_Load(object sender, EventArgs e)
        {
            DB_Helper.InitializeDB();
            TokensGrid.DataSource          = DB_Helper.getTokenInfo();
            DatabaseClientsGrid.DataSource = DB_Helper.getDbClientInfo();
            //ConnectedClientsGrid.DataSource = getConnectedClientInfo();
            listBox1.DrawItem += ListBox1_DrawItem;

            _timer          = new Timer();
            _timer.Interval = 1000;
            _timer.Tick    += _timer_Tick;
            _timer.Start();
            command.Clear();
            command.Add("UPDATEUSERS");
            updateClientList();
        }
Esempio n. 2
0
        //custom generate button
        private void button7_Click(object sender, EventArgs e)
        {
            int days      = Convert.ToInt32(daysNum.Value);
            int months    = Convert.ToInt32(MonthsNum.Value);
            int years     = Convert.ToInt32(YearsNum.Value);
            int totalDays = 0;

            totalDays += days;
            if (months > 0)
            {
                totalDays += (months * 30);
            }
            if (years > 0)
            {
                totalDays += (years * 365);
            }

            DB_Helper.Generate_Token(totalDays);
        }
Esempio n. 3
0
 //genereate 3 month
 private void button15_Click(object sender, EventArgs e)
 {
     DB_Helper.Generate_Token(90, Convert.ToInt32(tokenNum.Value));
 }
Esempio n. 4
0
 //genrate trial token
 private void button9_Click(object sender, EventArgs e)
 {
     DB_Helper.Generate_Token(1, textBox2.Text);
 }
Esempio n. 5
0
 //token save
 private void button23_Click(object sender, EventArgs e)
 {
     DB_Helper.Update_Tokens();
 }
Esempio n. 6
0
 //TOKEN REFRESH
 private void TokensRefresh_Button_Click(object sender, EventArgs e)
 {
     TokensGrid.DataSource = DB_Helper.getTokenInfo();
 }
Esempio n. 7
0
 //save user changes
 private void button22_Click_1(object sender, EventArgs e)
 {
     DB_Helper.Update_Users();
 }
Esempio n. 8
0
 //client refresh
 private void dbClientsRefresh_Button_Click(object sender, EventArgs e)
 {
     DatabaseClientsGrid.DataSource = DB_Helper.getDbClientInfo();
 }