Skip to content

Commit

Permalink
Fin v1.0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
matchaniat committed May 9, 2016
1 parent 71420cc commit 10b676c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mScan75/GestionBandes.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:mScan75"
mc:Ignorable="d"
Title="Gestion des bandes" Height="270" Width="300">
Title="Gestion des bandes" Height="270" Width="300" ResizeMode="CanMinimize">
<Grid>
<DataGrid x:Name="dataGrid" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Height="219" Width="192" AutoGenerateColumns="False" ItemsSource="{Binding data}">
<DataGrid.Columns>
Expand Down
19 changes: 18 additions & 1 deletion mScan75/GestionBandes.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,24 @@ public void lireBandes()

private void envoyerBandes(object sender, RoutedEventArgs e)
{

port.Open();
port.WriteLine("PRG");
port.ReadLine();
foreach (Bande ligne in data)
{
string d = ((Double.Parse(ligne.Debut)) * 10000.0).ToString();
string f = ((Double.Parse(ligne.Fin)) * 10000.0).ToString();
port.WriteLine("CSP," + ligne.Num + ","+d+","+f);
if (port.ReadLine().Contains("ERR"))
{
MessageBox.Show("Erreur ligne "+ligne.Num, "Erreur", MessageBoxButton.OK, MessageBoxImage.Error);
}
}
port.WriteLine("EPG");
port.ReadLine();
port.Close();
lireBandes();
MessageBox.Show("Données envoyées", "Envoyé", MessageBoxButton.OK, MessageBoxImage.Information);
}
}
public class Bande
Expand Down
4 changes: 2 additions & 2 deletions mScan75/GestionFreq.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:mScan75"
mc:Ignorable="d"
Title="Gestion des fréquences" Height="650" Width="700">
Title="Gestion des fréquences" Height="650" Width="700" ResizeMode="CanMinimize">
<Grid>
<DataGrid x:Name="grille" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Height="599" Width="576" AutoGenerateColumns="False" ItemsSource="{Binding test}">
<DataGrid.Columns>
Expand All @@ -27,7 +27,7 @@
<Button x:Name="ba8" Content="Banque 8" HorizontalAlignment="Left" Margin="591,185,0,0" VerticalAlignment="Top" Width="91" Click="changerBanque"/>
<Button x:Name="ba9" Content="Banque 9" HorizontalAlignment="Left" Margin="591,210,0,0" VerticalAlignment="Top" Width="91" Click="changerBanque"/>
<Button x:Name="ba10" Content="Banque 10" HorizontalAlignment="Left" Margin="591,235,0,0" VerticalAlignment="Top" Width="91" Click="changerBanque"/>
<Button x:Name="button" Margin="591,313,10,0" VerticalAlignment="Top" Width="91" Height="54" Click="envoyerFrequences">
<Button x:Name="button" Margin="591,313,0,0" VerticalAlignment="Top" Height="54" Click="envoyerFrequences" HorizontalAlignment="Left" Width="91">
<TextBlock TextWrapping="Wrap" >Envoyer vers le scanner</TextBlock>
</Button>
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion mScan75/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:mScan75"
mc:Ignorable="d"
Title="mScan75" Height="530" Width="700">
Title="mScan75" Height="530" Width="700" ResizeMode="CanMinimize">

<Grid>
<Label Content="Port :" HorizontalAlignment="Left" Height="25" VerticalAlignment="Top" Width="79" Margin="0,10,0,0"/>
Expand Down

0 comments on commit 10b676c

Please sign in to comment.