mirror of
https://github.com/bitwarden/mobile
synced 2026-01-03 17:13:50 +00:00
Changed all C# control flow block statements to include space between keyword and open paren (#800)
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Bit.App.Pages
|
||||
SetActivityIndicator();
|
||||
_vm = BindingContext as GeneratorHistoryPageViewModel;
|
||||
_vm.Page = this;
|
||||
if(Device.RuntimePlatform == Device.iOS)
|
||||
if (Device.RuntimePlatform == Device.iOS)
|
||||
{
|
||||
ToolbarItems.Add(_closeItem);
|
||||
ToolbarItems.Add(_moreItem);
|
||||
@@ -40,7 +40,7 @@ namespace Bit.App.Pages
|
||||
|
||||
private async void Close_Clicked(object sender, System.EventArgs e)
|
||||
{
|
||||
if(DoOnce())
|
||||
if (DoOnce())
|
||||
{
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
@@ -48,13 +48,13 @@ namespace Bit.App.Pages
|
||||
|
||||
private async void More_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
if(!DoOnce())
|
||||
if (!DoOnce())
|
||||
{
|
||||
return;
|
||||
}
|
||||
var selection = await DisplayActionSheet(AppResources.Options, AppResources.Cancel,
|
||||
null, AppResources.Clear);
|
||||
if(selection == AppResources.Clear)
|
||||
if (selection == AppResources.Clear)
|
||||
{
|
||||
await _vm.ClearAsync();
|
||||
}
|
||||
|
||||
@@ -23,9 +23,9 @@ namespace Bit.App.Pages
|
||||
_fromTabPage = fromTabPage;
|
||||
_selectAction = selectAction;
|
||||
var isIos = Device.RuntimePlatform == Device.iOS;
|
||||
if(selectAction != null)
|
||||
if (selectAction != null)
|
||||
{
|
||||
if(isIos)
|
||||
if (isIos)
|
||||
{
|
||||
ToolbarItems.Add(_closeItem);
|
||||
}
|
||||
@@ -33,7 +33,7 @@ namespace Bit.App.Pages
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isIos)
|
||||
if (isIos)
|
||||
{
|
||||
ToolbarItems.Add(_moreItem);
|
||||
}
|
||||
@@ -42,7 +42,7 @@ namespace Bit.App.Pages
|
||||
ToolbarItems.Add(_historyItem);
|
||||
}
|
||||
}
|
||||
if(isIos)
|
||||
if (isIos)
|
||||
{
|
||||
_typePicker.On<iOS>().SetUpdateMode(UpdateMode.WhenFinished);
|
||||
}
|
||||
@@ -56,7 +56,7 @@ namespace Bit.App.Pages
|
||||
protected async override void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
if(!_fromTabPage)
|
||||
if (!_fromTabPage)
|
||||
{
|
||||
await InitAsync();
|
||||
}
|
||||
@@ -64,7 +64,7 @@ namespace Bit.App.Pages
|
||||
|
||||
protected override bool OnBackButtonPressed()
|
||||
{
|
||||
if(Device.RuntimePlatform == Device.Android && _tabsPage != null)
|
||||
if (Device.RuntimePlatform == Device.Android && _tabsPage != null)
|
||||
{
|
||||
_tabsPage.ResetToVaultPage();
|
||||
return true;
|
||||
@@ -84,13 +84,13 @@ namespace Bit.App.Pages
|
||||
|
||||
private async void More_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
if(!DoOnce())
|
||||
if (!DoOnce())
|
||||
{
|
||||
return;
|
||||
}
|
||||
var selection = await DisplayActionSheet(AppResources.Options, AppResources.Cancel,
|
||||
null, AppResources.PasswordHistory);
|
||||
if(selection == AppResources.PasswordHistory)
|
||||
if (selection == AppResources.PasswordHistory)
|
||||
{
|
||||
var page = new GeneratorHistoryPage();
|
||||
await Navigation.PushModalAsync(new Xamarin.Forms.NavigationPage(page));
|
||||
@@ -115,7 +115,7 @@ namespace Bit.App.Pages
|
||||
|
||||
private async void Close_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
if(DoOnce())
|
||||
if (DoOnce())
|
||||
{
|
||||
await Navigation.PopModalAsync();
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace Bit.App.Pages
|
||||
get => _length;
|
||||
set
|
||||
{
|
||||
if(SetProperty(ref _length, value))
|
||||
if (SetProperty(ref _length, value))
|
||||
{
|
||||
_options.Length = value;
|
||||
var task = SliderInputAsync();
|
||||
@@ -80,7 +80,7 @@ namespace Bit.App.Pages
|
||||
get => _uppercase;
|
||||
set
|
||||
{
|
||||
if(SetProperty(ref _uppercase, value))
|
||||
if (SetProperty(ref _uppercase, value))
|
||||
{
|
||||
_options.Uppercase = value;
|
||||
var task = SaveOptionsAsync();
|
||||
@@ -93,7 +93,7 @@ namespace Bit.App.Pages
|
||||
get => _lowercase;
|
||||
set
|
||||
{
|
||||
if(SetProperty(ref _lowercase, value))
|
||||
if (SetProperty(ref _lowercase, value))
|
||||
{
|
||||
_options.Lowercase = value;
|
||||
var task = SaveOptionsAsync();
|
||||
@@ -106,7 +106,7 @@ namespace Bit.App.Pages
|
||||
get => _number;
|
||||
set
|
||||
{
|
||||
if(SetProperty(ref _number, value))
|
||||
if (SetProperty(ref _number, value))
|
||||
{
|
||||
_options.Number = value;
|
||||
var task = SaveOptionsAsync();
|
||||
@@ -119,7 +119,7 @@ namespace Bit.App.Pages
|
||||
get => _special;
|
||||
set
|
||||
{
|
||||
if(SetProperty(ref _special, value))
|
||||
if (SetProperty(ref _special, value))
|
||||
{
|
||||
_options.Special = value;
|
||||
var task = SaveOptionsAsync();
|
||||
@@ -132,7 +132,7 @@ namespace Bit.App.Pages
|
||||
get => _avoidAmbiguous;
|
||||
set
|
||||
{
|
||||
if(SetProperty(ref _avoidAmbiguous, value))
|
||||
if (SetProperty(ref _avoidAmbiguous, value))
|
||||
{
|
||||
_options.Ambiguous = !value;
|
||||
var task = SaveOptionsAsync();
|
||||
@@ -145,7 +145,7 @@ namespace Bit.App.Pages
|
||||
get => _minNumber;
|
||||
set
|
||||
{
|
||||
if(SetProperty(ref _minNumber, value))
|
||||
if (SetProperty(ref _minNumber, value))
|
||||
{
|
||||
_options.MinNumber = value;
|
||||
var task = SaveOptionsAsync();
|
||||
@@ -158,7 +158,7 @@ namespace Bit.App.Pages
|
||||
get => _minSpecial;
|
||||
set
|
||||
{
|
||||
if(SetProperty(ref _minSpecial, value))
|
||||
if (SetProperty(ref _minSpecial, value))
|
||||
{
|
||||
_options.MinSpecial = value;
|
||||
var task = SaveOptionsAsync();
|
||||
@@ -171,7 +171,7 @@ namespace Bit.App.Pages
|
||||
get => _numWords;
|
||||
set
|
||||
{
|
||||
if(SetProperty(ref _numWords, value))
|
||||
if (SetProperty(ref _numWords, value))
|
||||
{
|
||||
_options.NumWords = value;
|
||||
var task = SaveOptionsAsync();
|
||||
@@ -184,12 +184,12 @@ namespace Bit.App.Pages
|
||||
get => _wordSeparator;
|
||||
set
|
||||
{
|
||||
if(value == null)
|
||||
if (value == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var val = value.Trim();
|
||||
if(SetProperty(ref _wordSeparator, val))
|
||||
if (SetProperty(ref _wordSeparator, val))
|
||||
{
|
||||
_options.WordSeparator = val;
|
||||
var task = SaveOptionsAsync();
|
||||
@@ -202,7 +202,7 @@ namespace Bit.App.Pages
|
||||
get => _capitalize;
|
||||
set
|
||||
{
|
||||
if(SetProperty(ref _capitalize, value))
|
||||
if (SetProperty(ref _capitalize, value))
|
||||
{
|
||||
_options.Capitalize = value;
|
||||
var task = SaveOptionsAsync();
|
||||
@@ -215,7 +215,7 @@ namespace Bit.App.Pages
|
||||
get => _includeNumber;
|
||||
set
|
||||
{
|
||||
if(SetProperty(ref _includeNumber, value))
|
||||
if (SetProperty(ref _includeNumber, value))
|
||||
{
|
||||
_options.Number = value;
|
||||
var task = SaveOptionsAsync();
|
||||
@@ -240,7 +240,7 @@ namespace Bit.App.Pages
|
||||
get => _typeSelectedIndex;
|
||||
set
|
||||
{
|
||||
if(SetProperty(ref _typeSelectedIndex, value))
|
||||
if (SetProperty(ref _typeSelectedIndex, value))
|
||||
{
|
||||
IsPassword = value == 0;
|
||||
var task = SaveOptionsAsync();
|
||||
@@ -264,7 +264,7 @@ namespace Bit.App.Pages
|
||||
|
||||
public async Task SaveOptionsAsync(bool regenerate = true)
|
||||
{
|
||||
if(!_doneIniting)
|
||||
if (!_doneIniting)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -272,7 +272,7 @@ namespace Bit.App.Pages
|
||||
_passwordGenerationService.NormalizeOptions(_options, _enforcedPolicyOptions);
|
||||
await _passwordGenerationService.SaveOptionsAsync(_options);
|
||||
LoadFromOptions();
|
||||
if(regenerate)
|
||||
if (regenerate)
|
||||
{
|
||||
await RegenerateAsync();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user