Exemple #1
0
        public AnalyzeListData Clone()
        {
            var clone = new AnalyzeListData();

            clone.AnalyzeDatas = new List <AnalyzeData>();
            foreach (var data in AnalyzeDatas)
            {
                clone.AnalyzeDatas.Add(data.Clone());
            }
            if (_analyzed)
            {
                clone.Analyzed();
            }
            return(clone);
        }
Exemple #2
0
        public PicrossAnalyze(List <List <NumberSquare> > rowNumberSquares, List <List <NumberSquare> > colNumberSquares)
        {
            oldPaintedCount = 0;
            _bitmapData     = new BitmapData[rowNumberSquares.Count, colNumberSquares.Count];
            for (int r = 0; r < rowNumberSquares.Count; r++)
            {
                for (int c = 0; c < colNumberSquares.Count; c++)
                {
                    _bitmapData[r, c] = new BitmapData(r, c);
                }
            }

            rowNumbers = new List <AnalyzeListData>();
            foreach (var rowList in rowNumberSquares)
            {
                AnalyzeListData list = new AnalyzeListData();
                foreach (var s in rowList)
                {
                    if (s.GetValue() != 0)
                    {
                        list.AnalyzeDatas.Add(new AnalyzeData(s.GetValue()));
                    }
                }
                rowNumbers.Add(list);
            }

            colNumbers = new List <AnalyzeListData>();
            foreach (var colList in colNumberSquares)
            {
                AnalyzeListData list = new AnalyzeListData();
                foreach (var s in colList)
                {
                    if (s.GetValue() != 0)
                    {
                        list.AnalyzeDatas.Add(new AnalyzeData(s.GetValue()));
                    }
                }
                colNumbers.Add(list);
            }
        }