예제 #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            try { pictureBox1.ImageLocation = "firma_logo.png"; } catch { }

            float y = (Convert.ToInt32(this.Height) - Convert.ToInt32(panel1.Height)) / 2;

            panel1.Location = new Point(x: Convert.ToInt32(panel1.Location.X), y: Convert.ToInt32(y));
            y = (Convert.ToInt32(this.Height) - Convert.ToInt32(pictureBox1.Height)) / 2;
            pictureBox1.Location = new Point(x: Convert.ToInt32(pictureBox1.Location.X), y: Convert.ToInt32(y));

            if (SQL.baglanti_test())
            {
                lbl_baglanti.Text      = "Bağlantı Var";
                lbl_baglanti.ForeColor = Color.GreenYellow;
            }
            else
            {
                lbl_baglanti.Text      = "Bağlantı Yok";
                lbl_baglanti.ForeColor = Color.Red;
            }

            label2.Text = Program.GetMacAddress();

            try
            {
                lbl_versiyon.Text  = ApplicationDeployment.CurrentDeployment.CurrentVersion.Major.ToString();
                lbl_versiyon.Text += ".";
                lbl_versiyon.Text += ApplicationDeployment.CurrentDeployment.CurrentVersion.Minor.ToString();
                lbl_versiyon.Text += ".";
                lbl_versiyon.Text += ApplicationDeployment.CurrentDeployment.CurrentVersion.Build.ToString();
                lbl_versiyon.Text += ".";
                lbl_versiyon.Text += ApplicationDeployment.CurrentDeployment.CurrentVersion.Revision.ToString();
            }
            catch { lbl_versiyon.Text = "DEBUG"; }
        }
예제 #2
0
 private void lbl_baglanti_Click(object sender, EventArgs e)
 {
     if (SQL.baglanti_test())
     {
         lbl_baglanti.Text      = "Bağlantı Var";
         lbl_baglanti.ForeColor = Color.GreenYellow;
     }
     else
     {
         lbl_baglanti.Text      = "Bağlantı Yok";
         lbl_baglanti.ForeColor = Color.Red;
     }
 }