-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Tests and Refactored code (#2129)
* Added Tests and Refactored code * removed un-used file * delete test files when test completes * removed extra build configs * added clean-up method * removed unused variable * re-added removed attributtion * added error handling and move strings to string resource * added error handling to file explorer view model * moved varible assignment to if statement block * removed savin of settings file from the UI * re-added open source notice * added missing controls for powerrename and fancy zones * removed dead coded * remove un-used configuration * added error handling for file saving and updated powerreanme constructor * removed added configurations * added settings state
- Loading branch information
Lavius Motileng
committed
Apr 17, 2020
1 parent
7e1f554
commit 3fc738b
Showing
37 changed files
with
1,537 additions
and
503 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
18 changes: 0 additions & 18 deletions
18
src/core/Microsoft.PowerToys.Settings.Test/Microsoft.PowerToys.Settings.Test.csproj
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
53 changes: 53 additions & 0 deletions
53
src/core/Microsoft.PowerToys.Settings.UI.Lib/PowerRenameLocalProperties.cs
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 |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// Copyright (c) Microsoft Corporation | ||
// The Microsoft Corporation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Text.Json; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Microsoft.PowerToys.Settings.UI.Lib | ||
{ | ||
|
||
public class PowerRenameLocalProperties | ||
{ | ||
public PowerRenameLocalProperties() | ||
{ | ||
PersistState = false; | ||
MRUEnabled = false; | ||
MaxMRUSize = 0; | ||
ShowIcon = false; | ||
ExtendedContextMenuOnly = false; | ||
} | ||
|
||
private int _maxSize; | ||
|
||
public bool PersistState { get; set; } | ||
|
||
public bool MRUEnabled { get; set; } | ||
|
||
public int MaxMRUSize | ||
{ | ||
get | ||
{ | ||
return _maxSize; | ||
} | ||
|
||
set | ||
{ | ||
if (value < 0) | ||
{ | ||
_maxSize = 0; | ||
} | ||
} | ||
} | ||
|
||
public bool ShowIcon { get; set; } | ||
|
||
public bool ExtendedContextMenuOnly { get; set; } | ||
|
||
public string ToJsonString() | ||
{ | ||
return JsonSerializer.Serialize(this); | ||
} | ||
} | ||
} |
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
Oops, something went wrong.