• 大小: 3.36M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2024-04-24
  • 语言: C#
  • 标签: PLC  上位机  智能家居  

资源简介


资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;

namespace thinger.cn.PLCSpeaker
{
    /// 
    /// 课程网址:https://ke.qq.com/course/301616
    /// 

    public partial class FrmMain : Form
    {
        //创建业务类对象
        private SmartDevices smartDevices = new SmartDevices();

        //创建定时器
        private Timer mytimer = new Timer();

        private List lightState = new List();
        private short temp = 0;


        public FrmMain()
        {
            InitializeComponent();
            //初始化定时器
            this.mytimer.Interval = 100;
            this.mytimer.Tick += Mytimer_Tick;
            this.mytimer.Enabled = true;

            //设置列表
            this.cmb_PLC.DataSource = this.smartDevices.PLCList;
            this.cmb_PLC.DisplayMember = “PLCName“;

            //关联灯控制的方法

            this.smartDevices.PassMsg = AddShowLogList;

            this.btn_begin.Enabled = this.btn_send.Enabled = false;
        }

        private void Mytimer_Tick(object sender EventArgs e)
        {
            if (this.smartDevices.IsConnected)
            {
                try
                {
                    this.smartDevices.GetDataFromServer(ref lightState ref temp);
                    //this.led1.Image = lightState[0] ? Properties.Resources.ledon : Properties.Resources.ledoff;
                    //this.led2.Image = lightState[1] ? Properties.Resources.ledon : Properties.Resources.ledoff;
                    //this.led3.Image = lightState[2] ? Properties.Resources.ledon : Properties.Resources.ledoff;
                    //this.led4.Image = lightState[3] ? Properties.Resources.ledon : Properties.Resources.ledoff;
                    //this.led5.Image = lightState[4] ? Properties.Resources.ledon : Properties.Resources.ledoff;
                    //this.led6.Image = lightState[5] ? Properties.Resources.ledon : Properties.Resources.ledoff;
                    //this.led7.Image = lightState[6] ? Properties.Resources.ledon : Properties.Resources.ledoff;
                    //this.led8.Image = lightState[7] ? Properties.Resources.ledon : Properties.Resources.ledoff;

                    //foreach (var item in this.panel_light.Controls)
                    //{
                    //    if (item is LED ld)
                    //    {
                    //        ld.LedState = lightState[Convert.ToInt32(ld.LedName.Substring(1)) - 1];
                    //    }    
                    //}

                    //foreach (var item in this.panel_light.Controls)
                    //{
                    //    if (item is LED ld && ld.Tag != null && ld.Tag.ToString().Length > 0)
                    //    {
                    //        ld.LedState = lightState[Convert.ToInt32(ld.Tag)];
                    //    }
                    //}


          

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件          4  2020-10-29 22:39  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\AdditionalFiles\PLCM\plcmArchive.pma15_0

     文件         20  2020-10-29 22:39  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\segments.gen

     文件        648  2020-10-29 22:39  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\segments_8t

     文件      52465  2020-10-29 20:59  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\_by.fdt

     文件       1444  2020-10-29 20:59  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\_by.fdx

     文件        750  2020-10-29 20:59  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\_by.fnm

     文件       5436  2020-10-29 20:59  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\_by.frq

     文件      10687  2020-10-29 20:59  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\_by.prx

     文件        439  2020-10-29 20:59  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\_by.tii

     文件      23757  2020-10-29 20:59  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\_by.tis

     文件       1124  2020-10-29 20:59  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\_by.tvd

     文件      54822  2020-10-29 20:59  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\_by.tvf

     文件       2884  2020-10-29 20:59  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\_by.tvx

     文件         31  2020-10-29 22:39  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\_by_1.del

     文件       4938  2020-10-29 22:39  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\_bz.cfs

     文件          9  2020-10-29 22:39  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\_bz_1.del

     文件       4938  2020-10-29 22:39  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SearchIndex\_c0.cfs

     文件       1522  2020-10-29 22:39  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\IM\SPL\options

     文件       3058  2020-10-29 20:53  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\System\PEData\meta\ChangeListConsumer\Hmibase.xml

     文件       3058  2020-10-29 20:53  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\System\PEData\meta\ChangeListConsumer\Iecpl.xml

     文件       3058  2020-10-29 20:53  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\System\PEData\meta\ChangeListConsumer\Siemens.Simatic.Lang.IPI.Target.xml

     文件       3058  2020-10-29 20:53  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\System\PEData\meta\ChangeListConsumer\Siemens.Simatic.Lang.Online.xml

     文件       3058  2020-10-29 20:53  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\System\PEData\meta\ChangeListConsumer\Siemens.Simatic.Lang.xml

     文件       2202  2020-10-29 20:53  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\System\PEData\meta\ChangeListProvider\Siemens.Automation.DomainModel.xml

     文件      83440  2020-10-29 22:39  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\System\PEData.idx

     文件    2621008  2020-10-29 22:39  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\System\PEData.plf

     文件       7741  2020-10-29 22:39  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\thinger.cn.PLCSpeaker.ap16

     文件      24576  2020-10-21 19:26  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\Vci\Vci.db

     文件      69632  2020-10-29 20:59  上位机语音识别控制PLC源码(含西门子PLC程序)\PLC程序\thinger.cn.PLCSpeaker\XRef\XRef.db

    ..A..H.    136192  2020-10-29 22:42  上位机语音识别控制PLC源码(含西门子PLC程序)\项目源码\thinger.cn.PLCSpeaker\.vs\thinger.cn.PLCSpeaker\v16\.suo

............此处省略114个文件信息

评论

共有 条评论