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
public enum Devices | |
{ | |
Phone, | |
Tablet, | |
Desktop, | |
Xbox, | |
IoT, | |
Continuum, | |
SurfaceHub | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Windows.Storage; | |
using Windows.UI.Xaml; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
public partial class MainWindow : Window | |
{ | |
public MainWindow() | |
{ | |
InitializeComponent(); | |
this.Loaded += MainWindow_Loaded; | |
} | |
private void MainWindow_Loaded(object sender, RoutedEventArgs e) |
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
public class ZIndexConverter : DependencyObject, IValueConverter | |
{ | |
public string Size | |
{ | |
get { return (string)GetValue(SizeProperty); } | |
set { SetValue(SizeProperty, value); } | |
} | |
public static readonly DependencyProperty SizeProperty = | |
DependencyProperty.Register(nameof(Size), typeof(string), typeof(ZIndexConverter), new PropertyMetadata("0,0",OnSizeChanged)); |
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
<!--Remember to RaisePropertyChanged the ZIndex when Size Changes in the Model--> | |
<!-- And the viewmodel is defined like the following: | |
<Application.Resources> | |
<vm:PackViewModel x:Key="PackViewModel"/> | |
... | |
--> | |
<Grid Opacity="0.7" SnapsToDevicePixels="False" x:Name="ObjectZIndex" Visibility="{Binding IsZIndexSelector, Converter={StaticResource BoolVisibilityConverter}}" VerticalAlignment="Top" HorizontalAlignment="Left" Background="Transparent" Width="{Binding ElementName=BackPanel, Path=ActualWidth}" Height="1" RenderTransformOrigin="0,0"> | |
<Grid.Resources> |
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
extends Node | |
enum {NON_EXISTING, LOAD_SUCCESS, LOAD_ERROR_COULDNT_OPEN} | |
const SAVE_PATH = "user://config.cfg" | |
var _config_file = ConfigFile.new() | |
func _ready(): | |
var result = load_settings() | |
if result == NON_EXISTING: | |
SetDefault() |
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
public class ListDictionaryConverter<T> : JsonConverter where T : Entity | |
{ | |
public override bool CanConvert(Type objectType) | |
{ | |
return (objectType == typeof(object)); | |
} | |
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) | |
{ | |
Dictionary<string, T> result; |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Data; | |
using System.Windows.Documents; |
OlderNewer