190724
This commit is contained in:
41
SubProject/FCOMMON/fSelectMonth.cs
Normal file
41
SubProject/FCOMMON/fSelectMonth.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FCOMMON
|
||||
{
|
||||
public partial class fSelectMonth : Form
|
||||
{
|
||||
public int selectmon = -1;
|
||||
public fSelectMonth()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.KeyDown += (s1,e1)=>{ if (e1.KeyCode == Keys.Escape) this.Close(); };
|
||||
}
|
||||
|
||||
private void fSelectMonth_Load(object sender, EventArgs e)
|
||||
{
|
||||
for(int i = 1 ; i <=12;i++)
|
||||
{
|
||||
Button newbt = new Button();
|
||||
newbt.Text = string.Format("{0}월",i);
|
||||
newbt.Tag = i;
|
||||
newbt.Click += newbt_Click;
|
||||
newbt.Dock = DockStyle.Fill;
|
||||
tableLayoutPanel1.Controls.Add(newbt);
|
||||
}
|
||||
}
|
||||
|
||||
void newbt_Click(object sender, EventArgs e)
|
||||
{
|
||||
var bt = sender as Button;
|
||||
selectmon = int.Parse(bt.Tag.ToString());
|
||||
DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user