Ejemplo n.º 1
0
 public StoredChronometerViewModel()
 {
     // Load data from storage
     ChronometerStore = ChronometerStore.Prepare();
     // Initialize the list
     ChronoCollection = new ObservableCollection <ChronometerItem>(ChronometerStore.Items);
 }
Ejemplo n.º 2
0
        //public ObservableCollection<Lap> Laps { get; set; }

        public ChronometerPage()
        {
            InitializeComponent();

            BuildApplicationBar();

            _chronometerStore = ChronometerStore.Prepare();

            //var v = DeviceExtendedProperties.GetValue("DeviceUniqueId") as byte[]; // Needs ID_CAP_IDENTITY_DEVICE enabled
            //var str = System.Text.Encoding.BigEndianUnicode.GetString(v,0, v.Length);

            //byte[] id = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
            //string deviceID = Convert.ToBase64String(id);

            _started = false;

            //  DispatcherTimer setup
            _dispatcherTimer          = new DispatcherTimer();
            _dispatcherTimer.Tick    += dispatcherTimer_Tick;
            _dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 100);
        }