示例#1
0
        private void frmMain_SizeChanged(object sender, EventArgs e)
        {
            Graphics g = this.pictureBox1.CreateGraphics();

            g.Clear(Color.White);
            Clock clock = new Clock();

            clock.OnStart(g, pictureBox1.Width / 2, pictureBox1.Height / 2);
            timer1.Tick += new EventHandler(Draw);
        }
示例#2
0
        public void pictureBox1_Click(object sender, EventArgs e)
        {//画表盘
            Graphics g = this.pictureBox1.CreateGraphics();

            g.Clear(Color.White);

            Clock clock = new Clock();

            clock.OnStart(g, pictureBox1.Width / 2, pictureBox1.Height / 2);
            timer1.Tick += new EventHandler(Draw);
        }