示例#1
0
        public void Paste(string moves)
        {
            Flags.IsExamineMode = true;
            DataTable dt = UData.LoadDataTable(Notations.Game.Moves.DataTable.Clone(), moves);

            Paste(dt);
            Flags.IsExamineMode = false;
        }
示例#2
0
        public MoveLog(MoveComments moveComments)
        {
            Game = moveComments.Move.Game;

            DataTable = GetMoveLogTable();

            this.MoveComments = moveComments;

            UData.LoadDataTable(DataTable, this.MoveComments[MoveCommentTypeE.MoveLog]);
        }
示例#3
0
        private void ProcessData(string str, UserSession us)
        {
            if (UData.IsValidXml(str))
            {
                DataTable dt = UData.LoadDataTable(UData.LoadXsdText(str), str);

                Kv kv = new Kv(dt);

                Ap.MsgQueue.Enqueue(kv);
            }
        }
示例#4
0
 public void Load(string kvXml)
 {
     if (String.IsNullOrEmpty(kvXml))
     {
         CreateKv();
     }
     else
     {
         DataTable = UData.LoadDataTable(kvXml, kvXml);
     }
 }
示例#5
0
        public void Union(string moves)
        {
            if (moves == "")
            {
                return;
            }

            DataTable dt = UData.LoadDataTable(Notations.Game.Moves.DataTable.Clone(), moves);

            AddMoves(dt);
        }
示例#6
0
        public static DataTable GetDataTable(DataTable table, string key)
        {
            try
            {
                string s = Get(table, key);

                return(UData.LoadDataTable(s));
            }
            catch
            {
                return(null);
            }
        }
示例#7
0
        public static DataTable LoadDataTable5(string xmlPath)
        {
            DataTable table = null;

            try
            {
                if (UFile.Exists(xmlPath))
                {
                    string content = InfinityStreamsManager.ReadFromFile(xmlPath);

                    table = UData.LoadDataTable(content, content);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(table);
        }
示例#8
0
        public void Union(string moves)
        {
            if (moves == "")
            {
                return;
            }

            DataTable dt = UData.LoadDataTable(Notations.Game.Moves.DataTable.Clone(), moves);

            if (dt.Rows.Count != 1)
            {
                return;
            }

            Move m = new Move(dt.Rows[0]);

            m.Game = this;

            AddMove(m.From, m.To, m.Piece, m.Fen, m, true);

            //MoveTo(MoveToE.Last);

            DoEngineMoveIfNeeded();
        }
示例#9
0
        public Moves(string movesDataTable)
        {
            DataTable = GetMovesTable();

            UData.LoadDataTable(DataTable, movesDataTable);
        }
示例#10
0
 public static DataTable UnzipDataTable(string xsd, string dt)
 {
     return(UData.LoadDataTable(xsd, UZip.Unzip(dt)));
 }
示例#11
0
 public void LoadXml(string dt)
 {
     UData.LoadDataTable(this.DataTable, UZip.Unzip(dt));
 }
示例#12
0
        public void Paste(string moves)
        {
            DataTable dt = UData.LoadDataTable(Notations.Game.Moves.DataTable.Clone(), moves);

            Paste(dt);
        }