Merge branch 'master' of http://www.scserverddns.top:13000/sc/DyeingComputer
This commit is contained in:
commit
c8ed3818d0
17 files changed
+71
-15
No files matched your search
@@ -3,10 +3,12 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:DyeingComputer.View"
|
||||
xmlns:local="clr-namespace:DyeingComputer.View"
|
||||
xmlns:lang="clr-namespace:DyeingComputer.Properties"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="630" d:DesignWidth="1280" VerticalAlignment="Top">
|
||||
<Grid>
|
||||
<DataGrid HorizontalAlignment="Left" Height="179" Margin="204,136,0,0" VerticalAlignment="Top" Width="343" d:ItemsSource="{d:SampleData ItemCount=5}"/>
|
||||
<ComboBox HorizontalAlignment="Left" Height="30" Margin="190,10,0,0" x:Name="comboBoxCOM" VerticalAlignment="Top" Width="200" SelectionChanged="comboBoxCOM_SelectionChanged" FontSize="20"/>
|
||||
<TextBlock HorizontalAlignment="Left" Height="30" Margin="90,10,0,0" TextWrapping="Wrap" Text="{x:Static lang:Resources.Port}" VerticalAlignment="Top" Width="80" FontSize="25"/>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -23,6 +23,16 @@ namespace DyeingComputer.View
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
using DyeingComputer.UserClass;
|
||||
using DyeingComputer.Windows;
|
||||
using formula_manage.UserClass;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using DyeingComputer.UserClass;
|
||||
using DyeingComputer.Windows;
|
||||
using formula_manage.UserClass;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
|
||||
Reference in new issue
Block a user