Sound implemented, points ok and users visible on button
This commit is contained in:
@ -18,7 +18,8 @@ namespace WinGreed
|
||||
{
|
||||
if (lvMemberList.Items.Count > 0)
|
||||
{
|
||||
var nextLvInstance = lvMemberList.Items[NextLvItem()];
|
||||
var plNr = NextLvItem();
|
||||
var nextLvInstance = lvMemberList.Items[plNr];
|
||||
var nextPlayerName = nextLvInstance.Text;
|
||||
|
||||
if (!GameOver || (GameOver && nextLvInstance != gocFirst.lvsave))
|
||||
@ -27,7 +28,10 @@ namespace WinGreed
|
||||
fPR.TotPoints = int.Parse(nextLvInstance.SubItems[2].Text);
|
||||
fPR.ShowDialog();
|
||||
nextLvInstance.SubItems[2].Text = fPR.TotPoints.ToString();
|
||||
lstLogBox.Items.Add($"{nextPlayerName} -> {fPR.AddedPoints} po<70>ng.");
|
||||
if (fPR.TotPoints > 0 && fPR.AddedPoints>0)
|
||||
{
|
||||
lstLogBox.Items.Add($"{nextPlayerName} -> {fPR.AddedPoints} po<70>ng.");
|
||||
}
|
||||
}
|
||||
|
||||
if (GameOver)
|
||||
@ -66,6 +70,9 @@ namespace WinGreed
|
||||
gocFirst.lvsave = nextLvInstance;
|
||||
}
|
||||
}
|
||||
plNr = actPlayerNo;
|
||||
btnSpela.Text = $"L<>t {lvMemberList.Items[NextLvItem()].Text} spela";
|
||||
actPlayerNo = plNr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,6 +105,11 @@ namespace WinGreed
|
||||
txtNewName.Text = "";
|
||||
txtNewName.Visible = false;
|
||||
btnAddOk.Visible = false;
|
||||
if (lvMemberList.Items.Count > 1)
|
||||
{
|
||||
btnSpela.Enabled = true;
|
||||
btnSpela.Text = $"L<>t {lvMemberList.Items[0].Text} spela";
|
||||
}
|
||||
}
|
||||
|
||||
private void txtNewName_TextChanged(object sender, EventArgs e)
|
||||
@ -115,7 +127,7 @@ namespace WinGreed
|
||||
private void PlaySomething()
|
||||
{
|
||||
var soundPlayer = new SoundPlayer();
|
||||
soundPlayer.SoundLocation = @"C:\Users\tommy\Downloads\smartsound_HUMAN_CROWD_Applause_Short.wav";
|
||||
soundPlayer.SoundLocation = @".\HUMAN_CROWD_Applause.wav";
|
||||
soundPlayer.Play();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user