<?xml version="1.0"?>

<configuration>

  <configSections>
    <section name="log4net"
             type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
    <section name="modules"
             type="Microsoft.Practices.Composite.Modularity.ModulesConfigurationSection, Microsoft.Practices.Composite" />
    <sectionGroup name="userSettings"
                  type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <section name="Supremacy.Client.Properties.Settings"
               type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
               allowExeDefinition="MachineToLocalUser"
               requirePermission="false" />
    </sectionGroup>
    <section name="loggingConfiguration"
             type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <section name="UpdaterConfiguration"
             type="Microsoft.ApplicationBlocks.Updater.Configuration.ApplicationUpdaterSettings, Microsoft.ApplicationBlocks.Updater" />
    <section name="securityCryptographyConfiguration"
             type="Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Configuration.CryptographySettings, Microsoft.Practices.EnterpriseLibrary.Security.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
  </configSections>

  <runtime>
    <gcConcurrent enabled="false" />
  </runtime>

  <system.net>
    <webRequestModules>
      <add prefix="vfs"
           type="Supremacy.VFS.VfsWebRequestFactory, SupremacyCore" />
    </webRequestModules>
  </system.net>

  <connectionStrings>
    <add name="Supremacy.Properties.Settings.TextDatabaseConnectionString"
         connectionString="Data Source=|DataDirectory|\Resources\Data\Text.sdf" />
    <add name="Supremacy.Properties.Settings.SupremacyDatabaseConnectionString"
         connectionString="Data Source=|DataDirectory|\Resources\Data\SupremacyDatabase.sdf" />
    <add name="Supremacy.Client.Properties.Settings.TextDatabaseConnectionString"
         connectionString="Data Source=|DataDirectory|\Resources\Data\TextDatabase.sdf"
         providerName="Microsoft.SqlServerCe.Client.3.5" />
  </connectionStrings>

  <system.serviceModel>
    <client>
      <endpoint contract="Supremacy.WCF.ISupremacyService"
                binding="netTcpBinding"
                bindingConfiguration="DuplexBinding"
                behaviorConfiguration="ClientDuplexBehavior" />
      <endpoint name="LocalEndpoint"
                address="net.pipe://localhost/SupremacyService/Local"
                contract="Supremacy.WCF.ISupremacyService"
                binding="netNamedPipeBinding"
                bindingConfiguration="NamedPipeBinding"
                behaviorConfiguration="ClientDuplexBehavior" />
    </client>

    <services>
      <service name="Supremacy.WCF.SupremacyService">
        <endpoint contract="Supremacy.WCF.ISupremacyService"
                  address="net.tcp://localhost:4455/SupremacyService"
                  binding="netTcpBinding"
                  bindingConfiguration="DuplexBinding"
                  behaviorConfiguration="ServerDuplexBehavior" />
        <endpoint name="LocalEndpoint"
                  address="net.pipe://localhost/SupremacyService/Local"
                  contract="Supremacy.WCF.ISupremacyService"
                  binding="netNamedPipeBinding"
                  bindingConfiguration="NamedPipeBinding"
                  behaviorConfiguration="ServerDuplexBehavior" />
      </service>
    </services>

    <bindings>
      <netNamedPipeBinding>
        <binding name="NamedPipeBinding"
                 closeTimeout="00:00:03"
                 openTimeout="00:00:15"
                 receiveTimeout="00:05:00"
                 sendTimeout="00:05:00"
                 transferMode="Buffered"
                 hostNameComparisonMode="StrongWildcard"
                 maxBufferPoolSize="524288"
                 maxBufferSize="134217728"
                 maxReceivedMessageSize="134217728">
          <readerQuotas maxDepth="134217728"
                        maxStringContentLength="134217728"
                        maxArrayLength="134217728"
                        maxBytesPerRead="134217728"
                        maxNameTableCharCount="134217728" />
          <security mode="None">
            <transport protectionLevel="None" />
          </security>
        </binding>
      </netNamedPipeBinding>
      <netTcpBinding>
        <binding name="DuplexBinding"
                 closeTimeout="00:00:03"
                 openTimeout="00:00:10"
                 receiveTimeout="00:05:00"
                 sendTimeout="00:05:00"
                 transactionFlow="false"
                 transferMode="Buffered"
                 transactionProtocol="OleTransactions"
                 hostNameComparisonMode="StrongWildcard"
                 listenBacklog="1024"
                 maxBufferPoolSize="524288"
                 maxBufferSize="134217728"
                 maxConnections="10"
                 maxReceivedMessageSize="134217728">
          <readerQuotas maxDepth="134217728"
                        maxStringContentLength="134217728"
                        maxArrayLength="134217728"
                        maxBytesPerRead="134217728"
                        maxNameTableCharCount="134217728" />
          <reliableSession ordered="true"
                           inactivityTimeout="01:00:00"
                           enabled="true" />
          <security mode="None">
            <transport clientCredentialType="None"
                       protectionLevel="None" />
          </security>
        </binding>
      </netTcpBinding>
    </bindings>

    <behaviors>
      <endpointBehaviors>
        <behavior name="ServerDuplexBehavior">
          <synchronousReceive />
        </behavior>
        <behavior name="ClientDuplexBehavior">
          <callbackTimeouts transactionTimeout="00:05:00" />
          <synchronousReceive />
        </behavior>
      </endpointBehaviors>
    </behaviors>

  </system.serviceModel>

  <userSettings>
    <Supremacy.Client.Properties.Settings>
      <setting name="FullScreenMode"
               serializeAs="String">
        <value>True</value>
      </setting>
      <setting name="MusicVolume"
               serializeAs="String">
        <value>1</value>
      </setting>
      <setting name="UseHighQualityScaling"
               serializeAs="String">
        <value>True</value>
      </setting>
      <setting name="UseAnimatedStars"
               serializeAs="String">
        <value>True</value>
      </setting>
      <setting name="WindowWidth"
               serializeAs="String">
        <value>1280</value>
      </setting>
      <setting name="WindowHeight"
               serializeAs="String">
        <value>768</value>
      </setting>
      <setting name="CheckForUpdatesOnStartup"
               serializeAs="String">
        <value>True</value>
      </setting>
      <setting name="EnableScreenTransitions"
               serializeAs="String">
        <value>False</value>
      </setting>
      <setting name="EnableDialogAnimations"
               serializeAs="String">
        <value>False</value>
      </setting>
    </Supremacy.Client.Properties.Settings>
  </userSettings>

  <!--<userSettings>
    <Supremacy.Client.Properties.Settings>
      <setting name="FullScreenMode" serializeAs="String">
        <value>False</value>
      </setting>
      <setting name="WindowWidth" serializeAs="String">
        <value>1440</value>
      </setting>
      <setting name="WindowHeight" serializeAs="String">
        <value>960</value>
      </setting>
      <setting name="MusicVolume" serializeAs="String">
        <value>1</value>
      </setting>
      <setting name="UseHighQualityScaling" serializeAs="String">
        <value>True</value>
      </setting>
      <setting name="UseAnimatedStars" serializeAs="String">
        <value>True</value>
      </setting>
    </Supremacy.Client.Properties.Settings>
  </userSettings>-->

  <!--<system.diagnostics>
    <sources>

      <source name="System.Windows.Data"
              switchName="SourceSwitch" >
        <listeners>
          <add name="console"/>
          <add name="textListener" />
        </listeners>
      </source>


      <source name="System.Windows.DependencyProperty"
              switchName="SourceSwitch" >
        <listeners>
          <add name="console" />
          <add name="textListener" />
        </listeners>
      </source>
      
      
      <source name="System.Windows.Freezable"
              switchName="SourceSwitch" >
        <listeners>
          <add name="console" />
          <add name="textListener" />
        </listeners>
      </source>


      <source name="System.Windows.RoutedEvent"
              switchName="SourceSwitch" >
        <listeners>
          <add name="console" />
          <add name="textListener" />
        </listeners>
      </source>


      <source name="System.Windows.Media.Animation"
              switchName="SourceSwitch" >
        <listeners>
          <add name="console" />
          <add name="textListener" />
        </listeners>
      </source>


      <source name="System.Windows.NameScope"
              switchName="SourceSwitch" >
        <listeners>
          <add name="console" />
          <add name="textListener" />
        </listeners>
      </source>


      <source name="System.Windows.ResourceDictionary"
              switchName="SourceSwitch" >
        <listeners>
          <add name="console" />
          <add name="textListener" />
        </listeners>
      </source>


      <source name="System.Windows.Markup"
              switchName="SourceSwitch" >
        <listeners>
          <add name="console" />
          <add name="textListener" />
        </listeners>
      </source>


      <source name="System.Windows.Documents"
              switchName="SourceSwitch" >
        <listeners>
          <add name="console" />
          <add name="textListener" />
        </listeners>
      </source>

    </sources>


    <switches>
      <add name="SourceSwitch"
           value="All" />
    </switches>

    <sharedListeners>
      <add name="console"
           type="System.Diagnostics.ConsoleTraceListener"
           initializeData="false"/>
      <add name="xmlListener"
           type="System.Diagnostics.XmlWriterTraceListener"
           traceOutputOptions="None"
           initializeData="AvTrace.xml" />
      <add name="textListener"
           type="System.Diagnostics.TextWriterTraceListener"
           initializeData="AvTrace.txt" />
    </sharedListeners>
    <trace autoflush="true"
           indentsize="4"></trace>
  </system.diagnostics>-->

  <loggingConfiguration name="Logging Application Block"
                        tracingEnabled="true"
                        defaultCategory=""
                        logWarningsWhenNoCategoriesMatch="true">
    <listeners>
      <add fileName="UpdaterLog.txt"
           header="----------------------------------------"
           footer="----------------------------------------"
           formatter="Text Formatter"
           listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
           traceOutputOptions="None"
           type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
           name="FlatFile TraceListener" />
    </listeners>
    <formatters>
      <add template="Timestamp: {timestamp}&#xD;&#xA;           Message: {message}&#xD;&#xA;           Category: {category}&#xD;&#xA;           Priority: {priority}"
           type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
           name="Text Formatter" />
    </formatters>
    <specialSources>
      <allEvents switchValue="All"
                 name="All Events">
        <listeners>
          <add name="FlatFile TraceListener" />
        </listeners>
      </allEvents>
      <notProcessed switchValue="All"
                    name="Unprocessed Category" />
      <errors switchValue="All"
              name="Logging Errors and Warnings" />
    </specialSources>
  </loggingConfiguration>
  <UpdaterConfiguration defaultDownloader="HTTPDownloader"
                        applicationId="StarTrekSupremacy"
                        manifestUri="http://www.startreksupremacy.com/Repository/manifests.xml">
    <downloaders>
      <add name="HTTPDownloader"
           type="Katersoft.HttpDownloader.HttpDownloader, HttpDownloader"
           downloadBufferSize="512"
           downloadProgressMaximumFrequency="100" />
      <!--<add name="BITS" type="Microsoft.ApplicationBlocks.Updater.Downloaders.BitsDownloader, Microsoft.ApplicationBlocks.Updater.Downloaders"
        authenticationScheme="BG_AUTH_SCHEME_NTLM"
        targetServerType="BG_AUTH_TARGET_SERVER" />-->
    </downloaders>
  </UpdaterConfiguration>
  <securityCryptographyConfiguration>
    <hashProviders>
      <add algorithmType="System.Security.Cryptography.MD5CryptoServiceProvider, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
           saltEnabled="true"
           type="Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.HashAlgorithmProvider, Microsoft.Practices.EnterpriseLibrary.Security.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
           name="MD5CryptoServiceProvider" />
    </hashProviders>
  </securityCryptographyConfiguration>

  <modules>
    <!--
    <module moduleName="Supremacy.Updater.UpdaterModule" moduleType="Supremacy.Updater.UpdaterModule, SupremacyUpdater" assemblyFile="SupremacyUpdater.dll" startupLoaded="true">
      <dependencies>
        <dependency moduleName="Supremacy.Client.ClientModule"/>
      </dependencies>
    </module>
-->
  </modules>

  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"
                      sku=".NETFramework,Version=v4.0" />
  </startup>

</configuration>