Пример #1
0
        private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            if (status == 0)
            {
                if (MessageBox.Show("TELAH TERJADI KESALAHAN DENGAN PESAN:\n\n" + eksepsi + "\n\nSILAHKAN HUBUNGI" +
                    " TEKNISI ANDA", "PERINGATAN", MessageBoxButtons.OK, MessageBoxIcon.Error) == DialogResult.OK)
                {
                    statusUser.Text = " : CLIENT GAGAL MELAKUKAN KONEKSI DENGAN SERVER!!!!!!!!!!!!!!!!!!!";
                    //fSetConn setConn = new fSetConn();
                    //setConn.StartPosition = FormStartPosition.CenterScreen;
                    //setConn.ShowDialog();
                    //setConn.Show();
                    if ((dekripKoneksi = (decrypt)alat.FormSudahDibuat(typeof(decrypt))) == null)
                    {
                        dekripKoneksi = new decrypt();
                        //System.Windows.Forms.ListView lvTampil = (System.Windows.Forms.ListView)cari.Controls["groupBox1"].Controls["lvTampil"];
                        //fillTheSearchTable(lvTampil);
                        //setConn.Size = new System.Drawing.Size(lebarLayar, tinggiLayar);
                        dekripKoneksi.StartPosition = FormStartPosition.CenterScreen;
                        dekripKoneksi.MdiParent = this;
                        dekripKoneksi.Show();
                    }
                    else
                    {
                        //System.Windows.Forms.ListView lvTampil = (System.Windows.Forms.ListView)cari.Controls["groupBox1"].Controls["lvTampil"];
                        //fillTheSearchTable(lvTampil);
                        dekripKoneksi.Select();
                    }
                }
                else
                    this.Close();

            }
            else if (status == 1)
            {
                statusUser.Text = "User Aktip : .:|:. Posisi : ";
                toolStripStatusServer.Text = " Server : " + konek.GetServer();
                showLogin();
            }
        }
Пример #2
0
 private void mSetKoneksi_Click(object sender, EventArgs e)
 {
     //if ((setConn = (fSetConn)alat.formSudahDibuat(typeof(fSetConn))) == null)
     //{
     //    setConn = new fSetConn();
     //    //System.Windows.Forms.ListView lvTampil = (System.Windows.Forms.ListView)cari.Controls["groupBox1"].Controls["lvTampil"];
     //    //fillTheSearchTable(lvTampil);
     //    //setConn.Size = new System.Drawing.Size(lebarLayar, tinggiLayar);
     //    setConn.StartPosition = FormStartPosition.CenterScreen;
     //    setConn.MdiParent = this;
     //    setConn.Show();
     //}
     //else
     //{
     //    //System.Windows.Forms.ListView lvTampil = (System.Windows.Forms.ListView)cari.Controls["groupBox1"].Controls["lvTampil"];
     //    //fillTheSearchTable(lvTampil);
     //    setConn.Select();
     //}
     if ((dekripKoneksi = (decrypt)alat.FormSudahDibuat(typeof(decrypt))) == null)
     {
         dekripKoneksi = new decrypt();
         //System.Windows.Forms.ListView lvTampil = (System.Windows.Forms.ListView)cari.Controls["groupBox1"].Controls["lvTampil"];
         //fillTheSearchTable(lvTampil);
         //setConn.Size = new System.Drawing.Size(lebarLayar, tinggiLayar);
         dekripKoneksi.StartPosition = FormStartPosition.CenterScreen;
         dekripKoneksi.MdiParent = this;
         dekripKoneksi.Show();
     }
     else
     {
         //System.Windows.Forms.ListView lvTampil = (System.Windows.Forms.ListView)cari.Controls["groupBox1"].Controls["lvTampil"];
         //fillTheSearchTable(lvTampil);
         dekripKoneksi.Select();
     }
 }