2010-12-16 8 views
2

GoogleカレンダーとOutlookカレンダーを同期するコードを作成しています。私はエントリを追加することができますが、問題は私が更新するアイテムをGoogleカレンダーのアイテムを更新するかどうかわからない場合です。私はGoogleカレンダーAPIを使用した拡張プロパティの追加と取得

 ExtendedProperty property = new ExtendedProperty(); 
     property.Name = reminderAppt.GlobalAppointmentID; 
     property.Value = "App Id"; 
     entry.ExtensionElements.Add(property); 

拡張プロパティを追加してい問題は、私はItemChangedが呼び出されたときに同じエントリを取得する方法を知っていないであることを解決するため

答えて

3

これは、私が拡張プロパティ要素を取得する際に使用しているものです。

foreach (Google.GData.Client.IExtensionElementFactory property in googleEvent.ExtensionElements) 
     { 
      ExtendedProperty customProperty = property as ExtendedProperty; 
      if (customProperty != null) 
       genericEvent.EventID = customProperty.Value;     
     } 
0

古い質問が、いくつかのために多分役立つ:

EventEntry.Insertメソッドは戻り値を持って、それがGoogleのcalendarItemの独特のEventIdを含むオブジェクトを返します。

このIDを使用すると、カレンダーエントリをOutlookと同期させることができます。

関連する問題