コード例 #1
0
 private void HandleLastAnchorChanged(object sender, AnchorChangedEventArgs e)
 {
     Settings.Default.LastAnchorTime = e.Time;
     Settings.Default.LastAnchor     = e.LastAnchor;
     Settings.Default.Save();
     UpdateStatusLogText("Last sync time saved: " + e.Time.ToString());
 }
コード例 #2
0
 private void HandleLastAnchorChanged(object sender, AnchorChangedEventArgs e)
 {
     ///Apparetly reference to complex type of ApplicationSettingsBase works properly only in the same class and in the same thread
     ///otherwise, the changes to properties of the complex type can not be detected by ApplicationSettingsBase.
     ///This function is called in another thread of the Facade. So I need to use propertyName to make the dirty flag work properly.
     syncItem.LastAnchorTime = e.Time;
     syncItem.LastAnchor     = e.LastAnchor;
     syncSettings.Save();
     AppendStatusText("Last sync: " + syncItem.LastAnchorTime.ToString("yyyy-MM-dd HH:mm:ss"));
     ShowLastSyncInfo();
 }