コード例 #1
0
        private void init(Subject subj)
        {
            subj.registerInterest(this);
            fnt        = new Font("arial", 18, FontStyle.Bold);
            bBrush     = new SolidBrush(Color.Black);
            pic.Paint += new PaintEventHandler(paintHandler);

            //=================
            //make Hashtable for converting color strings
            //=================
            colors = new Hashtable();
            colors.Add("red", Color.Red);
            colors.Add("green", Color.Green);
            colors.Add("blue", Color.Blue);
            colName = "";
        }
コード例 #2
0
 public void init(Subject subj)
 {
     subj.registerInterest(this);
 }