Esempio n. 1
0
 //------------------------------------
 public string ToString(string strFormat)
 {
     if (strFormat.Trim().Length > 0)
     {
         return(GetStringDecomposeeValeurSimple(strFormat.Split(' ')));
     }
     return(Valeur.ToString() + Unite);
 }
Esempio n. 2
0
 public override string ToString()
 {
     if (CAVOO == null)
     {
         return(base.ToString());
     }
     if (Valeur == null)
     {
         return("NULL");
     }
     return(Valeur.ToString());
 }
Esempio n. 3
0
 public void repositionner(double coordX, double coordY)
 // repostionne le noeud
 {
     this.CoordX = coordX;
     this.CoordY = coordY;
     Canvas.SetLeft(this.textBlock, coordX + this.Width / 2 - 5 - (Valeur.ToString().Length - 1) * 3.5);
     Canvas.SetTop(this.textBlock, coordY + this.Height / 2 - 10);
     this.lienGauche.CoordX1 = coordX + this.Width / 2;
     this.lienGauche.CoordY1 = coordY + this.Height / 2;
     this.lienDroit.CoordX1  = coordX + this.Width / 2;
     this.lienDroit.CoordY1  = coordY + this.Height / 2;
 }
Esempio n. 4
0
        //------------------------------------
        public override string ToString()
        {
            if (m_strFormat.Length > 0)
            {
                return(ToString(m_strFormat));
            }
            IUnite unite = CGestionnaireUnites.GetUnite(Unite);

            if (unite != null)
            {
                return(Valeur.ToString() + unite.LibelleCourt);
            }
            return(Valeur.ToString() + Unite);
        }
Esempio n. 5
0
 /// <summary>
 /// Constructeur par défaut
 /// </summary>
 public GMBD()
 {
     m_BD            = new MyDB("iziel_connector", "wJ9VFDrH", "iziel_warhammer", "mysql-iziel.alwaysdata.net");
     m_BD.SurErreur += (ConnexionEmettrice, MethodeEmettrice, RequeteSql, Valeurs, MessageErreur) =>
     {
         System.Diagnostics.Debug.WriteLine(string.Format("\nERREUR SQL :\nMéthode : {0}\nRequête initiale : {1}\nValeurs des {2} parties variables : {3}\nRequête exécutée : {4}\nMessage d'erreur : {5}\n",
                                                          MethodeEmettrice,
                                                          RequeteSql,
                                                          (Valeurs != null) ? Valeurs.Length : 0,
                                                          ((Valeurs != null) && (Valeurs.Length >= 1)) ? "\n* " + string.Join("\n* ", Valeurs.Select((Valeur, Indice) => string.Format("Valeurs[{0}] : {1}", Indice, (Valeur != null) ? Valeur.ToString() : "NULL")).ToArray()) : string.Empty,
                                                          MyDB.FormaterEnSql(RequeteSql, Valeurs),
                                                          MessageErreur));
     };
 }
Esempio n. 6
0
 public override string ToString()
 {
     return(DateDePrise.ToShortDateString() + " - " + Valeur.ToString("N1") + "°c");
 }
Esempio n. 7
0
        public override void deplacer(Point[] tabPoint, int nbPoint)
        {
            /*========================================= PARITE DEPALACMENT DU TEXTBLOCK =================================================*/
            DoubleAnimation dax = new DoubleAnimation(); // Double animation axe des x
            DoubleAnimation day = new DoubleAnimation(); // Double animation axe des y
            int             ix = 1, iy = 1;
            double          dx, dy;
            double          a = this.Width / 2 - 5 - (Valeur.ToString().Length - 1) * 3.5, b = this.Height / 2 - 10;

            dax.Duration = TimeSpan.FromSeconds(time); // intialisation de la durée d'un déplacment sur l'axe des x
            day.Duration = TimeSpan.FromSeconds(time); // intialisation de la durée d'un déplacment sur l'axe des y
            dax.From     = this.CoordX + a;            // affectation de la coordonné de départ par rapport au axe des x du 1er dépalcement
            dax.To       = tabPoint[0].X + a;          // affectation de la coordonné d'arrivée par rapport au axe des x du 1er dépalcement
            day.From     = this.CoordY + b;            // affectation de la coordonné de départ par rapport au axe des y du 1er dépalcement
            day.To       = tabPoint[0].Y + b;          // affectation de la coordonné d'arrivée par rapport au axe des y du 1er dépalcement
            dx           = tabPoint[0].X - this.CoordX;
            dy           = tabPoint[0].Y - this.CoordY;
            lienGauche.deplacerX1Y1(lienGauche.Ligne.X1 + dx, lienGauche.Ligne.Y1 + dy);
            lienGauche.deplacerX2Y2(lienGauche.Ligne.X2 + dx, lienGauche.Ligne.Y2 + dy);
            lienDroit.deplacerX1Y1(lienDroit.Ligne.X1 + dx, lienDroit.Ligne.Y1 + dy);
            lienDroit.deplacerX2Y2(lienDroit.Ligne.X2 + dx, lienDroit.Ligne.Y2 + dy);
            lienGauche.CoordX1 = tabPoint[0].X + Width / 2;
            lienDroit.CoordX1  = tabPoint[0].X + Width / 2;
            lienGauche.CoordY1 = tabPoint[0].Y + Height / 2;
            lienDroit.CoordY1  = tabPoint[0].Y + Height / 2;
            dax.Completed     += (s, e) =>         // méthode à executer une fois le déplacment par rapport au axe x terminé
            {
                if (ix < nbPoint)                  // si le déplacement ne s'est pas fait envers tout les points on continue le déplacement sur l'axe des x
                {
                    dax.From = this.CoordX + a;    // affectation de la coordonné de départ par rapport au axe des x du (ix+1) eme dépalcement
                    dax.To   = tabPoint[ix].X + a; // affectation de la coordonné d'arrivée par rapport au axe des x du (ix+1) eme dépalcement
                    lienGauche.deplacerX1Y1(lienGauche.Ligne.X1 + dx, lienGauche.Ligne.Y1 + dy);
                    lienGauche.deplacerX2Y2(lienGauche.Ligne.X2 + dx, lienGauche.Ligne.Y2 + dy);
                    lienDroit.deplacerX1Y1(lienDroit.Ligne.X1 + dx, lienDroit.Ligne.Y1 + dy);
                    lienDroit.deplacerX2Y2(lienDroit.Ligne.X2 + dx, lienDroit.Ligne.Y2 + dy);
                    this.lienGauche.CoordX1 = tabPoint[ix].X + Width / 2;
                    this.lienDroit.CoordX1  = tabPoint[ix].X + Width / 2;
                    this.textBlock.BeginAnimation(Canvas.LeftProperty, dax); // effectuation du (ix+1) eme déplacement par rapport au axe des x
                    ix++;
                }
            };

            day.Completed += (s1, e1) =>
            {
                if (iy < nbPoint)                  // si le déplacement ne s'est pas fait envers tout les points on continue le déplacement sur l'axe des y
                {
                    day.From = this.CoordY + b;    // affectation de la coordonné de départ par rapport au axe des y du (iy+1) eme dépalcement
                    day.To   = tabPoint[iy].Y + b; // affectation de la coordonné d'arrivée par rapport au axe des y du (iy+1) eme dépalcement
                    dx       = tabPoint[ix].X - this.CoordX;
                    dy       = tabPoint[iy].Y - this.CoordY;
                    this.lienGauche.CoordY1 = tabPoint[iy].Y + Height / 2;
                    this.lienDroit.CoordY1  = tabPoint[iy].Y + Height / 2;
                    this.textBlock.BeginAnimation(Canvas.TopProperty, day); // effectuation du (iy+1) eme déplacement par rapport au axe des y
                    iy++;
                }
            };
            this.textBlock.BeginAnimation(Canvas.LeftProperty, dax); // effectuation du 1er déplacement par rapport au axe des x
            this.textBlock.BeginAnimation(Canvas.TopProperty, day);  //  effectuation du 1er déplacement par rapport au axe des y

            /*===========================================================================================================================*/


            /*======================================== PARITE DEPALACMENT DE LA FORME  =================================================*/
            base.deplacer(tabPoint, nbPoint); // Deplacement de la form qui contient la valeur
            /*===========================================================================================================================*/
        }
Esempio n. 8
0
 public override string ToString()
 {
     return(Valeur.ToString("00") + "/20 " + Academie);
 }
Esempio n. 9
0
        private void MajValeur()
        {
            if (Editable)
            {
                xValeur.Visibility       = Visibility.Visible;
                xValeur.Background       = Brushes.White;
                xValeur.IsHitTestVisible = true;
            }
            else
            {
                xValeur.Visibility   = Visibility.Visible;
                xValeur.Background   = Brushes.Transparent;
                xValeur.TextWrapping = TextWrapping;
                //xValeur.IsReadOnly = true;
                xValeur.BorderThickness  = new Thickness(0);
                xValeur.IsHitTestVisible = false;
                if (Unite)
                {
                    xGrille.ColumnDefinitions[0].Width = GridLength.Auto;
                }
            }

            if (Orientation == Orientation.Horizontal)
            {
                DockPanel.SetDock(xIntitule, Dock.Left);
            }
            else
            {
                DockPanel.SetDock(xIntitule, Dock.Top);
                xIntitule.HorizontalAlignment = HorizontalAlignment.Left;
            }

            if (Intitule)
            {
                xIntitule.Visibility = Visibility.Visible;
            }
            else
            {
                xIntitule.Visibility = Visibility.Collapsed;
            }

            if (Unite)
            {
                xUnite.Visibility = Visibility.Visible;
            }
            else
            {
                xUnite.Visibility = Visibility.Collapsed;
            }

            String pIntitule = DicIntitules.Intitule(Valeur_Objet, Valeur_Propriete);

            xIntitule.Text = pIntitule + " :";

            if (Unite)
            {
                _Unite      = DicIntitules.Unite(Valeur_Objet, Valeur_Propriete);
                xUnite.Text = _Unite;
            }

            MajSuffix();

            if (Valeur != null && String.IsNullOrWhiteSpace(Valeur.ToString()) && (Editable == false))
            {
                xBase.Visibility = Visibility.Collapsed;
            }

            String ToolTip = DicIntitules.Info(Valeur_Objet, Valeur_Propriete);

            if (!String.IsNullOrWhiteSpace(ToolTip))
            {
                xBase.ToolTip = ToolTip;
            }

            if (IntituleSeul)
            {
                xGrille.Visibility = System.Windows.Visibility.Collapsed;
            }
        }