|
@ -1,9 +1,11 @@ |
|
|
using SunlightCentralizedControlManagement_SCCM_.UserClass; |
|
|
using ScottPlot.TickGenerators.TimeUnits; |
|
|
|
|
|
using SunlightCentralizedControlManagement_SCCM_.UserClass; |
|
|
using SunlightCentralizedControlManagement_SCCM_.ViewModel; |
|
|
using SunlightCentralizedControlManagement_SCCM_.ViewModel; |
|
|
using System; |
|
|
using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
using System.Data.SqlClient; |
|
|
using System.Data.SqlClient; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
|
|
|
using System.Speech.Synthesis; |
|
|
using System.Text; |
|
|
using System.Text; |
|
|
using System.Threading.Tasks; |
|
|
using System.Threading.Tasks; |
|
|
using System.Windows; |
|
|
using System.Windows; |
|
@ -50,11 +52,14 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
TEXT_SQLUSER.Text = Configini.IniReadvalue("SQL_SERVER", "SQL4"); |
|
|
TEXT_SQLUSER.Text = Configini.IniReadvalue("SQL_SERVER", "SQL4"); |
|
|
TEXT_SQLPASWORD.Text = Configini.IniReadvalue("SQL_SERVER", "SQL5"); |
|
|
TEXT_SQLPASWORD.Text = Configini.IniReadvalue("SQL_SERVER", "SQL5"); |
|
|
dDispenser.IsChecked = Convert.ToBoolean(Configini.IniReadvalue("SYS", "DyelotsDispenser")); |
|
|
dDispenser.IsChecked = Convert.ToBoolean(Configini.IniReadvalue("SYS", "DyelotsDispenser")); |
|
|
|
|
|
VOICE_V1.Text = Configini.IniReadvalue("VOICE", "V1"); |
|
|
|
|
|
VOICE_V2.Text = Configini.IniReadvalue("VOICE", "V2"); |
|
|
} |
|
|
} |
|
|
catch (Exception ex) { LogGing.ERRDATA(ex); } |
|
|
catch (Exception ex) { LogGing.ERRDATA(ex); } |
|
|
} |
|
|
} |
|
|
//调用配置文件
|
|
|
//调用配置文件
|
|
|
private UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "SCCM.ini"); |
|
|
private UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "SCCM.ini"); |
|
|
|
|
|
private SpeechSynthesizer synth = new SpeechSynthesizer();//语音
|
|
|
|
|
|
|
|
|
private void comboBoxCOM_SelectionChanged(object sender, SelectionChangedEventArgs e) |
|
|
private void comboBoxCOM_SelectionChanged(object sender, SelectionChangedEventArgs e) |
|
|
{ |
|
|
{ |
|
@ -118,5 +123,18 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
Configini.IniWritevalue("SYS", "DyelotsDispenser", dDispenser.IsChecked.ToString()); |
|
|
Configini.IniWritevalue("SYS", "DyelotsDispenser", dDispenser.IsChecked.ToString()); |
|
|
MainWindowViewModel.DyelotsDispenser = (bool)dDispenser.IsChecked; |
|
|
MainWindowViewModel.DyelotsDispenser = (bool)dDispenser.IsChecked; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void VOICE_Click(object sender, RoutedEventArgs e)//语言测试按钮
|
|
|
|
|
|
{ |
|
|
|
|
|
try |
|
|
|
|
|
{ |
|
|
|
|
|
synth.Rate = int.Parse(VOICE_V1.Text); |
|
|
|
|
|
synth.Volume = int.Parse(VOICE_V2.Text); |
|
|
|
|
|
synth.SpeakAsync(Properties.Resources.TESTVOICE); |
|
|
|
|
|
Configini.IniWritevalue("VOICE", "V1", VOICE_V1.Text); |
|
|
|
|
|
Configini.IniWritevalue("VOICE", "V2", VOICE_V2.Text); |
|
|
|
|
|
} |
|
|
|
|
|
catch (Exception) { } |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|