Пример #1
0
 public override bool LoadCreateItemInfo(string MemberID, IList <LogData.CreateItemInfo> createItemLog,
                                         LogDownloadCompleted finishCallback)
 {
     _jobq.Add(new GSpread.Job.CreateIfNotExistSheet(MemberID, _wrapper));
     _jobq.Add(new GSpread.Job.LoadCreateItemEntry(MemberID, _wrapper, createItemLog, finishCallback));
     return(true);
 }
Пример #2
0
 public override bool LoadMissionResult(string MemberID, IList <LogData.MissionResultInfo> missionLog,
                                        LogDownloadCompleted finishCallback)
 {
     _jobq.Add(new GSpread.Job.CreateIfNotExistSheet(MemberID, _wrapper));
     _jobq.Add(new GSpread.Job.LoadMissionResultEntry(MemberID, _wrapper, missionLog, finishCallback));
     return(true);
 }
Пример #3
0
        public override bool LoadBattleResult(string MemberID, IList <LogData.BattleResultInfo> battleLog,
                                              LogDownloadCompleted finishCallback)
        {
            string file = GetFilePath(MemberID, battlelog_filename);

            if (file == null)
            {
                finishCallback(false);
                return(false);
            }

            if (!File.Exists(file))
            {
                finishCallback(false);
                return(false);
            }

            using (TextFieldParser parser = new TextFieldParser(file,
                                                                System.Text.Encoding.UTF8))
            {
                parser.TextFieldType = FieldType.Delimited;
                parser.SetDelimiters(",");

                lock (((ICollection)battleLog).SyncRoot)
                {
                    while (!parser.EndOfData)
                    {
                        string[] row  = parser.ReadFields();
                        var      info = new LogData.BattleResultInfo(row);
                        info.Number   = battleLog.Count + 1;
                        info.MemberID = MemberID;
                        battleLog.Add(info);
                    }
                }
            }

            finishCallback(true);
            return(true);
        }
Пример #4
0
 public override bool LoadCreateItemInfo(string MemberID, IList<LogData.CreateItemInfo> createItemLog,
     LogDownloadCompleted finishCallback)
 {
     _jobq.Add(new GSpread.Job.CreateIfNotExistSheet(MemberID, _wrapper));
     _jobq.Add(new GSpread.Job.LoadCreateItemEntry(MemberID, _wrapper, createItemLog, finishCallback));
     return true;
 }
Пример #5
0
 public virtual bool LoadMaterialChange(string MemberID, IList<LogData.MaterialChangeInfo> materialsLog,
     MaterialDataLoadPostProcess postCallback, LogDownloadCompleted finishCallback)
     { finishCallback(true); return true; }
Пример #6
0
 public virtual bool LoadMissionResult(string MemberID, IList<LogData.MissionResultInfo> missionLog,
     LogDownloadCompleted finishCallback) { finishCallback(true); return true; }
Пример #7
0
 public virtual bool LoadBattleResult(string MemberID, IList<LogData.BattleResultInfo> battleLog,
     LogDownloadCompleted finishCallback) { finishCallback(true); return true; }
Пример #8
0
 public virtual bool LoadCreateItemInfo(string MemberID, IList<LogData.CreateItemInfo> createItemLog,
     LogDownloadCompleted finishCallback) { finishCallback(true); return true; }
Пример #9
0
        public override bool LoadMaterialChange(string MemberID, IList<LogData.MaterialChangeInfo> materialsLog,
            MaterialDataLoadPostProcess postCallback, LogDownloadCompleted finishCallback)
        {
            string file = GetFilePath(MemberID, material_filename);
            if (file == null)
            {
                finishCallback(false);
                return false;
            }

            if (!File.Exists(file))
            {
                finishCallback(false);
                return false;
            }

            using (TextFieldParser parser = new TextFieldParser(file,
                System.Text.Encoding.UTF8))
            {
                parser.TextFieldType = FieldType.Delimited;
                parser.SetDelimiters(",");

                lock (((ICollection)materialsLog).SyncRoot)
                {
                    while (!parser.EndOfData)
                    {
                        string[] row = parser.ReadFields();
                        var info = new LogData.MaterialChangeInfo(row);
                        if (materialsLog.Count > 0)
                            info.PrevItem = materialsLog.Last();
                        info.Number = materialsLog.Count + 1;
                        info.MemberID = MemberID;
                        materialsLog.Add(info);
                        postCallback(info);
                    }
                }
            }
            finishCallback(true);
            return true;
        }
Пример #10
0
        public override bool LoadMaterialChange(string MemberID, IList <LogData.MaterialChangeInfo> materialsLog,
                                                MaterialDataLoadPostProcess postCallback, LogDownloadCompleted finishCallback)
        {
            string file = GetFilePath(MemberID, material_filename);

            if (file == null)
            {
                finishCallback(false);
                return(false);
            }

            if (!File.Exists(file))
            {
                finishCallback(false);
                return(false);
            }

            using (TextFieldParser parser = new TextFieldParser(file,
                                                                System.Text.Encoding.UTF8))
            {
                parser.TextFieldType = FieldType.Delimited;
                parser.SetDelimiters(",");

                lock (((ICollection)materialsLog).SyncRoot)
                {
                    while (!parser.EndOfData)
                    {
                        string[] row  = parser.ReadFields();
                        var      info = new LogData.MaterialChangeInfo(row);
                        if (materialsLog.Count > 0)
                        {
                            info.PrevItem = materialsLog.Last();
                        }
                        info.Number   = materialsLog.Count + 1;
                        info.MemberID = MemberID;
                        materialsLog.Add(info);
                        postCallback(info);
                    }
                }
            }
            finishCallback(true);
            return(true);
        }
Пример #11
0
 public virtual bool LoadMaterialChange(string MemberID, IList <LogData.MaterialChangeInfo> materialsLog,
                                        MaterialDataLoadPostProcess postCallback, LogDownloadCompleted finishCallback)
 {
     finishCallback(true); return(true);
 }
Пример #12
0
 public override bool LoadMaterialChange(string MemberID, IList <LogData.MaterialChangeInfo> materialsLog,
                                         MaterialDataLoadPostProcess postCallback, LogDownloadCompleted finishCallback)
 {
     _jobq.Add(new GSpread.Job.CreateIfNotExistSheet(MemberID, _wrapper));
     _jobq.Add(new GSpread.Job.LoadMaterialChangeEntry(MemberID, _wrapper, materialsLog, postCallback,
                                                       finishCallback));
     return(true);
 }
Пример #13
0
 public virtual bool LoadMissionResult(string MemberID, IList <LogData.MissionResultInfo> missionLog,
                                       LogDownloadCompleted finishCallback)
 {
     finishCallback(true); return(true);
 }
Пример #14
0
 public virtual bool LoadBattleResult(string MemberID, IList <LogData.BattleResultInfo> battleLog,
                                      LogDownloadCompleted finishCallback)
 {
     finishCallback(true); return(true);
 }
Пример #15
0
 public virtual bool LoadCreateItemInfo(string MemberID, IList <LogData.CreateItemInfo> createItemLog,
                                        LogDownloadCompleted finishCallback)
 {
     finishCallback(true); return(true);
 }
Пример #16
0
 public override bool LoadMissionResult(string MemberID, IList<LogData.MissionResultInfo> missionLog,
     LogDownloadCompleted finishCallback)
 {
     _jobq.Add(new GSpread.Job.CreateIfNotExistSheet(MemberID, _wrapper));
     _jobq.Add(new GSpread.Job.LoadMissionResultEntry(MemberID, _wrapper, missionLog, finishCallback));
     return true;
 }
Пример #17
0
 public override bool LoadMaterialChange(string MemberID, IList<LogData.MaterialChangeInfo> materialsLog,
     MaterialDataLoadPostProcess postCallback, LogDownloadCompleted finishCallback)
 {
     _jobq.Add(new GSpread.Job.CreateIfNotExistSheet(MemberID, _wrapper));
     _jobq.Add(new GSpread.Job.LoadMaterialChangeEntry(MemberID, _wrapper, materialsLog, postCallback,
         finishCallback));
     return true;
 }
Пример #18
0
        public override bool LoadMissionResult(string MemberID, IList<LogData.MissionResultInfo> missionLog,
            LogDownloadCompleted finishCallback)
        {
            string file = GetFilePath(MemberID, mission_filename);
            if (file == null)
            {
                finishCallback(false);
                return false;
            }

            if (!File.Exists(file))
            {
                finishCallback(false);
                return false;
            }

            using (TextFieldParser parser = new TextFieldParser(file,
                System.Text.Encoding.UTF8))
            {
                parser.TextFieldType = FieldType.Delimited;
                parser.SetDelimiters(",");

                lock (((ICollection)missionLog).SyncRoot)
                {
                    while (!parser.EndOfData)
                    {
                        string[] row = parser.ReadFields();
                        var info = new LogData.MissionResultInfo(row);
                        info.Number = missionLog.Count + 1;
                        info.MemberID = MemberID;
                        missionLog.Add(info);
                    }
                }
            }
            finishCallback(true);
            return true;
        }