src/FingersDance.ViewModel/AnnotationViewModel.cs
changeset 129 1f37ef03ebee
parent 69 a4c44555f205
child 136 8b513df1b446
equal deleted inserted replaced
128:90c29e979ef4 129:1f37ef03ebee
    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;
       
    23 
       
    24             Console.WriteLine("_tcBegin = " + _tcBegin + ", _marginLeft = " + _marginLeft);
    20         }
    25         }
    21 
    26 
    22         public float TcBegin
    27         public float TcBegin
    23         {
    28         {
    24             get { return _tcBegin; }
    29             get { return _tcBegin; }
    49                     return;
    54                     return;
    50                 _gestureType = value;
    55                 _gestureType = value;
    51                 base.OnPropertyChanged("GestureType");
    56                 base.OnPropertyChanged("GestureType");
    52             }
    57             }
    53         }
    58         }
       
    59         public float MarginLeft
       
    60         {
       
    61             get { return _marginLeft; }
       
    62             set
       
    63             {
       
    64                 if (value == _marginLeft || float.IsNaN(value))
       
    65                     return;
       
    66                 _marginLeft = value;
       
    67                 base.OnPropertyChanged("MarginLeft");
       
    68             }
       
    69         }
    54 
    70 
    55     }
    71     }
    56 }
    72 }