-
Notifications
You must be signed in to change notification settings - Fork 3
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
7 changed files
with
74 additions
and
37 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,19 +1,26 @@ | ||
namespace Turbulence.Core.ViewModels.Design | ||
using Turbulence.Discord.Services; | ||
|
||
namespace Turbulence.Core.ViewModels.Design; | ||
|
||
public class DesignLogViewModel : LogViewModel | ||
{ | ||
public class DesignLogViewModel : LogViewModel | ||
Array types = Enum.GetValues(typeof(LogType)); | ||
Array levels = Enum.GetValues(typeof(LogLevel)); | ||
Random random = new Random(); | ||
|
||
public DesignLogViewModel() | ||
{ | ||
public DesignLogViewModel() | ||
Logs.AddRange(new LogEntry[] | ||
{ | ||
Logs.AddRange(new string[] | ||
{ | ||
"[CDN] Request 1", | ||
"[API] Request 2", | ||
}); | ||
} | ||
new("Request 1", LogType.Images, LogLevel.Debug, DateTime.Now), | ||
new("Request 2", LogType.Networking, LogLevel.Info, DateTime.Now), | ||
}); | ||
} | ||
|
||
public override void Refresh() | ||
{ | ||
Logs.Add($"[REFRESH] New Request {Logs.Count}"); | ||
} | ||
public override void Refresh() | ||
{ | ||
var type = (LogType)types.GetValue(random.Next(types.Length))!; | ||
var lvl = (LogLevel)levels.GetValue(random.Next(levels.Length))!; | ||
Logs.Add(new($"New Request {Logs.Count}", type, lvl, DateTime.Now)); | ||
} | ||
} |
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