mCore™ .NET SMS Library 1.2

mCore.vCalendarException Class

Description:

The mCore.vCalendarException is thrown for any errors encountered during get/set of all properties or executing methods of mCore.vCalendar class.

Namespace: mCore
Assembly: mCoreLib (in mCoreLib.dll)
Inherits: System.Exception

Usage Example:

Visual Basic
Public Class MyClass
   Public WithEvents objSMS As New mCore.SMS

   Public Sub SendVCalendar()
      Dim objVCAL As mCore.vCalendar = objSMS.vCalendar
      Try
         SetCommParameters()
         objVCAL.Destination = "+919873094767"
         objVCAL.StartDateTime = #3/17/2006 10:30 AM#
         objVCAL.EndDateTime = #3/17/2006 11:45 AM#

         'OR specify the event duration
         'objVCAL.EventDuration = "75M"
         objVCAL.Location = "Corporate Office"
         objVCAL.Description = "New recruitment interview for project manager"
         objVCAL.Summary = "Recruitment Interview"

         objVCAL.Send()
         MsgBox("vCalendar sent!", MsgBoxStyle.Information, strMyAppName)

      Catch ex As mCore.vCalendarException
         MsgBox(ex.Message, MsgBoxStyle.Critical, "mCore Demo")
      Catch ex As mCore.GeneralException
         MsgBox(ex.Message, MsgBoxStyle.Critical, "mCore Demo")
      Catch ex As Exception
      End Try
   End Sub

   Public Sub SetCommParameters()
      Try
         objSMS.Port = "COM1"
         objSMS.BaudRate = mCore.SMS.EnumBaudRate.BaudRate_19200
         objSMS.DataBits = mCore.SMS.EnumDataBits.Eight
         objSMS.StopBits = mCore.SMS.EnumStopBits.One
         objSMS.Parity = mCore.SMS.EnumParity.None
         objSMS.FlowControl = mCore.SMS.EnumFlowControl.RTS_CTS

      Catch ex As mCore.GeneralException
         MsgBox(ex.Message)
      Catch ex As Exception
      End Try
   End Function
End Class
 
C#
class MyClass
{
   public mCore.SMS objSMS = new mCore.SMS();

   public static void SendVCalendar()
   {
      mCore.vCalendar objVCAL = objSMS.vCalendar();
      try
      {

         SetCommParameters();
         objVCAL.Destination = "+919873094767"
         objVCAL.StartDateTime = new System.DateTime(2006, 3, 17, 10, 30, 0);
         objVCAL.EndDateTime = new System.DateTime(2006, 3, 17, 11, 45, 0);

         //OR specify the event duration
         //objVCAL.EventDuration = "75M";
         objVCAL.Location = "Corporate Office";
         objVCAL.Description = "New recruitment interview for project manager";
         objVCAL.Summary = "Recruitment Interview";

         objVCAL.Send();
         MessageBox.Show("vCalendar sent!");
      }

      catch (mCore.vCalendarException e)
      {
         MessageBox.Show(e.ToString());
      }
      catch (mCore.GeneralException e)
      {
         MessageBox.Show(e.ToString());
      }
      catch (Exception e)
      {
      }
   }

   public static void SetCommParameters()
   {
      try
      {
         objSMS.Port = "COM1";
         objSMS.BaudRate = mCore.SMS.EnumBaudRate.BaudRate_19200;
         objSMS.DataBits = mCore.SMS.EnumDataBits.Eight;
         objSMS.StopBits = mCore.SMS.EnumStopBits.One;
         objSMS.Parity = mCore.SMS.EnumParity.None;
         objSMS.FlowControl = mCore.SMS.EnumFlowControl.RTS_CTS;
      }
      catch (mCore.GeneralException e)
      {
         MessageBox.Show(e.ToString());
      }
      catch (Exception e)
      {
      }
   }
}

See Also:

mCore.GeneralException Class
mCore.SMSDeleteException Class
mCore.SMSReadException Class
mCore.SMSSendException
mCore.vCardException Class
mCore.WapPushException Class

 

Copyright © IG Logix Softech Pvt Ltd, All Rights Reserved