Ejemplo n.º 1
0
        private void Config_RunView()
        {
            /// 配置运行界面
            ///
            /// 配置编辑界面
            /// 左侧的树形结构

            // 设置退出键位置
            ViewCaoZuo.Object_Position(0.95, 0.01, 0.05, 0.05, button_exit, this.Controls);

            ViewCaoZuo.Object_Position(0.01, 0.01, 0.1, 0.95, treeview1, this.Controls);

            // 运行界面
            RunPanel.BorderStyle = BorderStyle.Fixed3D;
            ViewCaoZuo.Object_Position(0.12, 0.01, 0.8, 0.95, RunPanel, this.Controls);

            // 编辑树形结构
            TreeNode viewnode = new TreeNode();

            treeview1.AfterSelect     += new TreeViewEventHandler(TreeView_Right_Click);
            treeview1.ContextMenuStrip = contextMenuStrip_viewnoderightmenu;
            viewnode.Text = "画面";
            viewnode.Name = "画面";
            treeview1.Nodes.Add(viewnode);
            Reflush_TreeView_ViewNode(viewnode);
        }
Ejemplo n.º 2
0
 private void MainView_Load(object sender, EventArgs e)
 {
     ViewCaoZuo.Max_Form(this);
     ViewCaoZuo.Object_Position(0.1, 0.1, 0.8, 0.85, panel1, this.Controls);
     label_username.Text = Login.username;
     label_passion.Text  = Login.passion;
 }
Ejemplo n.º 3
0
        private void init_view()
        {
            ViewCaoZuo.Object_Position(0.01, 0.01, 0.1, 0.9, treeView_main, this.Controls);
            ViewCaoZuo.Object_Position(0.12, 0.01, 0.8, 0.9, panel_subview, this.Controls);
            ViewCaoZuo.Object_Position(0.92, 0.01, 0.06, 0.04, button_close, this.Controls);
            ViewCaoZuo.Show_Form_In_Panel(zongmao1, panel_subview);

            // 总貌的进去详细页面的事件
            zongmao1.EnterToXiangxi += new EventHandler(ChangeToXiangxi);
        }
Ejemplo n.º 4
0
        // 初始化画面
        private void _init_view()
        {
            //标题
            控件.Title title = new 控件.Title("除尘脱硫自动控制系统");
            ViewCaoZuo.Object_Position(0, 0, 1, 0.1, title, this.Controls);

            // 退出控钮
            控件.ExitButton exitbutton = new 控件.ExitButton();
            ViewCaoZuo.Object_Position(0.85, 0.1, 0.15, 0.1, exitbutton, this.Controls);

            // 选项标签
            ViewCaoZuo.Object_Position(0, 0.1, 0.85, 0.9, tabControl1, this.Controls);
        }
Ejemplo n.º 5
0
        public void ReSet_Device_Info()
        {
            // 总貌中显示设备的信息
            // 按照设备号进行排列
            for (int i = 0; i < 6; i++)
            {
                int count = tabControl1.TabPages[i].Controls.Count;

                for (int j = 0; j < count; j++)
                {
                    Control control = (Control)tabControl1.TabPages[i].Controls[0];
                    tabControl1.TabPages[i].Controls.Remove(control);
                    control.Dispose();
                }

                for (int j = 1; j <= 12; j++)
                {
                    try
                    {
                        int       machine_num = i * 12 + j;
                        string    where_cmd   = "Address='" + machine_num.ToString() + "'";
                        DataTable dt_machine  = MainView.builder.Select_Table("Device_Info", where_cmd);
                        DataRow   dr          = dt_machine.Rows[0];
                        if (dr[3].ToString() == "溢流缸")
                        {
                            if (machine_num > 65)
                            {
                                MessageBox.Show("超过最大限制,请联系厂家升级!");
                            }
                            YiLiuGang_Item item = new YiLiuGang_Item();
                            item.MyClick += new EventHandler(Click_Yiliu);
                            item.Set_Title(dr[0].ToString());
                            ViewCaoZuo.Object_Position(0 + ((j - 1) % 4) * 0.25, 0.01 + ((j - 1) / 4) * 0.31, 0.24, 0.3, item, tabControl1.TabPages[i].Controls);
                        }

                        if (dr[3].ToString() == "气流缸")
                        {
                            if (machine_num > 65)
                            {
                                MessageBox.Show("超过最大限制,请联系厂家升级!");
                            }
                            QiLiuGang item = new QiLiuGang();
                            item.Set_Title(dr[0].ToString());
                            item.MyClick += new EventHandler(Click_Qiliu);
                            ViewCaoZuo.Object_Position(0 + ((j - 1) % 4) * 0.25, 0.01 + ((j - 1) / 4) * 0.31, 0.24, 0.3, item, tabControl1.TabPages[i].Controls);
                        }
                    }
                    catch { }
                }
            }
        }
Ejemplo n.º 6
0
        public void init_view()
        {
            ViewCaoZuo.Object_Position(0.01, 0.01, 0.25, 0.45, zongmaoItem1, this.Controls);
            ViewCaoZuo.Object_Position(0.26, 0.01, 0.25, 0.45, zongmaoItem2, this.Controls);
            ViewCaoZuo.Object_Position(0.52, 0.01, 0.25, 0.45, zongmaoItem3, this.Controls);
            ViewCaoZuo.Object_Position(0.01, 0.5, 0.25, 0.45, zongmaoItem4, this.Controls);
            ViewCaoZuo.Object_Position(0.26, 0.5, 0.25, 0.45, zongmaoItem5, this.Controls);
            ViewCaoZuo.Object_Position(0.52, 0.5, 0.25, 0.45, zongmaoItem6, this.Controls);

            zongmaoItem1.Enter_Xiangxi += new EventHandler(enter_xiangxi);
            zongmaoItem2.Enter_Xiangxi += new EventHandler(enter_xiangxi);
            zongmaoItem3.Enter_Xiangxi += new EventHandler(enter_xiangxi);
            zongmaoItem4.Enter_Xiangxi += new EventHandler(enter_xiangxi);
            zongmaoItem5.Enter_Xiangxi += new EventHandler(enter_xiangxi);
            zongmaoItem6.Enter_Xiangxi += new EventHandler(enter_xiangxi);
        }
Ejemplo n.º 7
0
        public void init_view()
        {
            // 初始化画面
            ViewCaoZuo.Object_Position(0, 0, 1, 0.05, label_title, this.Controls);

            // 容器
            ViewCaoZuo.Object_Position(0.01, 0.06, 0.95, 0.89, tabControl1, this.Controls);

            for (int i = 0; i < 6; i++)
            {
                tabControl1.TabPages[i].Width  = (int)(tabControl1.Width * 0.99);
                tabControl1.TabPages[i].Height = (int)(tabControl1.Height * 0.99);
            }


            ReSet_Device_Info();
        }
Ejemplo n.º 8
0
        private void init_view()
        {
            comboBox_guochengzhonglei.Items.Clear();
            comboBox_guochengzhonglei.Items.Add("结束");
            comboBox_guochengzhonglei.Items.Add("取样");
            comboBox_guochengzhonglei.Items.Add("出布");
            comboBox_guochengzhonglei.Items.Add("自动暂停");
            comboBox_guochengzhonglei.Items.Add("停泵取样");
            comboBox_guochengzhonglei.Items.Add("进布");

            textBox_pinlv.Text             = zhubengpinlv;
            textBox_tibu.Text              = tibupinlv;
            textBox_fengji.Text            = fengjipinlv;
            comboBox_guochengzhonglei.Text = gongyi_duan_name;


            ViewCaoZuo.Object_Position(0, 0, 1, 0.2, label1, this.Controls);        // 标题

            ViewCaoZuo.Object_Position(0.1, 0.21, 0.2, 0.1, label3, this.Controls); // 下拉菜单

            ViewCaoZuo.Object_Position(0.4, 0.21, 0.4, 0.1, comboBox_guochengzhonglei, this.Controls);

            ViewCaoZuo.Object_Position(0.16, 0.35, 0.06, 0.1, pictureBox1, this.Controls);         // 主泵频率

            ViewCaoZuo.Object_Position(0.26, 0.35, 0.3, 0.1, label6, this.Controls);

            ViewCaoZuo.Object_Position(0.49, 0.35, 0.3, 0.1, textBox_pinlv, this.Controls);

            ViewCaoZuo.Object_Position(0.16, 0.5, 0.06, 0.1, pictureBox2, this.Controls);           // 提布频率

            ViewCaoZuo.Object_Position(0.26, 0.5, 0.3, 0.1, label7, this.Controls);

            ViewCaoZuo.Object_Position(0.49, 0.5, 0.3, 0.1, textBox_tibu, this.Controls);

            ViewCaoZuo.Object_Position(0.16, 0.65, 0.06, 0.1, pictureBox3, this.Controls);           // 风机频率

            ViewCaoZuo.Object_Position(0.26, 0.65, 0.3, 0.1, label8, this.Controls);

            ViewCaoZuo.Object_Position(0.49, 0.65, 0.3, 0.1, textBox_fengji, this.Controls);

            ViewCaoZuo.Object_Position(0.01, 0.89, 0.2, 0.1, button1, this.Controls);     // 确认

            ViewCaoZuo.Object_Position(0.3, 0.89, 0.2, 0.1, button2, this.Controls);      // 上一条

            ViewCaoZuo.Object_Position(0.6, 0.89, 0.2, 0.1, button3, this.Controls);      // 下一条
        }
Ejemplo n.º 9
0
        private void Config_EditView()
        {
            /// 配置编辑界面
            /// 左侧的树形结构

            // 设置退出键位置
            ViewCaoZuo.Object_Position(0.95, 0.01, 0.05, 0.05, button_exit, this.Controls);

            ViewCaoZuo.Object_Position(0.01, 0.01, 0.1, 0.95, treeview1, this.Controls);

            // 编辑区域
            EditPanel.BorderStyle = BorderStyle.FixedSingle;
            ViewCaoZuo.Object_Position(0.12, 0.1, 0.85, 0.85, EditPanel, this.Controls);

            /// 加入画面选项
            TreeNode viewnode = new TreeNode();

            viewnode.Text = "画面";
            viewnode.Name = "画面";
            treeview1.Nodes.Add(viewnode);


            /// 加入数据编辑选项
            ///
            TreeNode dataconfignode = new TreeNode();

            dataconfignode.Text = "数据编辑";
            dataconfignode.Name = "数据编辑";
            treeview1.Nodes.Add(dataconfignode);

            // 右键选择菜单
            treeview1.AfterSelect     += new TreeViewEventHandler(TreeView_Right_Click);
            treeview1.ContextMenuStrip = contextMenuStrip_viewnoderightmenu;
            Reflush_TreeView_ViewNode(viewnode);

            //  普通控件按钮
            Button NormalControl = new Button();

            NormalControl.Text = "普通控件";
            NormalControl.Name = "NormalControlButton";
            ViewCaoZuo.Object_Position(0.13, 0.02, 0.05, 0.05, NormalControl, this.Controls);


            NormalControl.Click += new EventHandler(ShowNormalControlWindows);
        }
Ejemplo n.º 10
0
        private void init_view()
        {
            //this.BackColor = System.Drawing.Color.FromName("Blue");

            ViewCaoZuo.Object_Position(0.05, 0.01, 0.8, 0.1, show_label, this.Controls);

            button_num1.Text = "1";
            ViewCaoZuo.Object_Position(0.01, 0.2, 0.2, 0.15, button_num1, this.Controls);
            button_num1.Click += new EventHandler(Button1_Click);

            button_num2.Text = "2";
            ViewCaoZuo.Object_Position(0.01 + 0.3, 0.2, 0.2, 0.15, button_num2, this.Controls);
            button_num2.Click += new EventHandler(Button1_Click);

            button_num3.Text = "3";
            ViewCaoZuo.Object_Position(0.01 + 0.3 * 2, 0.2, 0.2, 0.15, button_num3, this.Controls);
            button_num3.Click += new EventHandler(Button1_Click);
        }
Ejemplo n.º 11
0
        public void init_view()
        {
            ViewCaoZuo.Object_Position(0.01, 0.1, 0.9, 0.35, chart1, this.Controls);

            ViewCaoZuo.Object_Position(0.27, 0.5, 0.5, 0.49, dataGridView_craft, this.Controls);

            ViewCaoZuo.Object_Position(0.78, 0.5, 0.05, 0.05, label_no1, this.Controls);

            ViewCaoZuo.Object_Position(0.84, 0.5, 0.15, 0.05, comboBox1, this.Controls);

            ViewCaoZuo.Object_Position(0.8, 0.6, 0.2, 0.03, button_read_gongyi, this.Controls);

            ViewCaoZuo.Object_Position(0.01, 0.5, 0.25, 0.49, panel1, this.Controls);

            //ViewCaoZuo.Object_Position(0.4, 0.6, 0.35, 0.35, panel2, this.Controls);

            ViewCaoZuo.Object_Position(0.8, 0.65, 0.23, 0.34, panel3, this.Controls);

            ViewCaoZuo.Object_Position(0.9, 0.01, 0.09, 0.05, button_return, this.Controls);
        }
Ejemplo n.º 12
0
        private void init_view()
        {
            ViewCaoZuo.Object_Position(0, 0, 1, 0.2, label1, this.Controls);        // 标题

            ViewCaoZuo.Object_Position(0, 0.2, 1, 0.2, chart1, this.Controls);      // 图表

            ViewCaoZuo.Object_Position(0.01, 0.4, 0.2, 0.1, label2, this.Controls); // 起始温度

            ViewCaoZuo.Object_Position(0.21, 0.4, 0.2, 0.1, textBox_startwendu, this.Controls);

            ViewCaoZuo.Object_Position(0.01, 0.5, 0.2, 0.1, label3, this.Controls); // 目标温度

            ViewCaoZuo.Object_Position(0.21, 0.5, 0.2, 0.1, textBox_endwendu, this.Controls);

            ViewCaoZuo.Object_Position(0.01, 0.6, 0.2, 0.1, label4, this.Controls); // 降温速率

            ViewCaoZuo.Object_Position(0.21, 0.6, 0.2, 0.1, textBox_sulv, this.Controls);

            ViewCaoZuo.Object_Position(0.01, 0.7, 0.2, 0.1, label5, this.Controls);  // 降温时间

            ViewCaoZuo.Object_Position(0.21, 0.7, 0.2, 0.1, textBox_time, this.Controls);
        }
Ejemplo n.º 13
0
        public static bool[] chuanganqi_connect_is = new bool[400];              // 传感器是否连接上


        public Form1()
        {
            InitializeComponent();
            ViewCaoZuo.Max_Form(this);
            ViewCaoZuo.Object_Position(0.94, 0.05, 0.05, 0.04, button_exit, this.Controls);
            ViewCaoZuo.Object_Position(0.94, 0.10, 0.05, 0.04, button1, this.Controls);
            ViewCaoZuo.Object_Position(0.94, 0.15, 0.05, 0.04, button2, this.Controls);
            ViewCaoZuo.Object_Position(0.94, 0.20, 0.05, 0.04, button3, this.Controls);
            ViewCaoZuo.Object_Position(0.94, 0.25, 0.05, 0.04, button4, this.Controls);



            // 换页

            allsubview.Clear();
            for (int i = 1; i <= 16; i++)
            {
                SubView subview = new SubView();
                subview.Set_Machine_Num(i);
                ViewCaoZuo.Object_Position(0.01 + (i - 1) % 4 * 0.2, 0.05 + (i - 1) / 4 * 0.2, 0.19, 0.19, subview, this.Controls);
                allsubview.Add(subview);
            }

            /// 建立数个ip客户端,用以连接
            ///
            for (int i = 1; i < 100; i++)
            {
                try
                {
                    string          address_string = SubView.inifile.IniReadValue("station_ip", i.ToString());
                    IPAddress       ip             = IPAddress.Parse(address_string);
                    TcpServerClient client         = new TcpServerClient(address_string, 8880);
                    allclient.Add(client);
                    client.Data_Arrival_Event += new EventHandler(DataArrival);
                }
                catch { }
            }
        }
Ejemplo n.º 14
0
        private void init_view()
        {
            ViewCaoZuo.Object_Position(0.40, 0.01, 0.2, 0.1, label_title, this.Controls);

            ViewCaoZuo.Object_Position(0.01, 0.13, 0.98, 0.3, panel_chart, this.Controls);
            ViewCaoZuo.Object_Position(0, 0, 1, 1, chart1, panel_chart.Controls);

            ViewCaoZuo.Object_Position(0.01, 0.44, 0.98, 0.05, panel_caozuo, this.Controls);

            ViewCaoZuo.Object_Position(0, 0, 0.1, 0.90, button_qian1hour, panel_caozuo.Controls);

            ViewCaoZuo.Object_Position(0.1, 0, 0.1, 0.9, button_qian5min, panel_caozuo.Controls);

            ViewCaoZuo.Object_Position(0.2, 0, 0.1, 0.9, button_now, panel_caozuo.Controls);

            ViewCaoZuo.Object_Position(0.3, 0, 0.1, 0.9, button_next5min, panel_caozuo.Controls);

            ViewCaoZuo.Object_Position(0.4, 0, 0.1, 0.9, button_next1hour, panel_caozuo.Controls);

            ViewCaoZuo.Object_Position(0.55, 0, 0.3, 0.9, dateTimePicker_search, panel_caozuo.Controls);

            ViewCaoZuo.Object_Position(0.01, 0.5, 0.4, 0.49, groupBox1, this.Controls);
        }
Ejemplo n.º 15
0
        public static View.ProjectManager projectmanager = new View.ProjectManager();               // 项目管理配置

        public Form1()
        {
            InitializeComponent();
            // 初始化
            projectmanager.TopLevel = false;

            // 最开始显示的是工程管理界面
            Show_View(projectmanager);

            // 新建数据库
            master_sql_builder.Create_Database("MyMES");

            // 设置比例
            ViewCaoZuo.Max_Form(this);
            ViewCaoZuo.Object_Position(0, 0, 0.1, 1, treeView_select, this.Controls);
            ViewCaoZuo.Object_Position(0.12, 0.08, 0.8, 0.9, panel_view, this.Controls);

            string[] a = FileCaozuo.Read_All_Line(Project_Config_File);
            if (a != null)
            {
                // 当配置文件不为空时
            }
        }
Ejemplo n.º 16
0
        private void init_view()
        {
            // 模拟量
            ViewCaoZuo.Object_Position(0.01, 0.01, 0.5, 0.5, pictureBox1, this.Controls);               // 机缸图片

            ViewCaoZuo.Object_Position(0.53, 0.01, 0.4, 0.12, label1, this.Controls);                   // 机缸标题

            ViewCaoZuo.Object_Position(0.53, 0.13, 0.45, 0.12, label_mengcheng, this.Controls);         // 机缸名称

            ViewCaoZuo.Object_Position(0.01, 0.53, 0.3, 0.12, label_wendu, this.Controls);              // 温度标签

            ViewCaoZuo.Object_Position(0.3, 0.53, 0.3, 0.12, myLabel_wendu, this.Controls);             // 温度显示

            ViewCaoZuo.Object_Position(0.01, 0.65, 0.3, 0.12, label_jigangshuiwei, this.Controls);      // 水位标签

            ViewCaoZuo.Object_Position(0.3, 0.65, 0.3, 0.12, myLabel_div10_shuiwei, this.Controls);     // 水位显示

            ViewCaoZuo.Object_Position(0.01, 0.77, 0.3, 0.12, label_duanshi, this.Controls);            // 工艺时长标签

            ViewCaoZuo.Object_Position(0.3, 0.77, 0.4, 0.12, myLabel_time_gongyi, this.Controls);       // 工艺运行时长显示

            ViewCaoZuo.Object_Position(0.01, 0.89, 0.3, 0.12, label_zongyunxingshijian, this.Controls); // 总时长标签

            ViewCaoZuo.Object_Position(0.3, 0.89, 0.4, 0.12, myLabel_time_zong, this.Controls);         // 总时长显示



            // 开关量

            ViewCaoZuo.Object_Position(0.7, 0.3, 0.1, 0.1, myLabel_Red_Yellow_start, this.Controls);     // 启动

            ViewCaoZuo.Object_Position(0.7, 0.4, 0.1, 0.1, myLabel_Red_Yellow_zanting, this.Controls);   // 暂停

            ViewCaoZuo.Object_Position(0.7, 0.5, 0.1, 0.1, myLabel_Red_Yellow_zhubeng, this.Controls);   // 主泵

            ViewCaoZuo.Object_Position(0.7, 0.6, 0.1, 0.1, myLabel_Red_Yellow_tingzhi, this.Controls);   // 停止
        }
Ejemplo n.º 17
0
        private void init_view()
        {
            // 初始化操作
            ViewCaoZuo.Max_Form(this);      // 屏幕最大化

            // 树形图的大小位置
            ViewCaoZuo.Object_Position(0.01, 0.1, 0.1, 0.8, treeView1, this.Controls);

            ViewCaoZuo.Object_Position(0.01, 0.05, 0.1, 0.05, label_caidanliebiao, this.Controls);

            ViewCaoZuo.Object_Position(0.01, 0, 1, 0.05, label_title, this.Controls);

            ViewCaoZuo.Object_Position(0.12, 0.06, 0.85, 0.84, panel_bg, this.Controls);

            //zongmao_view.Click_Yiliu += new EventHandler(Show_xiangxi_Yiliu);
            //zongmao_view.Click_Qiliu += new EventHandler(Show_xiangxi_Qiliu);

            //zongmao_view2.Click_Yiliu += new EventHandler(Show_xiangxi_Yiliu);
            //zongmao_view2.Click_Qiliu += new EventHandler(Show_xiangxi_Qiliu);

            zongmao_view3.Click_Yiliu += new EventHandler(Show_xiangxi_Yiliu);
            zongmao_view3.Click_Qiliu += new EventHandler(Show_xiangxi_Qiliu);


            xiangxi_view.return_to_zongmao += new EventHandler(Return_To_MainView);

            // 初始化总貌
            //zongmao_view.Set_Chejian("一车间");
            //zongmao_view.ReSet_Device_Info();    // 显示总貌信息

            //zongmao_view2.Set_Chejian("二车间");
            //zongmao_view2.ReSet_Device_Info();

            zongmao_view3.Set_Chejian("三车间");
            zongmao_view3.ReSet_Device_Info();
        }
Ejemplo n.º 18
0
        public void init_view()
        {
            ViewCaoZuo.Object_Position(0, 0, 1, 0.2, label1, this.Controls);         // 标题

            ViewCaoZuo.Object_Position(0.01, 0.25, 0.2, 0.1, label2, this.Controls); //保温温度

            ViewCaoZuo.Object_Position(0.24, 0.25, 0.2, 0.1, textBox_baowenwendu, this.Controls);

            ViewCaoZuo.Object_Position(0.01, 0.4, 0.2, 0.1, label3, this.Controls);        // 保温时间

            ViewCaoZuo.Object_Position(0.24, 0.4, 0.2, 0.1, textBox_baowenshijian, this.Controls);

            ViewCaoZuo.Object_Position(0.5, 0.25, 0.06, 0.1, pictureBox1, this.Controls);   // 主泵频率

            ViewCaoZuo.Object_Position(0.56, 0.25, 0.2, 0.1, label6, this.Controls);

            ViewCaoZuo.Object_Position(0.79, 0.25, 0.2, 0.1, textBox_pinlv, this.Controls);

            ViewCaoZuo.Object_Position(0.5, 0.4, 0.06, 0.1, pictureBox2, this.Controls);  // 提布频率

            ViewCaoZuo.Object_Position(0.56, 0.4, 0.2, 0.1, label7, this.Controls);

            ViewCaoZuo.Object_Position(0.79, 0.4, 0.2, 0.1, textBox_tibu, this.Controls);

            ViewCaoZuo.Object_Position(0.5, 0.55, 0.06, 0.1, pictureBox3, this.Controls);  // 风机频率

            ViewCaoZuo.Object_Position(0.56, 0.55, 0.2, 0.1, label8, this.Controls);

            ViewCaoZuo.Object_Position(0.79, 0.55, 0.2, 0.1, textBox_fengji, this.Controls);

            ViewCaoZuo.Object_Position(0.01, 0.89, 0.2, 0.1, button1, this.Controls);     // 确认

            ViewCaoZuo.Object_Position(0.3, 0.89, 0.2, 0.1, button2, this.Controls);      // 上一条

            ViewCaoZuo.Object_Position(0.6, 0.89, 0.2, 0.1, button3, this.Controls);      // 下一条
        }
Ejemplo n.º 19
0
        private void init_view()
        {
            // 标题
            ViewCaoZuo.Object_Position(0.01, 0, 1, 0.05, label_title, this.Controls);

            // 工具栏
            ViewCaoZuo.Object_Position(0.01, 0.05, 1, 0.05, panel_tool, this.Controls);


            ViewCaoZuo.Object_Position(0.01, 0, 1, 1, toolStrip1, panel_tool.Controls);

            // 选择树形图
            ViewCaoZuo.Object_Position(0.01, 0.1, 0.1, 0.85, treeView1, this.Controls);

            // 串口信息
            ViewCaoZuo.Object_Position(0.12, 0.1, 0.85, 0.2, panel_com_info, this.Controls);

            // 数据设置标题
            ViewCaoZuo.Object_Position(0.12, 0.1, 0.85, 0.2, panel_dataset, this.Controls);

            // 表格背景
            ViewCaoZuo.Object_Position(0.12, 0.35, 0.85, 0.6, panel1, this.Controls);

            // 表格
            ViewCaoZuo.Object_Position(0.01, 0.01, 0.98, 0.98, myDataGridView1, panel1.Controls);



            Create_Device_Database();   // 创建串口通讯表

            // 波特率下拉菜单
            comboBox_botelv.Items.Clear();
            comboBox_botelv.Items.Add("2‘kps");
            comboBox_botelv.Items.Add("4800kps");
            comboBox_botelv.Items.Add("9600kps");
            comboBox_botelv.Items.Add("19200kps");
            comboBox_botelv.Items.Add("38400kps");

            // 数据位下拉菜单

            comboBox_shujuwei.Items.Clear();
            comboBox_shujuwei.Items.Add("8bits");
            comboBox_shujuwei.Items.Add("7bits");

            // 停止位
            comboBox_tingzhiwei.Items.Clear();
            comboBox_tingzhiwei.Items.Add("1bit");
            comboBox_tingzhiwei.Items.Add("2bits");

            // 校验位
            comboBox_jiaoyanwei.Items.Clear();
            comboBox_jiaoyanwei.Items.Add("none");
            comboBox_jiaoyanwei.Items.Add("odd");
            comboBox_jiaoyanwei.Items.Add("even");

            modbus1.com_num = 1;
            modbus2.com_num = 2;
            modbus3.com_num = 3;
            modbus4.com_num = 4;
            modbus5.com_num = 5;
            modbus6.com_num = 6;

            Read_All_Com();
        }
Ejemplo n.º 20
0
 private void init_view()
 {
     ViewCaoZuo.Object_Position(0.01, 0.01, 0.1, 0.03, label_machine_num, this.Controls);
 }
Ejemplo n.º 21
0
 private void init_view()
 {
     ViewCaoZuo.Object_Position(0, 0, 1, 0.05, label_title, this.Controls);
 }