最近
、PHPのGoogleカレンダーでSMS通知+イベントログの記事に出会いました
そして、私はこの自転車を理解することも決めました
何が必要ですか?
1.
Google APIを参照
する次のライブラリをプロジェクトに接続する必要があります
- Google.GData.Calendar
- Google.GData.Client
- Google.GData.Extensions
2.少しのコード。
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
internal class Sms { readonly Uri postUri = new Uri ( "http://www.google.com/calendar/feeds/default/private/full" ); private readonly CalendarService service = new CalendarService( "Zabr-SMSSender-1.0" ); private readonly EventEntry entry = new EventEntry(); private static Reminder MyReminder { get { Reminder reminder = new Reminder(); reminder.Minutes = 1; reminder.Method = Reminder.ReminderMethod.sms; return reminder; } } public void SendSmsFromGoogle( string Login, string Password, string Topic, string Message, DateTime StartDate, DateTime EndDate) { service.setUserCredentials(Login, Password); entry.Service = service; entry.Authors.Add( new AtomPerson(AtomPersonType.Author)); entry.Title.Text = Topic; entry.Content.Content = Message; entry.Times.Add( new When(StartDate.AddMinutes(3), EndDate.AddMinutes(5))); entry.Reminder = MyReminder; service.Insert(postUri, entry); } } * This source code was highlighted with Source Code Highlighter .
その後、次のようにクラシックを使用できます。
- Sms sms = 新しい Sms()
- sms.SendSmsFromGoogle(txtLogin、txtPasswd、txtTopic、txtMessage、 DateTime .Now、 DateTime .Now);
MyReminderのコンテキストのReminderタイプは、通知を受け取る方法を説明します。
サービスを宣言するときの行( "Zabr-SMSSender-1.0")は、次の形式にすることができます。
「会社のプログラムバージョン」、なぜわからないのか、どうやら統計情報:)
txtLogin-ログイン、txtPasswd-パスワード、txtTopic-イベントテーマ、
txtMessage-イベントメッセージ、まあ、イベントの開始日と終了日。
Googleサーバーとクライアント間で時間が一致しない場合があるため、少し調整することができます(
StartDate.AddMinutes(3)、EndDate.AddMinutes(5) )