50 lines
1.1 KiB
C#
50 lines
1.1 KiB
C#
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 PanelMaterial : DockContent
|
|
{
|
|
MainForm m_Owner = null;
|
|
|
|
public PanelMaterial(MainForm owner)
|
|
{
|
|
InitializeComponent();
|
|
|
|
m_Owner = owner;
|
|
this.ApplyTheme();
|
|
}
|
|
|
|
public void UpdateData(DataHandler data)
|
|
{
|
|
var MaterialSpring = data.GetMaterialSpring();
|
|
var MaterialTable = data.GetMaterialTable();
|
|
|
|
cbMaterialSpring.Items.Clear();
|
|
cbMaterialSpring.Items.Add("All");
|
|
foreach (var x in MaterialSpring)
|
|
cbMaterialSpring.Items.Add(x);
|
|
cbMaterialSpring.SelectedIndex = 0;
|
|
|
|
cbMaterialTable.Items.Clear();
|
|
cbMaterialTable.Items.Add("All");
|
|
foreach (var x in MaterialTable)
|
|
cbMaterialTable.Items.Add(x);
|
|
cbMaterialTable.SelectedIndex = 0;
|
|
}
|
|
|
|
private void btApply_Click(object sender, EventArgs e)
|
|
{
|
|
m_Owner.OnApplyData();
|
|
}
|
|
}
|
|
}
|