public void Initialise()
        {
            this.fColumns.Clear();
            List <PlotPointColour> plotPointColours = new List <PlotPointColour>();

            foreach (PlotPointColour value in Enum.GetValues(typeof(PlotPointColour)))
            {
                plotPointColours.Add(value);
            }
            for (int i = 0; i != 5; i++)
            {
                PlotPointColour  item             = plotPointColours[i % plotPointColours.Count];
                FiveByFiveColumn fiveByFiveColumn = new FiveByFiveColumn()
                {
                    Name   = item.ToString(),
                    Colour = item
                };
                this.fColumns.Add(fiveByFiveColumn);
                for (int j = 1; j <= 5; j++)
                {
                    FiveByFiveItem fiveByFiveItem = new FiveByFiveItem()
                    {
                        Details = string.Concat(fiveByFiveColumn.Name, " ", j)
                    };
                    fiveByFiveColumn.Items.Add(fiveByFiveItem);
                }
            }
        }
Beispiel #2
0
        public FiveByFiveColumn Copy()
        {
            FiveByFiveColumn fiveByFiveColumn = new FiveByFiveColumn()
            {
                ID     = this.fID,
                Name   = this.fName,
                Colour = this.fColour
            };

            foreach (FiveByFiveItem fItem in this.fItems)
            {
                fiveByFiveColumn.Items.Add(fItem.Copy());
            }
            return(fiveByFiveColumn);
        }