public GameSettings() { try { m_lDBCon = new SQL.DBConnector(Program.DBCon.ConfigData, true); //Load DisplaySettings from AppData LoadDisplaySettings(); //Load AppConfig AppConfigGlobal = LoadAppConfig("AppConfig.xml", false); AppConfigLocal = LoadAppConfig("AppConfigLocal.xml", true); //Set up some filewatchers, If user changes config its reflected here WatcherDisplaySettings(); WatcherAppDataSettings(); //Currently disabled as we only check Verbose logging and that cant be changed from the game // not more necessary since E:D 2.2 (journal) //if((AppConfigGlobal.Network.VerboseLogging != 1) && ((AppConfigLocal == null) || (AppConfigLocal.Network.VerboseLogging != 1))) //{ // //Check and Request for Verbose Logging // AppConfigLocal = CheckAndRequestVerboseLogging("AppConfigLocal.xml", AppConfigLocal); //} } catch (Exception ex) { throw new Exception("Error while creating the object", ex); } }
public DataRetriever(SQL.DBConnector DBCon, string tableName, String DataStatement) { MySqlConnection connection = (MySqlConnection)DBCon.Connection; command = connection.CreateCommand(); this.tableName = tableName; this.DataStatement = DataStatement; }
/// <summary> /// constructor for the DataRetriever (used for loading and caching data in DGV VirtualMode) /// </summary> /// <param name="DBCon">used DBConnector</param> /// <param name="m_BaseTableName">name of the table with the base structure</param> /// <param name="m_DataStatement">sql-statement for loading the data</param> /// <param name="SortByColumn">column for sorting (must be existingClassification in the base table (m_BaseTableName) and in the 'DataStement')</param> /// <param name="SortOrder">sort oder</param> /// <param name="SortOrder">optional blueprint for typed tables</param> public DataRetriever(SQL.DBConnector DBCon, string BaseTableName, String DataStatement, String SortByColumn, DBConnector.SQLSortOrder SortOrder, DataTable TypeTable = null) { m_Command = ((MySqlConnection)DBCon.Connection).CreateCommand(); m_BaseTableName = BaseTableName; m_DataStatement = DataStatement; m_ColumnToSortBy = SortByColumn; m_ColumnSortOrder = SortOrder; m_PrimaryKey = DBCon.getPrimaryKey(this.m_BaseTableName); m_TableType = TypeTable; m_DBCon = DBCon; if(this.m_PrimaryKey.Count != 1) throw new Exception("Length of primary key is not '1' (table '" + BaseTableName + "')"); m_MemoryCache = new DataRetrieverCache(this, 50); }
/// <summary> /// constructor for the DataRetriever (used for loading and caching data in DGV VirtualMode) /// </summary> /// <param name="DBCon">used DBConnector</param> /// <param name="m_BaseTableName">name of the table with the base structure</param> /// <param name="m_DataStatement">sql-statement for loading the data</param> /// <param name="SortByColumn">column for sorting (must be existingClassification in the base table (m_BaseTableName) and in the 'DataStement')</param> /// <param name="SortOrder">sort oder</param> /// <param name="SortOrder">optional blueprint for typed tables</param> public DataRetriever(SQL.DBConnector DBCon, string BaseTableName, string columnStatement, String baseStatement, String SortByColumn, DBConnector.SQLSortOrder SortOrder, System.Windows.Forms.BindingNavigator bindingNavigator, DataTable TypeTable = null) { m_Command = ((MySqlConnection)DBCon.Connection).CreateCommand(); m_BaseTableName = BaseTableName; m_ColumnStatement = columnStatement; m_BaseStatement = baseStatement; m_ColumnToSortBy = SortByColumn; m_ColumnSortOrder = SortOrder; m_PrimaryKey = DBCon.getPrimaryKey(this.m_BaseTableName); m_TableType = TypeTable; m_DBCon = DBCon; m_BindingNavigator = bindingNavigator; if (this.m_PrimaryKey.Count != 1) { throw new Exception("Length of primary key is not '1' (table '" + BaseTableName + "')"); } m_MemoryCache = new DataRetrieverCache(this, 50); }
public VirtualJustInTimeDemo(SQL.DBConnector DBCon) { m_DBCon = DBCon; }
public EDDNCommunicator() { m_lDBCon = new SQL.DBConnector(Program.DBCon.ConfigData, true); m_Reciever = new Dictionary<String, EDDNReciever>(); _SendDelayTimer_Market = new System.Timers.Timer(2000); _SendDelayTimer_Market.AutoReset = false; _SendDelayTimer_Market.Elapsed += new System.Timers.ElapsedEventHandler(this.SendDelayTimerMarket_Elapsed); _SendDelayTimer_Commodity = new System.Timers.Timer(2000); _SendDelayTimer_Commodity.AutoReset = false; _SendDelayTimer_Commodity.Elapsed += new System.Timers.ElapsedEventHandler(this.SendDelayTimerCommodity_Elapsed); _SendDelayTimer_Outfitting = new System.Timers.Timer(2000); _SendDelayTimer_Outfitting.AutoReset = false; _SendDelayTimer_Outfitting.Elapsed += new System.Timers.ElapsedEventHandler(this.SendDelayTimerOutfitting_Elapsed); _SendDelayTimer_Shipyard = new System.Timers.Timer(2000); _SendDelayTimer_Shipyard.AutoReset = false; _SendDelayTimer_Shipyard.Elapsed += new System.Timers.ElapsedEventHandler(this.SendDelayTimerShipyard_Elapsed); _SendDelayTimer_Journal = new System.Timers.Timer(2000); _SendDelayTimer_Journal.AutoReset = false; _SendDelayTimer_Journal.Elapsed += new System.Timers.ElapsedEventHandler(this.SendDelayTimerJournal_Elapsed); _logger = new SingleThreadLogger(ThreadLoggerType.EddnSubscriber); m_RejectedData = new List<String>(); m_RawData = new List<String>(); UserIdentification(); }