Archived
Private
Public Access
1
0
This repository has been archived on 2026-02-04. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ProjectBackup/C#/DigiSim/Window.xaml
2022-09-04 12:45:01 +02:00

200 lines
7.9 KiB
XML

<Window x:Class="DigiSim.Window"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
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:DigiSim"
xmlns:system="clr-namespace:System;assembly=mscorlib"
mc:Ignorable="d"
Title="MainWindow" Height="720" Width="1280">
<Window.Resources>
<Brush x:Key="Cyan">#5BC0EB</Brush>
<Brush x:Key="Yellow">#FDE74C</Brush>
<Brush x:Key="Green">#9BC53D</Brush>
<Brush x:Key="Red">#E55934</Brush>
<Brush x:Key="Orange">#FA7921</Brush>
<Brush x:Key="Light">#6D6A75</Brush>
<Brush x:Key="Gray">#524E5A</Brush>
<Brush x:Key="Dark">#37323E</Brush>
<Style TargetType="{x:Type Button}" x:Key="GateButtons">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="Border" Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource Gray}" TargetName="Border" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{StaticResource Light}" TargetName="Border"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid Background="{StaticResource Dark}">
<Grid.RowDefinitions>
<RowDefinition Height="18"/>
<RowDefinition/>
<RowDefinition Height="60"/>
</Grid.RowDefinitions>
<Menu Grid.Row="0" Background="White">
<MenuItem Header="_File">
<MenuItem Header="_New" Click="NewFile"/>
<MenuItem Header="_Open"/>
<MenuItem Header="_Save"/>
<Separator/>
<MenuItem Header="_Exit"/>
</MenuItem>
<MenuItem Header="_Edit">
<MenuItem Header="_Delete all self build Gates"/>
<MenuItem Header="_Save as Gate" Click="SaveAsGate"/>
</MenuItem>
<MenuItem Header="_Board">
<MenuItem Header="_Add Input"/>
<MenuItem Header="_Add Output"/>
</MenuItem>
<MenuItem Header="_Gates" x:Name="CustomGates">
</MenuItem>
</Menu>
<Canvas Grid.Row="1" Background="{StaticResource Gray}" Margin="50" x:Name="Canvas"/>
<Grid Grid.Row="2">
<Grid.Resources>
<system:Double x:Key="Width">75</system:Double>
</Grid.Resources>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button
Width="{StaticResource Width}"
Margin="5"
FontSize="20"
Background="{StaticResource Light}"
Foreground="White"
Style="{StaticResource GateButtons}"
Click="GateButtonClick"
x:Name="BtnInput"
Content="Input"/>
<Button
Width="{StaticResource Width}"
Margin="5"
FontSize="20"
Background="{StaticResource Light}"
Foreground="White"
Style="{StaticResource GateButtons}"
Click="GateButtonClick"
x:Name="BtnOutput"
Content="Output"/>
<Button
Width="{StaticResource Width}"
Margin="5"
FontSize="20"
Background="{StaticResource Light}"
Foreground="White"
Style="{StaticResource GateButtons}"
Click="GateButtonClick"
x:Name="BtnButton"
Content="Button"/>
<Button
Width="{StaticResource Width}"
Margin="5"
FontSize="20"
Background="{StaticResource Light}"
Foreground="White"
Style="{StaticResource GateButtons}"
Click="GateButtonClick"
x:Name="BtnSplitter"
Content="Splitter"/>
<Button
Width="{StaticResource Width}"
Margin="5"
FontSize="20"
Background="{StaticResource Light}"
Foreground="White"
Style="{StaticResource GateButtons}"
Click="GateButtonClick"
x:Name="BtnAnd"
Content="AND"/>
<Button
Width="{StaticResource Width}"
Margin="5"
FontSize="20"
Background="{StaticResource Light}"
Foreground="White"
Style="{StaticResource GateButtons}"
Click="GateButtonClick"
x:Name="BtnNand"
Content="NAND"/>
<Button
Width="{StaticResource Width}"
Margin="5"
FontSize="20"
Background="{StaticResource Light}"
Foreground="White"
Style="{StaticResource GateButtons}"
Click="GateButtonClick"
x:Name="BtnOr"
Content="OR"/>
<Button
Width="{StaticResource Width}"
Margin="5"
FontSize="20"
Background="{StaticResource Light}"
Foreground="White"
Style="{StaticResource GateButtons}"
Click="GateButtonClick"
x:Name="BtnNor"
Content="NOR"/>
<Button
Width="{StaticResource Width}"
Margin="5"
FontSize="20"
Background="{StaticResource Light}"
Foreground="White"
Style="{StaticResource GateButtons}"
Click="GateButtonClick"
x:Name="BtnNot"
Content="NOT"/>
<Button
Width="{StaticResource Width}"
Margin="5"
FontSize="20"
Background="{StaticResource Light}"
Foreground="White"
Style="{StaticResource GateButtons}"
Click="GateButtonClick"
x:Name="BtnXor"
Content="XOR"/>
<Button
Width="{StaticResource Width}"
Margin="5"
FontSize="20"
Background="{StaticResource Light}"
Foreground="White"
Style="{StaticResource GateButtons}"
Click="GateButtonClick"
x:Name="BtnXnor"
Content="XNOR"/>
</StackPanel>
</Grid>
</Grid>
</Window>