Пример #1
0
        public void SetupDialog()
        {
            SetupDialogForm F = new SetupDialogForm(this);

            F.RaAxis = m_Axes[0];
            if (F.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                RegUnregASCOM(true);
                if (F.Connection == null)
                {
                    _profile.DeleteSubKey(s_csDriverID, s_SerialSubKey);
                }
                else
                {
                    _profile.CreateSubKey(s_csDriverID, s_SerialSubKey);
                    _profile.WriteValue(s_csDriverID, "Port", F.Connection.Port.ToString(), s_SerialSubKey);
                    _profile.WriteValue(s_csDriverID, "Baud", ((Int16)F.Connection.Speed).ToString(), s_SerialSubKey);
                }
            }
        }
Пример #2
0
        public void SetupDialog()
        {
            SetupDialogForm F = new SetupDialogForm(this);
            F.RaAxis = m_Axes[0];
            if (F.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                RegUnregASCOM(true);
                if (F.Connection == null)
                {
                    _profile.DeleteSubKey(s_csDriverID, s_SerialSubKey);
                }
                else
                {
                    _profile.CreateSubKey(s_csDriverID, s_SerialSubKey);
                    _profile.WriteValue(s_csDriverID, "Port", F.Connection.Port.ToString(), s_SerialSubKey);
                    _profile.WriteValue(s_csDriverID, "Baud", ((Int16)F.Connection.Speed).ToString(), s_SerialSubKey);
                }

            }
        }