Ejemplo n.º 1
0
        /// <summary>
        /// 消息记录事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void message_Btn_MouseClick(object sender, MouseEventArgs e)
        {
            //ChatMessageBox.GetInstance(this).Height = ChatMessageBox.GetInstance(this).Height + 10;

            //if (MessageMouseClick != null)
            //    MessageMouseClick(sender, e);
            //else
            //{

            //}

            if (bf == null)
            {
                bf = new MessageLogForm();
                bf.XmppConn = XmppCon;
                bf.BackgroundImage = this.BackgroundImage;
                bf.Text = "消息管理器";
                bf.ShowIcon = false;
                bf.AllowMove = false;
                bf.ShowInTaskbar = false;
                //bf.Size = new Size(500, 300);
                try
                {
                    bf.Show();
                }
                catch (Exception)
                {

                }

            }
            else
            {
                if (bf.IsDisposed)
                {
                    bf = new MessageLogForm();
                    bf.XmppConn = XmppCon;
                    bf.BackgroundImage = this.BackgroundImage;
                    bf.Text = "消息管理器";
                    bf.ShowIcon = false;
                    bf.AllowMove = false;
                    bf.ShowInTaskbar = false;
                    //bf.Size = new Size(500, 300);
                    try
                    {
                        bf.Show();
                    }
                    catch (Exception)
                    {

                    }

                }
                else
                {
                    try
                    {
                        bf.Show();
                    }
                    catch (Exception)
                    {

                    }
                }
            }
        }
Ejemplo n.º 2
0
        private void btn_message_MouseClick(object sender, MouseEventArgs e)
        {
            if (messageLogForm == null || messageLogForm.IsDisposed)
            {
                messageLogForm = new MessageLogForm();
                messageLogForm.XmppConn = XmppCon;
                messageLogForm.BackgroundImage = this.BackgroundImage;
                messageLogForm.Text = "消息管理器";
                messageLogForm.ShowIcon = false;
                messageLogForm.AllowMove = false;
                messageLogForm.ShowInTaskbar = false;
            }
            try
            {
                messageLogForm.Show();
                messageLogForm.Activate();
            }
            catch (Exception)
            {

            }
        }