Esempio n. 1
0
        /// <summary>
        /// Initialize the MFD
        /// </summary>
        /// <param name="configString">A config string to assign buttons, labels</param>
        /// <param name="ip">The IP address of the SCJoyServer</param>
        /// <param name="port">The first Joystick port</param>
        /// <returns>True if successfull</returns>
        public bool InitMFD(UC_MFDstartLand owner, MfdInstance mfd, string configString, string ip, uint port)
        {
            m_owner = owner;

            Initialized = MFD.Init(owner, mfd, configString, ip, port);
            if (!Initialized)
            {
                return(false);
            }

            // Init Drawing stuff for this panel

            // A frame around the usable area
            MFD.GProc.Drawings.Add(MfdBase.Frame(Color.Chartreuse));
            // Create all labels with a prototype font and color
            MFD.GProc.Drawings.Add(MfdLabels.LabelList(
                                       new TextItem( )
            {
                Font            = m_owner.Font,                    //   the font to use for button labels
                TextBrush       = new SolidBrush(Color.LimeGreen), // the text label color
                TextBrushActive = new SolidBrush(Color.Lime),      // the active text label color
                FillBrush       = null                             // new SolidBrush( ControlPaint.Dark( Color.LimeGreen, 0.7F ) ) // the text label background fill (or null)
            },
                                       MFD.ButtonLabelList));
            // Change individual items..

            // Add more to draw

            return(Initialized);
        }
Esempio n. 2
0
        /// <summary>
        /// Initialize the MFD
        /// </summary>
        /// <param name="configString">A config string to assign buttons, labels</param>
        /// <param name="ip">The IP address of the SCJoyServer</param>
        /// <param name="port">The first Joystick port</param>
        /// <returns>True if successfull</returns>
        public bool InitMFD(UC_MFDtest owner, MfdInstance mfd, string configString, string ip, uint port)
        {
            m_owner = owner;

            Initialized = MFD.Init(owner, mfd, configString, ip, port);
            if (!Initialized)
            {
                return(false);
            }

            // Init Drawing stuff for this panel

            // A frame around the usable area
            MFD.GProc.Drawings.Add(MfdBase.Frame(Color.Green));
            // Create all labels with a prototype font and color
            MFD.GProc.Drawings.Add(MfdLabels.LabelList(
                                       new TextItem( )
            {
                Font            = m_owner.Font,
                TextBrush       = new SolidBrush(Color.LimeGreen),
                TextBrushActive = null,
                FillBrush       = null
            },
                                       MFD.ButtonLabelList));
            // Change individual items..

            // Add more to draw

            return(Initialized);
        }