forked from BeyondDimension/SteamTools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
181 additions
and
124 deletions.
There are no files selected for viewing
Submodule ArchiSteamFarm
updated
from 9f89bb to 731495
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/ST.Client.Desktop.Avalonia/Application/Converters/ASF/BotStatusConverter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using System.Linq; | ||
using ArchiSteamFarm.Steam; | ||
#if !__MOBILE__ | ||
using Avalonia.Data.Converters; | ||
#else | ||
using Xamarin.Forms; | ||
#endif | ||
|
||
namespace System.Application.Converters | ||
{ | ||
public class BotStatusConverter : IValueConverter | ||
{ | ||
public object? Convert(object? value, Type? targetType, object? parameter, CultureInfo? culture) | ||
{ | ||
if (value is Bot bot && bot != null) | ||
{ | ||
if (!bot.KeepRunning) | ||
return "未启用"; | ||
if (!bot.IsConnectedAndLoggedOn) | ||
return "离线"; | ||
if (bot.CardsFarmer.Paused || | ||
bot.CardsFarmer.TimeRemaining == TimeSpan.Zero) | ||
return "在线"; | ||
if (!bot.CardsFarmer.CurrentGamesFarmingReadOnly.Any()) | ||
return "在线"; | ||
return "正在挂卡"; | ||
} | ||
return value; | ||
} | ||
|
||
public object? ConvertBack(object? value, Type? targetType, object? parameter, CultureInfo? culture) => throw new NotImplementedException(); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.