Close
Faqja 4 prej 5 FillimFillim ... 2345 FunditFundit
Duke shfaqur rezultatin 31 deri 40 prej 42
  1. #31
    i/e regjistruar Maska e hot_prinz
    Anėtarėsuar
    29-05-2007
    Vendndodhja
    Frankfurt
    Postime
    9,878
    ja edhe nje version tjeter i Valdet Milionerit ,

    per administrimin e pyetjeve perdor nje skede "data.bin", aty jipen te dhenat te ndara me pikepresje, rreshtat qe fillon me shkronjen e pare "#" jane komentare, nese rreshtat e pyetjeve nuk permbajn te gjitha elementet do te ignorohen dhe sdo futen ne loje, vlerat jane:
    ;;;... e keshtu me radhe edhe per pergjigjet tjera, skeda data.bin me disa pyetje inicializuese gjindet ne skedarin e bashkangjitur.

    Pasi qe fillova para disa oreve e tani ketu u be vone, do vazhdoj tjetren here me vendosjen e xhokereve si 50:50, telefoni e ndryshime tjera:

    Kodi PHP:

    using System
    ;
    using System.IO;
    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.Threading;

    namespace 
    Milioner
    {
        public 
    partial class Form1 Form
        
    {
            
    int pyetja=1;
            
    string strAppPath Environment.CurrentDirectory;
            
    String[] strArray = new String[0];
            
    bool bA false;
            
    bool bB false;
            
    bool bC false;
            
    bool bD false;
            
    bool bTastat false;

            public 
    Form1()
            {
                
    InitializeComponent();
            }

            private 
    void Form1_Load(object senderEventArgs e)
            {
                if (
    File.Exists(strAppPath + @"\data.bin"))
                    
    skeda_ne_matrice(strAppPath "\\data.bin"ref strArray);

                
    inicializo_lojen();
            }

            private 
    void inicializo_lojen()
            {
                
    lblA.BackColor Color.Blue;
                
    lblB.BackColor Color.Blue;
                
    lblC.BackColor Color.Blue;
                
    lblD.BackColor Color.Blue;

                if (
    pyetja <= 15)
                {
                    if (
    pyetja >= 2)
                    {
                        
    lblMoney.Text this.gbEuro.Controls["lbl" + (pyetja 1)].Text "    ";
                        
    this.gbEuro.Controls["lbl" + (pyetja 1)].BackColor Color.Transparent;
                        if ((
    pyetja 1) != && (pyetja 1) != 10)
                            
    this.gbEuro.Controls["lbl" + (pyetja 1)].ForeColor Color.DarkOrange;
                        else
                            
    this.gbEuro.Controls["lbl" + (pyetja 1)].ForeColor Color.White;
                    }
                    
    aktualizo_euro(pyetja);
                    
    merr_pyetje_randome();
                }
                else
                {
                    
    DialogResult rezultati MessageBox.Show("Urime, keni fituar 1.000.000 €!!!\n\nDeshironi te startoni nje loje tjeter?!"
                    
    "Urime!"MessageBoxButtons.YesNoMessageBoxIcon.Information);
                    if (
    rezultati == DialogResult.Yes)
                        
    Application.Restart();
                    else
                        
    Application.Exit();
                }
            }

            private 
    void merr_pyetje_randome()
            {
                
    ArrayList strAL = new ArrayList();
                foreach (
    string p in strArray)
                {
                    
    p.TrimStart();
                    if (
    p.Substring(01) != "#")
                    {
                        
    string[] strSpl p.Split(';');
                        if (
    strSpl.Length >= 10)
                        {
                            if (
    strSpl[0] == pyetja.ToString())
                            {
                                
    strAL.Add(p);
                            }
                        }
                    }
                }

                if (
    strAL.Count 0)
                {
                    
    Random rnd = new Random();
                    
    int numri_random rnd.Next(0strAL.Count);
                    
    string pyetja_randome strAL[numri_random].ToString();
                    
    string[] strSpl pyetja_randome.Split(';');
                    
    lblPyetje.Text strSpl[1];
                    
    lblA.Text strSpl[2];
                    if (
    strSpl[3] == "0")
                        
    bA false;
                    else
                        
    bA true;
                    
    lblB.Text strSpl[4];
                    if (
    strSpl[5] == "0")
                        
    bB false;
                    else
                        
    bB true;
                    
    lblC.Text strSpl[6];
                    if (
    strSpl[7] == "0")
                        
    bC false;
                    else
                        
    bC true;
                    
    lblD.Text strSpl[8];
                    if (
    strSpl[9].Substring(01) == "0")
                        
    bD false;
                    else
                        
    bD true;
                }
                else
                {
                    
    MessageBox.Show("Vendos pyetje per te gjitha ketegorite per te mos ndaluar!""Ska pyetje per kete kategori!");
                }
            }

            private 
    void skeda_ne_matrice(string strFileref string[] strArray)
            {
                
    StreamReader myFile = new StreamReader(strFileSystem.Text.Encoding.Default);
                
    String strTemp myFile.ReadToEnd();
                
    strArray strTemp.Split('\n');
                
    myFile.Close();
            }
            private 
    void aktualizo_euro(int pyetja)
            {
                
    this.gbEuro.Controls["lbl" pyetja].BackColor Color.DarkOrange;
                
    this.gbEuro.Controls["lbl" pyetja].ForeColor Color.Yellow;
            }

            private 
    void lblA_MouseEnter(object senderEventArgs e)
            {
                
    Label lbl_shtypur = (Label)sender;
                
    lbl_shtypur.BackColor Color.DarkOrange;
            }
            private 
    void lblA_MouseLeave(object senderEventArgs e)
            {
                
    Label lbl_shtypur = (Label)sender;
                
    lbl_shtypur.BackColor Color.Blue;
            }

            private 
    void lblA_Click(object senderEventArgs e)
            {
                if (!
    bTastat)
                {
                    
    bTastat true;
                    
    lblA.BackColor Color.DarkOrange;
                    if (
    bA)
                        
    sukses();
                    else
                        
    deshtim(lblA);
                }
            }

            private 
    void lblB_Click(object senderEventArgs e)
            {
                if (!
    bTastat)
                {
                    
    bTastat true;
                    
    lblB.BackColor Color.DarkOrange;
                    if (
    bB)
                        
    sukses();
                    else
                        
    deshtim(lblB);
                }
            }

            private 
    void lblC_Click(object senderEventArgs e)
            {
                if (!
    bTastat)
                {
                    
    bTastat true;
                    
    lblC.BackColor Color.DarkOrange;
                    if (
    bC)
                        
    sukses();
                    else
                        
    deshtim(lblC);
                }
            }

            private 
    void lblD_Click(object senderEventArgs e)
            {
                if (!
    bTastat)
                {
                    
    bTastat true;
                    
    lblD.BackColor Color.DarkOrange;
                    if (
    bD)
                        
    sukses();
                    else
                        
    deshtim(lblD);
                }
            }
            private 
    void deshtim(Label l)
            {
                
    DialogResult rezultati MessageBox.Show("Deshironi te startoni nje loje tjeter?!"
                    
    ,"Humbet!",MessageBoxButtons.YesNo,MessageBoxIcon.Information);
                
    l.BackColor Color.DarkOrange;
                if (
    rezultati == DialogResult.Yes)
                    
    Application.Restart();
                else
                    
    Application.Exit();
            }

            private 
    void sukses()
            {
                
    Thread.Sleep(500);
                
    bTastat false;
                
    pyetja++;
                
    inicializo_lojen();
            }
        }

    Fotografitė e Bashkėngjitura Fotografitė e Bashkėngjitura   
    Skedarėt e Bashkėngjitur Skedarėt e Bashkėngjitur

  2. #32
    i/e regjistruar
    Anėtarėsuar
    08-05-2008
    Vendndodhja
    Middle East
    Postime
    243
    Te Lumt Hot_prinz per punen!

    I madh je, Faliminderit shum per kete Version sapo jam duke luajtur...

    Valdet Faliminderit per iden

  3. #33
    i/e regjistruar Maska e hot_prinz
    Anėtarėsuar
    29-05-2007
    Vendndodhja
    Frankfurt
    Postime
    9,878
    little_boy, falemnderit shume.

    Ja edhe nje version pak me te perpunuar, xhokeret e telefonit dhe te publikut jane te thjeshte per momentin tregojne vetem vleren e sakte ne nje msgbox, por loja tani permban edhe disa efekte te zerit.

    Kodi PHP:
    using System;
    using System.IO;
    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;

    namespace 
    Milioner
    {
        public 
    partial class Form1 Form
        
    {
            
    int pyetja;
            
    string strAppPath Environment.CurrentDirectory;
            
    String[] strArray = new String[0];
            
    bool bA;
            
    bool bB;
            
    bool bC;
            
    bool bD;
            
    bool bTastat;
            
    Label pyetja_shtypur;
            
    Timer timeri_suksesit;
            
    Timer timeri_fitores;
            
    bool j5050;
            
    bool jTelefoni;
            
    bool jPubliku;

            public 
    Form1()
            {
                
    InitializeComponent();
            }

            private 
    void Form1_Load(object senderEventArgs e)
            {
                if (
    File.Exists(strAppPath + @"\intro.wav"))
                {
                    
    System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer();
                    
    myPlayer.SoundLocation strAppPath + @"\intro.wav";
                    
    myPlayer.Play();
                }

                if (
    File.Exists(strAppPath + @"\data.bin"))
                    
    skeda_ne_matrice(strAppPath + @"\data.bin"ref strArray);
                
    loje_e_re();
            }

            private 
    void loje_e_re()
            {
                for (
    int i 116i++)
                {
                    if (
    this.gbEuro.Controls["lbl" i].BackColor == Color.DarkOrange)
                        
    this.gbEuro.Controls["lbl" i].BackColor Color.Transparent;
                    if (
    != && != 10)
                        
    this.gbEuro.Controls["lbl" i].ForeColor Color.DarkOrange;
                    else
                        
    this.gbEuro.Controls["lbl" i].ForeColor Color.White;
                }
                
    j5050 false;
                
    jPubliku false;
                
    jTelefoni false;
                
    pyetja 1;
                
    bA false;
                
    bB false;
                
    bC false;
                
    bD false;
                
    bTastat false;
                
    pastro_jokerat();
                
    inicializo_lojen();
            }

            private 
    void pastro_jokerat()
            {
                
    lbl5050.BackColor Color.MidnightBlue;
                
    lblTelefoni.BackColor Color.MidnightBlue;
                
    lblPubliku.BackColor Color.MidnightBlue;
            }

            private 
    void inicializo_lojen()
            {
                
    shto_handlerat_jokeri();
                
    shto_handlerat_pyetje();
                
    shto_handlerat_EL();
                
    pastro_pyetjet();
                
    lblA.Visible true;
                
    lblB.Visible true;
                
    lblC.Visible true;
                
    lblD.Visible true;

                if (
    pyetja <= 15)
                {
                    if (
    pyetja >= 2)
                    {
                        
    lblMoney.Text this.gbEuro.Controls["lbl" + (pyetja 1)].Text "    ";
                        
    this.gbEuro.Controls["lbl" + (pyetja 1)].BackColor Color.Transparent;
                        if ((
    pyetja 1) != && (pyetja 1) != 10)
                            
    this.gbEuro.Controls["lbl" + (pyetja 1)].ForeColor Color.DarkOrange;
                        else
                            
    this.gbEuro.Controls["lbl" + (pyetja 1)].ForeColor Color.White;
                    }
                    
    aktualizo_euro(pyetja);
                    
    merr_pyetje_randome();
                }
                else
                {
                    
    fitore();
                }
            }

            private 
    void shto_handlerat_jokeri()
            {
                if (!
    j5050)
                {
                    
    this.lbl5050.MouseLeave += new System.EventHandler(this.jokeri_MouseLeave);
                    
    this.lbl5050.MouseEnter += new System.EventHandler(this.jokeri_MouseEnter);
                }
                if (!
    jTelefoni)
                {
                    
    this.lblTelefoni.MouseLeave += new System.EventHandler(this.jokeri_MouseLeave);
                    
    this.lblTelefoni.MouseEnter += new System.EventHandler(this.jokeri_MouseEnter);
                }
                if (!
    jPubliku)
                {
                    
    this.lblPubliku.MouseLeave += new System.EventHandler(this.jokeri_MouseLeave);
                    
    this.lblPubliku.MouseEnter += new System.EventHandler(this.jokeri_MouseEnter);
                }
            }

            private 
    void largo_handlerat_jokeri()
            {
                
    this.lbl5050.MouseLeave -= new System.EventHandler(this.jokeri_MouseLeave);
                
    this.lblTelefoni.MouseLeave -= new System.EventHandler(this.jokeri_MouseLeave);
                
    this.lblPubliku.MouseLeave -= new System.EventHandler(this.jokeri_MouseLeave);
                
    this.lbl5050.MouseEnter -= new System.EventHandler(this.jokeri_MouseEnter);
                
    this.lblTelefoni.MouseEnter -= new System.EventHandler(this.jokeri_MouseEnter);
                
    this.lblPubliku.MouseEnter -= new System.EventHandler(this.jokeri_MouseEnter);
            }

            private 
    void fitore()
            {
                if (
    File.Exists(strAppPath + @"\wonmillion.wav"))
                {
                    
    System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer();
                    
    myPlayer.SoundLocation strAppPath + @"\wonmillion.wav";
                    
    myPlayer.Play();
                }

                
    timeri_fitores = new Timer();
                
    timeri_fitores.Interval 3000;
                
    timeri_fitores.Start();
                
    timeri_fitores.Tick += new EventHandler(timeri_fitores_Tick);

                
    lblPyetja.Text "Urime fituat!\n1.000.000 €";
                
    lblPyetje.Text "";
                
    lblPyetje.Visible false;

            }
             
            public 
    void timeri_fitores_Tick(object senderEventArgs eArgs)
            {
                if (
    sender == timeri_fitores)
                {
                    
    lblPyetje.Visible true;
                    
    lblPyetja.Text "";
                    
    timeri_fitores.Stop();
                    
    timeri_fitores.Tick -= new EventHandler(timeri_fitores_Tick);
                    
    label4.Text "";
                    
    lblrezultati.Text "Doni tė filloni nje lojė tė re?";
                    
    lblA.Text "";
                    
    lblB.Text "";
                    
    lblC.Text "";
                    
    lblD.Text "";
                    
    shto_gb_humbje();
                }
            }

            private 
    void shto_handlerat_pyetje()
            {
                
    this.lblA.Click += new System.EventHandler(this.pyetja_Click);
                
    this.lblB.Click += new System.EventHandler(this.pyetja_Click);
                
    this.lblC.Click += new System.EventHandler(this.pyetja_Click);
                
    this.lblD.Click += new System.EventHandler(this.pyetja_Click);
            }

            private 
    void shto_handlerat_EL()
            {
                
    this.lblA.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblB.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblC.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblD.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);

                
    this.lblA.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblB.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblC.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblD.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
            }

            private 
    void largo_handlerat_pyetje()
            {
                
    this.lblA.Click -= new System.EventHandler(this.pyetja_Click);
                
    this.lblB.Click -= new System.EventHandler(this.pyetja_Click);
                
    this.lblC.Click -= new System.EventHandler(this.pyetja_Click);
                
    this.lblD.Click -= new System.EventHandler(this.pyetja_Click);
            }

            private 
    void largo_handlerat_EL()
            {
                
    this.lblA.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblB.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblC.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblD.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);

                
    this.lblA.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblB.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblC.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblD.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
            }

            private 
    void pastro_pyetjet()
            {
                
    lblA.BackColor Color.MediumBlue;
                
    lblB.BackColor Color.MediumBlue;
                
    lblC.BackColor Color.MediumBlue;
                
    lblD.BackColor Color.MediumBlue;
            }

            private 
    void merr_pyetje_randome()
            {
                
    ArrayList strAL = new ArrayList();
                foreach (
    string p in strArray)
                {
                    
    p.TrimStart();
                    if (
    p.Substring(01) != "#")
                    {
                        
    string[] strSpl p.Split(';');
                        if (
    strSpl.Length >= 10)
                        {
                            if (
    strSpl[0] == pyetja.ToString())
                            {
                                
    strAL.Add(p);
                            }
                        }
                    }
                }

                if (
    strAL.Count 0)
                {
                    
    Random rnd = new Random();
                    
    int numri_random rnd.Next(0strAL.Count);
                    
    string pyetja_randome strAL[numri_random].ToString();
                    
    string[] strSpl pyetja_randome.Split(';');
                    
    lblPyetje.Text strSpl[1];
                    
    lblA.Text strSpl[2];
                    if (
    strSpl[3] == "0")
                        
    bA false;
                    else
                        
    bA true;
                    
    lblB.Text strSpl[4];
                    if (
    strSpl[5] == "0")
                        
    bB false;
                    else
                        
    bB true;
                    
    lblC.Text strSpl[6];
                    if (
    strSpl[7] == "0")
                        
    bC false;
                    else
                        
    bC true;
                    
    lblD.Text strSpl[8];
                    if (
    strSpl[9].Substring(01) == "0")
                        
    bD false;
                    else
                        
    bD true;
                }
                else
                {
                    
    MessageBox.Show("Vendos pyetje per te gjitha ketegorite per te mos ndaluar!""Ska pyetje per kete kategori!");
                }
            }

            private 
    void skeda_ne_matrice(string strFileref string[] strArray)
            {
                
    StreamReader myFile = new StreamReader(strFileSystem.Text.Encoding.Default);
                
    String strTemp myFile.ReadToEnd();
                
    strArray strTemp.Split('\n');
                
    myFile.Close();
            }
            private 
    void aktualizo_euro(int pyetja)
            {
                
    this.gbEuro.Controls["lbl" pyetja].BackColor Color.DarkOrange;
                
    this.gbEuro.Controls["lbl" pyetja].ForeColor Color.Yellow;
            }

            private 
    void jokeri_MouseEnter(object senderEventArgs e)
            {
                
    Label lbl_shtypur = (Label)sender;
                
    lbl_shtypur.BackColor Color.DarkOrange;
            }
            private 
    void jokeri_MouseLeave(object senderEventArgs e)
            {
                
    Label lbl_shtypur = (Label)sender;
                
    lbl_shtypur.BackColor Color.MidnightBlue;
            }

            private 
    void pyetja_MouseEnter(object senderEventArgs e)
            {
                
    Label lbl_shtypur = (Label)sender;
                
    lbl_shtypur.BackColor Color.DarkOrange;
            }
            private 
    void pyetja_MouseLeave(object senderEventArgs e)
            {
                
    Label lbl_shtypur = (Label)sender;
                
    lbl_shtypur.BackColor Color.Blue;
            }

            private 
    void pyetja_Click(object senderEventArgs e)
            {
                
    largo_handlerat_EL();
                if (!
    bTastat)
                {
                    
    bTastat true;
                    
    pyetja_shtypur =(Label)sender;
                    
    pyetja_shtypur.BackColor Color.DarkOrange;
                    
    shfaq_sigurte_Click();
                }
            }

            private 
    void shfaq_sigurte_Click()
            {
                if (
    File.Exists(strAppPath + @"\question.wav"))
                {
                    
    System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer();
                    
    myPlayer.SoundLocation strAppPath + @"\question.wav";
                    
    myPlayer.Play();
                }

                
    largo_handlerat_jokeri();
                
    gbSigurte.Visible true;
                
    this.lblPO.Click += new System.EventHandler(this.sigurte_Click);
                
    this.lblJO.Click += new System.EventHandler(this.sigurte_Click);
                
    this.lblPO.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblJO.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblPO.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblJO.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
            }

            private 
    void sigurte_Click(object senderEventArgs e)
            {
                
    largo_handlerat_pyetje();

                if ((
    Label)sender == lblPO)
                {
                    switch (
    pyetja_shtypur.Name)
                    {
                        case 
    "lblA":
                            if (
    bA)
                                
    sukses(lblA);
                            else
                                
    deshtim(lblA);
                            break;
                        case 
    "lblB":
                            if (
    bB)
                                
    sukses(lblB);
                            else
                                
    deshtim(lblB);
                            break;
                        case 
    "lblC":
                            if (
    bC)
                                
    sukses(lblC);
                            else
                                
    deshtim(lblC);
                            break;
                        case 
    "lblD":
                            if (
    bD)
                                
    sukses(lblD);
                            else
                                
    deshtim(lblD);
                            break;
                    }

                }
                else if ((
    Label)sender == lblJO)
                {
                    
    bTastat false;
                    
    pastro_pyetjet();
                    
    shto_handlerat_EL();
                    
    shto_handlerat_jokeri();
                    
    shto_handlerat_pyetje();
                    
    gbSigurte.Visible false;
                    
    this.lblPO.Click -= new System.EventHandler(this.sigurte_Click);
                    
    this.lblJO.Click -= new System.EventHandler(this.sigurte_Click);
                    
    this.lblPO.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                    
    this.lblJO.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                    
    this.lblPO.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                    
    this.lblJO.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                    
    this.lblPO.BackColor Color.MediumBlue;
                    
    this.lblJO.BackColor Color.MediumBlue;
                }
            }

            private 
    void humbje_Click(object senderEventArgs e)
            {
                
    largo_handlerat_pyetje();
                if ((
    Label)sender == lblSerish)
                {
                    
    largo_gb_humbje();
                    
    loje_e_re();
                }
                else if ((
    Label)sender == lblDil)
                {
                    
    Application.Exit();
                }
            }

            private 
    void deshtim(Label l)
            {
                if (
    File.Exists(strAppPath + @"\hasta_la_vista.wav"))
                {
                    
    System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer();
                    
    myPlayer.SoundLocation strAppPath + @"\hasta_la_vista.wav";
                    
    myPlayer.Play();
                }

                
    largo_sigurte();
                
    shto_gb_humbje();
                if (
    bA)
                    
    this.Controls["lblA"].BackColor Color.Green;
                if(
    bB)
                    
    this.Controls["lblB"].BackColor Color.Green;
                if(
    bC)
                    
    this.Controls["lblC"].BackColor Color.Green;
                if(
    bD)
                    
    this.Controls["lblD"].BackColor Color.Green;

                
    l.BackColor Color.Red;

                if (
    pyetja >= 2)
                {
                    if (((
    pyetja 1) >= 0) && ((pyetja 1) < 5))
                    {
                        
    lblrezultati.Text "Shuma e fituar:  0€";
                    }
                    else if (((
    pyetja 1) >= 5) && ((pyetja 1) < 10))
                    {
                        
    lblMoney.Text this.gbEuro.Controls["lbl" 5].Text "    ";
                        
    lblrezultati.Text "Shuma e fituar:  " lblMoney.Text;
                    }
                    else if (((
    pyetja 1) >= 10) && ((pyetja 1) < 15))
                    {
                        
    lblMoney.Text this.gbEuro.Controls["lbl" 10].Text "    ";
                        
    lblrezultati.Text "Shuma e fituar:  " lblMoney.Text;
                    }
                }
            }

            private 
    void shto_gb_humbje()
            {
                
    gbHumbja.Visible true;
                
    this.lblSerish.Click += new System.EventHandler(this.humbje_Click);
                
    this.lblDil.Click += new System.EventHandler(this.humbje_Click);
                
    this.lblSerish.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblDil.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblSerish.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblDil.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
            }

            private 
    void largo_gb_humbje()
            {
                
    gbHumbja.Visible false;
                
    this.lblSerish.Click -= new System.EventHandler(this.humbje_Click);
                
    this.lblDil.Click -= new System.EventHandler(this.humbje_Click);
                
    this.lblSerish.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblDil.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblSerish.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblDil.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
            }

            private 
    void largo_sigurte()
            {
                
    gbSigurte.Visible false;
                
    this.lblPO.Click -= new System.EventHandler(this.sigurte_Click);
                
    this.lblJO.Click -= new System.EventHandler(this.sigurte_Click);
                
    this.lblPO.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblJO.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblPO.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblJO.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblPO.BackColor Color.MediumBlue;
                
    this.lblJO.BackColor Color.MediumBlue;
            }

            private 
    void sukses(Label l)
            {
                if (
    File.Exists(strAppPath + @"\good.wav"))
                {
                    
    System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer();
                    
    myPlayer.SoundLocation strAppPath + @"\good.wav";
                    
    myPlayer.Play();
                }
                
    largo_sigurte();
                
    timeri_suksesit = new Timer();
                
    timeri_suksesit.Interval 1500;
                
    timeri_suksesit.Start();
                
    timeri_suksesit.Tick += new EventHandler(timeri_suksesit_Tick);

                
    l.BackColor Color.Green;
                
    lblPyetja.Text "E SAKTĖ!";
                
    lblPyetje.Text "";
                
    lblPyetje.Visible false;

            }
            public 
    void timeri_suksesit_Tick(object senderEventArgs eArgs)
            {
                if (
    sender == timeri_suksesit)
                {
                    
    bTastat false;
                    
    pyetja++;
                    
    lblPyetje.Visible true;
                    
    lblPyetja.Text "";
                    
    timeri_suksesit.Stop();
                    
    timeri_suksesit.Tick -= new EventHandler(timeri_suksesit_Tick);
                    
    inicializo_lojen();
                }
            }

            private 
    void lbl5050_Click(object senderEventArgs e)
            {
                if (!
    j5050)
                {
                    
    j5050 true;
                    
    lbl5050.BackColor Color.DarkRed;
                    
    this.lbl5050.MouseLeave -= new System.EventHandler(this.jokeri_MouseLeave);
                    
    this.lbl5050.MouseEnter -= new System.EventHandler(this.jokeri_MouseEnter);
                    
    string[] pArr = new String[] { "lblA""lblB""lblC""lblD" };
                    
    Random rnd = new Random();
                    
    int i 0;
                    while (
    2)
                    {
                        
    int numri_random rnd.Next(0pArr.Length);
                        switch (
    pArr[numri_random])
                        {
                            case 
    "lblA":
                                if (!
    bA)
                                {
                                    if (
    lblA.Visible == true)
                                    {
                                        
    lblA.Visible false;i++;
                                    }
                                }
                                break;
                            case 
    "lblB":
                                if (!
    bB)
                                {
                                    if (
    lblB.Visible == true)
                                    {
                                        
    lblB.Visible false;i++;
                                    }
                                }
                                break;
                            case 
    "lblC":
                                if (!
    bC)
                                {
                                    if (
    lblC.Visible == true)
                                    {
                                        
    lblC.Visible false;i++;
                                    }
                                }
                                break;
                            case 
    "lblD":
                                if (!
    bD)
                                {
                                    if (
    lblD.Visible == true)
                                    {
                                        
    lblD.Visible false;i++;
                                    }
                                }
                                break;
                        }
                    }
                }
            }

            private 
    void lblTelefoni_Click(object senderEventArgs e)
            {
                if (!
    jTelefoni)
                {
                    
    jTelefoni true;
                    
    lblTelefoni.BackColor Color.DarkRed;
                    
    this.lblTelefoni.MouseLeave -= new System.EventHandler(this.jokeri_MouseLeave);
                    
    this.lblTelefoni.MouseEnter -= new System.EventHandler(this.jokeri_MouseEnter);

                    if (
    bA)
                        
    mesazhi("lblA""Xhokeri i Telefonit");
                    if (
    bB)
                        
    mesazhi("lblB""Xhokeri i Telefonit");
                    if (
    bC)
                        
    mesazhi("lblC""Xhokeri i Telefonit");
                    if (
    bD)
                        
    mesazhi("lblD""Xhokeri i Telefonit");
                }
            }

            private 
    void mesazhi(string p,string q)
            {
                
    MessageBox.Show("Pėrgjigja e saktė duhet tė jetė:\n\n"
                        
    this.Controls[p].Textq+" (100% i sigurte) :P",
                        
    MessageBoxButtons.OKMessageBoxIcon.Information);
            }

            private 
    void lblPubliku_Click(object senderEventArgs e)
            {
                if (!
    jPubliku)
                {
                    
    jPubliku true;
                    
    lblPubliku.BackColor Color.DarkRed;
                    
    this.lblPubliku.MouseLeave -= new System.EventHandler(this.jokeri_MouseLeave);
                    
    this.lblPubliku.MouseEnter -= new System.EventHandler(this.jokeri_MouseEnter);

                    if (
    bA)
                        
    mesazhi("lblA""Xhokeri i publikut");
                    if (
    bB)
                        
    mesazhi("lblB""Xhokeri i publikut");
                    if (
    bC)
                        
    mesazhi("lblC""Xhokeri i publikut");
                    if (
    bD)
                        
    mesazhi("lblD""Xhokeri i publikut");
                }
            }
        }


    versioni i lojes me efekte te zerit:

    Milioneri me efekte te zerit
    Fotografitė e Bashkėngjitura Fotografitė e Bashkėngjitura   
    Skedarėt e Bashkėngjitur Skedarėt e Bashkėngjitur

  4. #34

  5. #35

  6. #36
    i/e regjistruar
    Anėtarėsuar
    08-05-2008
    Vendndodhja
    Middle East
    Postime
    243
    @Hot_prinz, si do te kishte mundesi qe te fusje me shum se 15 pytje pastaj "Random" te zgjidhen 15?

    Faliminderit

  7. #37
    i/e regjistruar Maska e hot_prinz
    Anėtarėsuar
    29-05-2007
    Vendndodhja
    Frankfurt
    Postime
    9,878
    @little-boy,

    une ato pyetje i pata vendose vetem si testim, skeda "data.bin" mund te perpunohet me pyetje e pergjigje te reja, ja tani i kam fute me shume pyetje e pergjigje (te themi disi te huazuara ), i kam bere edhe disa ndryshime sa i perket skedes "data.bin", tani nuk nxjerr me gabim nese rreshti permban vetem '\n' -newline, tani lejohet qe ne mes pyetjeve pergjigjeve e ndaresve tjere te perdoren zbrazetira, disa ndryshime ne aksione te xhokereve, ata mund te klikoheshin kur dilte dritarja se a jeni te sigurte ne pyetje, etj:
    Fotografitė e Bashkėngjitura Fotografitė e Bashkėngjitura  
    Skedarėt e Bashkėngjitur Skedarėt e Bashkėngjitur

  8. #38
    i/e regjistruar
    Anėtarėsuar
    08-05-2008
    Vendndodhja
    Middle East
    Postime
    243
    Faliminderit shum!

    Tashe duket Prefekte... Te lumte

  9. #39
    Programues
    Anėtarėsuar
    21-02-2006
    Postime
    31
    UKE nese je ende ketu.
    Pergezime per punimin.
    Cka mendoni per WPF?
    Nese ki mundesi ta hapėsh nje tem te re ta diskutojme kete teknologji te Microsoft-it
    Falemnderit per mirkuptim
    '----------------------
    E.pllana Mitrovice
    live your day
    ---------------------
    CodeProject Article

  10. #40
    [QUOTE=hot_prinz;2161567]
    Kodi PHP:
    using System;
    using System.IO;
    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;

    namespace 
    Milioner
    {
        public 
    partial class Form1 Form
        
    {
            
    int pyetja;
            
    string strAppPath Environment.CurrentDirectory;
            
    String[] strArray = new String[0];
            
    bool bA;
            
    bool bB;
            
    bool bC;
            
    bool bD;
            
    bool bTastat;
            
    Label pyetja_shtypur;
            
    Timer timeri_suksesit;
            
    Timer timeri_fitores;
            
    bool j5050;
            
    bool jTelefoni;
            
    bool jPubliku;

            public 
    Form1()
            {
                
    InitializeComponent();
            }

            private 
    void Form1_Load(object senderEventArgs e)
            {
                if (
    File.Exists(strAppPath + @"\intro.wav"))
                {
                    
    System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer();
                    
    myPlayer.SoundLocation strAppPath + @"\intro.wav";
                    
    myPlayer.Play();
                }

                if (
    File.Exists(strAppPath + @"\data.bin"))
                    
    skeda_ne_matrice(strAppPath + @"\data.bin"ref strArray);
                
    loje_e_re();
            }

            private 
    void loje_e_re()
            {
                for (
    int i 116i++)
                {
                    if (
    this.gbEuro.Controls["lbl" i].BackColor == Color.DarkOrange)
                        
    this.gbEuro.Controls["lbl" i].BackColor Color.Transparent;
                    if (
    != && != 10)
                        
    this.gbEuro.Controls["lbl" i].ForeColor Color.DarkOrange;
                    else
                        
    this.gbEuro.Controls["lbl" i].ForeColor Color.White;
                }
                
    j5050 false;
                
    jPubliku false;
                
    jTelefoni false;
                
    pyetja 1;
                
    bA false;
                
    bB false;
                
    bC false;
                
    bD false;
                
    bTastat false;
                
    pastro_jokerat();
                
    inicializo_lojen();
            }

            private 
    void pastro_jokerat()
            {
                
    lbl5050.BackColor Color.MidnightBlue;
                
    lblTelefoni.BackColor Color.MidnightBlue;
                
    lblPubliku.BackColor Color.MidnightBlue;
            }

            private 
    void inicializo_lojen()
            {
                
    shto_handlerat_jokeri();
                
    shto_handlerat_pyetje();
                
    shto_handlerat_EL();
                
    pastro_pyetjet();
                
    lblA.Visible true;
                
    lblB.Visible true;
                
    lblC.Visible true;
                
    lblD.Visible true;

                if (
    pyetja <= 15)
                {
                    if (
    pyetja >= 2)
                    {
                        
    lblMoney.Text this.gbEuro.Controls["lbl" + (pyetja 1)].Text "    ";
                        
    this.gbEuro.Controls["lbl" + (pyetja 1)].BackColor Color.Transparent;
                        if ((
    pyetja 1) != && (pyetja 1) != 10)
                            
    this.gbEuro.Controls["lbl" + (pyetja 1)].ForeColor Color.DarkOrange;
                        else
                            
    this.gbEuro.Controls["lbl" + (pyetja 1)].ForeColor Color.White;
                    }
                    
    aktualizo_euro(pyetja);
                    
    merr_pyetje_randome();
                }
                else
                {
                    
    fitore();
                }
            }

            private 
    void shto_handlerat_jokeri()
            {
                if (!
    j5050)
                {
                    
    this.lbl5050.MouseLeave += new System.EventHandler(this.jokeri_MouseLeave);
                    
    this.lbl5050.MouseEnter += new System.EventHandler(this.jokeri_MouseEnter);
                }
                if (!
    jTelefoni)
                {
                    
    this.lblTelefoni.MouseLeave += new System.EventHandler(this.jokeri_MouseLeave);
                    
    this.lblTelefoni.MouseEnter += new System.EventHandler(this.jokeri_MouseEnter);
                }
                if (!
    jPubliku)
                {
                    
    this.lblPubliku.MouseLeave += new System.EventHandler(this.jokeri_MouseLeave);
                    
    this.lblPubliku.MouseEnter += new System.EventHandler(this.jokeri_MouseEnter);
                }
            }

            private 
    void largo_handlerat_jokeri()
            {
                
    this.lbl5050.MouseLeave -= new System.EventHandler(this.jokeri_MouseLeave);
                
    this.lblTelefoni.MouseLeave -= new System.EventHandler(this.jokeri_MouseLeave);
                
    this.lblPubliku.MouseLeave -= new System.EventHandler(this.jokeri_MouseLeave);
                
    this.lbl5050.MouseEnter -= new System.EventHandler(this.jokeri_MouseEnter);
                
    this.lblTelefoni.MouseEnter -= new System.EventHandler(this.jokeri_MouseEnter);
                
    this.lblPubliku.MouseEnter -= new System.EventHandler(this.jokeri_MouseEnter);
            }

            private 
    void fitore()
            {
                if (
    File.Exists(strAppPath + @"\wonmillion.wav"))
                {
                    
    System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer();
                    
    myPlayer.SoundLocation strAppPath + @"\wonmillion.wav";
                    
    myPlayer.Play();
                }

                
    timeri_fitores = new Timer();
                
    timeri_fitores.Interval 3000;
                
    timeri_fitores.Start();
                
    timeri_fitores.Tick += new EventHandler(timeri_fitores_Tick);

                
    lblPyetja.Text "Urime fituat!\n1.000.000 €";
                
    lblPyetje.Text "";
                
    lblPyetje.Visible false;

            }
             
            public 
    void timeri_fitores_Tick(object senderEventArgs eArgs)
            {
                if (
    sender == timeri_fitores)
                {
                    
    lblPyetje.Visible true;
                    
    lblPyetja.Text "";
                    
    timeri_fitores.Stop();
                    
    timeri_fitores.Tick -= new EventHandler(timeri_fitores_Tick);
                    
    label4.Text "";
                    
    lblrezultati.Text "Doni tė filloni nje lojė tė re?";
                    
    lblA.Text "";
                    
    lblB.Text "";
                    
    lblC.Text "";
                    
    lblD.Text "";
                    
    shto_gb_humbje();
                }
            }

            private 
    void shto_handlerat_pyetje()
            {
                
    this.lblA.Click += new System.EventHandler(this.pyetja_Click);
                
    this.lblB.Click += new System.EventHandler(this.pyetja_Click);
                
    this.lblC.Click += new System.EventHandler(this.pyetja_Click);
                
    this.lblD.Click += new System.EventHandler(this.pyetja_Click);
            }

            private 
    void shto_handlerat_EL()
            {
                
    this.lblA.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblB.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblC.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblD.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);

                
    this.lblA.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblB.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblC.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblD.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
            }

            private 
    void largo_handlerat_pyetje()
            {
                
    this.lblA.Click -= new System.EventHandler(this.pyetja_Click);
                
    this.lblB.Click -= new System.EventHandler(this.pyetja_Click);
                
    this.lblC.Click -= new System.EventHandler(this.pyetja_Click);
                
    this.lblD.Click -= new System.EventHandler(this.pyetja_Click);
            }

            private 
    void largo_handlerat_EL()
            {
                
    this.lblA.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblB.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblC.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblD.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);

                
    this.lblA.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblB.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblC.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblD.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
            }

            private 
    void pastro_pyetjet()
            {
                
    lblA.BackColor Color.MediumBlue;
                
    lblB.BackColor Color.MediumBlue;
                
    lblC.BackColor Color.MediumBlue;
                
    lblD.BackColor Color.MediumBlue;
            }

            private 
    void merr_pyetje_randome()
            {
                
    ArrayList strAL = new ArrayList();
                foreach (
    string p in strArray)
                {
                    
    p.TrimStart();
                    if (
    p.Substring(01) != "#")
                    {
                        
    string[] strSpl p.Split(';');
                        if (
    strSpl.Length >= 10)
                        {
                            if (
    strSpl[0] == pyetja.ToString())
                            {
                                
    strAL.Add(p);
                            }
                        }
                    }
                }

                if (
    strAL.Count 0)
                {
                    
    Random rnd = new Random();
                    
    int numri_random rnd.Next(0strAL.Count);
                    
    string pyetja_randome strAL[numri_random].ToString();
                    
    string[] strSpl pyetja_randome.Split(';');
                    
    lblPyetje.Text strSpl[1];
                    
    lblA.Text strSpl[2];
                    if (
    strSpl[3] == "0")
                        
    bA false;
                    else
                        
    bA true;
                    
    lblB.Text strSpl[4];
                    if (
    strSpl[5] == "0")
                        
    bB false;
                    else
                        
    bB true;
                    
    lblC.Text strSpl[6];
                    if (
    strSpl[7] == "0")
                        
    bC false;
                    else
                        
    bC true;
                    
    lblD.Text strSpl[8];
                    if (
    strSpl[9].Substring(01) == "0")
                        
    bD false;
                    else
                        
    bD true;
                }
                else
                {
                    
    MessageBox.Show("Vendos pyetje per te gjitha ketegorite per te mos ndaluar!""Ska pyetje per kete kategori!");
                }
            }

            private 
    void skeda_ne_matrice(string strFileref string[] strArray)
            {
                
    StreamReader myFile = new StreamReader(strFileSystem.Text.Encoding.Default);
                
    String strTemp myFile.ReadToEnd();
                
    strArray strTemp.Split('\n');
                
    myFile.Close();
            }
            private 
    void aktualizo_euro(int pyetja)
            {
                
    this.gbEuro.Controls["lbl" pyetja].BackColor Color.DarkOrange;
                
    this.gbEuro.Controls["lbl" pyetja].ForeColor Color.Yellow;
            }

            private 
    void jokeri_MouseEnter(object senderEventArgs e)
            {
                
    Label lbl_shtypur = (Label)sender;
                
    lbl_shtypur.BackColor Color.DarkOrange;
            }
            private 
    void jokeri_MouseLeave(object senderEventArgs e)
            {
                
    Label lbl_shtypur = (Label)sender;
                
    lbl_shtypur.BackColor Color.MidnightBlue;
            }

            private 
    void pyetja_MouseEnter(object senderEventArgs e)
            {
                
    Label lbl_shtypur = (Label)sender;
                
    lbl_shtypur.BackColor Color.DarkOrange;
            }
            private 
    void pyetja_MouseLeave(object senderEventArgs e)
            {
                
    Label lbl_shtypur = (Label)sender;
                
    lbl_shtypur.BackColor Color.Blue;
            }

            private 
    void pyetja_Click(object senderEventArgs e)
            {
                
    largo_handlerat_EL();
                if (!
    bTastat)
                {
                    
    bTastat true;
                    
    pyetja_shtypur =(Label)sender;
                    
    pyetja_shtypur.BackColor Color.DarkOrange;
                    
    shfaq_sigurte_Click();
                }
            }

            private 
    void shfaq_sigurte_Click()
            {
                if (
    File.Exists(strAppPath + @"\question.wav"))
                {
                    
    System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer();
                    
    myPlayer.SoundLocation strAppPath + @"\question.wav";
                    
    myPlayer.Play();
                }

                
    largo_handlerat_jokeri();
                
    gbSigurte.Visible true;
                
    this.lblPO.Click += new System.EventHandler(this.sigurte_Click);
                
    this.lblJO.Click += new System.EventHandler(this.sigurte_Click);
                
    this.lblPO.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblJO.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblPO.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblJO.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
            }

            private 
    void sigurte_Click(object senderEventArgs e)
            {
                
    largo_handlerat_pyetje();

                if ((
    Label)sender == lblPO)
                {
                    switch (
    pyetja_shtypur.Name)
                    {
                        case 
    "lblA":
                            if (
    bA)
                                
    sukses(lblA);
                            else
                                
    deshtim(lblA);
                            break;
                        case 
    "lblB":
                            if (
    bB)
                                
    sukses(lblB);
                            else
                                
    deshtim(lblB);
                            break;
                        case 
    "lblC":
                            if (
    bC)
                                
    sukses(lblC);
                            else
                                
    deshtim(lblC);
                            break;
                        case 
    "lblD":
                            if (
    bD)
                                
    sukses(lblD);
                            else
                                
    deshtim(lblD);
                            break;
                    }

                }
                else if ((
    Label)sender == lblJO)
                {
                    
    bTastat false;
                    
    pastro_pyetjet();
                    
    shto_handlerat_EL();
                    
    shto_handlerat_jokeri();
                    
    shto_handlerat_pyetje();
                    
    gbSigurte.Visible false;
                    
    this.lblPO.Click -= new System.EventHandler(this.sigurte_Click);
                    
    this.lblJO.Click -= new System.EventHandler(this.sigurte_Click);
                    
    this.lblPO.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                    
    this.lblJO.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                    
    this.lblPO.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                    
    this.lblJO.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                    
    this.lblPO.BackColor Color.MediumBlue;
                    
    this.lblJO.BackColor Color.MediumBlue;
                }
            }

            private 
    void humbje_Click(object senderEventArgs e)
            {
                
    largo_handlerat_pyetje();
                if ((
    Label)sender == lblSerish)
                {
                    
    largo_gb_humbje();
                    
    loje_e_re();
                }
                else if ((
    Label)sender == lblDil)
                {
                    
    Application.Exit();
                }
            }

            private 
    void deshtim(Label l)
            {
                if (
    File.Exists(strAppPath + @"\hasta_la_vista.wav"))
                {
                    
    System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer();
                    
    myPlayer.SoundLocation strAppPath + @"\hasta_la_vista.wav";
                    
    myPlayer.Play();
                }

                
    largo_sigurte();
                
    shto_gb_humbje();
                if (
    bA)
                    
    this.Controls["lblA"].BackColor Color.Green;
                if(
    bB)
                    
    this.Controls["lblB"].BackColor Color.Green;
                if(
    bC)
                    
    this.Controls["lblC"].BackColor Color.Green;
                if(
    bD)
                    
    this.Controls["lblD"].BackColor Color.Green;

                
    l.BackColor Color.Red;

                if (
    pyetja >= 2)
                {
                    if (((
    pyetja 1) >= 0) && ((pyetja 1) < 5))
                    {
                        
    lblrezultati.Text "Shuma e fituar:  0€";
                    }
                    else if (((
    pyetja 1) >= 5) && ((pyetja 1) < 10))
                    {
                        
    lblMoney.Text this.gbEuro.Controls["lbl" 5].Text "    ";
                        
    lblrezultati.Text "Shuma e fituar:  " lblMoney.Text;
                    }
                    else if (((
    pyetja 1) >= 10) && ((pyetja 1) < 15))
                    {
                        
    lblMoney.Text this.gbEuro.Controls["lbl" 10].Text "    ";
                        
    lblrezultati.Text "Shuma e fituar:  " lblMoney.Text;
                    }
                }
            }

            private 
    void shto_gb_humbje()
            {
                
    gbHumbja.Visible true;
                
    this.lblSerish.Click += new System.EventHandler(this.humbje_Click);
                
    this.lblDil.Click += new System.EventHandler(this.humbje_Click);
                
    this.lblSerish.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblDil.MouseLeave += new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblSerish.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblDil.MouseEnter += new System.EventHandler(this.pyetja_MouseEnter);
            }

            private 
    void largo_gb_humbje()
            {
                
    gbHumbja.Visible false;
                
    this.lblSerish.Click -= new System.EventHandler(this.humbje_Click);
                
    this.lblDil.Click -= new System.EventHandler(this.humbje_Click);
                
    this.lblSerish.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblDil.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblSerish.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblDil.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
            }

            private 
    void largo_sigurte()
            {
                
    gbSigurte.Visible false;
                
    this.lblPO.Click -= new System.EventHandler(this.sigurte_Click);
                
    this.lblJO.Click -= new System.EventHandler(this.sigurte_Click);
                
    this.lblPO.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblJO.MouseLeave -= new System.EventHandler(this.pyetja_MouseLeave);
                
    this.lblPO.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblJO.MouseEnter -= new System.EventHandler(this.pyetja_MouseEnter);
                
    this.lblPO.BackColor Color.MediumBlue;
                
    this.lblJO.BackColor Color.MediumBlue;
            }

            private 
    void sukses(Label l)
            {
                if (
    File.Exists(strAppPath + @"\good.wav"))
                {
                    
    System.Media.SoundPlayer myPlayer = new System.Media.SoundPlayer();
                    
    myPlayer.SoundLocation strAppPath + @"\good.wav";
                    
    myPlayer.Play();
                }
                
    largo_sigurte();
                
    timeri_suksesit = new Timer();
                
    timeri_suksesit.Interval 1500;
                
    timeri_suksesit.Start();
                
    timeri_suksesit.Tick += new EventHandler(timeri_suksesit_Tick);

                
    l.BackColor Color.Green;
                
    lblPyetja.Text "E SAKTĖ!";
                
    lblPyetje.Text "";
                
    lblPyetje.Visible false;

            }
            public 
    void timeri_suksesit_Tick(object senderEventArgs eArgs)
            {
                if (
    sender == timeri_suksesit)
                {
                    
    bTastat false;
                    
    pyetja++;
                    
    lblPyetje.Visible true;
                    
    lblPyetja.Text "";
                    
    timeri_suksesit.Stop();
                    
    timeri_suksesit.Tick -= new EventHandler(timeri_suksesit_Tick);
                    
    inicializo_lojen();
                }
            }

            private 
    void lbl5050_Click(object senderEventArgs e)
            {
                if (!
    j5050)
                {
                    
    j5050 true;
                    
    lbl5050.BackColor Color.DarkRed;
                    
    this.lbl5050.MouseLeave -= new System.EventHandler(this.jokeri_MouseLeave);
                    
    this.lbl5050.MouseEnter -= new System.EventHandler(this.jokeri_MouseEnter);
                    
    string[] pArr = new String[] { "lblA""lblB""lblC""lblD" };
                    
    Random rnd = new Random();
                    
    int i 0;
                    while (
    2)
                    {
                        
    int numri_random rnd.Next(0pArr.Length);
                        switch (
    pArr[numri_random])
                        {
                            case 
    "lblA":
                                if (!
    bA)
                                {
                                    if (
    lblA.Visible == true)
                                    {
                                        
    lblA.Visible false;i++;
                                    }
                                }
                                break;
                            case 
    "lblB":
                                if (!
    bB)
                                {
                                    if (
    lblB.Visible == true)
                                    {
                                        
    lblB.Visible false;i++;
                                    }
                                }
                                break;
                            case 
    "lblC":
                                if (!
    bC)
                                {
                                    if (
    lblC.Visible == true)
                                    {
                                        
    lblC.Visible false;i++;
                                    }
                                }
                                break;
                            case 
    "lblD":
                                if (!
    bD)
                                {
                                    if (
    lblD.Visible == true)
                                    {
                                        
    lblD.Visible false;i++;
                                    }
                                }
                                break;
                        }
                    }
                }
            }

            private 
    void lblTelefoni_Click(object senderEventArgs e)
            {
                if (!
    jTelefoni)
                {
                    
    jTelefoni true;
                    
    lblTelefoni.BackColor Color.DarkRed;
                    
    this.lblTelefoni.MouseLeave -= new System.EventHandler(this.jokeri_MouseLeave);
                    
    this.lblTelefoni.MouseEnter -= new System.EventHandler(this.jokeri_MouseEnter);

                    if (
    bA)
                        
    mesazhi("lblA""Xhokeri i Telefonit");
                    if (
    bB)
                        
    mesazhi("lblB""Xhokeri i Telefonit");
                    if (
    bC)
                        
    mesazhi("lblC""Xhokeri i Telefonit");
                    if (
    bD)
                        
    mesazhi("lblD""Xhokeri i Telefonit");
                }
            }

            private 
    void mesazhi(string p,string q)
            {
                
    MessageBox.Show("Pėrgjigja e saktė duhet tė jetė:\n\n"
                        
    this.Controls[p].Textq+" (100% i sigurte) :P",
                        
    MessageBoxButtons.OKMessageBoxIcon.Information);
            }

            private 
    void lblPubliku_Click(object senderEventArgs e)
            {
                if (!
    jPubliku)
                {
                    
    jPubliku true;
                    
    lblPubliku.BackColor Color.DarkRed;
                    
    this.lblPubliku.MouseLeave -= new System.EventHandler(this.jokeri_MouseLeave);
                    
    this.lblPubliku.MouseEnter -= new System.EventHandler(this.jokeri_MouseEnter);

                    if (
    bA)
                        
    mesazhi("lblA""Xhokeri i publikut");
                    if (
    bB)
                        
    mesazhi("lblB""Xhokeri i publikut");
                    if (
    bC)
                        
    mesazhi("lblC""Xhokeri i publikut");
                    if (
    bD)
                        
    mesazhi("lblD""Xhokeri i publikut");
                }
            }
        }

    ku mund ta fus ketne vb 6

Faqja 4 prej 5 FillimFillim ... 2345 FunditFundit

Tema tė Ngjashme

  1. Dr. Ibrahim Rugova - Presidenti i parė i Republikės sė Kosovės
    Nga Albanino nė forumin Elita kombėtare
    Pėrgjigje: 2055
    Postimi i Fundit: 27-11-2014, 11:11
  2. Bie "shi"!
    Nga hajla nė forumin Ditari i meditimeve
    Pėrgjigje: 144
    Postimi i Fundit: 24-12-2011, 17:40
  3. Pėrgjigje: 1
    Postimi i Fundit: 21-05-2009, 14:20
  4. Kuiz Islam ne Formen e Kuzit Te famshem "Kush do behet Milioner"
    Nga YlliRiaN nė forumin Komuniteti musliman
    Pėrgjigje: 1
    Postimi i Fundit: 06-02-2009, 14:36
  5. "Kush e percjell muajin e Ramazanit..."
    Nga b_a_t_o nė forumin Komuniteti musliman
    Pėrgjigje: 1
    Postimi i Fundit: 25-11-2004, 15:55

Regullat e Postimit

  • Ju nuk mund tė hapni tema tė reja.
  • Ju nuk mund tė postoni nė tema.
  • Ju nuk mund tė bashkėngjitni skedarė.
  • Ju nuk mund tė ndryshoni postimet tuaja.
  •