- 재질 check 기능 수정
- 리포트 맵 부분 수정
This commit is contained in:
@@ -45,7 +45,10 @@ namespace friction
|
||||
|
||||
lvSpring.Items.Clear();
|
||||
foreach (var x in SpringList)
|
||||
lvSpring.Items.Add(x);
|
||||
{
|
||||
ListViewItem item = lvSpring.Items.Add(x);
|
||||
item.Checked = true;
|
||||
}
|
||||
|
||||
lvTable.Items.Clear();
|
||||
lvTable.Items.Add("All");
|
||||
@@ -91,6 +94,26 @@ namespace friction
|
||||
m_Owner.OnApplyData(this, m_SelectedSpring.Text, m_SelectedTable.Text);
|
||||
}
|
||||
|
||||
public void SelectSpring(string strSpring)
|
||||
{
|
||||
if (m_SelectedSpring != null)
|
||||
{
|
||||
m_SelectedSpring.Font = lvSpring.Font;
|
||||
m_SelectedSpring.ForeColor = Theme.Forecolor;
|
||||
}
|
||||
|
||||
foreach (ListViewItem item in lvSpring.Items)
|
||||
{
|
||||
if (item.Text == strSpring)
|
||||
{
|
||||
m_SelectedSpring = item;
|
||||
item.Font = new Font(lvSpring.Font, FontStyle.Bold);
|
||||
item.ForeColor = Theme.Orange;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void SelectTable(int iIdx)
|
||||
{
|
||||
if (m_SelectedTable != null)
|
||||
@@ -141,29 +164,29 @@ namespace friction
|
||||
#endregion select
|
||||
|
||||
#region check
|
||||
public void LoadCheckedMaterial(string strPrefName)
|
||||
public void LoadUncheckedMaterial(string strPrefName)
|
||||
{
|
||||
Config.CheckedMaterial cm = Config.GetInstance().m_CheckedMaterial[strPrefName];
|
||||
List<string> CheckedSprings = new List<string>();
|
||||
List<string> CheckedTables = new List<string>();
|
||||
Config.UncheckedMaterial cm = Config.GetInstance().m_UncheckedMaterial[strPrefName];
|
||||
List<string> UncheckedSprings = new List<string>();
|
||||
List<string> UncheckedTables = new List<string>();
|
||||
|
||||
foreach (string s in cm.m_Springs)
|
||||
CheckedSprings.Add(s);
|
||||
UncheckedSprings.Add(s);
|
||||
foreach (string s in cm.m_Tables)
|
||||
CheckedTables.Add(s);
|
||||
UncheckedTables.Add(s);
|
||||
|
||||
foreach (ListViewItem item in lvSpring.Items)
|
||||
{
|
||||
item.Checked = false;
|
||||
item.Checked = true;
|
||||
}
|
||||
|
||||
foreach (string strSpring in CheckedSprings)
|
||||
foreach (string strSpring in UncheckedSprings)
|
||||
{
|
||||
foreach (ListViewItem item in lvSpring.Items)
|
||||
{
|
||||
if (item.Text == strSpring)
|
||||
{
|
||||
item.Checked = true;
|
||||
item.Checked = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -172,37 +195,37 @@ namespace friction
|
||||
|
||||
foreach (ListViewItem item in lvTable.Items)
|
||||
{
|
||||
item.Checked = false;
|
||||
item.Checked = true;
|
||||
}
|
||||
|
||||
foreach (string strTable in CheckedTables)
|
||||
foreach (string strTable in UncheckedTables)
|
||||
{
|
||||
foreach (ListViewItem item in lvTable.Items)
|
||||
{
|
||||
if (item.Text == strTable)
|
||||
{
|
||||
item.Checked = true;
|
||||
item.Checked = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SaveCheckedMaterial(string strPrefName)
|
||||
public void SaveUncheckedMaterial(string strPrefName)
|
||||
{
|
||||
Config.CheckedMaterial cm = Config.GetInstance().m_CheckedMaterial[strPrefName];
|
||||
Config.UncheckedMaterial cm = Config.GetInstance().m_UncheckedMaterial[strPrefName];
|
||||
|
||||
cm.m_Springs.Clear();
|
||||
foreach (ListViewItem item in lvSpring.Items)
|
||||
{
|
||||
if (item.Checked == true)
|
||||
if (item.Checked == false)
|
||||
cm.m_Springs.Add(item.Text);
|
||||
}
|
||||
|
||||
cm.m_Tables.Clear();
|
||||
foreach (ListViewItem item in lvTable.Items)
|
||||
{
|
||||
if (item.Checked == true)
|
||||
if (item.Checked == false)
|
||||
cm.m_Tables.Add(item.Text);
|
||||
}
|
||||
}
|
||||
@@ -213,16 +236,17 @@ namespace friction
|
||||
if (view == lvTable && e.Item.Text == "All")
|
||||
e.Item.Checked = true;
|
||||
|
||||
List<string> CheckedItems = new List<string>();
|
||||
foreach(ListViewItem item in view.CheckedItems)
|
||||
List<string> UncheckedItems = new List<string>();
|
||||
foreach (ListViewItem item in view.Items)
|
||||
{
|
||||
CheckedItems.Add(item.Text);
|
||||
if(item.Checked == false)
|
||||
UncheckedItems.Add(item.Text);
|
||||
}
|
||||
|
||||
if (view == lvTable)
|
||||
Config.GetInstance().SetTableChecked(CheckedItems);
|
||||
Config.GetInstance().SetTableChecked(UncheckedItems);
|
||||
else
|
||||
Config.GetInstance().SetSpringChecked(CheckedItems);
|
||||
Config.GetInstance().SetSpringChecked(UncheckedItems);
|
||||
|
||||
view.Sort();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user