基本信息
源码名称:电脑连手机或网络机顶盒
源码大小:1.61M
文件格式:.rar
开发语言:C#
更新时间:2019-05-01
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559

本次赞助数额为: 1 元 
   源码介绍
需要自己安装ftpwifi服务端,360手机助手、豌豆荚之类的软件进行下载

【全部主界面代码】

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;


namespace 电脑连接手机
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            this.timer1.Start();
        }

        WebBrowser browser = new WebBrowser();
       
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            this.webBrowser1.GoBack();
        }

        private void toolStripButton2_Click(object sender, EventArgs e)
        {
          this.webBrowser1.GoForward();
        }

        private void toolStripButton3_Click(object sender, EventArgs e)
        {
          this.webBrowser1.Refresh();
        }

        private void toolStripButton4_Click(object sender, EventArgs e)
        {
            this.Dispose();
            this.Close();
        }

        private void toolStripComboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.toolStripComboBox1.Text == "计算器")
            {
                this.toolStripTextBox1.Visible = false;
                this.toolStripTextBox2.Visible = false;
                this.toolStripLabel1.Visible = false;
                this.toolStripLabel2.Visible = false;
                this.toolStripButton5.Visible = false;
          

                Process lqyxz = Process.Start("C:\\Windows\\System32\\calc.exe");

                lqyxz.Dispose();
            }
            if (this.toolStripComboBox1.Text == "计算机管理")
            {
                this.toolStripTextBox1.Visible = false;
                this.toolStripTextBox2.Visible = false;
                this.toolStripLabel1.Visible = false;
                this.toolStripLabel2.Visible = false;
                this.toolStripButton5.Visible = false;
          

                Process jsjgl = Process.Start("C:\\Windows\\System32\\compmgmt.msc");

                jsjgl.Dispose();

            }

            if (this.toolStripComboBox1.Text == "DirectX诊断工具")
            {
                this.toolStripTextBox1.Visible = false;
                this.toolStripTextBox2.Visible = false;
                this.toolStripLabel1.Visible = false;
                this.toolStripLabel2.Visible = false;
                this.toolStripButton5.Visible = false;
          
                Process xzrj = Process.Start("C:\\Windows\\System32\\dxdiag.exe");

                xzrj.Dispose();

            }
            if (this.toolStripComboBox1.Text == "卸载软件")
            {
                this.toolStripTextBox1.Visible = false;
                this.toolStripTextBox2.Visible = false;
                this.toolStripLabel1.Visible = false;
                this.toolStripLabel2.Visible = false;
                this.toolStripButton5.Visible = false;
          

                Process xzrj = Process.Start("C:\\Windows\\System32\\Appwiz.cpl");

                xzrj.Dispose();

            }
            if (this.toolStripComboBox1.Text == "控制面板")
            {
                this.toolStripTextBox1.Visible = false;
                this.toolStripTextBox2.Visible = false;
                this.toolStripLabel1.Visible = false;
                this.toolStripLabel2.Visible = false;
                this.toolStripButton5.Visible = false;
          

                Process xzrj = Process.Start("C:\\Windows\\System32\\control.exe");

                xzrj.Dispose();

            }
            if (this.toolStripComboBox1.Text == "设备管理器")
            {
                this.toolStripTextBox1.Visible = false;
                this.toolStripTextBox2.Visible = false;
                this.toolStripLabel1.Visible = false;
                this.toolStripLabel2.Visible = false;
                this.toolStripButton5.Visible = false;
          
                Process xzrj = Process.Start("C:\\Windows\\System32\\devmgmt.msc");

                xzrj.Dispose();

            }
            if (this.toolStripComboBox1.Text == "命令提示符")
            {
                this.toolStripTextBox1.Visible = false;
                this.toolStripTextBox2.Visible = false;
                this.toolStripLabel1.Visible = false;
                this.toolStripLabel2.Visible = false;
                this.toolStripButton5.Visible = false;
          
                Process xzrj = Process.Start("C:\\Windows\\System32\\cmd.exe");

                xzrj.Dispose();

            }

            if (this.toolStripComboBox1.Text == "查看公网IP")
            {
                this.toolStripTextBox1.Visible = false;
                this.toolStripTextBox2.Visible = false;
                this.toolStripLabel1.Visible = false;
                this.toolStripLabel2.Visible = false;
                this.toolStripButton5.Visible = false;

                this.webBrowser1.Url = new Uri("http://ip.qq.com");

            }
            if (this.toolStripComboBox1.Text == "路由器登录界面")
            {
                this.toolStripTextBox1.Visible = true;
                this.toolStripTextBox2.Visible = true;
                this.toolStripLabel1.Visible = true;
                this.toolStripLabel2.Visible = true;
                this.toolStripButton5.Visible = true;
          

            }

        }

        private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
        {

        }

        private void notifyIcon1_DoubleClick(object sender, EventArgs e)
        {

            if (this.WindowState == FormWindowState.Minimized)
            {
                //this.Location = new Point(352, 177);
                this.Show();
                this.WindowState = FormWindowState.Normal;
                this.toolStripComboBox1.Text = "选择本机功能";
                notifyIcon1.Visible = true;
                this.ShowInTaskbar = true;
                FormBorderStyle = FormBorderStyle.FixedSingle;
             this.Height = 502;
                this.Width = 813;
            }
        }

        private void Form1_Resize(object sender, EventArgs e)
        {
            if (this.WindowState == FormWindowState.Minimized)
            {
             
                this.Hide();
                this.toolStripComboBox1.Text = "选择本机功能";

                this.toolStripTextBox1.Visible = false;
                this.toolStripTextBox2.Visible = false;
                this.toolStripLabel1.Visible = false;
                this.toolStripLabel2.Visible = false;
                this.toolStripButton5.Visible = false;
          


                this.ShowInTaskbar = false;
                this.notifyIcon1.Visible = true;
                FormBorderStyle = FormBorderStyle.None;

              this.webBrowser1.Url=new Uri ("https://www.baidu.com");


            }
        }

        private void 显示toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            if (this.WindowState == FormWindowState.Minimized)
            {
                this.Show();
                this.WindowState = FormWindowState.Normal;
                FormBorderStyle = FormBorderStyle.FixedSingle;
                notifyIcon1.Visible = true;
                this.ShowInTaskbar = true;
                this.Height = 502;
                this.Width = 813;
            }
        }

        private void 退出toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string ip = this.textBox1.Text;
            string dkh = this.textBox2.Text;
            if (this.textBox1.Text == "" && this.textBox2.Text != "")
            {
                this.label3.Visible = true;
                this.label3.Text = "请填写IP!";
                return;
            }


            if (ip == "" && dkh == "")
            {
                this.label3.Visible = true;
                this.label3.Text = "输入连接参数!";
                return;

            }
            if (dkh == "" && ip != "")
            {
                this.label3.Visible = true;
                this.label3.Text = "请填写端口号!";
                return;
            }


            if (ip != "101" && dkh != "2121")
            {

                this.label3.Visible = true;
                this.label3.Text = "手机数据查看:";
               this.webBrowser1.Url=new Uri ("ftp://192.168.0."   ip   ":"   dkh);
                return;
            }
            else
                this.label3.Visible = true;
            this.label3.Text = "输入机顶盒IP:";
            this.webBrowser1.Url = new Uri("ftp://192.168.0."   ip   ":"   dkh);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.webBrowser1.Url = new Uri("https://www.baidu.com");
        }

        private void toolStripTextBox1_MouseEnter(object sender, EventArgs e)
        {
           
        }

        private void toolStripButton5_Click(object sender, EventArgs e)
        {
            string luyouqiwd  = this.toolStripTextBox1.Text;
            string  luyouqiip= this.toolStripTextBox2.Text;
            if (luyouqiwd == "" && luyouqiip == "")
            {

                this.toolStripLabel3.Visible = true;
                this.toolStripLabel3.Text = "请输入路由器IP或路由器所在网段!";
                return;
            }

            if (luyouqiwd == "" && luyouqiip != "")
            {

                this.toolStripLabel3.Visible = true;
                this.toolStripLabel3.Text = "请输入路由器所在网段!";
                return;
            }
            if (luyouqiwd != "" && luyouqiip == "")
            {
                this.toolStripLabel3.Visible = true;
                this.toolStripLabel3.Text = "请输入路由器IP!";
                return;
            }

            if (luyouqiip != "" && luyouqiwd != "")
            {

                this.webBrowser1.Url = new Uri("http://192.168."   luyouqiwd   "."   luyouqiip);
            }
               
         
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            this.webBrowser1.Url = new Uri("https://www.baidu.com");

         
           
           
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            this.label5.Text = this.webBrowser1.DocumentTitle;
        }

        private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            webBrowser1.Document.InvokeScript("someInPageJavaFunction", null);
            this.webBrowser1.Document.Body.Style = "zoom:0.5";
        }

        private void textBox1_Click(object sender, EventArgs e)
        {
            this.textBox1.BackColor = Color.LightGreen;
        }

        private void textBox2_Click(object sender, EventArgs e)
        {
            this.textBox2.BackColor = Color.LightGreen;
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            this.textBox1.BackColor = DefaultBackColor;
        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {
            this.textBox2.BackColor = DefaultBackColor;
        }

       
    }
}