資源簡介
自動化生產線的報警監控模塊,和倍福PLC ads通信,
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?DevComponents.DotNetBar.Schedule;
using?DevComponents.DotNetBar;
using?DevComponents.Schedule.Model;
using?System.IO;
using?TwinCAT.Ads;
using?System.Runtime.InteropServices;
using?System.Threading;
using?System.Data.SqlClient;
using?System.Data.OleDb;
namespace?SideNavSample
{
????
????public?partial?class?Form1?:?OfficeForm
????{
????????private?int?hVar;
????????private?TcAdsClient?tcClient;
????????private?delegate?void?MyInvoke(string?str);
????????bool[]?bCurrValue?=?new?bool[160];
????????bool[]?bLastValue?=?new?bool[160];
????????int?nConnect?=?0;
???????//?Plc_IO?plc=null;
????????public?DataTable?AlamTable?=?new?DataTable();
????????public?Form1()
????????{
????????????InitializeComponent();
????????????comboBoxEx1.Items.AddRange(new?object[]?{?estyle.Office2013?estyle.OfficeMobile2014?estyle.Office2010Blue
????????????????estyle.Office2010Silver?estyle.Office2010Black?estyle.VisualStudio2010Blue?estyle.VisualStudio2012Light?
????????????????estyle.VisualStudio2012Dark?estyle.Office2007Blue?estyle.Office2007Silver?estyle.Office2007Black});
????????????comboBoxEx1.SelectedIndex?=?0;
????????}
????????private?void?switchButton1_ValueChanged(object?sender?EventArgs?e)
????????{
????????????sideNav1.EnableClose?=?switchButton1.Value;
????????????UpdateSideNavDock();
????????}
????????private?void?switchButton2_ValueChanged(object?sender?EventArgs?e)
????????{
????????????sideNav1.EnableMaximize?=?switchButton2.Value;
????????????UpdateSideNavDock();
????????}
????????private?void?switchButton3_ValueChanged(object?sender?EventArgs?e)
????????{
????????????sideNav1.EnableSplitter?=?switchButton3.Value;
????????????UpdateSideNavDock();
????????}
????????///?
????????///?Updates?the?Dock?property?of?SideNav?control?since?when?Close/Maximize/Splitter?functionality?is?enabled
????????///?the?Dock?cannot?be?set?to?fill?since?control?needs?ability?to?resize?itself.
????????///?
????????private?void?UpdateSideNavDock()
????????{
????????????if?(sideNav1.EnableClose?||?sideNav1.EnableMaximize?||?sideNav1.EnableSplitter)
????????????{
????????????????if?(sideNav1.Dock?!=?Dockstyle.Left)
????????????????{
????????????????????sideNav1.Dock?=?Dockstyle.Left;
????????????????????sideNav1.Width?=?this.ClientRectangle.Width?-?32;
????????????????????ToastNotification.Close(this);?//?Closes?any?toast?messages?if?already?open
????????????????????ToastNotification.Show(this?“With?current?settings?SideNav?control?must?be?able?to?resize?itself?so?its?Dock?is?set?to?Left.“?4000);
????????????????}
????????????}
????????????else?if?(sideNav1.Dock?!=?Dockstyle.Fill)
????????????{
????????????????sideNav1.Dock?=?Dockstyle.Fill;
????????????????ToastNotification.Close(this);?//?Closes?a
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????7422??2019-07-26?23:42??AlmProject\Alm.csproj
?????文件????????930??2019-07-27?00:19??AlmProject\Alm.sln
????..A..H.?????29184??2019-07-21?13:03??AlmProject\Alm.suo
????..A..H.?????37888??2019-07-27?00:11??AlmProject\Alm.v11.suo
????..A..H.?????67584??2019-07-27?01:29??AlmProject\Alm.v12.suo
?????文件????????161??2019-07-22?22:10??AlmProject\app.config
?????文件???????2012??2015-07-05?20:08??AlmProject\Backup\SideNavSample.sln
?????文件?????270336??2019-07-27?00:03??AlmProject\bin\x86\Debug\Alam.mdb
?????文件?????237056??2019-07-27?01:29??AlmProject\bin\x86\Debug\Alm.exe
?????文件????????161??2019-07-22?22:10??AlmProject\bin\x86\Debug\Alm.exe.config
?????文件??????62976??2019-07-27?01:29??AlmProject\bin\x86\Debug\Alm.pdb
?????文件??????24224??2019-07-27?01:29??AlmProject\bin\x86\Debug\Alm.vshost.exe
?????文件????????161??2019-07-22?22:10??AlmProject\bin\x86\Debug\Alm.vshost.exe.config
?????文件????????490??2010-03-17?22:39??AlmProject\bin\x86\Debug\Alm.vshost.exe.manifest
?????文件?????561152??2015-10-06?22:27??AlmProject\bin\x86\Debug\DevComponents.DotNetBar.Schedule.dll
?????文件?????649653??2015-10-05?18:00??AlmProject\bin\x86\Debug\DevComponents.DotNetBar.Schedule.xm
?????文件????5472256??2015-10-06?22:27??AlmProject\bin\x86\Debug\DevComponents.DotNetBar2.dll
?????文件????3946407??2015-10-05?18:00??AlmProject\bin\x86\Debug\DevComponents.DotNetBar2.xm
?????文件????1328984??2010-03-18?19:31??AlmProject\bin\x86\Debug\System.Data.dll
?????文件?????599904??2010-03-18?19:31??AlmProject\bin\x86\Debug\System.Deployment.dll
?????文件?????919880??2010-03-18?19:31??AlmProject\bin\x86\Debug\System.dll
?????文件?????212824??2010-03-18?19:31??AlmProject\bin\x86\Debug\System.Drawing.dll
?????文件????1637736??2010-03-18?19:31??AlmProject\bin\x86\Debug\System.Windows.Forms.dll
?????文件?????941904??2010-03-18?19:31??AlmProject\bin\x86\Debug\System.xm
?????文件?????270399??2008-05-08?17:15??AlmProject\bin\x86\Debug\TcAdsDll.dll
?????文件?????401408??2017-07-07?13:11??AlmProject\bin\x86\Debug\TwinCAT.Ads.dll
?????文件????????161??2019-07-22?22:10??AlmProject\bin\x86\Release\Alm.exe.config
?????文件??????24224??2019-07-27?00:19??AlmProject\bin\x86\Release\Alm.vshost.exe
?????文件????????161??2019-07-22?22:10??AlmProject\bin\x86\Release\Alm.vshost.exe.config
?????文件????????490??2010-03-17?22:39??AlmProject\bin\x86\Release\Alm.vshost.exe.manifest
............此處省略70個文件信息
評論
共有 條評論