C#/WindowForm
-
C# 시계만들기C#/WindowForm 2022. 6. 16. 00:43
디자인은 패널(panel)을 사용하였다. public partial class Form1 : Form { Graphics g; bool aClock_Flag = true; Point center; double radius; int hourHand; int minHand; int secHand; const int clientSize = 300; const int clockSize = 200; //필드, 속성 public Form1() { InitializeComponent(); this.Text = "FormClock"; this.ClientSize = new Size(clientSize, clientSize + menuStrip1.Height); panel1.BackColor = Color.WhiteSm..
-
C# 그래프를 이용한 ECG/PPG 그리기C#/WindowForm 2022. 6. 9. 02:21
시작하기에 앞서 ecg와 ppg의 데이터 파일을 넣어준다. 드래그해서 넣으면 간편히 넣을 수 있다. public partial class Form1 : Form { double[] ecg = new double[100000]; double[] ppg = new double[100000]; private int ecgCount; private int ppgCount; Timer t = new Timer(); public Form1() { InitializeComponent(); this.Text = "ECG/PPG"; this.WindowState = FormWindowState.Maximized; EcgRead(); PpgRead(); ChartSetting(); t.Interval = 10; // 0...
-
C# 그래프 그리기C#/WindowForm 2022. 6. 1. 19:06
Chart를 사용하여 그래프를 그려보자 namespace _041_Graph { public partial class Form1 : Form { public Form1() { InitializeComponent(); this.Text = "Graph using Chart control"; } private void Form1_Load(object sender, EventArgs e) { ChartSetting(); } private void ChartSetting() { ch.ChartAreas[0].BackColor = Color.Black; // X축과 Y축을 설정 ch.ChartAreas[0].AxisX.Minimum = -20; ch.ChartAreas[0].AxisX.Maximum = 20; c..
-
C# Chart 그리기- 2C#/WindowForm 2022. 6. 1. 18:57
1에서 만들어떤것과 마찬가지로 Chart를 사용해서 만들었고 이번에는 합쳐서 그리기와 나누어 그리기 버튼을 추가하였다. private void Form1_Load(object sender, EventArgs e) { chart1.Titles.Add("성적"); chart1.Series.Add("Series2"); chart1.Series["Series1"].LegendText = "수학"; chart1.Series["Series2"].LegendText = "영어"; chart1.ChartAreas.Add("ChartArea2"); chart1.Series["Series2"].ChartArea = "ChartArea2"; Random r = new Random(); for (int i = 0; i < 1..
-
C# Chart그리기-1C#/WindowForm 2022. 6. 1. 18:39
윈폼의 Chart를 사용하여 차트를 만들어보자 namespace _039_Chart { public partial class Form1 : Form { public Form1() { InitializeComponent(); this.Text = "Using Chart Contorl"; } private void Form1_Load(object sender, EventArgs e) { Random r = new Random(); chart1.Titles.Add("중간고사 성적"); for (int i = 0; i < 10; i++) { chart1.Series["Series1"].Points.Add(r.Next(100)); } chart1.Series[0].LegendText = "비주얼프로그래밍"; ch..
-
ACCESS를 사용한 DB연결 -3 (PhoneBook)C#/WindowForm 2022. 5. 18. 16:13
저번글에 이어서 검색과 수정버튼을 제작하겠습니다. 검색버튼 // 검색 private void btnSearch_Click(object sender, EventArgs e) { if (txtSId.Text == "" && txtSName.Text == "" && txtPhone.Text == "") return; connOpen(); string sql = string.Format("SELECT * FROM StudentTable WHERE "); if (txtSId.Text != "") sql += "SId = " + txtSId.Text; else if(txtSName.Text != "") sql += "SName = '" + txtSName.Text + "'"; else if(txtPhone.Text..
-
dataTimePickerC#/WindowForm 2022. 4. 6. 11:23
글씨체는 메이플스토리로 사용함 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace wdq { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void DateTimePicker1_ValueChanged(object sender, EventArgs e) { D..
-
Timer 사용C#/WindowForm 2022. 4. 6. 11:17
실행코드 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace _29 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { label1.Location = new Point(Cli..