コード例 #1
0
ファイル: AttackEditorWindow.cs プロジェクト: uyamae/Pzldm
        private void Awake()
        {
            setting          = Resources.Load <AttackEditorSetting>("AttackEditorSetting");
            playFieldSetting = new RowCol()
            {
                ColumnsCount     = 6,
                RowsCount        = 15,
                PatternRowsCount = 10,
            };
            //playFieldSetting = AssetDatabase.LoadAssetAtPath<PlayFieldSetting>("Assets/Scenes/Battle/Scripts/Setting.asset");

            tamaSprites = new Texture2D[4];
            tamaSprites[(int)ColorType.Red]    = AssetDatabase.LoadAssetAtPath <Texture2D>("Assets/Scenes/Battle/Datas/s01.png");
            tamaSprites[(int)ColorType.Blue]   = AssetDatabase.LoadAssetAtPath <Texture2D>("Assets/Scenes/Battle/Datas/s02.png");
            tamaSprites[(int)ColorType.Green]  = AssetDatabase.LoadAssetAtPath <Texture2D>("Assets/Scenes/Battle/Datas/s03.png");
            tamaSprites[(int)ColorType.Yellow] = AssetDatabase.LoadAssetAtPath <Texture2D>("Assets/Scenes/Battle/Datas/s04.png");

            preset = Resources.Load <AttackPatternPreset>("AttackPatternPreset");
            if (preset != null)
            {
                presetNames = new string[preset.presets.Length];
                for (int i = 0; i < preset.presets.Length; ++i)
                {
                    presetNames[i] = preset.presets[i].CharacterName;
                }
            }

            dropPattern = new ColorType[RowsCount, ColumnsCount];
        }
コード例 #2
0
        public RowCol RowColForXY(Vector2 localPos)
        {
            RowCol v = new RowCol()
            {
                col = (int)MathF.Floor(localPos.X / colSpacing),
                row = (int)MathF.Floor(localPos.Y / rowSpacing)
            };

            if (v.col < 0)
            {
                v.col = 0;
            }
            if (v.col >= cols)
            {
                v.col = cols - 1;
            }
            if (v.row < 0)
            {
                v.row = 0;
            }
            if (v.row >= rows)
            {
                v.row = rows - 1;
            }
            return(v);
        }
コード例 #3
0
        public RowCol FindAdjacentEmptyCell(BattleshipBoard board)
        {
            RowCol AdjacentEmptyCell;

            bool IsAdjacentEmpty()
            {
                return(AdjacentEmptyCell.IsValid() && board.findPossibleTarget(AdjacentEmptyCell));
            }

            AdjacentEmptyCell = new RowCol(Row + 1, Col);
            if (IsAdjacentEmpty())
            {
                return(AdjacentEmptyCell);
            }

            AdjacentEmptyCell = new RowCol(Row, Col + 1);
            if (IsAdjacentEmpty())
            {
                return(AdjacentEmptyCell);
            }

            AdjacentEmptyCell = new RowCol(Row - 1, Col);
            if (IsAdjacentEmpty())
            {
                return(AdjacentEmptyCell);
            }

            AdjacentEmptyCell = new RowCol(Row, Col - 1);
            if (IsAdjacentEmpty())
            {
                return(AdjacentEmptyCell);
            }

            return(new RowCol(-1, -1));
        }
コード例 #4
0
        public LocateObjectData LocateObject(object obj, ObjectStyle style, int locateOptions)
        {
            LocateObjectData result = default(LocateObjectData);

            if (style == ObjectStyle.TrackingObject)
            {
                RowCol rowCol = (RowCol)obj;
                result.Row     = rowCol.Row;
                result.Column  = rowCol.Col;
                result.Options = 1;
            }
            else
            {
                if (style == ObjectStyle.ExpandedBranch)
                {
                    OperationParameterTree parameterTreeAdapter  = (OperationParameterTree)obj;
                    OperationParameterTree parameterTreeAdapter2 = parameterTreeAdapter.m_Parent;
                    result.Row = -1;
                    for (int i = 0; i < parameterTreeAdapter2.m_Children.Length; i++)
                    {
                        if (parameterTreeAdapter2.m_Children[i] == parameterTreeAdapter)
                        {
                            result.Row = i;
                        }
                    }

                    result.Column  = 0;
                    result.Options = result.Row == m_RelativeRow ? 0 : 1;
                }
            }
            return(result);
        }
            private void CheckValue(int columnIndex, int rowIndex, object value)
            {
                RowCol rowCol = new RowCol(columnIndex, rowIndex);

                // is the new value an Image, and can it be animated?
                Image newImage        = value as Image;
                bool  newValueIsImage = (newImage != null && ImageAnimator.CanAnimate(newImage));

                // is there a previous image value?
                Image oldImage;

                if (_values.TryGetValue(rowCol, out oldImage))
                {
                    if (newImage == oldImage)
                    {
                        // same old image --> nothing else to do
                        return;
                    }

                    RemoveImage(rowCol, oldImage);
                }

                if (newValueIsImage)
                {
                    AddImage(rowCol, newImage);
                }
            }
コード例 #6
0
ファイル: TreeSystem.cs プロジェクト: TimPungr/ContractKiller
    void Start()
    {
        /*
         * if (!m_UsedCamera)
         *  m_UsedCamera = Camera.main;
         */

        for (int i = 0; i < m_ManagedTerrains.Length; i++)
        {
            TreeSystemTerrain terrain = m_ManagedTerrains[i];

            if (terrain.m_ManagedTerrain != null)
            {
                terrain.m_ManagedTerrain.drawTreesAndFoliage = false;
            }

            terrain.m_CellsStructured = new TreeSystemStructuredTrees[terrain.m_CellCount, terrain.m_CellCount];

            CullingGroup cullingGroup = new CullingGroup();

            BoundingSphere[] bounds = new BoundingSphere[terrain.m_Cells.Length];

            for (int j = 0; j < terrain.m_Cells.Length; j++)
            {
                // TODO: maybe allocate dinamically at runtime based on cell visibility to save memory
                terrain.m_Cells[j].m_InstanceData = new TreeSystemLODInstance[terrain.m_Cells[j].m_Instances.Length];

                // TODO: structure cell data

                // Create the culling group data
                bounds[j] = new BoundingSphere(terrain.m_Cells[j].m_BoundsSphere.m_CenterRadius);

                // Structure cell data
                RowCol pos = terrain.m_Cells[j].m_Position;
                terrain.m_CellsStructured[pos.m_Row, pos.m_Col] = terrain.m_Cells[j];
            }

            if (!m_Settings.m_UsedCamera)
            {
                cullingGroup.targetCamera = Camera.main;
            }
            else
            {
                cullingGroup.targetCamera = m_Settings.m_UsedCamera;
            }

            cullingGroup.SetBoundingSpheres(bounds);
            cullingGroup.SetBoundingSphereCount(bounds.Length);

            // Save the bounds just in case we might need them
            terrain.m_CullingGroupSpheres = bounds;
            terrain.m_CullingGroup        = cullingGroup;
        }

        if (m_Settings.m_ApplyTreeColliders)
        {
            SetApplyColliders(true);
        }
    }
コード例 #7
0
        public void OverridesDefaultTupleItemsWithRowCol()
        {
            var tuple = new RowCol(1, 2);

            Assert.AreEqual(1, tuple.Row);
            Assert.AreEqual(1, tuple.Item1);
            Assert.AreEqual(2, tuple.Col);
            Assert.AreEqual(2, tuple.Item2);
        }
コード例 #8
0
    public bool IsSameCell(RowCol other)
    {
        if (m_Row != other.m_Row || m_Col != other.m_Col)
        {
            return(false);
        }

        return(true);
    }
コード例 #9
0
ファイル: Playing.cs プロジェクト: isoundy000/chess_client
    void OnMouseDown()
    {
        if (!game.IsMyTurn())
        {
            return;
        }
        Debug.Log("!!!!!!  OnMouseDown ismyturn====>" + game.IsMyTurn().ToString());
        RowCol rowCol = GetRowCol(Input.mousePosition);

        // 选中的是自己的子
        if (game.IsMyCM(rowCol.row, rowCol.col))
        {
            selected_me.row = rowCol.row;
            selected_me.col = rowCol.col;
            is_selected     = true;
            show_selector(selected_me_obj, selected_me.row, selected_me.col);
            click_ogg.Play();
            Debug.Log(String.Format("select {0} {1}", rowCol.row, rowCol.col));
            return;
        }
        if (!is_selected)
        {
            return;
        }
        if (selected_me.row == 0)
        {
            return;
        }

        // 选了子,检查能不能走
        if (!game.CanMove(selected_me.row, selected_me.col, rowCol.row, rowCol.col))
        {
            return;
        }

        Table.MoveReq req = new Table.MoveReq();
        req.move      = new Table.Move();
        req.move.srow = selected_me.row;
        req.move.scol = selected_me.col;
        req.move.drow = rowCol.row;
        req.move.dcol = rowCol.col;

        if (game.is_red == false)
        {
            req.move.srow = 11 - req.move.srow;
            req.move.drow = 11 - req.move.drow;
            req.move.scol = 10 - req.move.scol;
            req.move.dcol = 10 - req.move.dcol;
        }
        Debug.Log(String.Format("move src{0} {1} dst{2} {3}", req.move.srow, req.move.scol, req.move.drow, req.move.dcol));
        network.WriteMsg("Table.MoveReq", req);
        //发送之后置空不是必然嘛。
        selected_me.row = 0;
        selected_me.col = 0;
        //应该等同步消息接收完成之后在转换方式
        //game.ChangeMyTurn ();
    }
                public bool Equals(RowCol other)
                {
                    if (other == null)
                    {
                        return(false);
                    }

                    return(other.Column == Column && other.Row == Row);
                }
コード例 #11
0
 private void OnFrameChanged(object o, EventArgs e)
 {
     // invalidate each cell in which it's being used
     RowCol[] rcs = new RowCol[_cells.Count];
     _cells.CopyTo(rcs);
     foreach (RowCol rc in rcs)
     {
         DataGridView.InvalidateCell(rc.Column, rc.Row);
     }
 }
コード例 #12
0
 public void StartInput()
 {
     inputStartPos = display.GetCursor();
     ClearSelection();
     display.ShowCursor();
     inputBuf     = "";
     inputIndex   = 0;
     inInputMode  = true;
     historyIndex = history.Count;
     //if (onInputChanged != null) onInputChanged.Invoke(inputBuf);
 }
コード例 #13
0
 void SetSelection(RowCol startPos, RowCol endPos)
 {
     if (hasSelection)
     {
         InvertRange(selStart, selEnd);
     }
     selStart = startPos;
     selEnd   = endPos;
     InvertRange(startPos, endPos);
     hasSelection = true;
 }
コード例 #14
0
ファイル: GridTests.cs プロジェクト: Babblesort/GameOfLife
        public void GridCanDeriveNeighborsForCell(RowCol cell, RowCol[] neighbors)
        {
            var grid = new Grid(3, 3);

            Assert.AreEqual(neighbors[0], grid.NeighborTL(cell));
            Assert.AreEqual(neighbors[1], grid.NeighborTT(cell));
            Assert.AreEqual(neighbors[2], grid.NeighborTR(cell));
            Assert.AreEqual(neighbors[3], grid.NeighborLL(cell));
            Assert.AreEqual(neighbors[4], grid.NeighborRR(cell));
            Assert.AreEqual(neighbors[5], grid.NeighborBL(cell));
            Assert.AreEqual(neighbors[6], grid.NeighborBB(cell));
            Assert.AreEqual(neighbors[7], grid.NeighborBR(cell));
        }
コード例 #15
0
    private void onClick(BaseEventData arg0)
    {
        if (!game.IsMyTurn())
        {
            return;
        }
        PointerEventData e = arg0 as PointerEventData;

        Debug.Log(String.Format("click {0}", e.position));

        RowCol rowCol = GetRowCol(e.position);

        if (rowCol.row <= 0 || rowCol.row > 10 || rowCol.col <= 0 || rowCol.col > 9)
        {
            return;
        }

        // 选中的是自己的子
        if (game.IsMyCM(rowCol.row, rowCol.col))
        {
            select_1.transform.localPosition = GetPos(rowCol.row, rowCol.col);
            select_1.SetActive(true);
            select_2.SetActive(false);
            selected_me = rowCol;
            //click_ogg.Play ();
            Debug.Log(String.Format("select {0} {1}", rowCol.row, rowCol.col));
            return;
        }

        if (selected_me.row == 0)
        {
            return;
        }

        // 选了子,检查能不能走
        if (!game.CanMove(selected_me.row, selected_me.col, rowCol.row, rowCol.col))
        {
            return;
        }

        Table.MoveReq req = new Table.MoveReq();
        req.move        = new Table.Move();
        req.move.srow   = selected_me.row;
        req.move.scol   = selected_me.col;
        req.move.drow   = rowCol.row;
        req.move.dcol   = rowCol.col;
        selected_me.row = 0;

        Debug.Log(String.Format("move src{0} {1} dst{2} {3}", req.move.srow, req.move.scol, req.move.drow, req.move.dcol));
        network.WriteMsg("Table.MoveReq", req);
    }
コード例 #16
0
        public void HasLiveCellsProperty()
        {
            var generation = new Generation();

            Assert.IsFalse(generation.HasLiveCells);

            var cell = new RowCol(0, 0);

            generation.Add(cell, false);
            Assert.IsFalse(generation.HasLiveCells);

            generation[cell] = true;
            Assert.IsTrue(generation.HasLiveCells);
        }
コード例 #17
0
        public static int NeighborsCount(RowCol cell, Grid grid, Generation cells)
        {
            var count = 0;

            count += LiveCellAtLocation(grid.NeighborTL(cell), cells);
            count += LiveCellAtLocation(grid.NeighborTT(cell), cells);
            count += LiveCellAtLocation(grid.NeighborTR(cell), cells);
            count += LiveCellAtLocation(grid.NeighborLL(cell), cells);
            count += LiveCellAtLocation(grid.NeighborRR(cell), cells);
            count += LiveCellAtLocation(grid.NeighborBL(cell), cells);
            count += LiveCellAtLocation(grid.NeighborBB(cell), cells);
            count += LiveCellAtLocation(grid.NeighborBR(cell), cells);
            return(count);
        }
            private void AddImage(RowCol rowCol, Image image)
            {
                _values[rowCol] = image;

                AnimatedImage animatedImage;

                if (!_animatedImages.TryGetValue(image, out animatedImage))
                {
                    animatedImage          = new AnimatedImage(image, _dataGridView);
                    _animatedImages[image] = animatedImage;
                }

                animatedImage.AddCell(rowCol);
            }
                public void RemoveCell(RowCol rowCol)
                {
                    Debug.Assert(_cells.Contains(rowCol));

                    if (_cells.Contains(rowCol))
                    {
                        _cells.Remove(rowCol);

                        if (_cells.Count == 0)
                        {
                            // this was the last cell we were using this image, so stop animation
                            ImageAnimator.StopAnimate(Image, new EventHandler(OnFrameChanged));
                        }
                    }
                }
コード例 #20
0
        void ClearAutocomplete()
        {
            if (string.IsNullOrEmpty(curSuggestion))
            {
                return;
            }
            RowCol pos = display.GetCursor();

            for (int i = 0; i < curSuggestion.Length; i++)
            {
                display.Put(' ');
            }
            curSuggestion = null;
            display.SetCursor(pos);
        }
                public void AddCell(RowCol rowCol)
                {
                    Debug.Assert(!_cells.Contains(rowCol));

                    if (!_cells.Contains(rowCol))
                    {
                        _cells.Add(rowCol);

                        if (_cells.Count == 1)
                        {
                            // this is the first cell we are using this image, so start animation
                            ImageAnimator.Animate(Image, new EventHandler(OnFrameChanged));
                        }
                    }
                }
コード例 #22
0
    void OnMouseDown()
    {
        if (!game.IsMyTurn())
        {
            return;
        }

        RowCol rowCol = GetRowCol(Input.mousePosition);

        // 选中的是自己的子
        if (game.IsMyCM(rowCol.row, rowCol.col))
        {
            selected_me.row = rowCol.row;
            selected_me.col = rowCol.col;
            show_selector(selected_me_obj, selected_me.row, selected_me.col);
            click_ogg.Play();
            Debug.Log(String.Format("select {0} {1}", rowCol.row, rowCol.col));
            return;
        }

        if (selected_me.row == 0)
        {
            return;
        }

        // 选了子,检查能不能走
        if (!game.CanMove(selected_me.row, selected_me.col, rowCol.row, rowCol.col))
        {
            return;
        }

        Table.MoveReq req = new Table.MoveReq();
        req.move      = new Table.Move();
        req.move.srow = selected_me.row;
        req.move.scol = selected_me.col;
        req.move.drow = rowCol.row;
        req.move.dcol = rowCol.col;

        if (game.is_red == false)
        {
            req.move.srow = 11 - req.move.srow;
            req.move.drow = 11 - req.move.drow;
            req.move.scol = 10 - req.move.scol;
            req.move.dcol = 10 - req.move.dcol;
        }
        Debug.Log(String.Format("move src{0} {1} dst{2} {3}", req.move.srow, req.move.scol, req.move.drow, req.move.dcol));
        network.WriteMsg("Table.MoveReq", req);
    }
                public override bool Equals(object obj)
                {
                    if (obj == null)
                    {
                        return(false);
                    }

                    RowCol other = obj as RowCol;

                    if (other == null)
                    {
                        return(false);
                    }

                    return(other.Column == Column && other.Row == Row);
                }
コード例 #24
0
    void OnMouseDown()
    {
        if (!game.IsMyTurn())
        {
            return;
        }

        RowCol rowCol = GetRowCol(Input.mousePosition);

        // 选中的是自己的子
        if (game.IsMyCM(rowCol.row, rowCol.col))
        {
            selected_me.row = rowCol.row;
            selected_me.col = rowCol.col;
            selected_me_obj.transform.SetPositionAndRotation(GetPos(rowCol.row, rowCol.col), Quaternion.identity);
            click_ogg.Play();
            Debug.Log(String.Format("select {0} {1}", rowCol.row, rowCol.col));
            return;
        }

        if (selected_me.row == 0)
        {
            return;
        }

        // 选了子,检查能不能走
        if (!game.CanMove(selected_me.row, selected_me.col, rowCol.row, rowCol.col))
        {
            return;
        }

        Table.MoveReq req = new Table.MoveReq();
        req.move      = new Table.Move();
        req.move.srow = selected_me.row;
        req.move.scol = selected_me.col;
        req.move.drow = rowCol.row;
        req.move.dcol = rowCol.col;

        if (game.is_red == false)
        {
            Debug.Log("move notify not red");
            req.move.srow = 11 - req.move.srow;
            req.move.drow = 11 - req.move.drow;
        }

        network.WriteMsg("Table.MoveReq", req);
    }
コード例 #25
0
        string GetTextInRange(RowCol startPos, RowCol endPos)
        {
            if (startPos.row < endPos.row || (startPos.row == endPos.row && startPos.col > endPos.col))
            {
                var temp = startPos;
                startPos = endPos;
                endPos   = temp;
            }
            RowCol pos    = startPos;
            var    result = new System.Text.StringBuilder();

            System.Text.StringBuilder pendingSpaces = null;
            while (pos != endPos && pos.row >= 0)
            {
                var cell = display.Get(pos.row, pos.col);
                if (cell == null || cell.character == ' ')
                {
                    // got a space: don't append this to our result just yet
                    if (pendingSpaces == null)
                    {
                        pendingSpaces = new System.Text.StringBuilder();
                    }
                    pendingSpaces.Append(" ");
                }
                else
                {
                    // not a space; append any pending spaces, and then this character.
                    if (pendingSpaces != null)
                    {
                        result.Append(pendingSpaces.ToString());
                    }
                    result.Append(cell.character.ToString());
                    pendingSpaces = null;
                }
                pos.col++;
                if (pos.col >= display.cols)
                {
                    pos.col = 0;
                    pos.row--;
                    result.Append(System.Environment.NewLine);
                    pendingSpaces = null;
                }
            }
            return(result.ToString());
        }
            private void RemoveImage(RowCol rowCol, Image image)
            {
                Debug.Assert(_values.ContainsKey(rowCol));
                Debug.Assert(_animatedImages.ContainsKey(image));

                _values.Remove(rowCol);

                AnimatedImage animatedImage;

                if (_animatedImages.TryGetValue(image, out animatedImage))
                {
                    animatedImage.RemoveCell(rowCol);
                    if (!animatedImage.IsUsed)
                    {
                        _animatedImages.Remove(image);
                    }
                }
            }
コード例 #27
0
        public void SetupExpiringResolver()
        {
            // OOO
            // OXO
            // OOO
            grid       = new Grid(3, 3);
            cell0      = new RowCol(0, 0);
            cell1      = new RowCol(0, 1);
            cell2      = new RowCol(0, 2);
            cell3      = new RowCol(1, 0);
            cell4      = new RowCol(1, 1);
            cell5      = new RowCol(1, 2);
            cell6      = new RowCol(2, 0);
            cell7      = new RowCol(2, 1);
            cell8      = new RowCol(2, 2);
            generation = new Generation
            {
                { cell0, false },
                { cell1, false },
                { cell2, false },
                { cell3, false },
                { cell4, true },
                { cell5, false },
                { cell6, false },
                { cell7, false },
                { cell8, false }
            };

            expectedNextGen = new Generation
            {
                { cell0, false },
                { cell1, false },
                { cell2, false },
                { cell3, false },
                { cell4, false },
                { cell5, false },
                { cell6, false },
                { cell7, false },
                { cell8, false }
            };
        }
コード例 #28
0
        private void btnSelectAll_Click(object sender, EventArgs e)
        {
            try
            {
                if (_currentBenMAPRollback != null)
                {
                    int           icount   = 0;
                    List <RowCol> lstExist = new List <RowCol>();
                    foreach (BenMAPRollback br in _monitorRollbackLine.BenMAPRollbacks)
                    {
                        if (br.SelectRegions != null)
                        {
                            icount += br.SelectRegions.Count;
                            lstExist.AddRange(br.SelectRegions);
                        }
                    }
                    List <string> lstString = lstExist.Select(p => p.Col + "," + p.Row).ToList();
                    if ((mainMap.Layers[0] as IFeatureLayer).DataSet.DataTable.Rows.Count == icount)
                    {
                        return;
                    }

                    foreach (DataRow dr in (mainMap.Layers[0] as IFeatureLayer).DataSet.DataTable.Rows)
                    {
                        RowCol iRowCol = new RowCol();
                        iRowCol.Col = Convert.ToInt32(dr["COL"]);
                        iRowCol.Row = Convert.ToInt32(dr["ROW"]);
                        if (!lstString.Contains(iRowCol.Col + "," + iRowCol.Row))
                        {
                            _currentBenMAPRollback.SelectRegions.Add(iRowCol);
                        }
                    }

                    ColorMap();
                }
            }
            catch (Exception ex)
            {
                Logger.LogError(ex);
            }
        }
コード例 #29
0
        public void CanReadAGenerationFromFile()
        {
            const string testFileName = "generationTest.txt";
            var          cell0        = new RowCol(0, 0);
            var          cell1        = new RowCol(0, 1);
            var          cells        = new Generation
            {
                { cell0, true },
                { cell1, false }
            };

            var file = new FileManager();

            file.CreateGenerationFile(testFileName, cells);

            var generation = file.ReadGenerationFile(testFileName);

            Assert.That(generation, Is.InstanceOf(typeof(Generation)));
            Assert.AreEqual(2, generation.Count);
            Assert.IsTrue(generation[cell0]);
            Assert.IsFalse(generation[cell1]);
        }
コード例 #30
0
        void InvertRange(RowCol startPos, RowCol endPos)
        {
            if (startPos.row < endPos.row || (startPos.row == endPos.row && startPos.col > endPos.col))
            {
                var temp = startPos;
                startPos = endPos;
                endPos   = temp;
            }
            RowCol pos = startPos;

            while (pos != endPos && pos.row >= 0)
            {
                var cell = display.Get(pos.row, pos.col);
                cell.inverse = !cell.inverse;
                //display.UpdateCell(cell);
                pos.col++;
                if (pos.col >= display.cols)
                {
                    pos.col = 0;
                    pos.row--;
                }
            }
        }
コード例 #31
0
ファイル: Board.cs プロジェクト: ryanechternacht/Niya
        public Board Play(IPlayer player, RowCol move)
        {
            var b = Clone ();

            var t = b.Tiles [move.Row, move.Col];
            if (t.Occupied)

                throw new Exception ("tile is occupied");

            t.Play (player);
            b.Moves.Add (new Move(player, move));

            return b;
        }
コード例 #32
0
ファイル: Game.cs プロジェクト: ryanechternacht/Niya
 private bool IsLegal(Board board, RowCol move)
 {
     foreach (var m in board.GetLegalMoves())
         if (m.Equals (move))
             return true;
     return false;
 }
コード例 #33
0
        /// <summary>
        /// Sets the source data range for the chart.
        /// </summary>
        /// <param name="source">The range that contains the source data.</param>
        /// <param name="plotBy">Specifies the way the data is to be plotted.</param>
        public void SetSourceData(Range source, RowCol plotBy)
        {
            var missing = System.Reflection.Missing.Value;

            InternalObject.GetType().InvokeMember("SetSourceData", System.Reflection.BindingFlags.InvokeMethod, null, InternalObject, new object[] { (source != null ? source.InternalObject : missing), (int)plotBy });
        }
コード例 #34
0
 /// <summary>
 /// Adds one or more new series to the SeriesCollection collection.
 /// </summary>
 /// <param name="Source">The new data as a Range object.</param>
 /// <param name="rowcol">Specifies whether the new values are in the rows or columns of the specified range.</param>
 /// <param name="serieslabels">True if the first row or column contains the name of the data series. False if the first row or column contains the first data point of the series. If this argument is omitted, Microsoft Excel attempts to determine the location of the series name from the contents of the first row or column.</param>
 /// <param name="categoryLabels">True if the first row or column contains the name of the category labels. False if the first row or column contains the first data point of the series. If this argument is omitted, Microsoft Excel attempts to determine the location of the category label from the contents of the first row or column.</param>
 /// <param name="replace">If CategoryLabels is True and Replace is True, the specified categories replace the categories that currently exist for the series. If Replace is False, the existing categories will not be replaced. The default value is False.</param>
 /// <returns></returns>
 public Series Add(Range Source, RowCol? rowcol = null, bool? serieslabels = null, bool? categoryLabels = null, bool? replace = null)
 {
     return new Series(InternalObject.GetType().InvokeMember("Add", System.Reflection.BindingFlags.InvokeMethod, null, InternalObject, new object[] { Source, rowcol, serieslabels, categoryLabels, replace }));
 }
コード例 #35
0
ファイル: Board.cs プロジェクト: ryanechternacht/Niya
 public Move(IPlayer player, RowCol rc)
 {
     RowCol = rc;
     Player = player;
 }