Exemple #1
0
        private void pctUpdate_Click(object sender, EventArgs e)
        {
            DaljaPrisni();
            KontrolloInternet objKontInt = new KontrolloInternet();

            objKontInt.Kontrollo();
            if (objKontInt.KtheAkainternet() == true)
            {
                System.Threading.Thread.Sleep(1500);
                t.Abort();
                ProcessStartInfo startInfo = new ProcessStartInfo();
                startInfo.FileName = "http://www.xhelati.tk/update";
                Process processi = new Process();
                processi.StartInfo = startInfo;
                processi.Start();
            }
            else
            {
                System.Threading.Thread.Sleep(1500);
                t.Abort();
                MessageBox.Show(this, "Gabim ! Ju nuk keni lidhje ne Internet.", "Gabim !", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemple #2
0
        public void rifresko()
        {
            DialogResult dlgres = new DialogResult();

            clsLoja.AuKry(lblFjala.Text);
            if (ukrykrejt == true)
            {
                if (humbje == true)
                {
                    if (muzika == true)
                    {
                        lshusi_varja.controls.play();
                    }
                    pctBritma.Image   = Xhelati.Properties.Resources.Varja;
                    pctBritma.Visible = true;
                    lblFjala.Text     = clsLoja.KtheMasken();
                    MessageBox.Show(this, "Deshtuat ! Ju keni humbur lojen. Paci fat ne lojen tjeter.\n\nPiket Totale: " + clsLoja.KthePoenatTotale(), "Deshtuat", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    dlgres = MessageBox.Show(this, "Urime ! Ju perfunduat lojen me Sukses.\n\nEmri: " + emri + "\nPiket Totale: " + clsLoja.KthePoenatTotale() + "\n\nDeshironi qe te rankoheni ne listen online ne Internet ?", "Urime !", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                    if (dlgres == DialogResult.Yes)
                    {
                        DaljaPrisni();
                        this.Hide();
                        KontrolloInternet objKontInt = new KontrolloInternet();
                        objKontInt.Kontrollo();
                        if (objKontInt.KtheAkainternet() == true)
                        {
                            System.Threading.Thread.Sleep(1500);
                            t.Abort();
                            string temp = objKontInt.VendosPoenat(emri, Convert.ToInt32(clsLoja.KthePoenatTotale()));
                            if (temp == "SUKSES")
                            {
                                MessageBox.Show(this, "Ju u rankuat ne listen e lojtareve.\nwww.Xhelati.tk", "Sukses !", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            }
                            else
                            {
                                MessageBox.Show(this, temp, "Gabim !", MessageBoxButtons.OK, MessageBoxIcon.Error);
                            }
                        }
                        else
                        {
                            System.Threading.Thread.Sleep(1500);
                            t.Abort();
                            MessageBox.Show(this, "Gabim ! Ju nuk keni lidhje ne Internet.", "Gabim !", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                    }
                }
                humbje    = false;
                ukrykrejt = false;
                DaljaMeny();
            }
            else
            {
                if (ukry == true)
                {
                    dlgres = MessageBox.Show(this, "Urime ! Ju e gjetet fjalen me sukses.\n\nEmri: " + emri + "\nPiket Totale: " + clsLoja.KthePoenatTotale() + "\n\nDeshironi te vazhdoni lojen ?", "Urime !", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                    if (dlgres == DialogResult.Yes)
                    {
                        lblGabimet.Text = "0/10";
                        lblFjala.Text   = clsLoja.KtheMasken();
                        KthejShkronjat();
                    }
                    else
                    {
                        MessageBox.Show(this, "Ju perfunduat lojen.\n\nEmri: " + emri + "\n\nPiket Totale: " + clsLoja.KthePoenatTotale(), "Perfundoi !", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        DaljaMeny();
                    }
                    ukry = false;
                }
                else
                {
                    int temp = Convert.ToInt32(lblGabimet.Text.Remove(lblGabimet.Text.Length - 3));
                    lblGabimet.Text = clsLoja.KtheGabimet().ToString() + "/10";
                    if (temp < Convert.ToInt32(lblGabimet.Text.Remove(lblGabimet.Text.Length - 3)))
                    {
                        if (muzika == true)
                        {
                            lshusi_britma.controls.play();
                        }
                        pctBritma.Image   = Xhelati.Properties.Resources.Britma;
                        pctBritma.Visible = true;
                    }
                }
            }
        }