コード例 #1
0
 public static void soundplyStop()
 {
     sp.SoundLocation = SystemConfig.GetConfigData("music_url", string.Empty);
     sp.Stop();
     try { sp.Play(); }
     catch (Exception) { MessageBox.Show("请检查配置文件或者音频丢失!"); }
 }
コード例 #2
0
 /// <summary>
 /// 初始话全局报警阈值
 /// </summary>
 public static void initialize_warning_count()
 {
     //   string s = SystemConfig.GetConfigData("user_warning_count", string.Empty);
     try
     {
         user_warning_count = Int32.Parse(SystemConfig.GetConfigData("user_warning_count", string.Empty));
     }catch (Exception) {
         MessageBox.Show("您上次设置的报警界限不合法,请重新设置!现在默认为1000");
         user_warning_count = 1000;
         SystemConfig.WriteConfigData("user_warning_count", "" + 1000);
     }
 }
コード例 #3
0
ファイル: Form2.cs プロジェクト: 15831944/tool
 public void initialize_warning_count()
 {
     //   string s = SystemConfig.GetConfigData("user_warning_count", string.Empty);
     try
     {
         textEdit1.Text = SystemConfig.GetConfigData("user_warning_count", string.Empty);
     }
     catch (Exception)
     {
         MessageBox.Show("您上次设置的报警界限不合法,请重新设置!现在默认为1000");
         textEdit1.Text = 1000 + "";
     }
 }
コード例 #4
0
 /// <summary>
 /// 初始化全局播放器
 /// </summary>
 private void initialize_soundPlayer()
 {
     sp = new SoundPlayer();
     sp.SoundLocation = SystemConfig.GetConfigData("music_url", string.Empty);
 }