FancyZonesEditor: open a tab with the selected layout on startup (#715)

This commit is contained in:
yuyoyuppe
2019-11-15 10:40:10 +03:00
committed by GitHub
parent 0082f56b58
commit cb13cfdda7
3 changed files with 41 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
@@ -38,7 +38,8 @@ namespace FancyZonesEditor
}
private int _WrapPanelItemSize = 262;
public int WrapPanelItemSize {
public int WrapPanelItemSize
{
get
{
return _WrapPanelItemSize;
@@ -238,4 +239,23 @@ namespace FancyZonesEditor
return null;
}
}
public class BooleanToIntConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value is bool)
{
return (bool)value == true ? 1 : 0;
}
return 0;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value is int)
{
return (int)value == 1;
}
return false;
}
}
}