コード例 #1
0
        //=========================================================================

        //=========================================================================
        /// <summary>
        /// Instantiates a new RobotBase class with the passed in PortSettings.
        /// </summary>
        /// <param name="portSettings">The  PortSettings for the underlying port.</param>
        public RobotBase(PortSettings portSettings)
            : this()
        {
            this.Configuration.PortSettings = portSettings;
            //---- make the changes to the underlying port
            this.UpdateUnderlyingPortSettings();
        }
コード例 #2
0
ファイル: RobotBase.cs プロジェクト: bluetulip89/robotitalk
 //=========================================================================
 //=========================================================================
 /// <summary>
 /// Instantiates a new RobotBase class with the passed in PortSettings.
 /// </summary>
 /// <param name="portSettings">The  PortSettings for the underlying port.</param>
 public RobotBase(PortSettings portSettings)
     : this()
 {
     this.Configuration.PortSettings = portSettings;
     //---- make the changes to the underlying port
     this.UpdateUnderlyingPortSettings();
 }
コード例 #3
0
 //=======================================================================
 //=======================================================================
 public RobotConfiguration(string displayName, bool hasCustomClass, bool hasCustomUI, PortSettings portSettings)
     : this()
 {
     this._displayName = displayName;
     this._hasCustomClass = hasCustomClass;
     this._hasCustomUI = hasCustomUI;
     this._portSettings = portSettings;
 }
コード例 #4
0
        //=======================================================================


        #endregion
        //=======================================================================


        #region ICloneable Members

        public object Clone()
        {
            //return this.MemberwiseClone();

            PortSettings portSettings = new PortSettings();

            portSettings.BaudRate  = this.BaudRate;
            portSettings.DataBits  = this.DataBits;
            portSettings.Handshake = this.Handshake;
            portSettings.Parity    = this.Parity;
            portSettings.PortName  = this.PortName;
            portSettings.StopBits  = this.StopBits;

            return(portSettings as object);
        }
コード例 #5
0
        //=======================================================================

        //=======================================================================
        public RobotConfiguration(string displayName, bool hasCustomClass, bool hasCustomUI, PortSettings portSettings)
            : this()
        {
            this._displayName    = displayName;
            this._hasCustomClass = hasCustomClass;
            this._hasCustomUI    = hasCustomUI;
            this._portSettings   = portSettings;
        }
コード例 #6
0
        public object Clone()
        {
            //return this.MemberwiseClone();

            PortSettings portSettings = new PortSettings();

            portSettings.BaudRate = this.BaudRate;
            portSettings.DataBits = this.DataBits;
            portSettings.Handshake = this.Handshake;
            portSettings.Parity = this.Parity;
            portSettings.PortName = this.PortName;
            portSettings.StopBits = this.StopBits;

            return portSettings as object;
        }