Exemplo n.º 1
0
        private void OnNewMessage(string senderUID, DateTime timeStamp, string message)
        {
            //wenn neue Message kommt und Fenster hat nicht den Focus oder ist minimiert dann blink
            if (!this.Focused || this.WindowState == FormWindowState.Minimized)
            {
                FlashWindow.Start(this);
            }

            ConversationTabPage userTab = TabExistsForUID(senderUID);

            if (userTab != null) //Tab exists
            {
                userTab.NewMessageFromOther(senderUID, timeStamp, message);


                //if (TabIsActiveForUID(senderUID) == null) //Also nicht aktiv
                //{
                //    //Blink
                //}
            }
            else
            {
                tc_conversations.TabPages.Add(new ConversationTabPage(this, senderUID, GetPublicKeyForUID(senderUID)));
                ConversationTabPage lastTP = (ConversationTabPage)tc_conversations.TabPages[tc_conversations.TabPages.Count - 1];
                Application.DoEvents();
                OnNewMessage(senderUID, timeStamp, message);
                //Blink
            }
        }
Exemplo n.º 2
0
        public frm_emoji(ConversationTabPage tabpage)
        {
            this.tabpage = tabpage;

            InitializeComponent();

            LoadEmojis();
        }
Exemplo n.º 3
0
        private bool TabIsActiveForUID(string uid)
        {
            ConversationTabPage currentTab = (ConversationTabPage)tc_conversations.SelectedTab;

            if (currentTab.UID == uid)
            {
                return(true);
            }

            return(false);
        }
Exemplo n.º 4
0
 private void tc_conversations_SelectedIndexChanged(object sender, EventArgs e)
 {
     ConversationTabPage currentTab = (ConversationTabPage)tc_conversations.SelectedTab;
 }