mirror of
https://github.com/knah/VRCMelonAssistant.git
synced 2024-05-21 04:42:52 +12:00
use pattern matching and interpolation
This commit is contained in:
parent
d3ad20d082
commit
5901ffb5de
|
@ -409,7 +409,7 @@ namespace ModAssistant
|
|||
{
|
||||
string path = Path.GetDirectoryName(ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath);
|
||||
string logFile = $"{path}{Path.DirectorySeparatorChar}log.log";
|
||||
File.AppendAllText(logFile, $"[{DateTime.UtcNow.ToString("yyyy-mm-dd HH:mm:ss.ffffff")}][{severity.ToUpper()}] {message}\n");
|
||||
File.AppendAllText(logFile, $"[{DateTime.UtcNow:yyyy-mm-dd HH:mm:ss.ffffff}][{severity.ToUpper()}] {message}\n");
|
||||
}
|
||||
|
||||
public static async Task Download(string link, string output)
|
||||
|
|
|
@ -55,8 +55,8 @@ namespace ModAssistant.Pages
|
|||
double viewWidth = ModsListView.ActualWidth;
|
||||
double totalSize = 0;
|
||||
GridViewColumn description = null;
|
||||
GridView grid = ModsListView.View as GridView;
|
||||
if (grid != null)
|
||||
|
||||
if (ModsListView.View is GridView grid)
|
||||
{
|
||||
foreach (var column in grid.Columns)
|
||||
{
|
||||
|
@ -730,8 +730,7 @@ namespace ModAssistant.Pages
|
|||
|
||||
private void CopyText(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
||||
{
|
||||
var textBlock = sender as TextBlock;
|
||||
if (textBlock == null) { return; }
|
||||
if (!(sender is TextBlock textBlock)) { return; }
|
||||
var text = textBlock.Text;
|
||||
|
||||
// Ensure there's text to be copied
|
||||
|
|
Loading…
Reference in a new issue