mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 13:32:54 +08:00
Fix some surrounding code formatting
This commit is contained in:
parent
53ff0802cb
commit
370775af68
@ -462,10 +462,10 @@ namespace osu.Game.Database
|
||||
if (retrievedItem == null)
|
||||
throw new ArgumentException(@"Specified model could not be found", nameof(item));
|
||||
|
||||
var filename = $"{getValidFilename(item.ToString())}{HandledExtensions.First()}";
|
||||
string filename = $"{getValidFilename(item.ToString())}{HandledExtensions.First()}";
|
||||
|
||||
using (var outputStream = exportStorage.GetStream(filename, FileAccess.Write, FileMode.Create))
|
||||
ExportModelTo(retrievedItem, outputStream);
|
||||
using (var stream = exportStorage.GetStream(filename, FileAccess.Write, FileMode.Create))
|
||||
ExportModelTo(retrievedItem, stream);
|
||||
|
||||
exportStorage.PresentFileExternally(filename);
|
||||
}
|
||||
|
@ -109,11 +109,12 @@ namespace osu.Game.Graphics
|
||||
if (Interlocked.Decrement(ref screenShotTasks) == 0 && cursorVisibility.Value == false)
|
||||
cursorVisibility.Value = true;
|
||||
|
||||
var fileName = getFileName();
|
||||
if (fileName == null) return;
|
||||
string filename = getFilename();
|
||||
|
||||
var stream = storage.GetStream(fileName, FileAccess.Write);
|
||||
if (filename == null) return;
|
||||
|
||||
using (var stream = storage.GetStream(filename, FileAccess.Write))
|
||||
{
|
||||
switch (screenshotFormat.Value)
|
||||
{
|
||||
case ScreenshotFormat.Png:
|
||||
@ -129,20 +130,21 @@ namespace osu.Game.Graphics
|
||||
default:
|
||||
throw new InvalidOperationException($"Unknown enum member {nameof(ScreenshotFormat)} {screenshotFormat.Value}.");
|
||||
}
|
||||
}
|
||||
|
||||
notificationOverlay.Post(new SimpleNotification
|
||||
{
|
||||
Text = $"{fileName} saved!",
|
||||
Text = $"{filename} saved!",
|
||||
Activated = () =>
|
||||
{
|
||||
storage.PresentFileExternally(fileName);
|
||||
storage.PresentFileExternally(filename);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
private string getFileName()
|
||||
private string getFilename()
|
||||
{
|
||||
var dt = DateTime.Now;
|
||||
var fileExt = screenshotFormat.ToString().ToLowerInvariant();
|
||||
|
Loading…
Reference in New Issue
Block a user