Skip to content

Commit 6278bcf

Browse files
committed
Updated profile contextmenu
1 parent 59b1d41 commit 6278bcf

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

MessageCommunicator.TestGui/MainWindow.axaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
MinWidth="200" MinHeight="200"
1010
Width="800" Height="550"
1111
Icon="Assets/MessageCommunicator.ico"
12-
ExtendClientAreaToDecorationsHint="True"
12+
ExtendClientAreaToDecorationsHint="False"
1313
Title="MessageCommunicator">
1414
<local:MainWindowFrame x:Name="CtrlWindowFrame"
1515
Status="{Binding Path=StatusBarState}">
@@ -65,7 +65,6 @@
6565
Header="Profiles"
6666
Classes="GroupBox">
6767
<DockPanel LastChildFill="True">
68-
6968
<Menu DockPanel.Dock="Top">
7069
<MenuItem ToolTip.Tip="Create new profile"
7170
Header="{local:VectorIconExtension Icon={StaticResource ResourceKey=IconCreate}}"
@@ -101,6 +100,19 @@
101100
Icon="{local:VectorIconExtension Icon={StaticResource ResourceKey=IconStop}}"
102101
IsEnabled="{Binding Path=#LstProfiles.SelectedItem.CanStop}"
103102
Command="{Binding Path=#LstProfiles.SelectedItem.Command_Stop}" />
103+
<Separator Classes="Horizontal" />
104+
105+
<MenuItem Header="Create profile"
106+
Icon="{local:VectorIconExtension Icon={StaticResource ResourceKey=IconCreate}}"
107+
Command="{Binding Path=Command_CreateProfile}" />
108+
<MenuItem Header="Edit profile"
109+
Icon="{local:VectorIconExtension Icon={StaticResource ResourceKey=IconEdit}}"
110+
IsEnabled="{Binding Path=IsProfileSelected}"
111+
Command="{Binding Path=Command_EditProfile}" />
112+
<MenuItem Header="Remove profile"
113+
Icon="{local:VectorIconExtension Icon={StaticResource ResourceKey=IconRemove}}"
114+
IsEnabled="{Binding Path=IsProfileSelected}"
115+
Command="{Binding Path=Command_DeleteProfile}" />
104116
</ContextMenu>
105117
</DataGrid.ContextMenu>
106118

MessageCommunicator.TestGui/MainWindowViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public ConnectionProfileViewModel? SelectedProfile
3333
_selectedProfile = value;
3434
this.SendMessageVM.CurrentConnectionProfile = _selectedProfile?.Model;
3535
this.RaisePropertyChanged(nameof(this.SelectedProfile));
36-
this.RaisePropertyChanged(nameof(this.IsProfileScreenEnabled));
36+
this.RaisePropertyChanged(nameof(this.IsProfileSelected));
3737
}
3838
}
3939
}
@@ -53,7 +53,7 @@ public MainWindowFrameStatus StatusBarState
5353

5454
public SendMessageViewModel SendMessageVM { get; }
5555

56-
public bool IsProfileScreenEnabled => _selectedProfile != null;
56+
public bool IsProfileSelected => _selectedProfile != null;
5757

5858
public ReactiveCommand<object?, Unit> Command_ImportProfiles { get; }
5959

0 commit comments

Comments
 (0)