示例#1
0
        /// <summary>
        /// For creating a dialog to handle an incoming IM conversation
        /// </summary>
        /// <param name="rtcClient"></param>
        /// <param name="activeSession"></param>
        public RtcDlg(Microsoft.Ccf.Csr.Rtc.RtcClient rtcClient, Microsoft.Ccf.Csr.Rtc.Session activeSession)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.rtcClient = rtcClient;

            sipAddress = null;
            firstName  = lastName = "";

            header.Text = "";

            // make a sound indicating a new IM conversation
            try
            {
                rtcClient.PlayRing(RingType.Message, true);
            }
            catch
            {
                // OK to ignore this exception as it is caused by absence of working audio device.
            }

            // save the active session
            this.activeSession = activeSession;

            statusBar.Text   = localize.RTCDLG_MSG_ANSWERING;
            information.Text = localize.RTCDLG_INFO;
        }
示例#2
0
 public RtcLib(RTC_SESSION_TYPE sessionType, string userUri, string serverUri, int transport)
 {
     // Initialize RTC Client
     rtcClient = new Microsoft.Ccf.Csr.Rtc.RtcClient(sessionType, userUri, serverUri, transport);
     rtcClient.IncomingSession += new  Microsoft.Ccf.Csr.Rtc.SessionEventHandler(this.IncomingSession);
     rtcClient.Listen();
 }
示例#3
0
 public void Close()
 {
     if (null != rtcClient)
     {
         rtcClient.Terminate();
         rtcClient = null;
     }
 }
示例#4
0
        /// <summary>
        /// For creating a new RTC conversation to someone else
        /// </summary>
        /// <param name="rtcClient"></param>
        /// <param name="sipAddress"></param>
        /// <param name="firstName"></param>
        /// <param name="lastName"></param>
        /// <param name="subject"></param>
        /// <param name="context"></param>
        public RtcDlg(Microsoft.Ccf.Csr.Rtc.RtcClient rtcClient, string sipAddress, string firstName, string lastName, string subject, string context)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            this.rtcClient = rtcClient;

            this.sipAddress = sipAddress;
            this.lastName   = lastName;
            this.firstName  = firstName;
            this.subject    = subject;
            this.context    = context;

            Text        = localize.RTCDLG_TEXTMSG_ASSISTANCE + " " + subject;
            header.Text = localize.RTCDLG_TEXTMSG_TO + " " + firstName + " " + lastName;

            statusBar.Text = "";

            // set margins
            RtcDlg_SizeChanged(this, null);
        }