This commit is contained in:
2018-12-04 23:24:02 +09:00
parent 22b38609cd
commit 9493b9f4d5
7 changed files with 244 additions and 47 deletions

View File

@@ -76,12 +76,29 @@ namespace AutoSellerNS
InitializeComponent();
cbSMMethod.SelectedIndex = 0;
foreach (TabPage tabPage in materialTabSelector1.BaseTabControl.TabPages)
{
Console.WriteLine(tabPage.Text);
var currentTabIndex = materialTabSelector1.BaseTabControl.TabPages.IndexOf(tabPage);
Console.WriteLine(currentTabIndex);
}
for(int i=0; i< materialTabSelector1.BaseTabControl.TabPages.Count; i++)
{
var tabPage = materialTabSelector1.BaseTabControl.TabPages[i];
Console.WriteLine(tabPage.Text);
var currentTabIndex = materialTabSelector1.BaseTabControl.TabPages.IndexOf(tabPage);
Console.WriteLine(currentTabIndex);
//new Rectangle(MaterialSkinManager.Instance.FORM_PADDING,
}
Util.SetLogView(tbLog);
Config.Init();
btUpdate.Enabled = false;
btSell.Enabled = false;
for (int i = 0; i < 21; i++)
{
lvCurPrice.Items.Add(new ListViewItem(new string[] { "", "", "", "" }));
@@ -251,6 +268,27 @@ namespace AutoSellerNS
m_CybosHelper.UpdateItems();
}
public void UpdateItem(bool bBid, string strCodeName, string strCode, int iPrice, int iConclusionCnt)
{
lock (m_Items)
{
int iIdx = m_Items.FindIndex(s => s.m_strCode == strCode);
if (iIdx < 0)
{
UpdateItem();
return;
}
ITEM Item = m_Items[iIdx];
Item.m_iItemCnt += bBid ? iConclusionCnt : -iConclusionCnt;
if (Item.m_iItemCnt == 0)
m_Items.RemoveAt(iIdx);
SyncListViewItems(m_Items);
}
}
public void UpdateItemCallback(List<ITEM> Items)
{
SyncItems(m_Items, Items);
@@ -309,6 +347,26 @@ namespace AutoSellerNS
m_CybosHelper.UpdateNC();
}
public void UpdateNCItem(bool bConclusion, bool bBid, string strCodeName, string strCode, int iPrice, int iConclusionCnt)
{
lock (m_NCItems)
{
int iIdx = m_NCItems.FindIndex(s => s.m_strCode == strCode);
if (iIdx < 0)
{
UpdateNCItem();
return;
}
NCITEM Item = m_NCItems[iIdx];
Item.m_iRemainCnt += (bConclusion ? -iConclusionCnt : iConclusionCnt);
if (Item.m_iRemainCnt == 0)
m_NCItems.RemoveAt(iIdx);
SyncNCListVIewItems(m_NCItems);
}
}
public void UpdateNCItemCallback(List<AutoSeller.NCITEM> NCItems)
{
SyncNCItems(m_NCItems, NCItems);
@@ -780,5 +838,10 @@ namespace AutoSellerNS
lvConclusion.EndUpdate();
}));
}
public void ErrorCallback(string msg)
{
Util.Log(Util.LOG_TYPE.ERROR, msg);
}
}
}