디자이너 알람기능없애기
페이지 정보
본문
부탁드립니다
첨부파일
-
app.ico (361.4K)
1회 다운로드 | DATE : 2020-06-28 19:54:58
- 이전글디자이너와 포인트 질문입니다 20.06.29
- 다음글디자이너 컴파일 스크립트/이미지 저장 위치 20.06.28
댓글목록
엔지엠소프트웨어님의 댓글
엔지엠소프트웨어 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일 Date
private void _tm_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
if ((int)this.numericUpDown1.Value < _sw.Elapsed.Minutes)
{
// wav 파일만 재생할 수 있습니다.
using (var media = new SoundPlayer(@"C:\Windows\servicing\LCU\Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.329.1.7\amd64_microsoft-windows-userexperience-desktop_31bf3856ad364e35_10.0.19041.173_none_6486f23c2831aaf3\r\screenclipping\screenclipping\assets\sounds\camerashutter.wav"))
{
media.Play();
}
}
}
이 부분을 삭제 하세요~
그리고, Timer와 Stopwatch 관련된 내용도 전부 제거하시면 됩니다.
엔지엠소프트웨어님의 댓글
엔지엠소프트웨어 쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일 Date
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Media;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Discord
{
public partial class Form1 : NGM.GUI.ComponentDefault.MainView
{
private System.Timers.Timer _tm = new System.Timers.Timer(1000);
private System.Diagnostics.Stopwatch _sw = new System.Diagnostics.Stopwatch();
public Form1()
{
InitializeComponent();
}
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
OpenFileDialog dialog = new OpenFileDialog();
if (dialog.ShowDialog() == DialogResult.OK)
{
if (File.Exists(dialog.FileName))
{
this.script1.SelectScript = dialog.FileName;
this.lblScriptName.Text = $"스크립트:{Path.GetFileName(dialog.FileName)}";
}
else
{
MessageBox.Show("파일이 존재하지 않습니다.");
}
}
else
{
MessageBox.Show("작업이 취소 되었습니다.");
}
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
private void logToolStripMenuItem_CheckedChanged(object sender, EventArgs e)
{
if (this.logToolStripMenuItem.Checked)
{
this.ShowApplicationOutput = true;
this.ShowConditionOutput = true;
this.ShowDebugOutput = true;
this.ShowDefaultOutput = true;
this.ShowFunctionOutput = true;
this.ShowHardwareOutput = true;
this.ShowKeyboardOutput = true;
this.ShowMemoryOutput = true;
this.ShowMouseOutput = true;
}
else
{
this.ShowApplicationOutput = false;
this.ShowConditionOutput = false;
this.ShowDebugOutput = false;
this.ShowDefaultOutput = false;
this.ShowFunctionOutput = false;
this.ShowHardwareOutput = false;
this.ShowKeyboardOutput = false;
this.ShowMemoryOutput = false;
this.ShowMouseOutput = false;
}
}
private void btnLogClear_Click(object sender, EventArgs e)
{
richTextBox1.Invoke((Action)delegate
{
richTextBox1.Text = string.Empty;
});
}
public override void WriteOutput(string message)
{
richTextBox1.Invoke((Action)delegate
{
// 메시지만 표시
richTextBox1.AppendText(message);
// 시간 포함 메시지 표시
//richTextBox1.AppendText($"{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff")}:{message}");
richTextBox1.AppendText(Environment.NewLine);
richTextBox1.SelectionStart = richTextBox1.Text.Length;
richTextBox1.ScrollToCaret();
});
}
private void playButton1_Click(object sender, EventArgs e)
{
_tm.Elapsed += _tm_Elapsed;
_tm.AutoReset = true;
_tm.Start();
_sw.Start();
}
private void _tm_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
if ((int)this.numericUpDown1.Value < _sw.Elapsed.Minutes)
{
// wav 파일만 재생할 수 있습니다.
using (var media = new SoundPlayer(@"C:\Windows\servicing\LCU\Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.329.1.7\amd64_microsoft-windows-userexperience-desktop_31bf3856ad364e35_10.0.19041.173_none_6486f23c2831aaf3\r\screenclipping\screenclipping\assets\sounds\camerashutter.wav"))
{
media.Play();
}
}
}
// 단축키
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (playButton1.ButtonShortcut != Keys.None)
{
KeyEventArgs e = new KeyEventArgs(keyData);
if ((e.KeyCode | e.Modifiers) == playButton1.ButtonShortcut)
{
playButton1.PerformClick();
return true;
}
}
if (stopButton1.ButtonShortcut != Keys.None)
{
KeyEventArgs e = new KeyEventArgs(keyData);
if ((e.KeyCode | e.Modifiers) == stopButton1.ButtonShortcut)
{
stopButton1.PerformClick();
return true;
}
}
return base.ProcessCmdKey(ref msg, keyData);
}
private void button1_Click(object sender, EventArgs e)
{
_tm.Stop();
_sw.Stop();
}
}
}