Beispiel #1
0
        /*protected override void OnPaint(PaintEventArgs e)
         * {
         *  base.OnPaint(e);
         *  e.Graphics.DrawRectangle(Pens.Yellow, 20, 30, 50, 50);
         * }*/
        private void button1_Click(object sender, EventArgs e)
        {
            //classname opjectname = new classname();
            Managr.bones = 500; //static field
            Managr m = new Managr()
            {
                ID     = 1,
                Name   = "Ahmed",
                City   = "cairo",
                Salary = 1200
            };

            MessageBox.Show(m.Reportmanagr());
        }
Beispiel #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            Managr.bones = 500;

            int    slry = int.Parse(textBox1.Text);
            Managr m    = new Managr()
            {
                ID     = 1,
                Name   = "Ahmed",
                City   = "cairo",
                Salary = slry
            };

            MessageBox.Show(m.Reportmanagr());
        }