Exemplo n.º 1
0
        private void LoadRecallCoordinates()
        {
            RecallCoordinates = new Dictionary <string, RecallCoordinate>();
            if (!File.Exists(folder + @"\RecallCoordinates.txt"))
            {
                Log.WriteLine(LogLevel.Warn, "Could not find RecallCoordinates.txt, return scrolls won't work.");
                return;
            }

            using (var data = new ShineReader(folder + @"\RecallCoordinates.txt"))
            {
                var recallData = data["RecallPoint"];

                using (var reader = new DataTableReaderEx(recallData))
                {
                    while (reader.Read())
                    {
                        var rc = RecallCoordinate.Load(reader);
                        RecallCoordinates.Add(rc.ItemIndex, rc);
                    }
                }

                Log.WriteLine(LogLevel.Info, "Loaded {0} recall coordinates.", RecallCoordinates.Count);
            }
        }
Exemplo n.º 2
0
        private void LoadRecallCoordinates()
        {
            RecallCoordinates = new Dictionary <string, RecallCoordinate>();
            DataTable RecallData = null;

            using (DatabaseClient dbClient = Program.DatabaseManager.GetClient())
            {
                RecallData = dbClient.ReadDataTable("SELECT  *FROM recall");
            }
            if (RecallData != null)
            {
                foreach (DataRow row in RecallData.Rows)
                {
                    var rc = RecallCoordinate.Load(row);
                    RecallCoordinates.Add(rc.ItemIndex, rc);
                }
            }
            Log.WriteLine(LogLevel.Info, "Loaded {0} recall coordinates.", RecallCoordinates.Count);
        }