private void Model_NatDiscoveryFinished(object sender, GEventArgs <NatInfo> e)
        {
            NatInfo info = e.Item;

            natDiscoveryWin.Dispatcher.Invoke(new Action(() => natDiscoveryWin.Close()));

            MessageBox.Show(string.Format("NAT discovery finished. NAT Type: {0}, Public address: {1}", info.NatType, info.PublicAddress));
        }
Esempio n. 2
0
        protected virtual void OnTextViewInvalidated(GEventArgs args)
        {
            var data = (GInvalidatedEventData)args.Data;

            foreach (RectangleF rect in data.InvalidRects)
            {
                Invalidate(Rectangle.Ceiling(rect));
            }
        }
Esempio n. 3
0
        private void OnTextViewPropertyChanged(GEventArgs args)
        {
            var data = (GPropertyEventData)args.Data;

            if (data.Key == GInputElement.CursorPropertyKey)
            {
                UpdateCursor();
            }
        }
Esempio n. 4
0
        private void OnTextViewAnchorClicked(GEventArgs args)
        {
            var eh = Events[AnchorClickedEventKey] as GEventHandler;

            if (eh != null)
            {
                args.Sender = this;
                eh(args);
            }
        }
 void _jumpListSelector_LetterClicked(object sender, GEventArgs <object> e)
 {
     Dispatcher.BeginInvoke(() =>
     {
         ScrollViewer scrollViewer = VisualTreeHelper.GetChild(mainListBox, 0) as ScrollViewer;
         if (scrollViewer != null)
         {
             scrollViewer.ScrollToVerticalOffset(_orderedCollection.IndexOf(e.Data as AlphabetizedItemContainer));
         }
     });
 }
Esempio n. 6
0
        private void DelegateMouseEvent(MouseEvent mouseEvent, MouseEventArgs e)
        {
            var eventData = new GMouseEventData(mouseEvent, e.Delta, e.Clicks, new Point(e.X, e.Y), e.Button);
            var args      = new GEventArgs(this, eventData, GInputElement.MouseEventKey, EventPropagation.Both);

            m_TextView.PreviewMouseEvent(args);
            if (args.Result == EventResult.Process)
            {
                m_TextView.OnMouseEvent(args);
            }
        }
        private void Model_NatDiscoveryFinished(object sender, GEventArgs<NatInfo> e)
        {
            NatInfo info = e.Item;
            natDiscoveryWin.Dispatcher.Invoke(new Action(() => natDiscoveryWin.Close()));

            MessageBox.Show(string.Format("NAT discovery finished. NAT Type: {0}, Public address: {1}", info.NatType, info.PublicAddress));
        }
Esempio n. 8
0
 /// <summary>
 /// Event handler: SIP message was sent by the model.
 /// </summary>
 /// <param name="sender">The model.</param>
 /// <param name="e">The string represenation of the SIP message.</param>
 /// <remarks>
 /// It is a monitoring tool on SIP messages. The model emits the SIPMessageSent event and the model
 /// presenter asks the view to log that message.
 /// </remarks>
 void softphoneEngine_SIPMessageSent(object sender, GEventArgs<string> e)
 {
     SIPMessageSent(e.Item);
 }
Esempio n. 9
0
 /// <summary>
 /// Event handler: A phone call has changed its state.
 /// </summary>
 /// <param name="sender">The model.</param>
 /// <param name="e">The phone call and its state.</param>
 /// <remarks>
 /// When a phone call changes his state, usually some SIP event inducate the change, the model arises the event of
 /// PhoneCallStateHasChanged, the model presenter asks the view to refresh its state, and the information about
 /// the given phone call.
 /// </remarks>
 void softphoneEngine_PhoneCallStateHasChanged(object sender, GEventArgs<Ozeki.Common.OzTuple<PhoneCallInfo, CallState>> e)
 {
     CallStateInfo(e.Item.Item1, e.Item.Item2);
 }
Esempio n. 10
0
 /// <summary>
 /// Event handler: Incoming call has arrived into the model.
 /// </summary>
 /// <param name="sender">The model.</param>
 /// <param name="e">The incoming call object.</param>
 /// <remarks>
 /// An incomming call is arrived to the model, the model presenter asks the view to visualize it.
 /// </remarks>
 void softphoneEngine_IncommingCall(object sender, GEventArgs<PhoneCallInfo> e)
 {
     IncomingCall(e.Item);
 }
Esempio n. 11
0
 /// <summary>
 /// Event handler: SoftPhoneEngine is disposing.
 /// </summary>
 /// <param name="sender">The softphoneEngine.</param>
 /// <param name="e">Bool value is used as in normal disposing.</param>
 void softphoneEngine_Disposing(object sender, GEventArgs<bool> e)
 {
     Dispose();
 }
Esempio n. 12
0
 private void Model_PhoneCallStateChanged(object sender, GEventArgs <IPhoneCall> e)
 {
     UpdatePhoneCalls();
 }
Esempio n. 13
0
        void _jumpListSelector_LetterClicked(object sender, GEventArgs<object> e)
        {

            Dispatcher.BeginInvoke(() =>
                                       {
                                           ScrollViewer scrollViewer = VisualTreeHelper.GetChild(mainListBox, 0) as ScrollViewer;
                                           if (scrollViewer != null)
                                               scrollViewer.ScrollToVerticalOffset(_orderedCollection.IndexOf(e.Data as AlphabetizedItemContainer));
                                       });
        }
 private void Model_PhoneCallStateChanged(object sender, GEventArgs<IPhoneCall> e)
 {
     UpdatePhoneCalls();
 }
Esempio n. 15
0
 private void Model_PhoneLineStateChanged(object sender, GEventArgs <IPhoneLine> e)
 {
     //tbPhoneLineStatus.Dispatcher.Invoke(new Action(() => tbPhoneLineStatus.GetBindingExpression(TextBox.TextProperty).UpdateTarget()));
     tbPhoneLineStatus.Dispatcher.Invoke(new Action(() => tbPhoneLineStatus.GetBindingExpression(Label.ContentProperty).UpdateTarget()));
 }
 private void Model_PhoneLineStateChanged(object sender, GEventArgs<IPhoneLine> e)
 {
     tbPhoneLineStatus.Dispatcher.Invoke(new Action(() => tbPhoneLineStatus.GetBindingExpression(TextBox.TextProperty).UpdateTarget()));
 }
Esempio n. 17
0
 private void Model_PhoneLineStateChanged(object sender, GEventArgs <IPhoneLine> e)
 {
     //tbPhoneLineStatus.Dispatcher.Invoke(new Action(() => tbPhoneLineStatus.GetBindingExpression(TextBox.TextProperty).UpdateTarget()));
     //txtCallStatus.Dispatcher.Invoke(new Action(() => txtCallStatus.GetBindingExpression(TextBox.TextProperty).UpdateTarget()));
     //txtCallStatus.Dispatcher.Invoke(new Action(() => txtCallStatus.Text = "Registration successful"));
 }