Inheritance: Control
Ejemplo n.º 1
0
    public static void Run()
    {
        IData data = new InitData()
        {
            IntegerData = 1, StringData = "some"
        };

        IBaseControl c1 = new ControlA();
        IBaseControl c2 = new ControlB();

        c1.Init(data);
        c2.Init(data);
    }
Ejemplo n.º 2
0
	public MainForm ()
	{
		// 
		// _tabControl
		// 
		_tabControl = new TabControl ();
		_tabControl.Dock = DockStyle.Bottom;
		_tabControl.Height = 200;
		Controls.Add (_tabControl);
		// 
		// _bugDescriptionText1
		// 
		_bugDescriptionText1 = new TextBox ();
		_bugDescriptionText1.Dock = DockStyle.Fill;
		_bugDescriptionText1.Multiline = true;
		_bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture,
			"Expected result on start-up:{0}{0}" +
			"1. The shape is colored orange.",
			Environment.NewLine);
		// 
		// _tabPage1
		// 
		_tabPage1 = new TabPage ();
		_tabPage1.Text = "#1";
		_tabPage1.Controls.Add (_bugDescriptionText1);
		_tabControl.Controls.Add (_tabPage1);
		// 
		// _bugDescriptionText2
		// 
		_bugDescriptionText2 = new TextBox ();
		_bugDescriptionText2.Dock = DockStyle.Fill;
		_bugDescriptionText2.Multiline = true;
		_bugDescriptionText2.Text = string.Format (CultureInfo.InvariantCulture,
			"Steps to execute:{0}{0}" +
			"1. Click the lower part of the shape.{0}{0}" +
			"2. Click the lower part again.{0}{0}" +
			"Expected result:{0}{0}" +
			"1. After step 1, the full shape colors blue.{0}{0}" +
			"2. After step 2, the full shape colors orange.",
			Environment.NewLine);
		// 
		// _tabPage2
		// 
		_tabPage2 = new TabPage ();
		_tabPage2.Text = "#2";
		_tabPage2.Controls.Add (_bugDescriptionText2);
		_tabControl.Controls.Add (_tabPage2);
		// 
		// _controlB
		// 
		_controlB = new ControlB ();
		_controlB.Dock = DockStyle.Top;
		_controlB.Height = 128;
		Controls.Add (_controlB);
		// 
		// MainForm
		// 
		ClientSize = new Size (300, 340);
		StartPosition = FormStartPosition.CenterScreen;
		Text = "bug #81135";
	}