src/FingersDance.ViewModel/AnnotationViewModel.cs
changeset 169 3a407c966e57
parent 167 206f07a8d887
child 182 25b49d4f1635
equal deleted inserted replaced
168:d70ee2002f75 169:3a407c966e57
    14         private float _dur;
    14         private float _dur;
    15         private String _gestureType;
    15         private String _gestureType;
    16         private Color _color;
    16         private Color _color;
    17 
    17 
    18         private float _marginLeft;
    18         private float _marginLeft;
       
    19         private Double _scaleX = 1;
    19 
    20 
       
    21         public AnnotationViewModel(Annotation a, float marginLeft, Double scaleX)
       
    22         {
       
    23             this._tcBegin = a.TcBegin;
       
    24             this._dur = a.Dur;
       
    25             this._gestureType = a.GestureType;
       
    26             this._color = a.Color;
       
    27             this._marginLeft = marginLeft;
       
    28             this._marginLeft = marginLeft;
       
    29             this._scaleX = scaleX;
       
    30         }
    20         public AnnotationViewModel(Annotation a, float marginLeft)
    31         public AnnotationViewModel(Annotation a, float marginLeft)
    21         {
    32         {
    22             this._tcBegin = a.TcBegin;
    33             this._tcBegin = a.TcBegin;
    23             this._dur = a.Dur;
    34             this._dur = a.Dur;
    24             this._gestureType = a.GestureType;
    35             this._gestureType = a.GestureType;
    78                     return;
    89                     return;
    79                 _marginLeft = value;
    90                 _marginLeft = value;
    80                 base.OnPropertyChanged("MarginLeft");
    91                 base.OnPropertyChanged("MarginLeft");
    81             }
    92             }
    82         }
    93         }
       
    94         public Double ScaleX
       
    95         {
       
    96             get { return _scaleX; }
       
    97             set
       
    98             {
       
    99                 if (value == _scaleX || Double.IsNaN(value))
       
   100                     return;
       
   101                 _scaleX = value;
       
   102                 base.OnPropertyChanged("ScaleX");
       
   103             }
       
   104         }
    83 
   105 
    84     }
   106     }
    85 }
   107 }