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; using WeifenLuo.WinFormsUI.Docking; namespace friction { public partial class MainForm : Form { string m_DBFileName = ""; DataHandler m_DataLoader = new DataHandler(); TablePanel m_TablePanel = null; RowPanel m_RowPanel = null; public MainForm() { InitializeComponent(); dockPanel.Theme = new VS2015DarkTheme(); m_TablePanel = new TablePanel(this); m_RowPanel = new RowPanel(this); } private void toolStripButtonOpen_Click(object sender, EventArgs e) { OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "엑셀 파일 (*.xlsx)|*.xlsx|엑셀 파일 (*.xls)|*.xls|전체|*"; DialogResult result = ofd.ShowDialog(); if(result == DialogResult.OK) { m_DBFileName = ofd.FileName; m_DataLoader.LoadData2(m_DBFileName); UpdateTablePanel(); toolStripStatusLabel.Text = m_DBFileName; } } private void UpdateTablePanel() { m_TablePanel.UpdateData(m_DataLoader); if(m_TablePanel.Visible == false) m_TablePanel.Show(dockPanel); } public void OnApplyData() { m_RowPanel.UpdateData(m_DataLoader); if (m_RowPanel.Visible == false) m_RowPanel.Show(dockPanel); } } }