mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-18 06:29:44 +08:00
adjusting event names
This commit is contained in:
parent
24664cc859
commit
4c88c9b029
@ -11,5 +11,4 @@
|
||||
WindowStyle="None"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent"
|
||||
Loaded="onLoad"/>
|
||||
|
||||
Loaded="OnLoaded"/>
|
||||
|
@ -70,7 +70,7 @@ namespace FancyZonesEditor
|
||||
Height = _settings.WorkArea.Height;
|
||||
}
|
||||
|
||||
void onLoad(object sender, RoutedEventArgs e)
|
||||
private void OnLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ShowLayoutPicker();
|
||||
}
|
||||
|
@ -40,26 +40,26 @@ namespace FancyZonesEditor
|
||||
|
||||
// Initialize the five default layout models: Focus, Columns, Rows, Grid, and PriorityGrid
|
||||
_defaultModels = new List<LayoutModel>(5);
|
||||
_focusModel = new CanvasLayoutModel("Focus", c_focusModelId, (int)_workArea.Width, (int)_workArea.Height);
|
||||
_focusModel = new CanvasLayoutModel("Focus", _focusModelId, (int)_workArea.Width, (int)_workArea.Height);
|
||||
_defaultModels.Add(_focusModel);
|
||||
|
||||
_columnsModel = new GridLayoutModel("Columns", c_columnsModelId);
|
||||
_columnsModel = new GridLayoutModel("Columns", _columnsModelId);
|
||||
_columnsModel.Rows = 1;
|
||||
_columnsModel.RowPercents = new int[1] { c_multiplier };
|
||||
_defaultModels.Add(_columnsModel);
|
||||
|
||||
_rowsModel = new GridLayoutModel("Rows", c_rowsModelId);
|
||||
_rowsModel = new GridLayoutModel("Rows", _rowsModelId);
|
||||
_rowsModel.Columns = 1;
|
||||
_rowsModel.ColumnPercents = new int[1] { c_multiplier };
|
||||
_defaultModels.Add(_rowsModel);
|
||||
|
||||
_gridModel = new GridLayoutModel("Grid", c_gridModelId);
|
||||
_gridModel = new GridLayoutModel("Grid", _gridModelId);
|
||||
_defaultModels.Add(_gridModel);
|
||||
|
||||
_priorityGridModel = new GridLayoutModel("Priority Grid", c_priorityGridModelId);
|
||||
_priorityGridModel = new GridLayoutModel("Priority Grid", _priorityGridModelId);
|
||||
_defaultModels.Add(_priorityGridModel);
|
||||
|
||||
_blankCustomModel = new CanvasLayoutModel("Create new custom", c_blankCustomModelId, (int)_workArea.Width, (int)_workArea.Height);
|
||||
_blankCustomModel = new CanvasLayoutModel("Create new custom", _blankCustomModelId, (int)_workArea.Width, (int)_workArea.Height);
|
||||
|
||||
_zoneCount = ReadRegistryInt("ZoneCount", 3);
|
||||
_spacing = ReadRegistryInt("Spacing", 16);
|
||||
@ -371,7 +371,7 @@ namespace FancyZonesEditor
|
||||
|
||||
public static bool IsPredefinedLayout(LayoutModel model)
|
||||
{
|
||||
return (model.Id >= c_lastPrefinedId);
|
||||
return model.Id >= _lastPrefinedId;
|
||||
}
|
||||
|
||||
// implementation of INotifyProeprtyChanged
|
||||
@ -380,8 +380,7 @@ namespace FancyZonesEditor
|
||||
// FirePropertyChanged -- wrapper that calls INPC.PropertyChanged
|
||||
protected virtual void FirePropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChangedEventHandler handler = PropertyChanged;
|
||||
if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
// storage for Default Layout Models
|
||||
@ -393,13 +392,13 @@ namespace FancyZonesEditor
|
||||
private GridLayoutModel _priorityGridModel;
|
||||
private CanvasLayoutModel _blankCustomModel;
|
||||
|
||||
private static readonly ushort c_focusModelId = 0xFFFF;
|
||||
private static readonly ushort c_rowsModelId = 0xFFFE;
|
||||
private static readonly ushort c_columnsModelId = 0xFFFD;
|
||||
private static readonly ushort c_gridModelId = 0xFFFC;
|
||||
private static readonly ushort c_priorityGridModelId = 0xFFFB;
|
||||
private static readonly ushort c_blankCustomModelId = 0xFFFA;
|
||||
private static readonly ushort c_lastPrefinedId = c_blankCustomModelId;
|
||||
private static readonly ushort _focusModelId = 0xFFFF;
|
||||
private static readonly ushort _rowsModelId = 0xFFFE;
|
||||
private static readonly ushort _columnsModelId = 0xFFFD;
|
||||
private static readonly ushort _gridModelId = 0xFFFC;
|
||||
private static readonly ushort _priorityGridModelId = 0xFFFB;
|
||||
private static readonly ushort _blankCustomModelId = 0xFFFA;
|
||||
private static readonly ushort _lastPrefinedId = _blankCustomModelId;
|
||||
|
||||
// hard coded data for all the "Priority Grid" configurations that are unique to "Grid"
|
||||
private static byte[][] _priorityData = new byte[][]
|
||||
|
@ -3,7 +3,6 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:FancyZonesEditor"
|
||||
mc:Ignorable="d"
|
||||
Title="Window1" Height="450" Width="800"
|
||||
WindowState="Maximized"
|
||||
@ -12,7 +11,7 @@
|
||||
WindowStyle="None"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent"
|
||||
Loaded="onLoad"
|
||||
Loaded="OnLoaded"
|
||||
>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@ using System.Windows;
|
||||
namespace FancyZonesEditor
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for Window1.xaml
|
||||
/// Interaction logic for WindowLayout.xaml
|
||||
/// </summary>
|
||||
public partial class WindowLayout : Window
|
||||
{
|
||||
@ -16,9 +16,9 @@ namespace FancyZonesEditor
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
void onLoad(object sender, RoutedEventArgs e)
|
||||
private void OnLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
//WindowEditor window = new WindowEditor(); window.Show();
|
||||
// WindowEditor window = new WindowEditor(); window.Show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user