示例#1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            string filepath = Application.StartupPath + @"\settings.xml";

            if (!System.IO.File.Exists(filepath))
            {
                CreateDefaultXmlsettingsFile();
            }

            //В конструкторе класса ComPort стало известно об имеющихся портах в системе
            CurrentComPortObject = new ComPort();
            FormBorderStyle      = FormBorderStyle.FixedSingle;
            int digitCapacity = Properties.Settings.Default.DigitCapacity;
        }
示例#2
0
        private bool introducedPunctuation;         //Флажок показывающий - введена ли запятая или точка в поле с ценой

        public MainForm()
        {
            InitializeComponent();
            PortConfigForm           = null;
            ChangePasswordDUForm     = null;
            CurrentComPortObject     = null;
            AboutProgrammForm        = null;
            PassToGlobalSettingsForm = null;
            GlobalSettingForm        = null;
            NameOfCurrentComPort     = Properties.Settings.Default.PortName;         //По умолчанию при запуске будем подключаться к этому порту;
            BaudRate = Properties.Settings.Default.BaudRates;
            introducedPunctuation = false;
            //Keys[] keypressed = { 8, 13, 44, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 127 };
            //ValidKeyMainForm = new List<Keys>(keypressed);
        }
 public FGlobalSetting(ComPort port)
 {
     InitializeComponent();
     comport = port;
 }
 public FConfiguringPorts(ComPort Link)
 {
     InitializeComponent();
     LinkToComPort = Link;
 }