<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="log4net" type="System.Configuration.IgnoreSectionHandler"/>
    <section name="Database" type="SimbaCameraScale.Common.Config.ConfigSectionDatabase, SimbaCameraScale"/>
    <section name="OpOrgs" type="SimbaCameraScale.Common.Config.ConfigSectionOpOrg, SimbaCameraScale"/>
    <section name="FrameClients" type="SimbaCameraScale.Common.Config.ConfigSectionFrameClient, SimbaCameraScale"/>
  </configSections>
  <!--App程序设置 必须在Log配置之前-->
  <appSettings>
    <add key="logo" value="欣巴快速条码扫描秤"/>
    <add key="company" value="上海欣巴自动化科技有限公司"/>
    <add key="website" value="http://localhost/"/>
    <add key="version" value="V1.1.0.0"/>
    <add key="release" value="2015.12.01"/>
    <add key="phone" value="(86)15692136386"/>

    <!--127.0.0.1-->
    <add key="CameraServerLocalIp" value="127.0.0.1"/>
    <add key="CameraServerLocalPort" value="9990"/>
    <add key="CameraServerThreadStrategy" value="multi"/>

    <add key="ScaleClientRemoteIp" value="127.0.0.1"/>
    <add key="ScaleClientRemotePort" value="8683"/>
    <add key="HttpServicePort" value="8681"/>
    <add key="PlatID" value="3"/>

    <add key="ScaleSerialPortName" value="COM1"/>
    <add key="ScaleSerialBaudRate" value="9600"/>
    <add key="ScaleSerialDataBit" value="8"/>
    <add key="ScaleSerialStopBit" value="1"/>

    <add key="FtpPath" value="ftp://127.0.0.1/"/>
    <add key="PicBasePath" value="D:\testdirectory\"/>
    <add key="FtpUser" value="qianlicao"/>
    <add key="FtpPwd" value="chobits"/>

    <add key="LogLevel" value="3"/>
    <add key="SuccessVoiceFileName" value="success.wav"/>
    <add key="FailedVoiceFileName" value="failed.wav"/>
    <add key="TonghangVoiceName" value="tonghang.wav"/>
    <add key="LockVoiceName" value="lock.wav"/>
    <add key="UnbindVoiceName" value="unbind.wav"/>
    <add key="TimeTick" value="3000"/>
    <add key="UseLog4Net" value="false"/>
    <add key="UserType" value="sto"/>
    <add key="Test" value="false"/>
    <add key="ScanType" value="receive"/>
    <add key="ShowPic" value="false"/>
    <add key="UploadNoInfoImg" value="false"/>
    <add key="AutoUploadPic" value="true"/>
    <add key="OverWeight" value="6"/>
    <add key="WeightCare" value="false"/>
    <add key="AdjustWeight" value="false"/>
    <add key="SubmitTime" value="10"/>
    <add key="WebServiceHost" value="127.0.0.1"/>
    <add key="ClientSettingsProvider.ServiceUri" value=""/>
    <add key="DiskName" value="D"/>
  </appSettings>
  <!--Database config 相关配置  0F-F6-3D-E5-E5-4B-E2-E9;Pwd=03-BA-E3-72-11-F2-05-98 -->
  <Database>
    <Mysql ConnectionStrCamera="Server=127.0.0.1;Database=simba-camera-scale;Uid=root;Pwd=123456;Charset=utf8" Provider="MySql.Data.MySqlClient"/>
    <SQLServer ConnectionStrPost="Data Source=127.0.0.1;Initial Catalog=SimbaCustomPost;User Id=sa;Password=123456;Timeout=200;" Provider="System.Data.SqlClient"/>
    <Oracle ConnectionString="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.207.1.29) (PORT=1521)))(CONNECT_DATA=(SERVICE_NAME= orcl)));User Id=simba; Password=simba" Provider="System.Data.OracleClient"/>
  </Database>


  <OpOrgs>
    <!-- <OpOrg SerVerIP="http://192.168.122.170:2227/receive/" OpOrgId="XBSW00000000001" OpOrgCode="900000"/>-->
   <OpOrg SerVerIP="http://222.72.44.130:2227/receive/" OpOrgId="123460000000584" OpOrgCode="900000"/>
    <!--<OpOrg SerVerIP="http://pda.sto.cn:2228/receive/" OpOrgId="FJNDZDFJ3521001" OpOrgCode="352100"/>-->
  </OpOrgs>

  <!--FrameClients config 相关配置-->
  <FrameClients>
    <FrameClient Id="FrameClient-1" IP="127.0.0.1" Port="10001" ParserName="LenHeader"/>
    <FrameClient Id="FrameClient-2" IP="127.0.0.1" Port="10002" ParserName="LenHeader"/>
    <FrameClient Id="FrameClient-3" IP="127.0.0.1" Port="10003" ParserName="LenHeader"/>
    <FrameClient Id="FrameClient-4" IP="127.0.0.1" Port="10004" ParserName="LenHeader"/>
  </FrameClients>

  <!--log4net相关设置-->
  <log4net>
    <dependentAssembly>
      <assemblyIdentity name="log4net" AutoGenerateBindingRedirects="false" publicKeyToken="669e0ddf0bb1aa2a" Culture="neutral"/>
      <bindingRedirect oldVersion="1.2.11.0" newVersion="1.2.13.0"/>
    </dependentAssembly>
    <root>
      <level value="DEBUG"/>
      <appender-ref ref="LogFileAppender"/>
      <!--<appender-ref ref="LogSqliteAppender"/>-->
    </root>
    <appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender">
      <param name="File" value=".\\logs\\logfile.log"/>
      <param name="AppendToFile" value="true"/>
      <param name="RollingStyle" value="Date"/>
      <DatePattern value=".yyyyMMdd"/>
      <StaticLogFileName value="true"/>
      <layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="[%d] %m%n"/>
      </layout>
      <filter type="log4net.Filter.LevelRangeFilter">
        <param name="levelMin" value="DEBUG"/>
        <param name="levelMax" value="FATAL"/>
      </filter>
    </appender>
    <appender name="LogSqliteAppender" type="log4net.Appender.AdoNetAppender">
      <bufferSize value="1"/>
      <connectionType value="System.Data.SQLite.SQLiteConnection,System.Data.SQLite, Version=1.0.66.0, Culture=neutral"/>
      <connectionString value="Data Source=logsqlite.s3db;"/>
      <commandText value="INSERT INTO Log (Date, Level, Logger,Source, Message) VALUES (@Date, @Level, @Logger, @Source, @Message)"/>
      <commandType value="Text"/>
      <parameter>
        <parameterName value="@Date"/>
        <dbType value="DateTime"/>
        <layout type="log4net.Layout.RawTimeStampLayout"/>
      </parameter>
      <parameter>
        <parameterName value="@Level"/>
        <dbType value="String"/>
        <layout type="log4net.Layout.PatternLayout">
          <conversionPattern value="%level"/>
        </layout>
      </parameter>
      <parameter>
        <parameterName value="@Logger"/>
        <dbType value="String"/>
        <layout type="log4net.Layout.PatternLayout">
          <conversionPattern value="%logger"/>
        </layout>
      </parameter>
      <parameter>
        <parameterName value="@Source"/>
        <dbType value="String"/>
        <layout type="log4net.Layout.PatternLayout">
          <conversionPattern value="%fiel:%line"/>
        </layout>
      </parameter>
      <parameter>
        <parameterName value="@Message"/>
        <dbType value="String"/>
        <layout type="log4net.Layout.PatternLayout">
          <conversionPattern value="%message"/>
        </layout>
      </parameter>
      <filter type="log4net.Filter.LevelRangeFilter">
        <param name="levelMin" value="DEBUG"/>
        <param name="levelMax" value="FATAL"/>
      </filter>
    </appender>
  </log4net>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
  </startup>
  <system.web>
    <membership defaultProvider="ClientAuthenticationMembershipProvider">
      <providers>
        <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri=""/>
      </providers>
    </membership>
    <roleManager defaultProvider="ClientRoleProvider" enabled="true">
      <providers>
        <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400"/>
      </providers>
    </roleManager>
  </system.web>
  <system.serviceModel>
    <bindings/>
    <client/>
  </system.serviceModel>
</configuration>
