public void SetCounter(bool IsRivalCard)
{
if (thisCard.SolCounter > 0)
{
if (thisCard.LunaCounter > 0)
{
Counter = new PictureBox();
ToolTip = new ToolTip();
if (Owner.Language == Language.Chinese)
{
ToolTip.SetToolTip(Counter, "计数:" + thisCard.SolCounter.ToString());
}
else
{
ToolTip.SetToolTip(Counter, "Total: " + thisCard.SolCounter.ToString());
}
if (!IsRivalCard)
{
Counter.Left = Right - 25;
Counter.Top = Top + 5;
Counter.Width = 20;
Counter.Height = 20;
}
else
{
Counter.Left = Left + 5;
Counter.Top = Bottom - 25;
Counter.Width = 20;
Counter.Height = 20;
}
Counter.Image = counters.Sol;
Counter2 = new PictureBox();
ToolTip2 = new ToolTip();
if (Owner.Language == Language.Chinese)
{
ToolTip2.SetToolTip(Counter2, "计数:" + thisCard.LunaCounter.ToString());
}
else
{
ToolTip2.SetToolTip(Counter2, "Total: " + thisCard.LunaCounter.ToString());
}
if (!IsRivalCard)
{
Counter2.Left = Right - 25;
Counter2.Top = Top + 30;
Counter2.Width = 20;
Counter2.Height = 20;
}
else
{
Counter2.Left = Left + 5;
Counter2.Top = Bottom - 50;
Counter2.Width = 20;
Counter2.Height = 20;
}
Counter2.Image = counters.Luna;
}
else
{
if (Counter2 != null)
{
Counter2.Dispose();
Counter2 = null;
}
Counter = new PictureBox();
ToolTip = new ToolTip();
if (Owner.Language == Language.Chinese)
{
ToolTip.SetToolTip(Counter, "计数:" + thisCard.SolCounter.ToString());
}
else
{
ToolTip.SetToolTip(Counter, "Total: " + thisCard.SolCounter.ToString());
}
if (!IsRivalCard)
{
Counter.Left = Right - 25;
Counter.Top = Top + 5;
Counter.Width = 20;
Counter.Height = 20;
}
else
{
Counter.Left = Left + 5;
Counter.Top = Bottom - 25;
Counter.Width = 20;
Counter.Height = 20;
}
Counter.Image = counters.Sol;
}
}
else
{
if (thisCard.LunaCounter > 0)
{
if (Counter2 != null)
{
Counter2.Dispose();
Counter2 = null;
ToolTip2.Dispose();
ToolTip2 = null;
}
Counter = new PictureBox();
ToolTip = new ToolTip();
if (Owner.Language == Language.Chinese)
{
ToolTip.SetToolTip(Counter, "计数:" + thisCard.LunaCounter.ToString());
}
else
{
ToolTip.SetToolTip(Counter, "Total: " + thisCard.LunaCounter.ToString());
}
if (!IsRivalCard)
{
Counter.Left = Right - 25;
Counter.Top = Top + 5;
Counter.Width = 20;
Counter.Height = 20;
}
else
{
Counter.Left = Left + 5;
Counter.Top = Bottom - 25;
Counter.Width = 20;
Counter.Height = 20;
}
Counter.Image = counters.Luna;
}
else
{
if (Counter != null)
{
Counter.Dispose();
Counter = null;
ToolTip.Dispose();
ToolTip = null;
}
if (Counter2 != null)
{
Counter2.Dispose();
Counter2 = null;
ToolTip2.Dispose();
ToolTip2 = null;
}
}
}
}