Skip to content

Commit f23b214

Browse files
committed
add readme file with hotkeys
1 parent 5b2e69a commit f23b214

17 files changed

+70
-35
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Ctrl + A = Select All
2+
Ctrl + S = Save
3+
Ctrl + Shift + S = Save As
4+
Ctrl + Shift + O = Open
5+
Ctrl + Shift + N = New
6+
Alt + F4 = Exit
7+
Ctrl + Shift + Alt + J = Export to JPEG
8+
Ctrl + Z = Undo
9+
Ctrl + Y = Redo
10+
Ctrl + N = Add Node
11+
Ctrl + LMB on Canvas = Start Select
12+
Ctrl + LMB on Connector = Create Loop
13+
LMB on Connector = Start create Connect
14+
Alt + LMB on Connector = Move Connector in Node
15+
Alt + LMB on Canvas = Start Cut
16+
Delete = Delete Selected Elements
17+
C + Delete = Delete Selected Connector
18+
N + Delete = Delete Selected Nodes
19+
20+

SimpleStateMachineNodeEditor/SimpleStateMachineNodeEditor.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,10 @@
5454
<PackageReference Include="Splat.Drawing" Version="9.4.5" />
5555
</ItemGroup>
5656

57+
<ItemGroup>
58+
<None Update="README.txt">
59+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
60+
</None>
61+
</ItemGroup>
62+
5763
</Project>

SimpleStateMachineNodeEditor/View/MainWindow.xaml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
<RowDefinition Height="auto"></RowDefinition>
1616
<RowDefinition Height="auto" x:Name="Fotter" MinHeight="18"></RowDefinition>
1717
</Grid.RowDefinitions>
18+
19+
<!--#region Header-->
1820
<DockPanel x:Name="Header" Grid.Row="0" Background="{StaticResource ColorWindowHeader}" LastChildFill="False">
21+
<!--#region Menu-->
1922
<!--OpacityMask - it's color on MouseOver-->
2023
<Menu Background="{StaticResource ColorMenuBackground}" Foreground="{StaticResource ColorMenuForeground}" BorderBrush="{StaticResource ColorMenuBorder}" OpacityMask="{StaticResource ColorMenuBackgroundMouseOver}" Template="{StaticResource MenuTemplate}" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Center">
2124
<MenuItem Header="File" x:Name="Item" Style="{StaticResource StyleMenuItem}" Margin="3,0,3,0">
@@ -73,7 +76,9 @@
7376
</MenuItem>
7477
</MenuItem>
7578
</Menu>
76-
79+
80+
<!--#endregion Menu-->
81+
<!--#region Main Panel-->
7782
<!--BorderBrush - it's Background color on IsMouseOver, OpacityMask - it's color on IsPressed-->
7883
<Button DockPanel.Dock="Right" x:Name="ButtonClose" ToolTip="Close" Style="{StaticResource StyleHeaderButton}" Background="{StaticResource ColorWindowHeader}" BorderBrush="{StaticResource ColorWindowHeaderButtonCloseBackgroundMouseOver}" OpacityMask="{StaticResource ColorWindowHeaderButtonCloseBackgroundPressed}" Padding="7" Grid.IsSharedSizeScope="True" Margin="0,0,-7,0">
7984
<Rectangle Fill="{StaticResource IconClose}" Height="11" Width="11"/>
@@ -85,10 +90,12 @@
8590
<Button DockPanel.Dock="Right" x:Name="ButtonMin" ToolTip="Minimize" Style="{StaticResource StyleHeaderButton}" Background="{StaticResource ColorWindowHeader}" BorderBrush="{StaticResource ColorWindowHeaderButtonBackgroundMouseOver}" OpacityMask="{StaticResource ColorWindowHeaderButtonBackgroundPressed}" >
8691
<Rectangle Fill="{StaticResource IconMinimize}" Height="1" Width="11" />
8792
</Button>
93+
94+
<!--For Name of scheme-->
8895
<Label x:Name="LabelSchemeName" Style="{StaticResource StyleLabel}" BorderBrush="{StaticResource ColorNodesCanvasBackground}" Background="{StaticResource ColorNodesCanvasBackground}" BorderThickness="10,5,10,5" Margin="10, 0, 0 ,0" HorizontalAlignment="Right" VerticalAlignment="Center" Foreground="{StaticResource ColorMenuForeground}">
8996
<Label.ContextMenu>
9097
<ContextMenu Template="{StaticResource TemplateContextMenu}" Background="{StaticResource ColorMenuBackground}" BorderBrush="{StaticResource ColorMenuBorder}" OpacityMask="{StaticResource ColorWindowHeaderButtonBackgroundMouseOver}" Foreground="{StaticResource ColorMenuForeground}" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Center" >
91-
<MenuItem Header="Copy" x:Name="ItemSchemeName" InputGestureText="Ctrl+C" Style="{StaticResource StyleContextMenuItem}">
98+
<MenuItem Header="Copy" x:Name="ItemCopySchemeName" InputGestureText="Ctrl+C" Style="{StaticResource StyleContextMenuItem}">
9299
<MenuItem.Icon>
93100
<Rectangle Fill="{StaticResource IconCopy}" Height="15" Width="13"/>
94101
</MenuItem.Icon>
@@ -99,9 +106,12 @@
99106
<KeyBinding x:Name="BindingCopySchemeName" Key="C" Modifiers="Control" />
100107
</Label.InputBindings>
101108
</Label>
102-
103109
<Button DockPanel.Dock="Right" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="{x:Null}" />
110+
<!--#endregion Main Panel-->
104111
</DockPanel>
112+
<!--#endregion Header-->
113+
114+
<!--#region ToolBar-->
105115
<ToolBarTray Grid.Row="1" IsLocked="True" Background="{x:Null}">
106116
<ToolBar Style="{StaticResource ToolBarTemplate}" Background="{x:Null}" Foreground="{x:Null}" >
107117
<Button x:Name="ButtonNew" ToolTip="New (Ctrl+N)" Style="{StaticResource StyleHeaderButton}" Background="{StaticResource ColorWindowHeader}" BorderBrush="{StaticResource ColorWindowHeaderButtonBackgroundMouseOver}">
@@ -145,13 +155,19 @@
145155
</Button>
146156
</ToolBar>
147157
</ToolBarTray>
158+
<!--#endregion ToolBar-->
159+
160+
<!--#region Tabs-->
148161
<!--BorderBrush - it's color on IsMouseOver, OpacityMask - it's color on IsPressed-->
149162
<TabControl Grid.Row="2" Background="{x:Null}" BorderBrush="{x:Null}" TabStripPlacement="Top" Padding="2,2,2,0" >
150163
<TabItem Header="Node editor" Style="{StaticResource StyleTabItem}" Background="{StaticResource ColorWindowHeader}" Foreground="{StaticResource ColorWindowHeaderTabItemForeground}" BorderBrush="{StaticResource ColorElementMouseOver}" OpacityMask="{StaticResource ColorElementMouseOver}">
151164
<view:ViewNodesCanvas x:Name="NodesCanvas" />
152165
</TabItem>
153166
<!--<TabItem Header="Transitions table" ToolTip="" Style="{StaticResource StyleTabItem}" Foreground="{StaticResource ColorForeground}"/>-->
154167
</TabControl>
168+
<!--#endregion Tabs-->
169+
170+
<!--#region Error List-->
155171
<GridSplitter Grid.Row="3" x:Name="ErrorListSplitter" HorizontalAlignment="Stretch" Background="{StaticResource ColorWindowHeader}" Height="3" ShowsPreview="False" IsEnabled="False"/>
156172
<Expander Style="{StaticResource StyleExpander}" x:Name="ErrorListExpander" Grid.Row="4" HorizontalContentAlignment="Stretch" ExpandDirection="Up" Margin="3,0,0,0" >
157173
<Expander.Header>
@@ -207,11 +223,10 @@
207223
</ListBox>
208224
</Expander.Content>
209225
</Expander>
226+
<!--#endregion Error List-->
210227
</Grid>
211228

212229
<Window.InputBindings>
213-
<!--<KeyBinding x:Name="BindingUndo" Key="Z" Modifiers="Control" />
214-
<KeyBinding x:Name="BindingRedo" Key="Y" Modifiers="Control" />-->
215230
<KeyBinding x:Name="BindingSave" Gesture="Ctrl+S"/>
216231
<KeyBinding x:Name="BindingSaveAs" Gesture="Ctrl+Shift+S"/>
217232
<KeyBinding x:Name="BindingOpen" Gesture="Ctrl+Shift+O" />

SimpleStateMachineNodeEditor/View/MainWindow.xaml.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ private void SetupBinding()
6161
{
6262
var SelectedItem = this.ObservableForProperty(x => x.MessageList.SelectedItem).Select(x=>(x.Value as ViewModelMessage)?.Text);
6363
this.BindCommand(this.ViewModel, x => x.CommandCopyError, x => x.BindingCopyError, SelectedItem).DisposeWith(disposable);
64-
this.BindCommand(this.ViewModel, x => x.CommandCopyError, x => x.ItemCopyError, SelectedItem).DisposeWith(disposable);
65-
64+
this.BindCommand(this.ViewModel, x => x.CommandCopyError, x => x.ItemCopyError, SelectedItem).DisposeWith(disposable);
6665

6766
this.OneWayBind(this.ViewModel, x => x.Messages, x => x.MessageList.ItemsSource).DisposeWith(disposable);
6867
this.OneWayBind(this.ViewModel, x => x.DebugEnable, x => x.LabelDebug.Visibility).DisposeWith(disposable);
@@ -72,6 +71,10 @@ private void SetupBinding()
7271
this.OneWayBind(this.ViewModel, x => x.CountInformation, x => x.LabelInformation.Content, value => value.ToString() + " Information").DisposeWith(disposable);
7372
this.OneWayBind(this.ViewModel, x => x.CountDebug, x => x.LabelDebug.Content, value => value.ToString() + " Debug").DisposeWith(disposable);
7473

74+
75+
76+
77+
this.BindCommand(this.ViewModel, x => x.CommandCopySchemeName, x => x.ItemCopySchemeName).DisposeWith(disposable);
7578
this.BindCommand(this.ViewModel, x => x.NodesCanvas.CommandSelectAll, x => x.ItemSelectAll).DisposeWith(disposable);
7679
this.BindCommand(this.ViewModel, x => x.NodesCanvas.CommandZoomIn, x => x.ButtonZoomIn).DisposeWith(disposable);
7780
this.BindCommand(this.ViewModel, x => x.NodesCanvas.CommandZoomOut, x => x.ButtonZoomOut).DisposeWith(disposable);
@@ -139,6 +142,8 @@ private void SetupEvents()
139142
{
140143
this.WhenActivated(disposable =>
141144
{
145+
this.MessageList.Events().MouseDoubleClick.Subscribe(_ => ViewModel.CommandCopyError.ExecuteWithSubscribe((MessageList.SelectedItem as ViewModelMessage)?.Text)).DisposeWith(disposable);
146+
this.LabelSchemeName.Events().MouseDoubleClick.WithoutParameter().InvokeCommand(ViewModel.CommandCopySchemeName).DisposeWith(disposable);
142147
this.Header.Events().PreviewMouseLeftButtonDown.Subscribe(e => HeaderClick(e)).DisposeWith(disposable);
143148
this.ButtonMin.Events().Click.Subscribe(e => ButtonMinClick(e)).DisposeWith(disposable);
144149
this.ButtonMax.Events().Click.Subscribe(e => ButtonMaxClick(e)).DisposeWith(disposable);

SimpleStateMachineNodeEditor/View/ViewConnect.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
using System.Windows.Markup;
1515
using SimpleStateMachineNodeEditor.ViewModel;
1616
using SimpleStateMachineNodeEditor.Helpers;
17-
using SimpleStateMachineNodeEditor.ViewModel.Connect;
1817

1918
namespace SimpleStateMachineNodeEditor.View
2019
{

SimpleStateMachineNodeEditor/View/ViewLeftConnector.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
using SimpleStateMachineNodeEditor.ViewModel;
1717
using System.Windows.Shapes;
1818
using SimpleStateMachineNodeEditor.Helpers.Extensions;
19-
using SimpleStateMachineNodeEditor.ViewModel.Connector;
2019

2120
namespace SimpleStateMachineNodeEditor.View
2221
{

SimpleStateMachineNodeEditor/View/ViewNodesCanvas.xaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
xmlns:local="clr-namespace:SimpleStateMachineNodeEditor.View"
77
xmlns:View="clr-namespace:SimpleStateMachineNodeEditor.View"
88
xmlns:ViewModel="clr-namespace:SimpleStateMachineNodeEditor.ViewModel"
9-
xmlns:Connect="clr-namespace:SimpleStateMachineNodeEditor.ViewModel.Connect"
109
mc:Ignorable="d"
1110
d:DesignHeight="450" d:DesignWidth="800" Focusable="True" AllowDrop="True" ClipToBounds="True">
1211

@@ -38,7 +37,7 @@
3837
</ItemsPanelTemplate>
3938
</ItemsControl.ItemsPanel>
4039
<ItemsControl.Resources >
41-
<DataTemplate DataType="{x:Type Connect:ViewModelConnect}">
40+
<DataTemplate DataType="{x:Type ViewModel:ViewModelConnect}">
4241
<View:ViewConnect ViewModel="{Binding}"/>
4342
</DataTemplate>
4443
<DataTemplate DataType="{x:Type ViewModel:ViewModelNode}">
@@ -83,7 +82,8 @@
8382
<KeyBinding x:Name="BindingRedo" Key="Y" Modifiers="Control" />
8483
<KeyBinding x:Name="BindingSelectAll" Key="A" Modifiers="Control" />
8584
<KeyBinding x:Name="BindingAddNode" Key="N" Modifiers="Control" />
86-
<KeyBinding x:Name="BindingDeleteSelectedElements" Key="Delete" />
85+
<KeyBinding x:Name="BindingDeleteSelectedElements" Key="Delete"/>
86+
<KeyBinding x:Name="BindingExportToJPEG" Gesture="Ctrl+Shift+Alt+J"/>
8787
<MouseBinding x:Name="BindingSelect" Gesture="Ctrl+LeftClick"/>
8888
<MouseBinding x:Name="BindingCut" Gesture="Alt+LeftClick" />
8989
</UserControl.InputBindings>

SimpleStateMachineNodeEditor/View/ViewNodesCanvas.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
using SimpleStateMachineNodeEditor.Helpers.Transformations;
1818
using SimpleStateMachineNodeEditor.Helpers.Enums;
1919
using SimpleStateMachineNodeEditor.Helpers.Extensions;
20-
using SimpleStateMachineNodeEditor.ViewModel.NodesCanvas;
2120
using ReactiveUI.Fody.Helpers;
21+
using SimpleStateMachineNodeEditor.ViewModel;
2222

2323
namespace SimpleStateMachineNodeEditor.View
2424
{

SimpleStateMachineNodeEditor/View/ViewRightConnector.xaml.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
using SimpleStateMachineNodeEditor.Helpers.Transformations;
1919
using SimpleStateMachineNodeEditor.Helpers.Enums;
2020
using SimpleStateMachineNodeEditor.Helpers.Extensions;
21-
using SimpleStateMachineNodeEditor.ViewModel.Connector;
2221

2322
namespace SimpleStateMachineNodeEditor.View
2423
{

SimpleStateMachineNodeEditor/ViewModel/Connect/ViewModelConnect.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99

1010
using SimpleStateMachineNodeEditor.Helpers;
1111
using SimpleStateMachineNodeEditor.Helpers.Extensions;
12-
using SimpleStateMachineNodeEditor.ViewModel.NodesCanvas;
13-
using SimpleStateMachineNodeEditor.ViewModel.Connector;
1412

15-
namespace SimpleStateMachineNodeEditor.ViewModel.Connect
13+
namespace SimpleStateMachineNodeEditor.ViewModel
1614
{
1715
public class ViewModelConnect : ReactiveObject
1816
{

0 commit comments

Comments
 (0)