Merge branch 'master' of http://gitblit.broconcentric.com:8088/r/M071
| | |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.Device.GTSCard", "src\Bro.Device.GTSCard\Bro.Device.GTSCard.csproj", "{B536003E-70BA-4701-B8FD-BAFA303AB4E2}" |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.M071.Process.DBManager", "src\Bro.M071.Process.DBManager\Bro.M071.Process.DBManager.csproj", "{230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}" |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.M071.DBManager", "src\Bro.M071.Process.DBManager\Bro.M071.DBManager.csproj", "{230B0FFF-F6AF-45FE-AAF7-B4B66250DD58}" |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.M071.Process.Model", "src\Bro.M071.Process.Model\Bro.M071.Process.Model.csproj", "{AD645C48-5811-4B1E-B81F-D35D5E6B577F}" |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.M071.Model", "src\Bro.M071.Process.Model\Bro.M071.Model.csproj", "{AD645C48-5811-4B1E-B81F-D35D5E6B577F}" |
| | | EndProject |
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bro.Process.DataBase", "src\Bro.Process.DBManager\Bro.Process.DataBase.csproj", "{65302D6E-9918-4E4C-92B4-75C8830C6BA7}" |
| | | EndProject |
| | |
| | | using Bro.Common.Base; |
| | | using Bro.Common.Interface; |
| | | using Bro.Common.Model; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | |
| | | namespace Bro.Device.GTSCard |
| | | { |
| | | public class GTSCardDriver : DeviceBase, IMotion |
| | | public class GTSCardDriver : DeviceBase,IMonitor, IMotion |
| | | { |
| | | public event Action<DateTime, string, IDevice, MonitorSet> OnMonitorInvoke; |
| | | public event Action<DateTime, IDevice, WarningSet> OnMonitorAlarm; |
| | | |
| | | public List<AxisInfo> GetCurrentAxisInfo(params string[] axisName) |
| | | { |
| | | throw new NotImplementedException(); |
| | |
| | | } |
| | | |
| | | static object lockObj = new object(); |
| | | |
| | | |
| | | /// <summary> |
| | | /// 读取当前值 |
| | |
| | | else return false; //运行中返回false |
| | | } |
| | | } |
| | | |
| | | public void Monitor() |
| | | { |
| | | throw new NotImplementedException(); |
| | | } |
| | | |
| | | public void ResetAlarm() |
| | | { |
| | | throw new NotImplementedException(); |
| | | } |
| | | } |
| | | } |
File was renamed from src/Bro.M071.Process.DBManager/Bro.M071.Process.DBManager.csproj |
| | |
| | | <Project>{987308DD-8BAA-463A-94E2-77D62E01A5BF}</Project> |
| | | <Name>Bro.Common.Device</Name> |
| | | </ProjectReference> |
| | | <ProjectReference Include="..\Bro.M071.Process.Model\Bro.M071.Process.Model.csproj"> |
| | | <ProjectReference Include="..\Bro.M071.Process.Model\Bro.M071.Model.csproj"> |
| | | <Project>{AD645C48-5811-4B1E-B81F-D35D5E6B577F}</Project> |
| | | <Name>Bro.M071.Process.Model</Name> |
| | | <Name>Bro.M071.Model</Name> |
| | | </ProjectReference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | |
| | | //using System.Text; |
| | | //using System.Threading.Tasks; |
| | | |
| | | //namespace Bro.M071.Process.DBManager |
| | | //namespace Bro.M071.DBManager |
| | | //{ |
| | | // public class ProductionDetectionImageRecordsManager : ModelManager<ProductionDetectionImageRecords> |
| | | // { |
| | |
| | | //using System.Text; |
| | | //using System.Threading.Tasks; |
| | | |
| | | //namespace Bro.M071.Process.DBManager |
| | | //namespace Bro.M071.DBManager |
| | | //{ |
| | | // public class ProductionDetectionRecordsDetailManager : ModelManager<ProductionDetectionRecordsDetail> |
| | | // { |
| | |
| | | //using System.Text; |
| | | //using System.Threading.Tasks; |
| | | |
| | | //namespace Bro.M071.Process.DBManager |
| | | //namespace Bro.M071.DBManager |
| | | //{ |
| | | // public class ProductionDetectionRecordsManager : ModelManager<ProductionDetectionRecords> |
| | | // { |
| | |
| | | </entityFramework> |
| | | <connectionStrings> |
| | | <!--<add name="DBSet" connectionString="data source=(LocalDb)\MSSQLLocalDB;initial catalog=Bro.Process.Model.Model;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />--> |
| | | <!--<add name="DBModel" connectionString="data source=(LocalDb)\MSSQLLocalDB;initial catalog=Bro.Process.Model.DBModel;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />--> |
| | | <add name="DBModel" connectionString="data source=D:\PROJECTS\M071\DataBase\M071.db;BinaryGUID=False" providerName="System.Data.SQLite" /> |
| | | <!--<add name="DataBase" connectionString="data source=(LocalDb)\MSSQLLocalDB;initial catalog=Bro.Process.Model.DBModel;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />--> |
| | | <add name="DataBase" connectionString="data source=D:\PROJECTS\M071\DataBase\M071.db;BinaryGUID=False" providerName="System.Data.SQLite" /> |
| | | </connectionStrings> |
| | | <system.data> |
| | | <DbProviderFactories> |
| | |
| | | //using System.Text; |
| | | //using System.Threading.Tasks; |
| | | |
| | | //namespace Bro.M071.Process.Model |
| | | //namespace Bro.M071.Model |
| | | //{ |
| | | // public class BaseModel |
| | | // { |
| | |
| | | //using System.Data.Entity.ModelConfiguration.Conventions; |
| | | //using System.Linq; |
| | | |
| | | //namespace Bro.M071.Process.Model |
| | | //namespace Bro.M071.Model |
| | | //{ |
| | | // public class DBModel : DbContext |
| | | // { |
| | |
| | | // //如果您想要针对其他数据库和/或数据库提供程序,请在应用程序配置文件中修改“DBModel” |
| | | // //连接字符串。 |
| | | // public DBModel() |
| | | // : base("name=DBModel") |
| | | // : base("name=DataBase") |
| | | // { |
| | | // ////数据库迁移检查暂时放在构造函数中,回头会放到程序初始化中 |
| | | // //Database.SetInitializer(new MigrateDatabaseToLatestVersion<DBModel, Configuration>()); |
| | |
| | | //namespace Bro.M071.Process.Model.Migrations |
| | | //namespace Bro.M071.Model.Migrations |
| | | //{ |
| | | // using System; |
| | | // using System.Data.Entity; |
| | |
| | | //using System; |
| | | //using System.ComponentModel.DataAnnotations; |
| | | |
| | | //namespace Bro.M071.Process.Model.Model |
| | | //namespace Bro.M071.Model.Model |
| | | //{ |
| | | // /// <summary> |
| | | // /// 事件时间记录 |
| | |
| | | //using System.Text; |
| | | //using System.Threading.Tasks; |
| | | |
| | | //namespace Bro.M071.Process.Model.Model |
| | | //namespace Bro.M071.Model.Model |
| | | //{ |
| | | // public class ManualDetectionRecords : BaseModel, INotifyPropertyChanged |
| | | // { |
| | |
| | | //using System; |
| | | //using System.ComponentModel.DataAnnotations; |
| | | |
| | | //namespace Bro.M071.Process.Model.Model |
| | | //namespace Bro.M071.Model.Model |
| | | //{ |
| | | // public class OperationRecords : BaseModel |
| | | // { |
| | |
| | | <Project>{987308DD-8BAA-463A-94E2-77D62E01A5BF}</Project> |
| | | <Name>Bro.Common.Device</Name> |
| | | </ProjectReference> |
| | | <ProjectReference Include="..\Bro.M071.Process.Model\Bro.M071.Process.Model.csproj"> |
| | | <ProjectReference Include="..\Bro.M071.Process.Model\Bro.M071.Model.csproj"> |
| | | <Project>{AD645C48-5811-4B1E-B81F-D35D5E6B577F}</Project> |
| | | <Name>Bro.M071.Process.Model</Name> |
| | | <Name>Bro.M071.Model</Name> |
| | | </ProjectReference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | |
| | | // //如果您想要针对其他数据库和/或数据库提供程序,请在应用程序配置文件中修改“DBModel” |
| | | // //连接字符串。 |
| | | // public DBModel() |
| | | // : base("name=DBModel") |
| | | // : base("name=DataBase") |
| | | // { |
| | | // ////数据库迁移检查暂时放在构造函数中,回头会放到程序初始化中 |
| | | // //Database.SetInitializer(new MigrateDatabaseToLatestVersion<DBModel, Configuration>()); |
| | |
| | | // public class ModelManager<T> where T : BaseModel, new() |
| | | // { |
| | | // private PropertyInfo TableProperty = null; |
| | | // public static string ConnectionString = ConfigurationManager.ConnectionStrings["DBModel"].ConnectionString; |
| | | // public static string ConnectionString = ConfigurationManager.ConnectionStrings["DataBase"].ConnectionString; |
| | | // public ModelManager() |
| | | // { |
| | | // T t = new T(); |
| | |
| | | public class SQLiteHelper |
| | | { |
| | | //数据库连接字符串 |
| | | public static string connectionString = ConfigurationManager.ConnectionStrings["DBModel"].ConnectionString; |
| | | public static string connectionString = ConfigurationManager.ConnectionStrings["DataBase"].ConnectionString; |
| | | |
| | | public SQLiteHelper() { } |
| | | |