public angularGaugeForm(StartForm parent, XmlNode initData)
        {
            zonesCount = 0;
            foreach (var p in typeof(AngularGaugeFormProperties).GetProperties())
            {
                string name = p.Name;
                if (name.StartsWith("AngularGauge_zone"))
                {
                    zonesCount++;
                }
            }

            InitializeComponent();
            _angularGauge = new YAngularGauge(rendererCanvas, LogManager.Log);

            _angularGauge.DisableRedraw();
            _angularGauge.resizeRule           = Proportional.ResizeRule.FIXED;
            _angularGauge.getCaptureParameters = constants.getCaptureParametersCallback;



            noDataSourcepanel = _angularGauge.addMessagePanel();

            noDataSourcepanel.text = "No data source configured\n"
                                     + " 1 - Make sure you have a Yoctopuce sensor connected.\n"
                                     + " 2 - Do a right-click on this window.\n"
                                     + " 3 - Choose \"Configure this gauge\" to bring up the properties editor.\n"
                                     + " 4 - Choose a data source\n";

            for (int i = 0; i < zonesCount; i++)
            {
                _angularGauge.AddZone();
            }
            prop     = new AngularGaugeFormProperties(initData, this);
            manager  = new formManager(this, parent, initData, "gauge", prop);
            mainForm = parent;

            if (AnnotationPanelCount == 0)
            {
                foreach (var p in typeof(AngularGaugeFormProperties).GetProperties())
                {
                    string name = p.Name;
                    if (name.StartsWith("AngularGauge_annotationPanel"))
                    {
                        AnnotationPanelCount++;
                    }
                }
            }
            for (int i = 0; i < AnnotationPanelCount; i++)
            {
                _angularGauge.addAnnotationPanel();
            }

            _angularGauge.setPatchAnnotationCallback(AnnotationCallback);


            initDataNode = initData;
            prop.ApplyAllProperties(this);
            if (!manager.initForm())
            {
                Rectangle s = Screen.FromControl(this).Bounds;
                this.Location = new Point((s.Width - this.Width) >> 1, (s.Height - this.Height) >> 1);
            }

            YDataRenderer.minMaxCheckDisabled = true;
            try { prop.ApplyAllProperties(_angularGauge); }
            catch (TargetInvocationException e) { LogManager.Log("AngularGauge initialization raised an exception (" + e.InnerException.Message + ")"); }
            YDataRenderer.minMaxCheckDisabled = false;

            manager.configureContextMenu(this, contextMenuStrip1, showConfiguration, switchConfiguration, capture);

            _angularGauge.resetRefrenceSize();
            _angularGauge.AllowPrintScreenCapture          = true;
            _angularGauge.proportionnalValueChangeCallback = manager.proportionalValuechanged;
            _angularGauge.resizeRule = Proportional.ResizeRule.RELATIVETOBOTH;
            _angularGauge.AllowRedraw();

            _angularGauge.OnDblClick += rendererCanvas_DoubleClick;
            if (constants.OSX_Running)
            {
                _angularGauge.OnRightClick += rendererCanvas_RightClick;
            }
        }