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 TablePanel : DockContent { MainForm m_Owner = null; public TablePanel(MainForm owner) { InitializeComponent(); m_Owner = owner; this.ApplyTheme(); } public void UpdateData(DataHandler data) { var Material1 = data.GetMaterial1(); var Material2 = data.GetMaterial2(); cbMaterial1.Items.Clear(); foreach(var x in Material1) cbMaterial1.Items.Add(x); cbMaterial2.Items.Clear(); foreach (var x in Material2) cbMaterial2.Items.Add(x); } private void btApply_Click(object sender, EventArgs e) { m_Owner.OnApplyData(); } } }