Пример #1
0
        public static T Create <T>(ViewResolver viewResolver, ExceptionReportInfo reportInfo) where T : class
        {
            if (SyncUi.InvokeRequired)
            {
                return((T)SyncUi.Invoke(new Func <ViewResolver, ExceptionReportInfo, T>(Create <T>), viewResolver, reportInfo));
            }

            var view = viewResolver.Resolve <T>();

            var constructor = view.GetConstructor(new[] { typeof(ExceptionReportInfo) });
            var newInstance = constructor.Invoke(new object[] { reportInfo });

            return(newInstance as T);
        }
Пример #2
0
        private void OnCallStateChanged(ICall call)
        {
            if (call == null || call.IsDisposed)
            {
                return;
            }

            if (NeedShowingNotification && call.State == CallState.INCOMING && call.LastState == CallState.NULL && call.IsIncoming)
            {
                if (SyncUi.InvokeRequired)
                {
                    SyncUi.Invoke(new Action(() => NotifyManager.NotifyUser(new CallNotifyControl(call, IsWindowPersistent), CloseWindowTimeout)));
                }
                else
                {
                    NotifyManager.NotifyUser(new CallNotifyControl(call, IsWindowPersistent), CloseWindowTimeout);
                }
            }
        }
Пример #3
0
 public MainFormApplicationContext() : base(new MainForm())
 {
     SyncUi.Initialize(MainForm);
 }