Example #1
0
        void OnAppActivateSource(object sender, ActivateSourceArgs e)
        {
            Trace.Call(sender, e);

            try {
                MainWindow.PresentWithServerTime();

                ChatView chatView = null;
                foreach (var kvp in Sources)
                {
                    if (kvp.Value != e.SourceId)
                    {
                        continue;
                    }
                    chatView = kvp.Key;
                }
                if (chatView == null)
                {
                    return;
                }

                ChatViewManager.CurrentChatView = chatView;
                DisposeSource(chatView);
            } catch (Exception ex) {
#if LOG4NET
                Logger.Error("OnAppActivateSource(): Exception", ex);
#endif
            }
        }
Example #2
0
        void OnAppActivateSource(object sender, ActivateSourceArgs e)
        {
            Trace.Call(sender, e);

            try {
                MainWindow.PresentWithServerTime();

                ChatView chatView = null;
                foreach (var kvp in Sources) {
                    if (kvp.Value != e.SourceId) {
                        continue;
                    }
                    chatView = kvp.Key;
                }
                if (chatView == null) {
                    return;
                }

                MainWindow.Notebook.CurrentChatView = chatView;
                DisposeSource(chatView);
            } catch (Exception ex) {
            #if LOG4NET
                Logger.Error("OnAppActivateSource(): Exception", ex);
            #endif
            }
        }