src/FingersDance.ViewModel/AnnotationViewModel.cs
changeset 143 9f157d9c725b
parent 69 a4c44555f205
child 146 dd8ed4d3beb6
equal deleted inserted replaced
142:3d66ca73df55 143:9f157d9c725b
    11     {
    11     {
    12         private float _tcBegin;
    12         private float _tcBegin;
    13         private float _dur;
    13         private float _dur;
    14         private String _gestureType;
    14         private String _gestureType;
    15 
    15 
    16         public AnnotationViewModel(Annotation a) {
    16         private float _marginLeft;
       
    17 
       
    18         public AnnotationViewModel(Annotation a, float marginLeft) {
    17             this._tcBegin = a.TcBegin;
    19             this._tcBegin = a.TcBegin;
    18             this._dur = a.Dur;
    20             this._dur = a.Dur;
    19             this._gestureType = a.GestureType;
    21             this._gestureType = a.GestureType;
       
    22             this._marginLeft = marginLeft;
    20         }
    23         }
    21 
    24 
    22         public float TcBegin
    25         public float TcBegin
    23         {
    26         {
    24             get { return _tcBegin; }
    27             get { return _tcBegin; }
    49                     return;
    52                     return;
    50                 _gestureType = value;
    53                 _gestureType = value;
    51                 base.OnPropertyChanged("GestureType");
    54                 base.OnPropertyChanged("GestureType");
    52             }
    55             }
    53         }
    56         }
       
    57         public float MarginLeft
       
    58         {
       
    59             get { return _marginLeft; }
       
    60             set
       
    61             {
       
    62                 if (value == _marginLeft || float.IsNaN(value))
       
    63                     return;
       
    64                 _marginLeft = value;
       
    65                 base.OnPropertyChanged("MarginLeft");
       
    66             }
       
    67         }
    54 
    68 
    55     }
    69     }
    56 }
    70 }