public ServiceObjectControl(ServiceObjectControl serviceContainerParent, Size size, Point location, ServiceForm parent)
 {
     this.state_    = TextServiceState.ServiceNotObtained;
     this.BackColor = Color.Beige;
     this.label     = string.Empty;
     this.Size      = size;
     this.Location  = location;
     this.parent    = parent;
     if (serviceContainerParent == null)
     {
         serviceContainer = new ServiceContainer();
     }
     else
     {
         serviceContainer = new ServiceContainer(serviceContainerParent.serviceContainer);
     }
 }
        private void CreateServiceControlTree()
        {
            // Create root service control.
            ServiceObjectControl control1 = new ServiceObjectControl(null, new Size(300, 40), new Point(10, 80), this);

            root = control1;
            // Create first tier - pass parent with service object control 1
            ServiceObjectControl control2 = new ServiceObjectControl(control1, new Size(200, 30), new Point(50, 160), this);
            ServiceObjectControl control3 = new ServiceObjectControl(control1, new Size(200, 30), new Point(50, 240), this);
            // Create second tier A - pass parent with service object control 2
            ServiceObjectControl control4 = new ServiceObjectControl(control2, new Size(180, 20), new Point(300, 145), this);
            ServiceObjectControl control5 = new ServiceObjectControl(control2, new Size(180, 20), new Point(300, 185), this);
            // Create second tier B - pass parent with service object control 3
            ServiceObjectControl control6 = new ServiceObjectControl(control3, new Size(180, 20), new Point(300, 225), this);
            ServiceObjectControl control7 = new ServiceObjectControl(control3, new Size(180, 20), new Point(300, 265), this);

            // Add controls.
            this.Controls.AddRange(new Control[] { control1, control2, control3, control4, control5, control6, control7 });
        }