SetForegroundWindow() приватный Метод

private SetForegroundWindow ( IntPtr hWnd ) : bool
hWnd System.IntPtr
Результат bool
Пример #1
0
        private void CallStateChangedHandler(object sender, Call.CallPropertyEventArgs args)
        {
            if (args.call.state == Call.CALL_STATE.Ringing && !args.call.is_outgoing)
            {
                if (IncomingTopMost)
                {
                    MainWindow.get_instance().BringToFront();
                }
                if (IncomingBalloons && !DND)
                {
                    IncomingCallNotification.ShowCallNotification(args.call);
                    if (Call.active_call != args.call && Call.active_call != null)
                    {
                        HandleCallWaiting(null, args.call);
                    }
                }
                else if (IncomingKeyboardFocus)
                {
                    Utils.SetForegroundWindow(MainWindow.get_instance());
                }
            }
            if (DND && args.call != null && args.call.is_outgoing == false && args.call.state == Call.CALL_STATE.Ringing)
            {
                args.call.hangup("Call ignored due to DND");
            }
            if (args.call != null && args.call.call_ended && ClearDTMFS)
            {
                args.call.dtmfs = "";
            }

            DelayedFunction.DelayedCall("broker_updatestatus", UpdateStatus, 500);
        }
Пример #2
0
 public void BringToFront(BRING_TO_FRONT_OPTS opts)
 {
     if (!opts.HasFlag(BRING_TO_FRONT_OPTS.OnlyIfTopMostSetting) || IncomingTopMost)
     {
         MainWindow.get_instance().BringToFront();
     }
     if (opts.HasFlag(BRING_TO_FRONT_OPTS.AlwaysKeyboardFocus) || (opts.HasFlag(BRING_TO_FRONT_OPTS.KeyboardFocusIfSettingEnabled) && IncomingKeyboardFocus))
     {
         Utils.SetForegroundWindow(MainWindow.get_instance());
     }
 }
Пример #3
0
 private void MakeUsTop()
 {
     Dispatcher.BeginInvoke((Action)(() => Utils.SetForegroundWindow(this)));
 }