Пример #1
0
 public void openFile()
 {
     if (Program.filepath != "")
     {
         //toc, acc, rif
         string mystring = Program.filepath;
         mystring = mystring.Substring(Math.Max(0, mystring.Length - 3));
         if (mystring == "toc")
         {
             _03Consultation f = new _03Consultation();
             f.Show();
             this.Hide();
             f.loadFile(Program.filepath);
         }
         if (mystring == "acc")
         {
             _02Accessoire f = new _02Accessoire();
             f.Show();
             this.Hide();
             f.loadFile(Program.filepath);
         }
         if (mystring == "rif")
         {
             _01Tarif f = new _01Tarif();
             f.Show();
             this.Hide();
             f.loadFile(Program.filepath);
         }
     }
     else
     {
         Menu m = new Menu();
         m.Show();
         this.Hide();
     }
 }
Пример #2
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            //label2.Text = label1.Text.Length.ToString()+ "   s0 = "+s0.Length+" , s1 = "+s1.Length+" , s2= "+s2.Length;
            label1.Text = s0 + "." + s1 + "." + s2 + ".";
            if (etat == 0)
            {
                s0 += "   ";
                s1 += "   ";
                s2 += "   ";
                if (label1.Text.Length == 12)
                {
                    etat = 1;
                }
                if (s0.Length >= 58)
                {
                    s0          = "";
                    s1          = "";
                    s2          = "";
                    p           = " . ";
                    label4.Text = "Connexion";
                }
            }
            if (etat == 1 && s0.Length == 14 && s1.Length == 2 && s2.Length == 2)
            {
                etat = 0;
            }

            if (etat == 1 && s2.Length == 2)
            {
                s1  = s1.Remove(s1.Length - 1);
                s0 += " ";
            }

            if (etat == 1 && s2.Length != 2)
            {
                s2  = s2.Remove(s2.Length - 1);
                s0 += " ";
            }
            if (label1.Text.Length == 12 || (label1.Text.Length == 21 && p.Length == 6) || (label1.Text.Length == 21 && p.Length == 9))
            {
                label4.Text = "Connexion" + p;
                p          += " . ";
            }
            if ((DateTime.Now - t).Seconds >= 3)
            {
                // Program.filepath = "accc.acc";
                //********************************************************************
                //********************************************************************
                string a = Program.filepath;
                // Program.filepath = @"C:\Users\root\Desktop\s  sa.acc";

                if (Services.etat != 0)
                {
                    if (Program.filepath != "")
                    {
                        //toc, acc, rif
                        string mystring = Program.filepath;
                        //mystring.Replace(" ", String.Empty);
                        mystring = mystring.Substring(Math.Max(0, mystring.Length - 3));
                        if (mystring == "toc")
                        {
                            _03Consultation f = new _03Consultation();
                            f.Show();
                            timer1.Dispose();
                            this.Hide();
                            f.loadFile(Program.filepath);
                        }
                        if (mystring == "acc")
                        {
                            _02Accessoire f = new _02Accessoire();
                            f.Show();
                            timer1.Dispose();
                            this.Hide();

                            f.loadFile(Program.filepath);
                        }
                        if (mystring == "rif")
                        {
                            _01Tarif f = new _01Tarif();
                            f.Show();
                            timer1.Dispose();
                            this.Hide();
                            f.loadFile(Program.filepath);
                        }
                    }
                    else
                    {
                        Menu m = new Menu();
                        m.Show();
                        timer1.Dispose();
                        this.Hide();
                    }
                }
                else
                {
                    _08Choix c = new _08Choix();
                    c.Show();
                    timer1.Dispose();
                    associationTypeAndIcon();
                    this.Hide();
                }
            }
        }
Пример #3
0
        private void b2_Click(object sender, EventArgs e)
        {
            _02Accessoire f = new _02Accessoire();

            f.Show();
        }