/* ******************************************************** */
            //! Create "Cell-Map Change"-Table (1 Cell-Map)

            /*!
             * @param	InstanceCellMap
             *      Original "Cell-Map"
             * @param	IndexTexture
             *      Index of Texture (in the Material-Table)
             * @retval	Return-Value
             *      Created "Cell-Map Change"-Table (1 Cell-Map)<br>
             *      null == Failure
             *
             * Create the "Cell-Map Change"-Table on the basis of the original "Cell-Map" information.<br>
             * Caution: The result is referencing data in original "Cell-Map".
             */
            public static Library_SpriteStudio.Control.CellChange[] CellMapCreate(Library_SpriteStudio.Data.CellMap InstanceCellMap, int IndexTexture)
            {
                Library_SpriteStudio.Control.CellChange[] Rv = null;
                if (null != InstanceCellMap)
                {
                    Library_SpriteStudio.Data.Cell DataCell = null;
                    if (null != InstanceCellMap.ListCell)
                    {
                        int Count = InstanceCellMap.ListCell.Length;
                        Rv = new Library_SpriteStudio.Control.CellChange[Count];
                        if (null != Rv)
                        {
                            for (int i = 0; i < Count; i++)
                            {
                                DataCell = InstanceCellMap.ListCell[i];
                                if (null == DataCell)
                                {                                       /* Invalid */
                                    Rv[i].CleanUp();
                                }
                                else
                                {
                                    Rv[i].DataSet(IndexTexture, InstanceCellMap, DataCell);
                                }
                            }
                        }
                    }
                    else
                    {                           /* Has no Cells */
                        Rv = new Library_SpriteStudio.Control.CellChange[0];
                    }
                }
                return(Rv);
            }
            /* ******************************************************** */
            //! Set Cell's data

            /*!
             * @param	InstanceTableCellChange
             *      "Cell-Map Change"-Table
             * @param	IndexCellMap
             *      Index of "Cell-Map"
             * @param	IndexCell
             *      Index of Cell in "Cell-Map"
             * @param	IndexTexture
             *      Index of Texture (in Material-Table)
             * @param	InstanceCellMap
             *      "Cell-Map" Data
             * @param	InstanceCell
             *      Cell Data
             * @retval	Return-Value
             *      true == "Output" is valid<br>
             *      false == "Output" is invalid
             *
             * Set cell data in "Cell-Map Change"-Table.<br>
             * Caution: "InstanceCellMap" and "InstanceCell" are referenced.
             */
            public static bool CellSet(Library_SpriteStudio.Control.CellChange[][] InstanceTableCellChange,
                                       int IndexCellMap,
                                       int IndexCell,
                                       int IndexTexture,
                                       Library_SpriteStudio.Data.CellMap InstanceCellMap,
                                       Library_SpriteStudio.Data.Cell InstanceCell
                                       )
            {
                if (false == TableCheckValidIndex(InstanceTableCellChange, IndexCellMap, IndexCell))
                {
                    return(false);
                }

                InstanceTableCellChange[IndexCellMap][IndexCell].DataSet(IndexTexture, InstanceCellMap, InstanceCell);
                return(true);
            }
            /* ******************************************************** */
            //! Full-Copy "Cell-Map Change"-Table (1 Cell-Map)

            /*!
             * @param	InstanceCellMap
             *      Original "Cell-Map"
             * @param	IndexTexture
             *      Index of Texture (in the Material-Table)
             * @retval	Return-Value
             *      Created "Cell-Map Change"-Table (1 Cell-Map)<br>
             *      null == Failure
             *
             * Create the "Cell-Map Change"-Table on the basis of the original "Cell-Map" information.<br>
             * Caution: The result is another instance from original "Cell-Map"s.
             */
            public static Library_SpriteStudio.Control.CellChange[] CellMapCopyFull(Library_SpriteStudio.Data.CellMap InstanceCellMap, int IndexTexture)
            {
                Library_SpriteStudio.Control.CellChange[] Rv = null;
                if (null != InstanceCellMap)
                {
                    Library_SpriteStudio.Data.Cell DataCell = null;
                    if (null != InstanceCellMap.ListCell)
                    {
                        Library_SpriteStudio.Data.CellMap DataCellMapNew = null;
                        Library_SpriteStudio.Data.Cell    DataCellNew    = null;
                        int Count = InstanceCellMap.ListCell.Length;
                        Rv = new Library_SpriteStudio.Control.CellChange[Count];
                        if (null != Rv)
                        {
                            for (int i = 0; i < Count; i++)
                            {
                                DataCell = InstanceCellMap.ListCell[i];
                                if (null == DataCell)
                                {                                       /* Invalid */
                                    Rv[i].CleanUp();
                                }
                                else
                                {
                                    DataCellMapNew = new Library_SpriteStudio.Data.CellMap();
                                    DataCellMapNew.Duplicate(InstanceCellMap);
                                    DataCellMapNew.ListCell = null;                                     /* Dis-Use */

                                    DataCellNew = new Library_SpriteStudio.Data.Cell();
                                    DataCellNew.Duplicate(DataCell);

                                    Rv[i].DataSet(IndexTexture, DataCellMapNew, DataCellNew);
                                }
                            }
                        }
                    }
                    else
                    {                           /* Has no Cells */
                        Rv = new Library_SpriteStudio.Control.CellChange[0];
                    }
                }
                return(Rv);
            }
            /* ******************************************************** */
            //! Set Cell's data

            /*!
             * @param	InstanceTableCellChange
             *      "Cell-Map Change"-Table
             * @param	IndexCellMap
             *      Index of "Cell-Map"
             * @param	IndexCell
             *      Index of Cell in "Cell-Map"
             * @param	IndexTexture
             *      Index of Texture (in Material-Table)
             * @param	InstanceCellMap
             *      "Cell-Map" Data
             * @param	InstanceCell
             *      Cell Data
             * @retval	Return-Value
             *      true == "Output" is valid<br>
             *      false == "Output" is invalid
             *
             * Set cell data in "Cell-Map Change"-Table.<br>
             * Caution: Cell data is not referencing "InstanceCellMap" and "InstanceCell".
             */
            public static bool CellSetFull(Library_SpriteStudio.Control.CellChange[][] InstanceTableCellChange,
                                           int IndexCellMap,
                                           int IndexCell,
                                           int IndexTexture,
                                           Library_SpriteStudio.Data.CellMap InstanceCellMap,
                                           Library_SpriteStudio.Data.Cell InstanceCell
                                           )
            {
                if (false == TableCheckValidIndex(InstanceTableCellChange, IndexCellMap, IndexCell))
                {
                    return(false);
                }

                Library_SpriteStudio.Data.CellMap InstanceCellMapNew = new Library_SpriteStudio.Data.CellMap();
                InstanceCellMapNew.Duplicate(InstanceCellMap);
                InstanceCellMapNew.ListCell = null;                     /* Dis-Use */

                Library_SpriteStudio.Data.Cell InstanceCellNew = new Library_SpriteStudio.Data.Cell();
                InstanceCellNew.Duplicate(InstanceCell);

                InstanceTableCellChange[IndexCellMap][IndexCell].DataSet(IndexTexture, InstanceCellMapNew, InstanceCellNew);
                return(true);
            }