Optimisation des appel des animation en cours
continuous-integration/drone/push Build is passing Details

Navigator
Hug0lvt 2 years ago
parent 1943a41bb7
commit 8f82992541

@ -110,6 +110,9 @@
<Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/>
</Style> </Style>
<SolidColorBrush x:Key="CouleurPrincipale" Color="#23395d"/> <SolidColorBrush x:Key="CouleurPrincipale" Color="#23395d"/>
<Style x:Key="BoutonMain" TargetType="Button"> <Style x:Key="BoutonMain" TargetType="Button">
@ -121,19 +124,22 @@
<Setter Property="FontSize" Value="16"/> <Setter Property="FontSize" Value="16"/>
<Setter Property="Foreground" Value="White"/> <Setter Property="Foreground" Value="White"/>
<Style.Resources> <Style.Resources>
<Style TargetType="Border"> <Style TargetType="Border">
<Setter Property="CornerRadius" Value="20,0,0,20"/> <Setter Property="CornerRadius" Value="20,0,0,20"/>
</Style> </Style>
</Style.Resources> </Style.Resources>
<Style.Triggers> <Style.Triggers>
<Trigger Property="IsDefault" Value="False">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimation Duration="0:0:0.5" Storyboard.TargetProperty="(Button.Background).(SolidColorBrush.Color)" To="#23395d"/>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Setter Property="Foreground" Value="White"/>
</Trigger>
<Trigger Property="IsDefault" Value="True"> <Trigger Property="IsDefault" Value="True">
<Setter Property="Foreground" Value="Black"/> <Setter Property="Foreground" Value="Black"/>
@ -147,9 +153,6 @@
</Trigger> </Trigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>

@ -20,7 +20,7 @@
<Image Source="images/logo.png" Margin="10" Grid.Column="0" Grid.Row="0" Width="75"/> <Image Source="images/logo.png" Margin="10" Grid.Column="0" Grid.Row="0" Width="75"/>
<Button Content="Tableau de bord" Style="{StaticResource BoutonMain}" IsDefault="True"/> <Button Click="Button_Click_TableauDeBord" Content="Tableau de bord" Style="{StaticResource BoutonMain}" IsDefault="True"/>
<Button Click="Button_Click_Compte" Content="Compte" Style="{StaticResource BoutonMain}"/> <Button Click="Button_Click_Compte" Content="Compte" Style="{StaticResource BoutonMain}"/>
<Button Click="Button_Click_Operation" Content="Opérations" Style="{StaticResource BoutonMain}"/> <Button Click="Button_Click_Operation" Content="Opérations" Style="{StaticResource BoutonMain}"/>
<Button Click="Button_Click_Echeancier" Content="Echéancier" Style="{StaticResource BoutonMain}"/> <Button Click="Button_Click_Echeancier" Content="Echéancier" Style="{StaticResource BoutonMain}"/>

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -27,9 +28,40 @@ namespace IHM
DataContext = this; DataContext = this;
} }
private void Button_Click_TableauDeBord(object sender, RoutedEventArgs e)
{
Debug.WriteLine(e);
Button btn = (Button)sender;
if (btn == null) return;
if (btn.IsDefault == false)
{
btn.IsDefault = true;
Nav.NavigateTo(Navigator.PART_TABLEAU_DE_BORD);
//scan les autres btns
}
else return;
}
private void Button_Click_Compte(object sender, RoutedEventArgs e) private void Button_Click_Compte(object sender, RoutedEventArgs e)
{ {
Button btn = (Button)sender;
if (btn == null) return;
if (btn.IsDefault == false)
{
btn.IsDefault = true;
Nav.NavigateTo(Navigator.PART_COMPTE); Nav.NavigateTo(Navigator.PART_COMPTE);
/*
StackPanel parent = btn.Parent as StackPanel;
foreach(Button bt in parent)
*/
}
else return;
//Nav.NavigateTo(Navigator.PART_COMPTE);
} }
private void Button_Click_Operation(object sender, RoutedEventArgs e) private void Button_Click_Operation(object sender, RoutedEventArgs e)
@ -46,5 +78,7 @@ namespace IHM
{ {
Nav.NavigateTo(Navigator.PART_PLANIFICATION); Nav.NavigateTo(Navigator.PART_PLANIFICATION);
} }
} }
} }

@ -16,6 +16,8 @@ namespace IHM
public const string PART_CONNEXION = "Connexion"; public const string PART_CONNEXION = "Connexion";
public const string PART_INSCRIPTION = "Inscription"; public const string PART_INSCRIPTION = "Inscription";
public const string PART_TABLEAU_DE_BORD = "Tableau de Bord";
public const string PART_COMPTE = "Compte"; public const string PART_COMPTE = "Compte";
public const string PART_AJOUTER_BANQUE = "Ajouter une banque"; public const string PART_AJOUTER_BANQUE = "Ajouter une banque";
public const string PART_SUPPRIMER_BANQUE = "Supprimer une banque"; public const string PART_SUPPRIMER_BANQUE = "Supprimer une banque";
@ -53,6 +55,7 @@ namespace IHM
[PART_SUPPRIMER_ECHEANCE] = () => new UCSupprimerEcheance(), [PART_SUPPRIMER_ECHEANCE] = () => new UCSupprimerEcheance(),
[PART_AJOUTER_PLANIFICATION] = () => new UCAjouterPlanification(), [PART_AJOUTER_PLANIFICATION] = () => new UCAjouterPlanification(),
[PART_SUPPRIMER_PLANIFICATION] = () => new UCSupprimerPlanification(), [PART_SUPPRIMER_PLANIFICATION] = () => new UCSupprimerPlanification(),
[PART_TABLEAU_DE_BORD] = () => new UCTableauDeBord(),
}; };

@ -0,0 +1,12 @@
<UserControl x:Class="IHM.UCTableauDeBord"
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:IHM"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
</Grid>
</UserControl>

@ -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 IHM
{
/// <summary>
/// Logique d'interaction pour UCTableauDeBord.xaml
/// </summary>
public partial class UCTableauDeBord : UserControl
{
public UCTableauDeBord()
{
InitializeComponent();
}
}
}
Loading…
Cancel
Save