예제 #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            bool res = SerialCom.Connect((string)this.listBox1.SelectedItem);

            updateConnectStatus();

            if (res)
            {
                Properties.Settings.Default.port = (string)this.listBox1.SelectedItem;
                Properties.Settings.Default.Save();

                this.Close();
            }
        }
예제 #2
0
        public Form1()
        {
            InitializeComponent();

            this.Icon = Icon.FromHandle(Properties.Resources.um24c2.GetHicon());

            this.fc = this.ucFilter1.GetFilterConfig();

            myDelegate = new UpdateChart(updatechart);

            Properties.Settings.Default.Reload();
            if (!string.IsNullOrEmpty(Properties.Settings.Default.port))
            {
                SerialCom.Connect(Properties.Settings.Default.port);
            }

            this.updateConnectStatus();
        }