Example #1
0
        protected internal virtual void InitializeMemoryBank()
        {
            _colorTemplates  = new ColorTemplateCollection();
            _shapeTemplates  = new ShapeTemplateCollection();
            _symbolTemplates = new SymbolTemplateCollection();

            this.Add(_colorTemplates);
            this.Add(_shapeTemplates);
            this.Add(_symbolTemplates);

            this.Add(new NamedEntityCollection());
        }
        public ColorTemplateCollection GetColorTemplates()
        {
            ColorTemplateCollection result = new ColorTemplateCollection();

            try
            {
                result.Add(new ColorTemplate(10, "UVRed", "Red", Color.FromArgb(255, 0, 1)));
                result.Add(new ColorTemplate(11, "Red", "Red", Color.FromArgb(255, 0, 0)));
                result.Add(new ColorTemplate(12, "Yellow", "Yellow", Color.FromArgb(255, 255, 0)));
                result.Add(new ColorTemplate(13, "Green", "Green", Color.FromArgb(0, 255, 0)));
                result.Add(new ColorTemplate(14, "Blue", "Blue", Color.FromArgb(0, 0, 255)));
            }
            catch
            {
                result.Dispose();
                throw;
            }
            return(result);
        }
        protected internal override void InitializeMemoryBank()
        {
            this.Clear();
            Memory.Reset();

            // Initialize
            ColorTemplateCollection  colorTemplates  = GetColorTemplates();
            ShapeTemplateCollection  shapeTemplates  = GetShapeTemplates();
            SymbolTemplateCollection symbolTemplates = GetSymbolTemplates();

            this.Add(colorTemplates);
            this.Add(shapeTemplates);
            this.Add(symbolTemplates);

            this.Add(new NamedEntityCollection());

            // Feedback Table
            FeedbackCounterTable feedbackCounterTable = new FeedbackCounterTable();

            this.SetFeedbackCounterTable(feedbackCounterTable);
        }