Example #1
0
 private void processCallAlert(CallAlert alert)
 {
     if (alert != null)
     {
         //if (alert.Action == alert.Incoming )
         if (alert.Action == alert.Initiated ||
             alert.Action == alert.Connected ||
             alert.Action == alert.Waiting ||
             alert.Action == alert.Answered)
         {
             if (m_callStatusDlg == null)
             {
                 m_callStatusDlg = new CallStatusDlg();
                 m_callStatusDlg.Show();
                 m_callStatusDlg.CallStatusDlgClosedEvent += new CallStatusDlgClosedEventHandler(m_callStatusDlg_CallStatusDlgClosedEvent);
             }
             m_callStatusDlg.displayAlert(alert);
         }
         else if (alert.Action == alert.Disconnected)
         {
             if (m_callStatusDlg != null)
             {
                 m_callStatusDlg.Close();
                 m_callStatusDlg = null;
             }
         }
     }
 }
Example #2
0
        public Toolbar()
        {
            m_connected     = true;
            m_callStatusDlg = null;
            InitializeComponent();


            //
            // signal
            //
            this.signal                   = new SignalLevelCtrl();
            this.signal.BackColor         = System.Drawing.Color.Transparent;
            this.signal.Location          = new System.Drawing.Point(24, 8);
            this.signal.Name              = "signal";
            this.signal.Size              = new System.Drawing.Size(35, 14);
            this.signal.TabIndex          = 7;
            this.signal.TabStop           = false;
            this.signal.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.Toolbar_MouseDoubleClick);
            this.signal.MouseDown        += new System.Windows.Forms.MouseEventHandler(this.Toolbar_MouseDown);
            this.Controls.Add(this.signal);


            //
            // battery
            //
            this.battery                   = new BatteryLevelCtrl();
            this.battery.BackColor         = System.Drawing.Color.Transparent;
            this.battery.Location          = new System.Drawing.Point(20, 26);
            this.battery.Name              = "battery";
            this.battery.Size              = new System.Drawing.Size(43, 14);
            this.battery.TabIndex          = 6;
            this.battery.TabStop           = false;
            this.battery.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.Toolbar_MouseDoubleClick);
            this.battery.MouseDownEvent   += new System.Windows.Forms.MouseEventHandler(this.Toolbar_MouseDown);
            this.Controls.Add(this.battery);

            Opacity = ApplicationSettings.Instance.ToolbarOpacity / 100d;

            Device.Instance.BluetoothConnectEvent    += new BluetoothConnectEventHandler(BlackBerry_BluetoothConnectEvent);
            Device.Instance.BluetoothDisconnectEvent += new BluetoothDisconnectEventHandler(BlackBerry_BluetoothDisconnectEvent);
            Device.Instance.MsgArrivedEvent          += new MsgArrivedEventHandler(BlackBerry_MsgArrivedEvent);
        }
Example #3
0
 void m_callStatusDlg_CallStatusDlgClosedEvent()
 {
     m_callStatusDlg = null;
 }