private void bunifuiOSSwitch1_OnValueChange(object sender, EventArgs e) { OS = new OnlineSistemi(Kullaniciid); if (Onlinetext.Text == "Çevrimiçi") { Onlinetext.Text = "Çevrimdışı"; Onlinetext.ForeColor = Color.Red; bunifuCustomLabel6.ForeColor = Color.Red; bunifuCustomLabel6.Text = "OFFLINE"; OS.Offline(); } else { Onlinetext.Text = "Çevrimiçi"; Onlinetext.ForeColor = Color.DarkGreen; bunifuCustomLabel6.ForeColor = Color.DarkGreen; bunifuCustomLabel6.Text = "ONLINE"; OS.Online(); } }
private void AnaForm_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'seckinumurDataSet1.Kullanicilars' table. You can move, or remove it, as needed. this.kullanicilarsTableAdapter1.Fill(this.seckinumurDataSet1.Kullanicilars); this.kullanicilarsTableAdapter.Fill(this.seckinumurDataSet.Kullanicilars); try { bunifuCustomDataGrid1.Refresh(); Kisisecdata.Refresh(); OS = new OnlineSistemi(Kullaniciid); VeriAl al = new VeriAl(Kullaniciid); KisiİsmiYeri.LabelText = al.kisi.Adi; SifreAl.Text = al.kisi.Sifresi; BtnGelen.Text = " GELEN KUTUSU (" + al.GelenMesajAdedi().ToString() + ")"; BtnGiden.Text = " GİDEN KUTUSU (" + al.GidenMesajAdedi().ToString() + ")"; BtnSilinenler.Text = " SİLİNENLER (" + al.SilinenMesajAdedi().ToString() + ")"; timer1.Interval = 1000; timer1.Start(); } catch { this.Close(); girisFormu.Visible = true; girisFormu.ProgressBar.Visible = true; girisFormu.HataMesaji.Visible = true; girisFormu.BtnTekarDene.Visible = true; girisFormu.kullaniciAdiAl.Visible = false; girisFormu.SifreAl.Visible = false; girisFormu.bunifuCustomLabel2.Visible = false; girisFormu.bunifuCustomLabel1.Visible = false; girisFormu.bunifuCustomLabel3.Visible = false; girisFormu.bunifuSeparator1.Visible = false; girisFormu.bunifuSeparator2.Visible = false; girisFormu.Giris1.Visible = false; girisFormu.KayitOl.Visible = false; girisFormu.timer1.Interval = 100; girisFormu.timer1.Start(); MessageBox.Show("İnternet Bağlantısı Kesildi!\n İnternete Bağlanıp Yeniden Giriş Yapın!", "HATA"); } }