This commit is contained in:
2022-05-02 22:17:39 +10:00
commit 2321afafb9
1554 changed files with 14276 additions and 0 deletions

Binary file not shown.

BIN
.vs/ERD/v17/.futdcache.v1 Normal file

Binary file not shown.

BIN
.vs/ERD/v17/.suo Normal file

Binary file not shown.

25
ERD.sln Normal file
View File

@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32328.378
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ERD", "ERD\ERD.csproj", "{E49F17A2-F0D9-43D4-BA01-40F8A93539BF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E49F17A2-F0D9-43D4-BA01-40F8A93539BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E49F17A2-F0D9-43D4-BA01-40F8A93539BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E49F17A2-F0D9-43D4-BA01-40F8A93539BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E49F17A2-F0D9-43D4-BA01-40F8A93539BF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F876A936-A4B1-475B-92FE-E7565F1134DC}
EndGlobalSection
EndGlobal

45
ERD/App.xaml Normal file
View File

@@ -0,0 +1,45 @@
<Application x:Class="ERD.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:ERD"
StartupUri="MainWindow.xaml">
<Application.Resources>
<!-- MoveThumb Template -->
<ControlTemplate x:Key="MoveThumbTemplate" TargetType="{x:Type local:MoveThumb}">
<Rectangle Fill="White"/>
</ControlTemplate>
<!-- ResizeDecorator Template -->
<ControlTemplate x:Key="ResizeDecoratorTemplate" TargetType="{x:Type Control}">
<Grid>
<local:ResizeThumb Height="3" Cursor="SizeNS" Margin="0 -4 0 0"
VerticalAlignment="Top" HorizontalAlignment="Stretch"/>
<local:ResizeThumb Width="3" Cursor="SizeWE" Margin="-4 0 0 0"
VerticalAlignment="Stretch" HorizontalAlignment="Left"/>
<local:ResizeThumb Width="3" Cursor="SizeWE" Margin="0 0 -4 0"
VerticalAlignment="Stretch" HorizontalAlignment="Right"/>
<local:ResizeThumb Height="3" Cursor="SizeNS" Margin="0 0 0 -4"
VerticalAlignment="Bottom" HorizontalAlignment="Stretch"/>
<local:ResizeThumb Width="7" Height="7" Cursor="SizeNWSE" Margin="-6 -6 0 0"
VerticalAlignment="Top" HorizontalAlignment="Left"/>
<local:ResizeThumb Width="7" Height="7" Cursor="SizeNESW" Margin="0 -6 -6 0"
VerticalAlignment="Top" HorizontalAlignment="Right"/>
<local:ResizeThumb Width="7" Height="7" Cursor="SizeNESW" Margin="-6 0 0 -6"
VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
<local:ResizeThumb Width="7" Height="7" Cursor="SizeNWSE" Margin="0 0 -6 -6"
VerticalAlignment="Bottom" HorizontalAlignment="Right"/>
</Grid>
</ControlTemplate>
<!-- Designer Item Template-->
<ControlTemplate x:Key="DesignerItemTemplate" TargetType="ContentControl">
<Grid DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}">
<local:MoveThumb Template="{StaticResource MoveThumbTemplate}" Cursor="SizeAll"/>
<Control Template="{StaticResource ResizeDecoratorTemplate}"/>
<ContentPresenter Content="{TemplateBinding ContentControl.Content}"/>
</Grid>
</ControlTemplate>
</Application.Resources>
</Application>

17
ERD/App.xaml.cs Normal file
View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace ERD
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}

10
ERD/AssemblyInfo.cs Normal file
View File

@@ -0,0 +1,10 @@
using System.Windows;
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]

View File

@@ -0,0 +1,39 @@
<UserControl x:Class="ERD.Components.EntityCard"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ERD.Components"
xmlns:space="clr-namespace:ERD"
mc:Ignorable="d"
Width="130"
Name="asd"
MinWidth="50"
Height="130"
MinHeight="50"
Template="{StaticResource DesignerItemTemplate}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1.5*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBox HorizontalContentAlignment="Center" BorderThickness ="0" Grid.Row="0" FontSize="25" Grid.Column="0"/>
<Separator Grid.Row="1" Grid.Column ="0" Margin="0" Background="Black"></Separator>
<TextBox HorizontalContentAlignment="Center" BorderThickness ="0" Grid.Row="2" FontSize="20" Grid.Column="0"/>
<TextBox HorizontalContentAlignment="Center" BorderThickness ="0" Grid.Row="3" FontSize="20" Grid.Column="0"/>
<TextBox HorizontalContentAlignment="Center" BorderThickness ="0" Grid.Row="4" FontSize="20" Grid.Column="0"/>
<TextBox HorizontalContentAlignment="Center" BorderThickness ="0" Grid.Row="5" FontSize="20" Grid.Column="0"/>
</Grid>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
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;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ERD.Components
{
/// <summary>
/// Interaction logic for EntityCard.xaml
/// </summary>
public partial class EntityCard : UserControl
{
public EntityCard()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,15 @@
<UserControl x:Class="ERD.Components.ellipse"
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"
Width="130"
MinWidth="50"
Height="130"
MinHeight="50"
Name="Hello"
Canvas.Top="10"
Canvas.Left="470"
Template="{StaticResource DesignerItemTemplate}">
<Ellipse Fill="Red"
IsHitTestVisible="False"/>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
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;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ERD.Components
{
/// <summary>
/// Interaction logic for ellipse.xaml
/// </summary>
public partial class ellipse : UserControl
{
public ellipse()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
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;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace ERD.Diagramming_Logic
{
internal class CanvasHandler
{
public MainWindow window;
public CanvasHandler(MainWindow window)
{
this.window = window;
}
/// <summary>
/// When the canvas is right clicked:
/// Gives options for what shape the user wants to insert
/// </summary>
public void OnRightClick()
{
new InsertElementMenu(this);
}
}
}

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace ERD.Diagramming_Logic.Elements
{
internal abstract class Element
{
protected CanvasHandler Handler;
protected Canvas canvas;
protected Element(CanvasHandler handler)
{
Handler = handler;
canvas = Handler.window.DrawingCanvas;
}
public abstract string GetMenuHeader();
public abstract void CreateElement(object sender, RoutedEventArgs e);
}
}

View File

@@ -0,0 +1,135 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Mime;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Shapes;
namespace ERD.Diagramming_Logic.Elements
{
internal class RectangleElement : Element
{
public override string GetMenuHeader()
{
return this.GetType().Name;
}
public override void CreateElement(object sender, RoutedEventArgs e)
{
TextBox rect = new TextBox()
{
Height = 150,
Width = 150,
//Stroke = Brushes.Black,
//StrokeThickness = 5,
//Fill = Brushes.Red
};
RepeatButton repeatButton = new RepeatButton()
{
Height = 150,
Width = 150,
Background = Brushes.Blue,
Delay = 500,
Interval = 1
};
repeatButton.Cursor = Cursors.SizeAll;
repeatButton.Content = rect;
repeatButton.Tag = "R" + (canvas.Children.Count - 1).ToString();
rect.MouseLeave += UnsetReadOnly;
rect.MouseMove += SetReadOnly;
Trace.WriteLine($"It's {(repeatButton.ActualWidth / 2)}");
Canvas.SetLeft(repeatButton, (canvas.ActualWidth / 2) - (repeatButton.Width / 2));
Canvas.SetTop(repeatButton, (canvas.ActualHeight / 2) - (repeatButton.Height / 2));
//repeatButton.Click += Holding;
repeatButton.MouseMove += Holding;
canvas.Children.Add(repeatButton);
}
private void SetReadOnly(object sender, MouseEventArgs e)
{
if (!Keyboard.Modifiers.HasFlag(ModifierKeys.Control)) return;
TextBox box = sender as TextBox;
box.Cursor = Cursors.SizeAll;
box.Background = Brushes.LightBlue;
box.Focusable = false;
}
private void UnsetReadOnly(object sender, MouseEventArgs e)
{
TextBox box = sender as TextBox;
box.IsReadOnly = false;
box.Background = Brushes.White;
box.Cursor = Cursors.IBeam;
box.Focusable = true;
}
private Point mousePosition, objectPosition;
private void Holding(object sender, RoutedEventArgs e)
{
if (!Keyboard.Modifiers.HasFlag(ModifierKeys.Control)) return;
var button = sender as RepeatButton;
if (mousePosition.X == 0 && objectPosition.X == 0)
{
mousePosition = Handler.window.mousePoint;
return;
}
var newMousePos = Handler.window.mousePoint;
var delta = newMousePos - mousePosition;
objectPosition.X = Canvas.GetLeft(button) + delta.X;
objectPosition.Y = Canvas.GetTop(button) + delta.Y;
Canvas.SetLeft(button, objectPosition.X);
Canvas.SetTop(button, objectPosition.Y);
mousePosition.X = 0;
objectPosition.X = 0;
}
private void OnHold(object sender, MouseButtonEventArgs e)
{
/*
Point dragStartPoint, objectStartLocation;
Trace.WriteLine("Nigger");
var r = sender as Rectangle ?? throw new InvalidOperationException();
dragStartPoint.X = e.GetPosition(Handler.window).X;
dragStartPoint.Y = e.GetPosition(Handler.window).Y;
objectStartLocation.X = Canvas.GetLeft(r);
objectStartLocation.Y = Canvas.GetTop(r);
double deltaX = Handler.window.mousePoint.X - dragStartPoint.X;
double deltaY = Handler.window.mousePoint.Y - dragStartPoint.Y;*/
}
public RectangleElement(CanvasHandler handler) : base(handler)
{
}
}
}

View File

@@ -0,0 +1,60 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using ERD.Diagramming_Logic.Elements;
namespace ERD.Diagramming_Logic
{
internal class InsertElementMenu
{
private readonly CanvasHandler _handler;
private readonly ContextMenu _contextMenu;
public InsertElementMenu(CanvasHandler handler)
{
_handler = handler;
_contextMenu = new ContextMenu();
InitializeMenu();
}
/// <summary>
/// Called in constructor to initialize the menu
/// </summary>
private void InitializeMenu()
{
_contextMenu.Placement = System.Windows.Controls.Primitives.PlacementMode.MousePoint;
AssignMenuItems();
_contextMenu.IsOpen = true;
}
/// <summary>
/// Called when initializing to assign all elements to the menu
/// </summary>
private void AssignMenuItems()
{
var elements = GetElements();
foreach (var element in elements)
{
var item = new MenuItem() { Header = element.GetMenuHeader() };
item.Click += element.CreateElement;
_contextMenu.Items.Add(item);
}
}
/// <summary>
/// Gets all elements used in the assembly. Used when assigning the menu.
/// </summary>
private IEnumerable<Element> GetElements()
{
var elementType = typeof(Element);
IEnumerable<Element> elements = this.GetType().Assembly.GetTypes()
.Where(p => elementType.IsAssignableFrom(p) && !p.IsAbstract)
.Select(r => Activator.CreateInstance(r, _handler) as Element)!;
return elements;
}
}
}

10
ERD/ERD.csproj Normal file
View File

@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,4 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/WebPathMapping/MappedPaths/=COMPONENTS_005CMAINWINDOW_002EXAML/@EntryIndexedValue"></s:String>
<s:String x:Key="/Default/CodeInspection/WebPathMapping/PathsInCorrectCasing/=COMPONENTS_005CMAINWINDOW_002EXAML/@EntryIndexedValue">Components\MainWindow.xaml</s:String></wpf:ResourceDictionary>

23
ERD/ERD.csproj.user Normal file
View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<ItemGroup>
<Compile Update="Components\ellipse.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="Components\EntityCard.xaml.cs">
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Page Update="Components\ellipse.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="Components\EntityCard.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="MainWindow.xaml">
<SubType>Designer</SubType>
</Page>
</ItemGroup>
</Project>

57
ERD/MainWindow.xaml Normal file
View File

@@ -0,0 +1,57 @@
<Window x:Class="ERD.MainWindow"
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:ERD"
xmlns:custom="clr-namespace:ERD.Diagramming_Logic.Elements"
xmlns:components="clr-namespace:ERD.Components"
mc:Ignorable="d"
Loaded="MainWindow_OnLoaded"
Title="MainWindow" Height="450" Width="800">
<Grid>
<Canvas x:Name="DrawingCanvas" KeyUp="KeyUnpressed" KeyDown="KeyPressed" MouseDown="DrawingCanvas_OnMouseDown" PreviewMouseRightButtonUp="DrawingCanvas_PreviewMouseRightButtonUp" PreviewMouseMove="DrawingCanvas_OnPreviewMouseMove" Background="LightGray">
<ContentControl Width="130"
Name="Entity"
MinWidth="50"
Height="130"
MinHeight="50"
Canvas.Top="150"
Canvas.Left="470"
Template="{StaticResource DesignerItemTemplate}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1.5*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBox HorizontalContentAlignment="Center" BorderThickness ="0" Grid.Row="0" FontSize="25" Grid.Column="0"/>
<Separator Grid.Row="1" Grid.Column ="0" Margin="0" Background="Black"></Separator>
<TextBox HorizontalContentAlignment="Center" BorderThickness ="0" Grid.Row="2" FontSize="20" Grid.Column="0"/>
<TextBox HorizontalContentAlignment="Center" BorderThickness ="0" Grid.Row="3" FontSize="20" Grid.Column="0"/>
<TextBox HorizontalContentAlignment="Center" BorderThickness ="0" Grid.Row="4" FontSize="20" Grid.Column="0"/>
<TextBox HorizontalContentAlignment="Center" BorderThickness ="0" Grid.Row="5" FontSize="20" Grid.Column="0"/>
</Grid>
</ContentControl>
</Canvas>
</Grid>
</Window>

259
ERD/MainWindow.xaml.cs Normal file
View File

@@ -0,0 +1,259 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Mime;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ERD.Components;
using ERD.Diagramming_Logic;
namespace ERD
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private readonly CanvasHandler _handler;
public Point mousePoint;
public static Canvas mainCanvas;
public void NewEntityCard()
{
var entity = new EntityCard();
mainCanvas.Children.Add(entity);
Canvas.SetLeft(entity, (mainCanvas.ActualWidth / 2) - (entity.ActualWidth / 2));
Canvas.SetTop(entity, (mainCanvas.ActualHeight / 2) - (entity.ActualWidth / 2));
}
public MainWindow()
{
_handler = new CanvasHandler(this);
InitializeComponent();
}
private void DrawingCanvas_PreviewMouseRightButtonUp(object sender, MouseButtonEventArgs e)
{
//_handler.OnRightClick();
}
private void DrawingCanvas_OnPreviewMouseMove(object sender, MouseEventArgs e)
{
mousePoint.X = e.GetPosition(this).X;
mousePoint.Y = e.GetPosition(this).Y;
}
private void UIElement_OnMouseMove(object sender, MouseEventArgs e)
{
if (!Keyboard.Modifiers.HasFlag(ModifierKeys.Control)) return;
TextBox box = sender as TextBox;
box.Cursor = Cursors.SizeAll;
box.Background = Brushes.LightBlue;
box.Focusable = false;
}
private void DrawingCanvas_OnMouseDown(object sender, MouseButtonEventArgs e)
{
Entity.Focus();
}
private void Unmoveable(object sender, RoutedEventArgs e)
{
}
private void Moveable(object sender, KeyEventArgs e)
{
}
private void KeyPressed(object sender, KeyEventArgs e)
{
Grid grid = Entity.Content as Grid;
switch (e.Key)
{
case Key.Multiply:
{
NewEntityCard();
break;
}
case Key.Add:
{
for (int i = 0; i < grid.Children.Count; i++)
{
UIElement element = grid.Children[i];
if (element.GetType() == typeof(TextBox))
{
TextBox tbox = element as TextBox;
if (tbox.IsMouseOver)
{
Entity.Focus();
tbox.FontSize += 2;
}
}
}
break;
}
case Key.Subtract:
{
for (int i = 0; i < grid.Children.Count; i++)
{
UIElement element = grid.Children[i];
if (element.GetType() == typeof(TextBox))
{
TextBox tbox = element as TextBox;
if (tbox.IsMouseOver)
{
Entity.Focus();
tbox.FontSize -= 2;
}
}
}
break;
}
case Key.System:
{
for (int i = 0; i < grid.Children.Count; i++)
{
UIElement element = grid.Children[i];
if (element.GetType() == typeof(TextBox))
{
TextBox tbox = element as TextBox;
tbox.IsHitTestVisible = false;
}
}
break;
}
case Key.NumPad0:
{
SetPrimaryKey();
break;
}
case Key.RightShift:
{
for (int i = 0; i < grid.Children.Count; i++)
{
UIElement element = grid.Children[i];
if (element.GetType() == typeof(TextBox))
{
TextBox tbox = element as TextBox;
if (tbox.IsMouseOver)
{
DrawingCanvas.Children.Remove(Entity);
}
}
}
break;
}
}
}
void SetPrimaryKey()
{
Grid grid = Entity.Content as Grid;
for (int i = 0; i < grid.Children.Count; i++)
{
UIElement element = grid.Children[i];
if (element.GetType() == typeof(TextBox))
{
TextBox tbox = element as TextBox;
if (tbox.IsMouseOver)
{
var decorations = tbox.TextDecorations;
var weight = tbox.FontWeight;
if (weight == FontWeights.Regular)
{
ChangeToKey(tbox, grid);
}
else
{
tbox.TextDecorations = null;
tbox.FontWeight = FontWeights.Regular;
}
}
}
}
}
void SwapTop(TextBox tbox, Grid grid)
{
var row = Grid.GetRow(tbox);
if (row > 2)
{
var checkingRow = row - 1;
var parent = GetGridElement(grid, checkingRow, 0) as TextBox;
if (parent.TextDecorations != TextDecorations.Underline)
{
Trace.WriteLine("Need to move to the top");
Grid.SetRow(parent, row);
Grid.SetRow(tbox, row - 1);
SwapTop(tbox, grid);
}
}
}
void ChangeToKey(TextBox tbox, Grid grid)
{
var row = Grid.GetRow(tbox);
Trace.WriteLine($"Changing to primary key {row}");
SwapTop(tbox, grid);
tbox.TextDecorations = TextDecorations.Underline;
tbox.FontWeight = FontWeights.Bold;
}
UIElement GetGridElement(Grid g, int r, int c)
{
for (int i = 0; i < g.Children.Count; i++)
{
UIElement e = g.Children[i];
if (Grid.GetRow(e) == r && Grid.GetColumn(e) == c)
return e;
}
return null;
}
private void KeyUnpressed(object sender, KeyEventArgs e)
{
Grid grid = Entity.Content as Grid; ;
for (int i = 0; i < grid.Children.Count; i++)
{
UIElement element = grid.Children[i];
if (element.GetType() == typeof(TextBox))
{
TextBox tbox = element as TextBox;
tbox.IsHitTestVisible = true;
}
}
}
private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)
{
mainCanvas = DrawingCanvas;
}
}
}

47
ERD/MoveThumb.cs Normal file
View File

@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Mime;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
namespace ERD
{
public class MoveThumb : Thumb
{
public MoveThumb()
{
DragDelta += MoveThumb_DragDelta;
}
private void MoveThumb_DragDelta(object sender, DragDeltaEventArgs e)
{
var x = Application.Current.MainWindow;
Control designerItem = (this.DataContext as ContentControl);
if (designerItem != null)
{
double left = Canvas.GetLeft(designerItem);
double top = Canvas.GetTop(designerItem);
Trace.WriteLine(left);
var eHorizontalChange = left + e.HorizontalChange;
var eVerticalChange = top + e.VerticalChange;
eHorizontalChange = Math.Clamp(eHorizontalChange, 0, MainWindow.mainCanvas.ActualWidth - designerItem.ActualWidth);
eVerticalChange = Math.Clamp(eVerticalChange, 0, MainWindow.mainCanvas.ActualHeight - designerItem.ActualHeight);
Canvas.SetLeft(designerItem, eHorizontalChange);
Canvas.SetTop(designerItem, eVerticalChange);
}
}
}
}

69
ERD/ResizeThumb.cs Normal file
View File

@@ -0,0 +1,69 @@
using System;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Mime;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Shapes;
namespace ERD
{
public class ResizeThumb : Thumb
{
public ResizeThumb()
{
DragDelta += new DragDeltaEventHandler(this.ResizeThumb_DragDelta);
}
private void ResizeThumb_DragDelta(object sender, DragDeltaEventArgs e)
{
Control designerItem = this.DataContext as Control;
if (designerItem != null)
{
double deltaVertical, deltaHorizontal;
switch (VerticalAlignment)
{
case VerticalAlignment.Bottom:
deltaVertical = Math.Min(-e.VerticalChange, designerItem.ActualHeight - designerItem.MinHeight);
designerItem.Height -= deltaVertical;
break;
case VerticalAlignment.Top:
deltaVertical = Math.Min(e.VerticalChange, designerItem.ActualHeight - designerItem.MinHeight);
Canvas.SetTop(designerItem, Canvas.GetTop(designerItem) + deltaVertical);
designerItem.Height -= deltaVertical;
break;
default:
break;
}
switch (HorizontalAlignment)
{
case HorizontalAlignment.Left:
deltaHorizontal = Math.Min(e.HorizontalChange, designerItem.ActualWidth - designerItem.MinWidth);
Canvas.SetLeft(designerItem, Canvas.GetLeft(designerItem) + deltaHorizontal);
designerItem.Width -= deltaHorizontal;
break;
case HorizontalAlignment.Right:
deltaHorizontal = Math.Min(-e.HorizontalChange, designerItem.ActualWidth - designerItem.MinWidth);
designerItem.Width -= deltaHorizontal;
break;
default:
break;
}
}
e.Handled = true;
}
}
}

View File

@@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v5.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v5.0": {
"ERD/1.0.0": {
"runtime": {
"ERD.dll": {}
}
}
}
},
"libraries": {
"ERD/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,8 @@
{
"runtimeOptions": {
"additionalProbingPaths": [
"C:\\Users\\dhanr\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\dhanr\\.nuget\\packages"
]
}
}

View File

@@ -0,0 +1,9 @@
{
"runtimeOptions": {
"tfm": "net5.0",
"framework": {
"name": "Microsoft.WindowsDesktop.App",
"version": "5.0.0"
}
}
}

View File

@@ -0,0 +1,23 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v5.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v5.0": {
"ERD/1.0.0": {
"runtime": {
"ERD.dll": {}
}
}
}
},
"libraries": {
"ERD/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,8 @@
{
"runtimeOptions": {
"additionalProbingPaths": [
"C:\\Users\\dhanr\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\dhanr\\.nuget\\packages"
]
}
}

View File

@@ -0,0 +1,12 @@
{
"runtimeOptions": {
"tfm": "net5.0",
"framework": {
"name": "Microsoft.WindowsDesktop.App",
"version": "5.0.0"
},
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
}
}
}

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v5.0", FrameworkDisplayName = "")]

Binary file not shown.

View File

@@ -0,0 +1,84 @@
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7DA0297AA8E0A106E59F1A2E23EDB5C17C688292"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using ERD;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Controls.Ribbon;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace ERD {
/// <summary>
/// App
/// </summary>
public partial class App : System.Windows.Application {
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "6.0.3.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
#line 5 "..\..\..\App.xaml"
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
#line default
#line hidden
System.Uri resourceLocater = new System.Uri("/ERD;component/app.xaml", System.UriKind.Relative);
#line 1 "..\..\..\App.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
/// <summary>
/// Application Entry Point.
/// </summary>
[System.STAThreadAttribute()]
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "6.0.3.0")]
public static void Main() {
ERD.App app = new ERD.App();
app.InitializeComponent();
app.Run();
}
}
}

View File

@@ -0,0 +1,84 @@
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "7DA0297AA8E0A106E59F1A2E23EDB5C17C688292"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using ERD;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Controls.Ribbon;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace ERD {
/// <summary>
/// App
/// </summary>
public partial class App : System.Windows.Application {
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "6.0.3.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
#line 5 "..\..\..\App.xaml"
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
#line default
#line hidden
System.Uri resourceLocater = new System.Uri("/ERD;V1.0.0.0;component/app.xaml", System.UriKind.Relative);
#line 1 "..\..\..\App.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
/// <summary>
/// Application Entry Point.
/// </summary>
[System.STAThreadAttribute()]
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "6.0.3.0")]
public static void Main() {
ERD.App app = new ERD.App();
app.InitializeComponent();
app.Run();
}
}
}

View File

@@ -0,0 +1,91 @@
#pragma checksum "..\..\..\..\Components\EntityCard.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "9BC7193E6A638AA0A07AB8F605BC75237FF028DF"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using ERD;
using ERD.Components;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Controls.Ribbon;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace ERD.Components {
/// <summary>
/// EntityCard
/// </summary>
public partial class EntityCard : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
#line 10 "..\..\..\..\Components\EntityCard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal ERD.Components.EntityCard asd;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "6.0.3.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/ERD;component/components/entitycard.xaml", System.UriKind.Relative);
#line 1 "..\..\..\..\Components\EntityCard.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "6.0.3.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
this.asd = ((ERD.Components.EntityCard)(target));
return;
}
this._contentLoaded = true;
}
}
}

View File

@@ -0,0 +1,91 @@
#pragma checksum "..\..\..\..\Components\EntityCard.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "9BC7193E6A638AA0A07AB8F605BC75237FF028DF"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using ERD;
using ERD.Components;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Controls.Ribbon;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace ERD.Components {
/// <summary>
/// EntityCard
/// </summary>
public partial class EntityCard : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
#line 10 "..\..\..\..\Components\EntityCard.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal ERD.Components.EntityCard asd;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "6.0.3.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/ERD;V1.0.0.0;component/components/entitycard.xaml", System.UriKind.Relative);
#line 1 "..\..\..\..\Components\EntityCard.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "6.0.3.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
this.asd = ((ERD.Components.EntityCard)(target));
return;
}
this._contentLoaded = true;
}
}
}

Binary file not shown.

View File

@@ -0,0 +1,89 @@
#pragma checksum "..\..\..\..\Components\ellipse.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "D8615DD82E4B4339D9FB3F993CE1AF2E4BE97A22"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Controls.Ribbon;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace ERD.Components {
/// <summary>
/// ellipse
/// </summary>
public partial class ellipse : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
#line 9 "..\..\..\..\Components\ellipse.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal ERD.Components.ellipse Hello;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "6.0.3.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/ERD;component/components/ellipse.xaml", System.UriKind.Relative);
#line 1 "..\..\..\..\Components\ellipse.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "6.0.3.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
this.Hello = ((ERD.Components.ellipse)(target));
return;
}
this._contentLoaded = true;
}
}
}

View File

@@ -0,0 +1,89 @@
#pragma checksum "..\..\..\..\Components\ellipse.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "D8615DD82E4B4339D9FB3F993CE1AF2E4BE97A22"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Controls.Ribbon;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace ERD.Components {
/// <summary>
/// ellipse
/// </summary>
public partial class ellipse : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
#line 9 "..\..\..\..\Components\ellipse.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal ERD.Components.ellipse Hello;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "6.0.3.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/ERD;V1.0.0.0;component/components/ellipse.xaml", System.UriKind.Relative);
#line 1 "..\..\..\..\Components\ellipse.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "6.0.3.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
this.Hello = ((ERD.Components.ellipse)(target));
return;
}
this._contentLoaded = true;
}
}
}

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("ERD")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("ERD")]
[assembly: System.Reflection.AssemblyTitleAttribute("ERD")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
61c3035b205dcb1c14ed456c623594e5cb24119d

View File

@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net5.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = ERD
build_property.ProjectDir = D:\csharp\wpf1\ERD\ERD\

Binary file not shown.

View File

@@ -0,0 +1 @@
e0c143eba75bcd097edaf0175d41a1a916c26c38

View File

@@ -0,0 +1,28 @@
D:\csharp\wpf1\ERD\ERD\bin\Debug\net5.0-windows\ERD.exe
D:\csharp\wpf1\ERD\ERD\bin\Debug\net5.0-windows\ERD.deps.json
D:\csharp\wpf1\ERD\ERD\bin\Debug\net5.0-windows\ERD.runtimeconfig.json
D:\csharp\wpf1\ERD\ERD\bin\Debug\net5.0-windows\ERD.runtimeconfig.dev.json
D:\csharp\wpf1\ERD\ERD\bin\Debug\net5.0-windows\ERD.dll
D:\csharp\wpf1\ERD\ERD\bin\Debug\net5.0-windows\ERD.pdb
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\ERD.csproj.AssemblyReference.cache
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\MainWindow.g.cs
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\App.g.cs
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\ERD_MarkupCompile.cache
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\ERD_MarkupCompile.lref
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\MainWindow.baml
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\ERD.g.resources
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\ERD.GeneratedMSBuildEditorConfig.editorconfig
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\ERD.AssemblyInfoInputs.cache
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\ERD.AssemblyInfo.cs
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\ERD.csproj.CoreCompileInputs.cache
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\ERD.dll
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\refint\ERD.dll
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\ERD.pdb
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\ERD.genruntimeconfig.cache
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\ref\ERD.dll
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\GeneratedInternalTypeHelper.g.cs
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\Components\EntityCard.g.cs
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\Components\EntityCard.baml
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\App.baml
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\Components\ellipse.g.cs
D:\csharp\wpf1\ERD\ERD\obj\Debug\net5.0-windows\Components\ellipse.baml

View File

@@ -0,0 +1,11 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v5.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v5.0": {}
},
"libraries": {}
}

View File

@@ -0,0 +1,16 @@
{
"runtimeOptions": {
"tfm": "net5.0",
"framework": {
"name": "Microsoft.WindowsDesktop.App",
"version": "5.0.0"
},
"additionalProbingPaths": [
"C:\\Users\\dhanr\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\dhanr\\.nuget\\packages"
],
"configProperties": {
"Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true
}
}
}

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
4fbab55de74e3d3f78b1e1872b242dfd852eda90

Binary file not shown.

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("ERD")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("ERD")]
[assembly: System.Reflection.AssemblyTitleAttribute("ERD")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
61c3035b205dcb1c14ed456c623594e5cb24119d

View File

@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net5.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = ERD_02yygypt_wpftmp
build_property.ProjectDir = D:\csharp\wpf1\ERD\ERD\

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("ERD")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("ERD")]
[assembly: System.Reflection.AssemblyTitleAttribute("ERD")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
61c3035b205dcb1c14ed456c623594e5cb24119d

View File

@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net5.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = ERD_0dk1slxw_wpftmp
build_property.ProjectDir = D:\csharp\wpf1\ERD\ERD\

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("ERD")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("ERD")]
[assembly: System.Reflection.AssemblyTitleAttribute("ERD")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
61c3035b205dcb1c14ed456c623594e5cb24119d

View File

@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net5.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = ERD_0gkgubhy_wpftmp
build_property.ProjectDir = D:\csharp\wpf1\ERD\ERD\

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("ERD")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("ERD")]
[assembly: System.Reflection.AssemblyTitleAttribute("ERD")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
61c3035b205dcb1c14ed456c623594e5cb24119d

View File

@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net5.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = ERD_0iy3fmfl_wpftmp
build_property.ProjectDir = D:\csharp\wpf1\ERD\ERD\

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("ERD")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("ERD")]
[assembly: System.Reflection.AssemblyTitleAttribute("ERD")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
61c3035b205dcb1c14ed456c623594e5cb24119d

View File

@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net5.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = ERD_0oi03iy1_wpftmp
build_property.ProjectDir = D:\csharp\wpf1\ERD\ERD\

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("ERD")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("ERD")]
[assembly: System.Reflection.AssemblyTitleAttribute("ERD")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
61c3035b205dcb1c14ed456c623594e5cb24119d

View File

@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net5.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = ERD_13xyd2ix_wpftmp
build_property.ProjectDir = D:\csharp\wpf1\ERD\ERD\

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("ERD")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("ERD")]
[assembly: System.Reflection.AssemblyTitleAttribute("ERD")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
61c3035b205dcb1c14ed456c623594e5cb24119d

View File

@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net5.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = ERD_142b3zyu_wpftmp
build_property.ProjectDir = D:\csharp\wpf1\ERD\ERD\

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("ERD")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("ERD")]
[assembly: System.Reflection.AssemblyTitleAttribute("ERD")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
61c3035b205dcb1c14ed456c623594e5cb24119d

View File

@@ -0,0 +1,10 @@
is_global = true
build_property.TargetFramework = net5.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = ERD_1bb3nkua_wpftmp
build_property.ProjectDir = D:\csharp\wpf1\ERD\ERD\

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("ERD")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("ERD")]
[assembly: System.Reflection.AssemblyTitleAttribute("ERD")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// Generated by the MSBuild WriteCodeFragment class.

View File

@@ -0,0 +1 @@
61c3035b205dcb1c14ed456c623594e5cb24119d

Some files were not shown because too many files have changed in this diff Show More