Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
feat: remote connect button
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-wff committed Dec 19, 2023
1 parent c3e6c12 commit d85ebc6
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 0 deletions.
Binary file added EasyGUI/Assets/Icons/magnet-outline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions EasyGUI/Controls/Buttons/ConnectButton.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<UserControl x:Class="EasyGUI.Controls.Buttons.ConnectButton"
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:buttons="clr-namespace:EasyGUI.Controls.Buttons"
xmlns:resx="clr-namespace:EasyGUI.Resources"
mc:Ignorable="d"
d:DesignHeight="50" d:DesignWidth="200">
<buttons:BaseButton ButtonText="{x:Static resx:Strings.ConnectButton_Connect}"
Click="Button_OnClick"
ButtonColor="{StaticResource YellowBrush}"
ButtonIcon="/Assets/Icons/magnet-outline.png" />
</UserControl>
18 changes: 18 additions & 0 deletions EasyGUI/Controls/Buttons/ConnectButton.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.Windows;

namespace EasyGUI.Controls.Buttons;

public partial class ConnectButton
{
public ConnectButton()
{
InitializeComponent();
}

public event RoutedEventHandler? Click;

private void Button_OnClick(object sender, RoutedEventArgs e)
{
Click?.Invoke(this, e);
}
}
1 change: 1 addition & 0 deletions EasyGUI/Controls/JobsHeader.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

<StackPanel Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Right" Orientation="Horizontal">
<buttons:StartButton x:Name="StartButton" Click="StartButton_OnClick"/>
<buttons:ConnectButton Margin="8,0,0,0" Click="ConnectButton_OnClick"/>
<buttons:SettingsButton Margin="8,0,0,0" Click="SettingsButton_OnClick" />
<buttons:CreateButton Margin="8,0,0,0" Click="CreateButton_OnClick" />
</StackPanel>
Expand Down
5 changes: 5 additions & 0 deletions EasyGUI/Controls/JobsHeader.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,9 @@ private void SettingsButton_OnClick(object sender, RoutedEventArgs e)
{
RaiseEvent(new RoutedEventArgs(SettingsButtonClickEvent));
}

private void ConnectButton_OnClick(object sender, RoutedEventArgs e)
{
throw new NotImplementedException();
}
}
6 changes: 6 additions & 0 deletions EasyGUI/EasyGUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
<Resource Include="Assets\Icons\trash-outline.png"/>
<Resource Include="Assets\Icons\close-circle-outline.png"/>
<Resource Include="Assets\Icons\pause-circle-outline.png"/>
<Resource Include="Assets\Icons\magnet-outline.png"/>
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -111,6 +112,11 @@
<XamlRuntime>Wpf</XamlRuntime>
<SubType>Designer</SubType>
</Page>
<Page Update="Controls\Buttons\ConnectButton.xaml">
<Generator>MSBuild:Compile</Generator>
<XamlRuntime>Wpf</XamlRuntime>
<SubType>Designer</SubType>
</Page>
</ItemGroup>

<ItemGroup>
Expand Down
9 changes: 9 additions & 0 deletions EasyGUI/Resources/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions EasyGUI/Resources/Strings.fr.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions EasyGUI/Resources/Strings.fr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,7 @@ Nous nous excusons pour la gêne occasionnée.</value>
<data name="JobDisplay_ErrorPopup_Message" xml:space="preserve">
<value>Une erreur est survenue pendant l'exécution de la tâche {0} : {1}</value>
</data>
<data name="ConnectButton_Connect" xml:space="preserve">
<value>Connexion à distance</value>
</data>
</root>
3 changes: 3 additions & 0 deletions EasyGUI/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,7 @@ We are sorry for this inconvenience.</value>
<data name="JobDisplay_ErrorPopup_Message" xml:space="preserve">
<value>An error occured during the execution of {0}: {1}</value>
</data>
<data name="ConnectButton_Connect" xml:space="preserve">
<value>Remote connect</value>
</data>
</root>

0 comments on commit d85ebc6

Please sign in to comment.