client/src/Iri.Modernisation.Controls/ViewModel/PolemicElementVM.cs
changeset 28 2d4ec5ab2a40
parent 27 f292db96b050
child 29 5f8d275750e7
equal deleted inserted replaced
27:f292db96b050 28:2d4ec5ab2a40
   186 		}
   186 		}
   187 
   187 
   188         /// <summary>
   188         /// <summary>
   189         /// PolemicType de l'élément
   189         /// PolemicType de l'élément
   190         /// </summary>
   190         /// </summary>
       
   191         private Color _type;
   191         public SolidColorBrush Type
   192         public SolidColorBrush Type
   192         {
   193         {
   193             get
   194             get
   194             {
   195             {
   195                 return new SolidColorBrush(Chapter.Color);
   196                 if (_element is SegmentIndex)
   196             }
   197                 {
       
   198                     return new SolidColorBrush(Chapter.Color);
       
   199                 }
       
   200                 else
       
   201                 {
       
   202                     return new SolidColorBrush(_type);
       
   203                 }
       
   204              
       
   205             }
       
   206             
       
   207             
   197         }
   208         }
   198         private PolemicElement _element { get; set; }
   209         private PolemicElement _element { get; set; }
   199 
   210 
   200         /// <summary>
   211         /// <summary>
   201         /// Constructeur
   212         /// Constructeur
   211             Description = _element.Description;
   222             Description = _element.Description;
   212             Tags = _element.Tags;
   223             Tags = _element.Tags;
   213             Chapter = _element.Chapter;
   224             Chapter = _element.Chapter;
   214             DisplayTimer.Interval = new TimeSpan(0, 0, 0, 0, 500);
   225             DisplayTimer.Interval = new TimeSpan(0, 0, 0, 0, 500);
   215             DisplayTimer.Tick += new EventHandler(myDispatcherTimer_Tick);
   226             DisplayTimer.Tick += new EventHandler(myDispatcherTimer_Tick);
       
   227             if (_element is Annotation)
       
   228             {
       
   229                 _type = ((Annotation)_element).Type.Color;
       
   230             }
   216         }
   231         }
   217         
   232         
   218         /// <summary>
   233         /// <summary>
   219         /// Lors d'un Tick,c'est à dire, lors d'un appuie long sur un élément
   234         /// Lors d'un Tick,c'est à dire, lors d'un appuie long sur un élément
   220         /// </summary>
   235         /// </summary>