资源简介
1.简单的C#组态软件,
2.实现自画控件,BUTTON ,SET ,RST ,ON_OFF, INVERT ,
3.实现,自定义协议
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Threading;
using FreeSCADA.Common;
using FreeSCADA.Interfaces;
namespace FreeSCADA.Archiver
{
public class ArchiverMain
{
ChannelsSettings channelSettings = new ChannelsSettings();
DatabaseSettings databaseSettings = new DatabaseSettings();
DbWriter dbWriter;
DbReader dbReader;
Thread channelUpdaterThread;
#region Initialization and singleton implementation
static ArchiverMain instance;
public static void Initialize()
{
if (instance == null)
instance = new ArchiverMain();
}
public static void Deinitialize()
{
instance = null;
}
public static ArchiverMain Current
{
get
{
if (instance == null)
throw new System.NullReferenceException();
return instance;
}
}
ArchiverMain()
{
Env.Current.Project.ProjectLoaded += new System.EventHandler(OnProjectLoaded);
Env.Current.Project.ProjectClosed += new System.EventHandler(OnProjectClosed);
OnProjectLoaded(Env.Current.Project new System.EventArgs());
if (Env.Current.Mode == EnvironmentMode.Designer)
{
ICommandContext context = Env.Current.Commands.GetPredefinedContext(PredefinedContexts.Project);
Env.Current.Commands.AddCommand(context new PropertyCommand());
}
}
#endregion
void OnProjectClosed(object sender System.EventArgs e)
{
channelSettings.Clear();
}
void OnProjectLoaded(object sender System.EventArgs e)
{
databaseSettings.Load();
channelSettings.Load();
}
public ChannelsSettings ChannelsSettings
{
get
{
return channelSettings;
}
}
public DatabaseSettings DatabaseSettings
{
get
{
return databaseSettings;
}
}
public bool IsRunning
{
get { return channelUpdaterThread != null; }
}
private static void ChannelUpdaterThreadProc(object obj)
{
ArchiverMain self = (ArchiverMain)obj;
try
{
for (; ; )
{
//System.Console.WriteLine(“{0} ChannelUpdaterThreadProc: Start loop“ System.DateTime.Now);
foreach (Rule rule in self.channelSettings.Rules)
{
if (rule.Enable)
{
foreach (baseCondition cond in rule.Conditions)
cond.Process();
if (rule.Archive)
self.dbWriter.WriteChannels(rule.Channels);
}
}
Thread.Sleep(100);
}
}
catch (ThreadAbortException)
{
}
if (self.dbWriter != null)
self.dbWriter.Close();
}
public bool Start()
{
dbWriter = new DbWriter();
if (dbWriter.Open() == false)
return false;
channelUpdaterThread = new Thread(new ParameterizedThreadStart(ChannelUpdaterThreadProc));
channelUpdaterThread.Start(this);
dbReader = new DbReader();
if (dbReader.Open() == false)
return false;
return IsRunn
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
....... 1822720 2010-10-28 00:52 1234\3rdParty\#SNMP\Browser.exe
....... 6544 2010-10-28 00:52 1234\3rdParty\#SNMP\Browser.exe.config
....... 1724416 2010-10-28 00:52 1234\3rdParty\#SNMP\Compiler.exe
....... 4678 2010-10-28 00:52 1234\3rdParty\#SNMP\Compiler.exe.config
....... 61440 2010-10-28 00:52 1234\3rdParty\#SNMP\Crad.Windows.Forms.Actions.dll
....... 1985871 2010-10-28 00:38 1234\3rdParty\#SNMP\Help\Documentation.chm
....... 1274 2010-10-28 00:38 1234\3rdParty\#SNMP\Help\Documentation.HxC
....... 1390312 2010-10-28 00:38 1234\3rdParty\#SNMP\Help\Documentation.HxS
....... 246 2010-10-28 00:38 1234\3rdParty\#SNMP\Help\Documentation.HxT
....... 120 2010-10-28 00:38 1234\3rdParty\#SNMP\Help\Documentation_A.HxK
....... 120 2010-10-28 00:38 1234\3rdParty\#SNMP\Help\Documentation_B.HxK
....... 120 2010-10-28 00:38 1234\3rdParty\#SNMP\Help\Documentation_F.HxK
....... 156 2010-10-28 00:38 1234\3rdParty\#SNMP\Help\Documentation_K.HxK
....... 132 2010-10-28 00:38 1234\3rdParty\#SNMP\Help\Documentation_NamedURLIndex.HxK
....... 120 2010-10-28 00:38 1234\3rdParty\#SNMP\Help\Documentation_S.HxK
....... 190464 2010-10-28 00:38 1234\3rdParty\#SNMP\Help\H2Reg.exe
....... 1600 2010-10-28 00:38 1234\3rdParty\#SNMP\Help\H2Reg.ini
....... 5520 2010-10-28 00:38 1234\3rdParty\#SNMP\Help\H2Reg_Log.txt
....... 76680 2010-10-28 00:52 1234\3rdParty\#SNMP\Microsoft.Practices.ob
....... 52104 2010-10-28 00:52 1234\3rdParty\#SNMP\Microsoft.Practices.Unity.Configuration.dll
....... 76680 2010-10-28 00:52 1234\3rdParty\#SNMP\Microsoft.Practices.Unity.dll
....... 57 2010-10-28 00:52 1234\3rdParty\#SNMP\modules\index
....... 14 2010-10-28 00:52 1234\3rdParty\#SNMP\modules\SNMPV2-CONF.module
....... 5606 2010-10-28 00:52 1234\3rdParty\#SNMP\modules\SNMPV2-MIB.module
....... 1119 2010-10-28 00:52 1234\3rdParty\#SNMP\modules\SNMPV2-SMI.module
....... 14 2010-10-28 00:52 1234\3rdParty\#SNMP\modules\SNMPV2-TC.module
....... 667 2010-10-28 00:52 1234\3rdParty\#SNMP\modules\SNMPV2-TM.module
....... 90112 2010-10-28 00:52 1234\3rdParty\#SNMP\sharpsnmplib.cf35.dll
....... 306688 2010-10-28 00:52 1234\3rdParty\#SNMP\sharpsnmplib.cf35.pdb
....... 40960 2010-10-28 00:52 1234\3rdParty\#SNMP\SharpSnmpLib.Controls.dll
............此处省略1579个文件信息
相关资源
- C# 调用win32 api函数-user32.dll详细说明
- C# 调用BarTender打印条码DEMO
- 大型比赛竞赛抽签系统 可打印 c# vs
- C#编写的Gerber查看器
- lua C# .Net4.0 vs2010 LuaInterface
- C#十六进制编辑器
- 明华URF-35H读卡器 C#读写源码 为大家
- C#文件流读取CSV文件
- c#读写PDF文件sql
- C# winform Socket大文件传输
- c#车牌识别系统附30张测试图片
- 《C#面向对象程序设计》源代码(CS)
- 金旭亮《C#面向对象程序设计》教案
- 试题库管理系统毕业论文(C#)源程序
- 学校网站原代码(C#.NET)
- C#-数据库操作技术-员工管理系统
- c#web开发入门经典
- C#与Matlab混合编程的几种方式
- c# 开发与 mysql数据库实现的增删改查
- C#异步操作 异步查询数据库 异步处理
- Basler相机通过IO触发源码
- [源代码] 《领域驱动设计 (C# 2008 实
- 松下PLC与C#通讯串口调试入门教程.z
- USB 继电器控制器 LCUS-1 保证能用 c#
- C# AES加密解密小工具
- C#圆形按钮,非常漂亮动态~~
- [精]C#仿QQ右下角弹出提示框()
- C#进程间通信-共享内存代码
- 有史以来最简单的三层(C#)
- vb调用c#编写的串口DLL文件(vb源码
评论
共有 条评论