Skip to content

Commit

Permalink
Remove obsolete files and transfer 'ClippingBorder' and 'Basic' style…
Browse files Browse the repository at this point in the history
…s to ScenariumEditor.NET

The commit mainly deletes obsolete files from the Editor.NET project and moves 'ClippingBorder.cs' and 'Basic.xaml' styles to ScenariumEditor.NET. Other files like 'ClickControl.cs', 'MainWindow.xaml.cs', etc. which are not needed in the current scope of the application, have been removed.
  • Loading branch information
xorza committed May 18, 2024
1 parent 483f5cb commit 5388782
Show file tree
Hide file tree
Showing 19 changed files with 48 additions and 67 deletions.
14 changes: 0 additions & 14 deletions Editor.NET/Editor.NET.sln.DotSettings

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Editor.NET", "Editor.NET\Editor.NET.csproj", "{346482BC-E92E-4E4C-BF00-F382DF4B54DA}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScenariumEditor.NET", "ScenariumEditor.NET\ScenariumEditor.NET.csproj", "{346482BC-E92E-4E4C-BF00-F382DF4B54DA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Application x:Class="Editor.NET.App"
<Application x:Class="ScenariumEditor.NET.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Editor.NET"
xmlns:local="clr-namespace:ScenariumEditor.NET"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary Source="Styles/Styles.xaml"></ResourceDictionary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Threading.Tasks;
using System.Windows;

namespace Editor.NET
namespace ScenariumEditor.NET
{
/// <summary>
/// Interaction logic for App.xaml
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Windows.Controls;
using System.Windows.Input;

namespace Editor.NET;
namespace ScenariumEditor.NET;

public class ClickControl : Control {
private bool _leftButtonDown;
Expand All @@ -14,21 +14,21 @@ protected ClickControl() {
MouseLeftButtonUp += MouseLeftButtonUpHandler;
}

public event MouseButtonEventHandler? LeftButtonClick;
public event MouseButtonEventHandler LeftButtonClick;

private void MouseEnterHandler(object? sender, RoutedEventArgs ea) {
private void MouseEnterHandler(object sender, RoutedEventArgs ea) {
_leftButtonDown = false;

InvalidateVisual();
}

private void MouseLeftButtonDownHandler(object? sender, MouseButtonEventArgs ea) {
private void MouseLeftButtonDownHandler(object sender, MouseButtonEventArgs ea) {
_leftButtonDown = true;

InvalidateVisual();
}

private void MouseLeftButtonUpHandler(object? sender, MouseButtonEventArgs ea) {
private void MouseLeftButtonUpHandler(object sender, MouseButtonEventArgs ea) {
if (_leftButtonDown) {
LeftButtonClick?.Invoke(sender, ea);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Windows.Input;
using System.Windows.Media;

namespace Editor.NET;
namespace ScenariumEditor.NET;

public class ConnectionEventArgs : RoutedEventArgs {
public ConnectionEventArgs(Connection connection) {
Expand Down Expand Up @@ -67,7 +67,7 @@ private static void Position_PropertyChangedCallback(DependencyObject d, Depende
((UIElement)d).InvalidateVisual();
}

private void LeftButtonClickHandler(object? sender, MouseButtonEventArgs ea) {
private void LeftButtonClickHandler(object sender, MouseButtonEventArgs ea) {
}

private void MouseButtonEventHandler(object sender, MouseButtonEventArgs e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Windows.Controls;
using System.Windows.Media;

namespace Editor.NET.Controls;
namespace ScenariumEditor.NET.Controls;

public class ClippingBorder : Border {
private readonly RectangleGeometry _clipRect = new RectangleGeometry();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Window x:Class="Editor.NET.MainWindow"
<Window x:Class="ScenariumEditor.NET.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:Editor.NET"
xmlns:viewModel="clr-namespace:Editor.NET.ViewModel"
xmlns:local="clr-namespace:ScenariumEditor.NET"
xmlns:viewModel="clr-namespace:ScenariumEditor.NET.ViewModel"

d:DataContext="{d:DesignInstance Type=viewModel:DesignMainWindowViewModel}"
mc:Ignorable="d"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Editor.NET.ViewModel;
using ScenariumEditor.NET.ViewModel;

namespace Editor.NET;
namespace ScenariumEditor.NET;

public partial class MainWindow : Window {
private readonly MainWindowViewModel _viewModel = new DesignMainWindowViewModel();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<UserControl x:Class="Editor.NET.Node"
<UserControl x:Class="ScenariumEditor.NET.Node"
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:sys="clr-namespace:System;assembly=mscorlib"
xmlns:local="clr-namespace:Editor.NET"
xmlns:viewModel="clr-namespace:Editor.NET.ViewModel"
xmlns:local="clr-namespace:ScenariumEditor.NET"
xmlns:viewModel="clr-namespace:ScenariumEditor.NET.ViewModel"
d:DataContext="{d:DesignInstance Type=viewModel:DesignNode}"
mc:Ignorable="d"
Width="Auto"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using Editor.NET.ViewModel;
using ScenariumEditor.NET.ViewModel;

namespace Editor.NET;
namespace ScenariumEditor.NET;

public partial class Node : UserControl {
private Point _dragTitleMousePosition;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,9 @@
<Nullable>disable</Nullable>
<UseWPF>true</UseWPF>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>ScenariumEditor.NET</RootNamespace>
</PropertyGroup>

<ItemGroup>
<Page Update="Styles\Basic.xaml">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>Wpf</XamlRuntime>
<SubType>Designer</SubType>
</Page>
</ItemGroup>


</Project>
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Editor.NET.Controls"
x:Class="Editor.NET.Styles.WindowResourceDictionary">
xmlns:controls="clr-namespace:ScenariumEditor.NET.Controls"
x:Class="ScenariumEditor.NET.Styles.WindowResourceDictionary">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Basic.xaml"></ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Windows.Input;
using System.Windows.Shapes;

namespace Editor.NET.Styles;
namespace ScenariumEditor.NET.Styles;

class NormalWindowPosition {
public Point Position { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
using System.Runtime.CompilerServices;
using System.Windows;

namespace Editor.NET.ViewModel;
namespace ScenariumEditor.NET.ViewModel;

public enum DataType {
Number,
String,
}

public class MainWindowViewModel : INotifyPropertyChanged {
private Node? _selectoedNode;
private Node _selectedNode;

public MainWindowViewModel() {
}
Expand All @@ -22,22 +22,22 @@ public MainWindowViewModel() {

public ObservableCollection<Connection> Connections { get; } = new();

public Node? SelectoedNode {
get => _selectoedNode;
public Node SelectoedNode {
get => _selectedNode;
set {
if (Equals(value, _selectoedNode)) return;
_selectoedNode = value;
if (Equals(value, _selectedNode)) return;
_selectedNode = value;
OnPropertyChanged();
}
}

public event PropertyChangedEventHandler? PropertyChanged;
public event PropertyChangedEventHandler PropertyChanged;

protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null) {
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) {
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}

protected bool SetField<T>(ref T field, T value, [CallerMemberName] string? propertyName = null) {
protected bool SetField<T>(ref T field, T value, [CallerMemberName] string propertyName = null) {
if (EqualityComparer<T>.Default.Equals(field, value)) return false;
field = value;
OnPropertyChanged(propertyName);
Expand Down Expand Up @@ -122,13 +122,13 @@ public bool IsEvent {
}
}

public event PropertyChangedEventHandler? PropertyChanged;
public event PropertyChangedEventHandler PropertyChanged;

protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null) {
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) {
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}

protected bool SetField<T>(ref T field, T value, [CallerMemberName] string? propertyName = null) {
protected bool SetField<T>(ref T field, T value, [CallerMemberName] string propertyName = null) {
if (EqualityComparer<T>.Default.Equals(field, value)) return false;
field = value;
OnPropertyChanged(propertyName);
Expand Down Expand Up @@ -210,13 +210,13 @@ public Point NodeCanvasPosition {
}
}

public event PropertyChangedEventHandler? PropertyChanged;
public event PropertyChangedEventHandler PropertyChanged;

protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null) {
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) {
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}

protected bool SetField<T>(ref T field, T value, [CallerMemberName] string? propertyName = null) {
protected bool SetField<T>(ref T field, T value, [CallerMemberName] string propertyName = null) {
if (EqualityComparer<T>.Default.Equals(field, value)) return false;
field = value;
OnPropertyChanged(propertyName);
Expand Down Expand Up @@ -311,13 +311,13 @@ public Input Trigger {
public ObservableCollection<Output> Outputs { get; } = new();
public ObservableCollection<Output> Events { get; } = new();

public event PropertyChangedEventHandler? PropertyChanged;
public event PropertyChangedEventHandler PropertyChanged;

protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null) {
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) {
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}

protected bool SetField<T>(ref T field, T value, [CallerMemberName] string? propertyName = null) {
protected bool SetField<T>(ref T field, T value, [CallerMemberName] string propertyName = null) {
if (EqualityComparer<T>.Default.Equals(field, value)) return false;
field = value;
OnPropertyChanged(propertyName);
Expand All @@ -326,13 +326,13 @@ protected bool SetField<T>(ref T field, T value, [CallerMemberName] string? prop
}

public class Connection : INotifyPropertyChanged {
public event PropertyChangedEventHandler? PropertyChanged;
public event PropertyChangedEventHandler PropertyChanged;

protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null) {
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) {
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}

protected bool SetField<T>(ref T field, T value, [CallerMemberName] string? propertyName = null) {
protected bool SetField<T>(ref T field, T value, [CallerMemberName] string propertyName = null) {
if (EqualityComparer<T>.Default.Equals(field, value)) return false;
field = value;
OnPropertyChanged(propertyName);
Expand Down

0 comments on commit 5388782

Please sign in to comment.