Fix most warnings.

This commit is contained in:
Dean Herbert
2017-03-07 10:59:19 +09:00
parent 9106c45858
commit 0cad5d7d41
168 changed files with 504 additions and 473 deletions

View File

@ -46,12 +46,12 @@ namespace osu.Game.Overlays.Options
private Bindable<T> bindable;
void bindable_ValueChanged(object sender, EventArgs e)
private void bindable_ValueChanged(object sender, EventArgs e)
{
dropdown.SelectedValue = bindable.Value;
}
void dropdown_ValueChanged(object sender, EventArgs e)
private void dropdown_ValueChanged(object sender, EventArgs e)
{
bindable.Value = dropdown.SelectedValue;
}

View File

@ -7,7 +7,7 @@ using osu.Game.Graphics.Sprites;
namespace osu.Game.Overlays.Options
{
class OptionLabel : OsuSpriteText
internal class OptionLabel : OsuSpriteText
{
[BackgroundDependencyLoader]
private void load(OsuColour colour)

View File

@ -11,8 +11,7 @@ namespace osu.Game.Overlays.Options
{
public abstract class OptionsSubsection : FillFlowContainer
{
private Container<Drawable> content;
protected override Container<Drawable> Content => content;
protected override Container<Drawable> Content { get; }
protected abstract string Header { get; }
@ -29,7 +28,7 @@ namespace osu.Game.Overlays.Options
Margin = new MarginPadding { Bottom = 10 },
Font = @"Exo2.0-Black",
},
content = new FillFlowContainer
Content = new FillFlowContainer
{
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 5),

View File

@ -32,12 +32,11 @@ namespace osu.Game.Overlays.Options.Sections.Audio
private void updateItems()
{
var deviceItems = new List<KeyValuePair<string, string>>();
deviceItems.Add(new KeyValuePair<string, string>("Default", string.Empty));
var deviceItems = new List<KeyValuePair<string, string>> { new KeyValuePair<string, string>("Default", string.Empty) };
deviceItems.AddRange(audio.AudioDeviceNames.Select(d => new KeyValuePair<string, string>(d, d)));
var preferredDeviceName = audio.AudioDevice.Value;
if (!deviceItems.Any(kv => kv.Value == preferredDeviceName))
if (deviceItems.All(kv => kv.Value != preferredDeviceName))
deviceItems.Add(new KeyValuePair<string, string>(preferredDeviceName, preferredDeviceName));
dropdown.Items = deviceItems;
@ -51,7 +50,7 @@ namespace osu.Game.Overlays.Options.Sections.Audio
Children = new Drawable[]
{
dropdown = new OptionDropDown<string>()
dropdown = new OptionDropDown<string>
{
Bindable = audio.AudioDevice
},

View File

@ -84,7 +84,7 @@ namespace osu.Game.Overlays.Options.Sections.General
}
}
class LoginForm : FillFlowContainer
private class LoginForm : FillFlowContainer
{
private TextBox username;
private TextBox password;