Menu testo e fix float margine
This commit is contained in:
parent
3d1f92321e
commit
a81451bd6b
6 changed files with 42 additions and 41 deletions
|
|
@ -313,12 +313,12 @@ namespace CatalogLib
|
|||
font = new Font(fo, dimensioneStandard, FontStyle.Regular);
|
||||
}
|
||||
|
||||
image.Mutate(x => x.DrawText(text, font, gBack, new PointF(xCenterofImg + 1 , yPosFromBottom + 1), new TextGraphicsOptions()
|
||||
image.Mutate(x => x.DrawText(text, font, gBack, new PointF((float)Math.Round(xCenterofImg + 1) , (float)Math.Round(yPosFromBottom + 1)), new TextGraphicsOptions()
|
||||
{
|
||||
HorizontalAlignment = HorizontalAlignment.Center
|
||||
}));
|
||||
|
||||
image.Mutate(x => x.DrawText(text, font, g, new PointF(xCenterofImg, yPosFromBottom), new TextGraphicsOptions()
|
||||
image.Mutate(x => x.DrawText(text, font, g, new PointF((float)Math.Round(xCenterofImg), (float)Math.Round(yPosFromBottom)), new TextGraphicsOptions()
|
||||
{
|
||||
HorizontalAlignment = HorizontalAlignment.Center
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -313,8 +313,8 @@ namespace CatalogLib
|
|||
set { SetString("DirDestinazione", value); }
|
||||
}
|
||||
|
||||
public float Margine { get => GetFloat("Margin", 1);
|
||||
set => SetFloat("Margin", value);
|
||||
public int Margine { get => GetInt("Margin", 1);
|
||||
set => SetInt("Margin", value);
|
||||
}
|
||||
public float MargVert { get; set; }
|
||||
public string Allineamento { get; set; }
|
||||
|
|
|
|||
|
|
@ -19,6 +19,11 @@
|
|||
<x:Type TypeName="catalogLib:Positions" />
|
||||
</ObjectDataProvider.MethodParameters>
|
||||
</ObjectDataProvider>
|
||||
<ObjectDataProvider x:Key="AlignmentEnum" MethodName="GetValues" ObjectType="{x:Type System:Enum}">
|
||||
<ObjectDataProvider.MethodParameters>
|
||||
<x:Type TypeName="catalogLib:Alignments" />
|
||||
</ObjectDataProvider.MethodParameters>
|
||||
</ObjectDataProvider>
|
||||
</UserControl.Resources>
|
||||
<ScrollViewer>
|
||||
<StackPanel Orientation="Vertical">
|
||||
|
|
@ -88,28 +93,8 @@
|
|||
|
||||
</GroupBox>
|
||||
<StackPanel Orientation="Vertical" VerticalAlignment="Stretch">
|
||||
<GroupBox Header="Slide Show" VerticalAlignment="Stretch">
|
||||
<StackPanel Orientation="Horizontal" >
|
||||
<CheckBox Content="Data" Margin="5,0" IsChecked="{Binding SlideshowData}"/>
|
||||
<CheckBox Content="Numero Foto" Margin="5,0" IsChecked="{Binding SlideshowNumeroFoto}"/>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox Header="Testo foto verticali" VerticalAlignment="Stretch">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Dimensione Carattere"/>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding TestoVertDimensioneCarattere}"/>
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Margine"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding TestoVertMargine}"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
|
||||
|
||||
</StackPanel>
|
||||
<GroupBox Header="Testo da applicare">
|
||||
|
|
@ -124,9 +109,19 @@
|
|||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Orizzontale" />
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Verticale" />
|
||||
<Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" >
|
||||
<TextBlock>
|
||||
Legenda:<LineBreak/>
|
||||
$_ A capo verticale<LineBreak/>
|
||||
$o Orario<LineBreak/>
|
||||
$t Tempo gara<LineBreak/>
|
||||
$n Nome File
|
||||
</TextBlock>
|
||||
|
||||
|
||||
</Label>
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding TestoApplicareOrizzontale}" AcceptsReturn="True"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Height="50" MaxLines="4" AcceptsReturn="True" Text="{Binding TestoApplicareVerticale}"/>
|
||||
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
|
|
@ -151,21 +146,19 @@
|
|||
<ComboBox Grid.Row="1" Grid.Column="1" ItemsSource="{Binding Source={StaticResource PositionsEnum}}" SelectedItem="{Binding TextPosition}">
|
||||
|
||||
</ComboBox>
|
||||
<!--ToDo-->
|
||||
|
||||
<CheckBox Grid.Row="2" Grid.Column="1" Content="Orario" IsChecked="{Binding TestoApplicareOrario}"/>
|
||||
<CheckBox Grid.Row="3" Grid.Column="1" Content="Tempo Gara" IsChecked="{Binding TestoApplicareTempoGaraCheck}"/>
|
||||
<ComboBox Grid.Row="2" Grid.Column="2" ItemsSource="{Binding Source={StaticResource AlignmentEnum}}" SelectedItem="{Binding TextAlignment}"></ComboBox>
|
||||
|
||||
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding TestoApplicareTempoGara}"/>
|
||||
<Label Grid.Row="6" Grid.Column="0" >Formato tempo gara</Label>
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Text="{Binding TestoApplicareTempoGara}"/>
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="0" Content="Margine (pixel)" />
|
||||
<TextBox Grid.Row="5" Grid.Column="1" Text="{Binding Margine}"/>
|
||||
|
||||
<Label Grid.Row="6" Grid.Column="0" Content="Allineamento" />
|
||||
<TextBox Grid.Row="6" Grid.Column="1" Text="{Binding TestoApplicareAllineamento}"/>
|
||||
|
||||
<Label Grid.Row="7" Grid.Column="0" Content="Partenza" />
|
||||
<ComboBox Grid.Row="7" Grid.Column="1" />
|
||||
<xctk:DateTimePicker Grid.Row="7" Grid.Column="1"></xctk:DateTimePicker>
|
||||
|
||||
<!--todo-->
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
|
|
|
|||
|
|
@ -805,7 +805,7 @@ namespace WPFCatalog
|
|||
set { PicSettings.Threading = value; RaisePropertyChanged("Threading"); }
|
||||
}
|
||||
|
||||
public float Margine
|
||||
public int Margine
|
||||
{
|
||||
get => PicSettings.Margine;
|
||||
set { PicSettings.Margine = value; RaisePropertyChanged("Margine"); }
|
||||
|
|
@ -817,6 +817,12 @@ namespace WPFCatalog
|
|||
set { PicSettings.TextPosition = value; RaisePropertyChanged("TextPosition"); }
|
||||
}
|
||||
|
||||
public Alignments TextAlignment
|
||||
{
|
||||
get => PicSettings.TextAlignment;
|
||||
set { PicSettings.TextAlignment = value; RaisePropertyChanged("TextAlignment"); }
|
||||
}
|
||||
|
||||
//public PicSettings.Positions Positions
|
||||
//{
|
||||
// get => PicSettings.Positions;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
Imports System.IO
|
||||
Option Strict Off
|
||||
Option Infer On
|
||||
Imports System.IO
|
||||
Imports System.Drawing.Drawing2D
|
||||
Imports System.Drawing.Imaging
|
||||
'Imports System.Threading
|
||||
|
|
@ -564,12 +566,12 @@ Catch ex As Exception
|
|||
|
||||
Private Sub aggiungiLogo(imgOutputBig As Bitmap)
|
||||
'imgOutputBig
|
||||
If PicSettings.LogoAggiungi = True And File.Exists(PicSettings.LogoNomeFile) Then
|
||||
If PicSettings.LogoAggiungi = True And (File.Exists(PicSettings.LogoNomeFile) Or PicSettings.LockDownMode )Then
|
||||
|
||||
Dim ImmagineLogo As Image
|
||||
|
||||
If (PicSettings.LockDownMode)
|
||||
ImmagineLogo = PicSettings.BuiltInImage
|
||||
ImmagineLogo = PicSettings.BuiltInImage.Clone()
|
||||
Else
|
||||
ImmagineLogo = Image.FromFile(PicSettings.LogoNomeFile)
|
||||
End If
|
||||
|
|
|
|||
|
|
@ -106,11 +106,11 @@
|
|||
</Setup>
|
||||
<Setup>
|
||||
<Nome>MarchioAltezza</Nome>
|
||||
<Valore>390</Valore>
|
||||
<Valore>500</Valore>
|
||||
</Setup>
|
||||
<Setup>
|
||||
<Nome>MarchioLarghezza</Nome>
|
||||
<Valore>390</Valore>
|
||||
<Valore>500</Valore>
|
||||
</Setup>
|
||||
<Setup>
|
||||
<Nome>MarchioMargine</Nome>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue