Aspose.Email.Examples.CSharp.Email.Outlook.AddAudioReminderToCalendar.Run C# (CSharp) 메소드

Run() 공개 정적인 메소드

public static Run ( ) : void
리턴 void
        public static void Run()
        {
            // ExStart:AddAudioReminderToCalendar
            // The path to the File directory.
            string dataDir = RunExamples.GetDataDir_Outlook();
            Appointment app = new Appointment("Home", DateTime.Now.AddHours(1), DateTime.Now.AddHours(1), "[email protected]", "[email protected]");

            MailMessage msg = new MailMessage();
            msg.AddAlternateView(app.RequestApointment());
            MapiMessage mapi = MapiMessage.FromMailMessage(msg);
            MapiCalendar calendar = (MapiCalendar)mapi.ToMapiMessageItem();

            // Set calendar properties
            calendar.ReminderSet = true;
            calendar.ReminderDelta = 58;//58 min before start of event
            calendar.ReminderFileParameter = dataDir + "Alarm01.wav";
            string savedFile = (dataDir + "calendarWithAudioReminder_out.ics");
            calendar.Save(savedFile, AppointmentSaveFormat.Ics);
            // ExEnd:AddAudioReminderToCalendar
        }
    }
AddAudioReminderToCalendar