Exemple #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            label1.Width = this.Width;

            // Opacity
            label1.BackColor     = Color.FromArgb(150, Color.Black);
            label1.ForeColor     = Color.White;
            toolStrip1.BackColor = Color.FromArgb(230, SystemColors.Control);
            // ----

            //toolStrip1.BackColor = Color.FromArgb(200,Color.Black);
            //toolStrip1.ForeColor = Color.White;

            adminPanelToolStripMenuItem.Enabled = false;
            toolStripButton7.Visible            = false;
            if (Login.type == "Admin")
            {
                adminPanelToolStripMenuItem.Enabled = true;
                toolStripButton7.Visible            = true;
            }
            toolStripStatusLabel2.Text = "Logged in as : " + Login.user;
            toolStripStatusLabel3.Text = "Date : " + DateTime.Today.ToLongDateString().ToString();
            toolStripStatusLabel4.Text = "Time : " + DateTime.Now.ToShortTimeString().ToString();

            MessagesQueries a       = new MessagesQueries();
            string          message = a.checkMessage(Login.type, DateTime.Now.ToLongDateString().ToString());

            if (message != "")
            {
                MessageBox.Show(message, "TODAY's Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }

            timer1.Start();
        }
Exemple #2
0
        private void todaysMessageToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MessagesQueries a       = new MessagesQueries();
            string          message = a.checkMessage(Login.type, DateTime.Now.ToLongDateString().ToString());

            if (message != "")
            {
                MessageBox.Show(message, "TODAY's Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemple #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         MessagesQueries a = new MessagesQueries();
         a.addMessage(richTextBox1.Text, comboBox1.Text, dateTimePicker1.Text);
         this.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }