⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 singlebeiviteform.cs

📁 飞信的收发使用csharp进行开发
💻 CS
📖 第 1 页 / 共 2 页
字号:
            this.lstContacts.CancelDescription = "取消邀请";
            this.lstContacts.CancelImage = (Image) manager.GetObject("lstContacts.CancelImage");
            this.lstContacts.DisableColor = Color.FromArgb(0xa4, 170, 220);
            this.lstContacts.DrawMode = DrawMode.OwnerDrawVariable;
            this.lstContacts.FormattingEnabled = true;
            this.lstContacts.IVRItemHeight = 80;
            this.lstContacts.LnkFont = new Font("Microsoft Sans Serif", 9f, FontStyle.Underline, GraphicsUnit.Point, 0);
            this.lstContacts.Location = new Point(30, 0xc9);
            this.lstContacts.MoodPhraseColor = Color.FromArgb(0xa4, 170, 220);
            this.lstContacts.MoodPhraseFont = new Font("Microsoft Sans Serif", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.lstContacts.Name = "lstContacts";
            this.lstContacts.SeperatorHeight = 1;
            this.lstContacts.ShowOneLine = false;
            this.lstContacts.Size = new Size(0x1bf, 0x89);
            this.lstContacts.TabIndex = 0x18;
            this.PicContact.BackColor = Color.White;
            this.PicContact.BorderColor = Color.FromArgb(0xa4, 170, 220);
            this.PicContact.Image = (Image) manager.GetObject("PicContact.Image");
            this.PicContact.Location = new Point(7, 0x15);
            this.PicContact.Name = "PicContact";
            this.PicContact.Size = new Size(0x76, 0x76);
            this.PicContact.TabIndex = 0x17;
            this.PicContact.ToolTipText = "";
            this.PicContact.Click += new EventHandler(this.PicContact_Click);
            this.lnkInviteUser.AutoSize = true;
            this.lnkInviteUser.Font = new Font("Microsoft Sans Serif", 8.25f);
            this.lnkInviteUser.Location = new Point(130, 0x1c);
            this.lnkInviteUser.Name = "lnkInviteUser";
            this.lnkInviteUser.Size = new Size(0x43, 13);
            this.lnkInviteUser.TabIndex = 0x12;
            this.lnkInviteUser.TabStop = true;
            this.lnkInviteUser.Text = "西门吹大猪";
            this.lnkInviteUser.LinkClicked += new LinkLabelLinkClickedEventHandler(this.lnkInviteUser_LinkClicked);
            this.lblInviteInfo.AutoEllipsis = true;
            this.lblInviteInfo.BorderColor = Color.Empty;
            this.lblInviteInfo.ButtonBorderStyle = ButtonBorderStyle.None;
            this.lblInviteInfo.Font = new Font("Microsoft Sans Serif", 8.25f);
            this.lblInviteInfo.Location = new Point(130, 0x1c);
            this.lblInviteInfo.Name = "lblInviteInfo";
            this.lblInviteInfo.Size = new Size(0x15d, 0x22);
            this.lblInviteInfo.TabIndex = 0x13;
            this.lblInviteInfo.Text = "西门吹大猪 邀请您进行手机 邀请您进行手机语聊";
            this.lnkInfoAddress.AutoSize = true;
            this.lnkInfoAddress.Location = new Point(0x83, 0x67);
            this.lnkInfoAddress.Name = "lnkInfoAddress";
            this.lnkInfoAddress.Size = new Size(0, 13);
            this.lnkInfoAddress.TabIndex = 20;
            this.lnkInfoAddress.TabStop = true;
            this.lnkInfoAddress.Visible = false;
            this.lnkInfoAddress.LinkClicked += new LinkLabelLinkClickedEventHandler(this.lnkInfoAddress_LinkClicked);
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.ClientSize = new Size(0x20c, 0x19b);
            base.Controls.Add(this.panel1);
            base.Icon = (Icon) manager.GetObject("$this.Icon");
            this.MaximumSize = new Size(530, 0x1b5);
            base.MinimizeBox = false;
            this.MinimumSize = new Size(530, 0x1b5);
            base.Name = "SingleBeIviteForm";
            base.Padding = new Padding(4);
            base.Text = "手机语聊";
            base.Controls.SetChildIndex(this.panel1, 0);
            base.Controls.SetChildIndex(base.menubar, 0);
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            base.ResumeLayout(false);
        }

        private void lnkInfoAddress_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                UiErrorHelper.HandEventSafely(base.FrameworkWindow, delegate {
                });
            }
        }

        private void lnkInviteUser_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
            {
                this.ShowContactInfo();
            }
        }

        private void lstContacts_IVRImageClick(object sender, IVRListItemEventArgs e)
        {
            UiErrorHelper.HandEventSafely(base.FrameworkWindow, delegate {
                this.FrameworkWindow.ContactManager.ShowContactDetail(this, (e.Item.Context as Imps.Client.Core.IVR).Contact.Uri.Raw);
            });
        }

        private void lstContacts_IVRNameClick(object sender, IVRListItemEventArgs e)
        {
            UiErrorHelper.HandEventSafely(base.FrameworkWindow, delegate {
                this.FrameworkWindow.ContactManager.ShowContactDetail(this, (e.Item.Context as Imps.Client.Core.IVR).Contact.Uri.Raw);
            });
        }

        protected override void OnFormClosed(FormClosedEventArgs e)
        {
            GlobalTimer.Unregister(new EventHandler(this.ShowInviteTime));
            if (base.OwnerDialog != null)
            {
                base.OwnerDialog.IVRStatusChange -= new EventHandler<IVREventArgs>(this.OwnerDialog_IVRStatusChange);
                base.OwnerDialog.InviteContactIVR.Contact.PersonalInfo.PropertiesChanged -= new EventHandler<PropertiesChangedEventArgs>(this.PersonalInfo_PropertiesChanged);
                foreach (Imps.Client.Core.IVR ivr in base.OwnerDialog.IVRList)
                {
                    if (ivr != base.OwnerDialog.InviteContactIVR)
                    {
                        ivr.Contact.PersonalInfo.PropertiesChanged -= new EventHandler<PropertiesChangedEventArgs>(this.Contact_PropertiesChanged);
                    }
                }
            }
            base.OnFormClosed(e);
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            UiErrorHelper.HandEventSafely(base.FrameworkWindow, delegate {
                Imps.Client.Core.Contact contact = base.OwnerDialog.InviteContactIVR.Contact;
                this.ShowContactPersionalInfo(contact);
                this.PicContact.Image = contact.PersonalInfo.Portrait;
                this.PicContact.Tag = contact.Uri.Raw;
                this.btnCancel.Text = StringTable.IVR.MsgDecline;
                this.btnAccept.Text = string.Format(StringTable.IVR.MsgAcceptButton, base.WaitTime);
                if (base.OwnerDialog.InviteContactIVR.Status == IVRParticipantStatus.Accept)
                {
                    base.OwnerDialog.AcceptInvite();
                    this.FormatForm(string.Format("{0}  邀请您进行手机语聊,请稍后接听来自{1} 的电话", base.GetContactDisplayName(contact.DisplayName), this.ServiceNo));
                }
                else
                {
                    this._startTickets = Environment.TickCount;
                    GlobalTimer.Register(new EventHandler(this.ShowInviteTime), this, 10);
                }
                base.OwnerDialog.IVRStatusChange += new EventHandler<IVREventArgs>(this.OwnerDialog_IVRStatusChange);
                contact.PersonalInfo.PropertiesChanged += new EventHandler<PropertiesChangedEventArgs>(this.PersonalInfo_PropertiesChanged);
                if (base.OwnerDialog.IVRList.Count > 1)
                {
                    this.FormatMultiIVR();
                }
                else
                {
                    this.lblBeInviteUsers.Visible = false;
                    this.lblSeparator.Visible = false;
                }
            });
        }

        private void OwnerDialog_IVRStatusChange(object sender, IVREventArgs e)
        {
            if (base.OwnerDialog.InviteContactIVR == e.IVR)
            {
                GlobalTimer.Unregister(new EventHandler(this.ShowInviteTime));
                switch (e.IVR.Status)
                {
                    case IVRParticipantStatus.Cancel:
                    case IVRParticipantStatus.Decline:
                        this.FormatForm(string.Format("{0}已经取消了会话邀请!", base.GetContactDisplayName(base.OwnerDialog.InviteContactIVR.Contact.DisplayName)));
                        return;

                    default:
                        return;
                }
            }
        }

        private void panel1_Paint(object sender, PaintEventArgs e)
        {
        }

        private void PersonalInfo_PropertiesChanged(object sender, PropertiesChangedEventArgs e)
        {
            Imps.Client.Core.Contact owner = (sender as Imps.Client.Core.ContactInfo).Owner;
            if (e.ContainsProperty("Portrait"))
            {
                ControlHelper.FadeinImage(this.PicContact, owner.PersonalInfo.Portrait);
            }
            if (base.OwnerDialog.InviteContactIVR.Status == IVRParticipantStatus.Inviting)
            {
                this.ShowContactPersionalInfo(owner);
            }
        }

        private void PicContact_Click(object sender, EventArgs e)
        {
            this.ShowContactInfo();
        }

        private void ShowContactInfo()
        {
            base.FrameworkWindow.ContactManager.ShowContactDetail(this, this.PicContact.Tag as string);
        }

        private void ShowContactPersionalInfo(Imps.Client.Core.Contact contact)
        {
            this.lblInviteInfo.Text = string.Format("{0}  邀请您进行手机语聊", base.GetContactDisplayName(contact.DisplayName));
            this.lnkInviteUser.Text = base.GetContactDisplayName(contact.DisplayName);
        }

        private void ShowInviteTime(object sender, EventArgs e)
        {
            UiErrorHelper.HandEventSafely(base.FrameworkWindow, delegate {
                int num = Convert.ToInt32(Math.Round((double) (((double) (Environment.TickCount - this._startTickets)) / 1000.0)));
                this.btnAccept.Text = string.Format(StringTable.IVR.MsgAcceptButton, base.WaitTime - num);
                if ((base.WaitTime - num) <= 0)
                {
                    GlobalTimer.Unregister(new EventHandler(this.ShowInviteTime));
                    base.OwnerDialog.IsOvertime = true;
                    this.FormatForm(string.Format("{0}邀请您手机语聊已经超时!", base.GetContactDisplayName(base.OwnerDialog.InviteContactIVR.Contact.DisplayName)));
                }
            });
        }

        public string ServiceNo
        {
            get
            {
                string str = base.OwnerDialog.InviteContactIVR.Contact.Uri.Sid.ToString();
                return (base.CurrentUser.Configuration.SystemSetting.SvcNoSetting.SvcNoIVR.ToString() + str);
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -