// 생성자 public WeekSpendPage(NeoTabPage Tab, DateTimePicker dtp) { W_SpendTab = Tab; SQLite = new SQLite(); // DB Object cmd = SQLite.GetSQLCommand(); // Command Object dateTimePicker1 = dtp; dateTimePicker1.CloseUp += DateTimePicker1_CloseUp; }
public Form1() { InitializeComponent(); this.FormBorderStyle = FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.MinimizeBox = false; this.StartPosition = FormStartPosition.CenterScreen; SQLite = new SQLite(); // DB Object cmd = SQLite.GetSQLCommand(); // Command Object currentCategory = "Week"; button1.Visible = true; button2.Visible = false; dateTimePicker1.CloseUp += DateTimePicker1_CloseUp; neoTabWindow1.Renderer = NeoTabControlLibrary.AddInRendererManager.LoadRenderer("MarginBlueRendererVS2"); neoTabWindow1.BackColor = Color.White; imgBtnContainer1.BackColor = Color.White; imgBtnContainer2.BackColor = Color.White; button1.Click += Button1_Click; panel5.BackColor = Color.LightGray; panel2.BackColor = Color.LightGray; // Budget B_IncomeTab = new NeoTabPage(); B_SpendTab = new NeoTabPage(); B_IncomeTab.Text = "수입 예산"; B_SpendTab.Text = "지출 예산"; BIp = new Budget(Budget.DMode.income, dateTimePicker1, DateTime.Now); BIp.SetLabel(); BIp.Dock = DockStyle.Fill; BIp.SetDate(dateTimePicker1.Value); BSp = new Budget(Budget.DMode.spend, dateTimePicker1, DateTime.Now); BSp.SetLabel(); BSp.Dock = DockStyle.Fill; BSp.SetDate(dateTimePicker1.Value); B_IncomeTab.Controls.Add(BIp); B_SpendTab.Controls.Add(BSp); // Week W_IncomeTab = new NeoTabPage(); W_SpendingTab = new NeoTabPage(); // 버튼 선언 reportBtn = new Button(); incomeBtn = new Button(); spendBtn = new Button(); detailBtn = new Button(); // 버튼 세팅 reportBtn.Size = new Size(107, 40); reportBtn.Location = new Point(843, 6); reportBtn.Text = "인쇄"; reportBtn.Font = button1.Font; incomeBtn.Size = new Size(107, 40); incomeBtn.Location = new Point(843, 6); incomeBtn.Text = "인쇄"; incomeBtn.Font = button1.Font; spendBtn.Size = new Size(107, 40); spendBtn.Location = new Point(843, 6); spendBtn.Text = "인쇄"; spendBtn.Font = button1.Font; detailBtn.Size = new Size(107, 40); detailBtn.Location = new Point(843, 6); detailBtn.Text = "인쇄"; detailBtn.Font = button1.Font; panel1.Controls.Add(reportBtn); panel1.Controls.Add(incomeBtn); panel1.Controls.Add(spendBtn); panel1.Controls.Add(detailBtn); reportBtn.Show(); incomeBtn.Hide(); spendBtn.Hide(); detailBtn.Hide(); // 월별 탭 M_ReportTab = new NeoTabPage(); M_ReportTab.Text = "재정 보고"; sr = new SpendReport(SpendReport.DMode.Month, reportBtn); sr.SetDate(dateTimePicker1.Value); sr.Validate(); sr.Dock = DockStyle.Fill; M_ReportTab.Controls.Add(sr); M_IncomeTab = new NeoTabPage(); M_IncomeTab.Text = "재정 수입"; ip = new IncomeProgress(IncomeProgress.DMode.income, incomeBtn); ip.Dock = DockStyle.Fill; M_IncomeTab.Controls.Add(ip); M_SpendingTab = new NeoTabPage(); M_SpendingTab.Text = "재정 지출"; sp = new IncomeProgress(IncomeProgress.DMode.spend, spendBtn); ip.Dock = DockStyle.Fill; M_SpendingTab.Controls.Add(sp); M_DetailTab = new NeoTabPage(); M_DetailTab.Text = "지출 세부 항목"; sd = new SpendDetail(SpendDetail.DMode.Month, detailBtn); sd.Dock = DockStyle.Fill; M_DetailTab.Controls.Add(sd); // 년도 탭 Y_ReportTab = new NeoTabPage(); Y_ReportTab.Text = "재정 보고"; yearSR = new SpendReport(SpendReport.DMode.Year, new Button()); yearSR.Dock = DockStyle.Fill; Y_ReportTab.Controls.Add(yearSR); Y_IncomeTab = new NeoTabPage(); Y_IncomeTab.Text = "재정 수입"; yearIP = new IncomeProgress(IncomeProgress.DMode.Y_income, new Button()); yearIP.Dock = DockStyle.Fill; Y_IncomeTab.Controls.Add(yearIP); Y_SpendingTab = new NeoTabPage(); Y_SpendingTab.Text = "재정 지출"; yearSP = new IncomeProgress(IncomeProgress.DMode.Y_spend, new Button()); yearSP.Dock = DockStyle.Fill; Y_SpendingTab.Controls.Add(yearSP); Y_DetailTab = new NeoTabPage(); Y_DetailTab.Text = "지출 세부 항목"; yearSD = new SpendDetail(SpendDetail.DMode.Year, new Button()); yearSD.Dock = DockStyle.Fill; Y_DetailTab.Controls.Add(yearSD); Y_PersonTab = new NeoTabPage(); Y_PersonTab.Text = "개인별 정산"; yearR = new YReport(); yearR.Dock = DockStyle.Fill; Y_PersonTab.Controls.Add(yearR); neoTabWindow1.SelectedIndexChanged += NeoTabWindow1_SelectedIndexChanged; setImgBtn(); setWeekTabPage(); // IncomeProgress ip.Date = DateTime.Now; sp.Date = DateTime.Now; ip.setIncomeFromDB(); sp.setIncomeFromDB(); ip.setSpendFromDB(); sp.setSpendFromDB(); // CheckSum 생성 - 기간별 Sum 저장되는 Table createCheckSumTable(); }