mirror of
https://github.com/JDM170/SteamAchievementManager
synced 2025-12-10 05:37:18 +07:00
Oops. That's what happens when you merge branches incorrectly. Fixes #6.
This commit is contained in:
3
SAM.Picker/GamePicker.Designer.cs
generated
3
SAM.Picker/GamePicker.Designer.cs
generated
@@ -178,7 +178,8 @@
|
|||||||
this._GameListView.TileSize = new System.Drawing.Size(184, 69);
|
this._GameListView.TileSize = new System.Drawing.Size(184, 69);
|
||||||
this._GameListView.UseCompatibleStateImageBehavior = false;
|
this._GameListView.UseCompatibleStateImageBehavior = false;
|
||||||
this._GameListView.VirtualMode = true;
|
this._GameListView.VirtualMode = true;
|
||||||
this._GameListView.ItemActivate += new System.EventHandler(this.OnSelectGame);
|
this._GameListView.ItemActivate += new System.EventHandler(this.OnActivateGame);
|
||||||
|
this._GameListView.ItemSelectionChanged += new System.Windows.Forms.ListViewItemSelectionChangedEventHandler(this.OnSelectGame);
|
||||||
this._GameListView.RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(this.OnGameListViewRetrieveVirtualItem);
|
this._GameListView.RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(this.OnGameListViewRetrieveVirtualItem);
|
||||||
//
|
//
|
||||||
// _PickerStatusStrip
|
// _PickerStatusStrip
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ namespace SAM.Picker
|
|||||||
|
|
||||||
private readonly List<GameInfo> _Games;
|
private readonly List<GameInfo> _Games;
|
||||||
private readonly List<GameInfo> _FilteredGames;
|
private readonly List<GameInfo> _FilteredGames;
|
||||||
|
private int _SelectedGameIndex;
|
||||||
|
|
||||||
public List<GameInfo> Games
|
public List<GameInfo> Games
|
||||||
{
|
{
|
||||||
@@ -59,6 +60,7 @@ namespace SAM.Picker
|
|||||||
{
|
{
|
||||||
this._Games = new List<GameInfo>();
|
this._Games = new List<GameInfo>();
|
||||||
this._FilteredGames = new List<GameInfo>();
|
this._FilteredGames = new List<GameInfo>();
|
||||||
|
this._SelectedGameIndex = -1;
|
||||||
this._LogosAttempted = new List<string>();
|
this._LogosAttempted = new List<string>();
|
||||||
this._LogoQueue = new ConcurrentQueue<GameInfo>();
|
this._LogoQueue = new ConcurrentQueue<GameInfo>();
|
||||||
|
|
||||||
@@ -318,14 +320,32 @@ namespace SAM.Picker
|
|||||||
this._CallbackTimer.Enabled = true;
|
this._CallbackTimer.Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnSelectGame(object sender, EventArgs e)
|
private void OnSelectGame(object sender, ListViewItemSelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (this._GameListView.SelectedItems.Count == 0)
|
if (e.IsSelected == true && e.ItemIndex != this._SelectedGameIndex)
|
||||||
|
{
|
||||||
|
this._SelectedGameIndex = e.ItemIndex;
|
||||||
|
}
|
||||||
|
else if (e.IsSelected == true && e.ItemIndex == this._SelectedGameIndex)
|
||||||
|
{
|
||||||
|
this._SelectedGameIndex = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnActivateGame(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (this._SelectedGameIndex < 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var info = this._GameListView.SelectedItems[0].Tag as GameInfo;
|
var index = this._SelectedGameIndex;
|
||||||
|
if (index < 0 || index >= this._FilteredGames.Count)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var info = this._FilteredGames[index];
|
||||||
if (info == null)
|
if (info == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user