染色机计算机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.2 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace DyeingComputer.View
{
/// <summary>
1 year ago
/// EngineerSetView.xaml 的交互逻辑
/// </summary>
1 year ago
public partial class EngineerSetView : UserControl
{
1 year ago
public EngineerSetView()
{
InitializeComponent();
// 获取所有可用串口端口,并添加到comboBoxCOM
string[] ports = System.IO.Ports.SerialPort.GetPortNames();
comboBoxCOM.ItemsSource = ports;
}
//调用配置文件
private UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "DyeingComputer.ini");
private void comboBoxCOM_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
Configini.IniWritevalue("SYS","COM",comboBoxCOM.SelectedValue.ToString());
}
}
}