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