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

📄 frmnewphone.cs

📁 Gibphone is CSharp Program, it can tell you how to design p2p chat.
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace GPCore.Forms
{
    /// <summary>
    /// A form for creating new Phone objects.
    /// </summary>
    public partial class frmNewPhone : Form
    {
        /// <summary>
        /// Creates a new NewPhone form.
        /// </summary>
        public frmNewPhone()
        {
            InitializeComponent();
        }

        private void frmNewPhone_Load(object sender, EventArgs e)
        {
            foreach (string s in Core.PluginManager.Phones)
            {
                object[] a = Core.PluginManager.GetAttributes(s);
                foreach (object o in a)
                {
                    if (o is PluginAttribute)
                    {
                        PluginAttribute pa = o as PluginAttribute;
                        ListViewItem li = lstPhone.Items.Add(pa.Title);
                        li.ToolTipText = String.Format("{0} Version {1}\n"+
                                                    "Developed by {2} of {3}\n"+
                                                    "{4}", pa.Title, pa.Version, pa.Developers, pa.Company, pa.Description);
                    }
                }
            }
            foreach (string s in Core.PluginManager.Vocoders)
            {
                object[] a = Core.PluginManager.GetAttributes(s);
                foreach (object o in a)
                {
                    if (o is PluginAttribute)
                    {
                        PluginAttribute pa = o as PluginAttribute;
                        ListViewItem li = lstVocoder.Items.Add(pa.Title);
                        li.ToolTipText = String.Format("{0} Version {1}\n" +
                                                    "Developed by {2} of {3}\n" +
                                                    "{4}", pa.Title, pa.Version, pa.Developers, pa.Company, pa.Description);
                    }
                }
            }
            foreach (string s in Core.PluginManager.NetworkProtocols)
            {
                object[] a = Core.PluginManager.GetAttributes(s);
                foreach (object o in a)
                {
                    if (o is PluginAttribute)
                    {
                        PluginAttribute pa = o as PluginAttribute;
                        ListViewItem li = lstNetwork.Items.Add(pa.Title);
                        li.ToolTipText = String.Format("{0} Version {1}\n" +
                                                    "Developed by {2} of {3}\n" +
                                                    "{4}", pa.Title, pa.Version, pa.Developers, pa.Company, pa.Description);
                    }
                }
            }
        }

        private void btnCreate_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
            Close();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
            this.Close();
        }
    }
}

⌨️ 快捷键说明

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