protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e) { if (e.Property == ValeurDP) { String Objet = ""; String Propriete = ""; String TypePropriete = ""; if (InfosBinding(e.Property, ref Objet, ref Propriete, ref TypePropriete)) { String ToolTip = DicIntitules.Info(Objet, Propriete); if (!String.IsNullOrWhiteSpace(ToolTip)) { xBase.ToolTip = ToolTip; } } } base.OnPropertyChanged(e); }
private void Case_Loaded(object sender, RoutedEventArgs e) { MajEditable(); MajIntituleDerriere(); MajValeur(); String pIntitule = DicIntitules.Intitule(Objet, ProprieteValeur); if (IntituleDerriere == false) { pIntitule = pIntitule + " :"; } xIntitule.Text = pIntitule; String ToolTip = DicIntitules.Info(Objet, ProprieteValeur); if (!String.IsNullOrWhiteSpace(ToolTip)) { xBase.ToolTip = ToolTip; } }
private void Supprimer_List <T>(object sender, RoutedEventArgs e, Boolean Message = false, Boolean UnItemMini = false) where T : ObjetGestion { ListBox V; ListeObservable <T> Liste; List <T> Ls; T L; if (Info(sender as MenuItem, out V, out Liste, out Ls, out L)) { int mini = UnItemMini ? 1 : 0; foreach (T iL in Ls) { Boolean Supprimer = !Message; if (Liste.Count > mini) { if (Message && MessageBox.Show(String.Format("Voulez vous vraiement supprimer : {0} {1} ?", DicIntitules.IntituleType(typeof(T).Name), iL.No), "Suppression", MessageBoxButton.OKCancel) == MessageBoxResult.OK) { Supprimer = true; } if (Supprimer && iL.Supprimer()) { Liste.Remove(iL); } } } Liste.Numeroter(); } }
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e) { if (e.Property == ValeurDP) { if (Editable) { xValeur.Visibility = System.Windows.Visibility.Visible; xValeur.Background = Brushes.White; xValeur.IsHitTestVisible = true; } else { xValeur.Visibility = System.Windows.Visibility.Visible; xValeur.Background = Brushes.Transparent; xValeur.IsReadOnly = true; xValeur.BorderThickness = new Thickness(0); xValeur.IsHitTestVisible = false; } if (Orientation == System.Windows.Controls.Orientation.Horizontal) { DockPanel.SetDock(xIntitule, Dock.Left); } else { DockPanel.SetDock(xIntitule, Dock.Top); xIntitule.HorizontalAlignment = System.Windows.HorizontalAlignment.Left; } if (Intitule) { xIntitule.Visibility = System.Windows.Visibility.Visible; } else { xIntitule.Visibility = System.Windows.Visibility.Collapsed; xIntitule.Margin = new Thickness(0); xIntitule.Padding = new Thickness(0); } String Objet = ""; String Propriete = ""; String TypePropriete = ""; if (InfosBinding(e.Property, ref Objet, ref Propriete, ref TypePropriete)) { String pIntitule = DicIntitules.Intitule(Objet, Propriete); xIntitule.Text = pIntitule + " :"; if (String.IsNullOrWhiteSpace(Valeur.ToString()) && (Editable == false)) { xBase.Visibility = System.Windows.Visibility.Collapsed; } String ToolTip = DicIntitules.Info(Objet, Propriete); if (!String.IsNullOrWhiteSpace(ToolTip) && (Info == true)) { xBase.ToolTip = ToolTip; } } } base.OnPropertyChanged(e); }