Updated libraries and made horizontal text property
This commit is contained in:
parent
af987f840d
commit
65aeabdfee
6 changed files with 30 additions and 17 deletions
|
|
@ -54,6 +54,18 @@ namespace ImageCatalog_2
|
|||
}
|
||||
}
|
||||
|
||||
private string _horizontalText;
|
||||
|
||||
public string HorizontalText
|
||||
{
|
||||
get => _horizontalText;
|
||||
set
|
||||
{
|
||||
_horizontalText = value;
|
||||
NotifyPropertyChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private bool _uiEnabled = true;
|
||||
|
||||
public bool UiEnabled
|
||||
|
|
|
|||
5
imagecatalog/MainForm.Designer.cs
generated
5
imagecatalog/MainForm.Designer.cs
generated
|
|
@ -466,7 +466,7 @@ namespace ImageCatalog
|
|||
txtSorgente.Name = "txtSorgente";
|
||||
txtSorgente.Size = new Size(500, 27);
|
||||
txtSorgente.TabIndex = 0;
|
||||
txtSorgente.Text = "TextBox1";
|
||||
txtSorgente.Text = "";
|
||||
//
|
||||
// txtDestinazione
|
||||
//
|
||||
|
|
@ -991,12 +991,13 @@ namespace ImageCatalog
|
|||
//
|
||||
// TextBox4
|
||||
//
|
||||
TextBox4.DataBindings.Add(new Binding("Text", bindingSource1, "HorizontalText", true, DataSourceUpdateMode.OnPropertyChanged));
|
||||
TextBox4.Location = new Point(96, 37);
|
||||
TextBox4.Margin = new Padding(4, 5, 4, 5);
|
||||
TextBox4.Name = "TextBox4";
|
||||
TextBox4.Size = new Size(543, 27);
|
||||
TextBox4.TabIndex = 8;
|
||||
TextBox4.Text = "TextBox4";
|
||||
TextBox4.Text = "";
|
||||
//
|
||||
// Label9
|
||||
//
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ public delegate void XyThreadAdd(string Info);
|
|||
|
||||
public partial class MainForm
|
||||
{
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public DataModel Model { get; set; }
|
||||
private readonly DataModel Model;
|
||||
|
||||
private readonly ILogger<MainForm> _logger;
|
||||
|
||||
|
|
@ -33,8 +32,9 @@ public partial class MainForm
|
|||
|
||||
private readonly ParametriSetup _parametriSetup;
|
||||
|
||||
public MainForm( ImageCreationStuff imageCreationStuff, ParametriSetup parametriSetup, ILogger<MainForm> logger)
|
||||
public MainForm(DataModel model, ImageCreationStuff imageCreationStuff, ParametriSetup parametriSetup, ILogger<MainForm> logger)
|
||||
{
|
||||
Model = model;
|
||||
_imageCreationService = imageCreationStuff;
|
||||
_parametriSetup = parametriSetup;
|
||||
_logger = logger;
|
||||
|
|
@ -133,7 +133,7 @@ public partial class MainForm
|
|||
Model.SourcePath = string.Empty;
|
||||
Model.DestinationPath = string.Empty;
|
||||
TextBox3.Text = "tn_";
|
||||
TextBox4.Text = "";
|
||||
Model.HorizontalText = "";
|
||||
TextBox5.Text = "350";
|
||||
TextBox6.Text = "350";
|
||||
TextBox27.Text = "2240";
|
||||
|
|
@ -431,7 +431,7 @@ public partial class MainForm
|
|||
_parametriSetup.AggiornaParametro("FontDimensioneMiniatura", TextBox25.Text);
|
||||
_parametriSetup.AggiornaParametro("FontBold", CheckBox3.Checked);
|
||||
_parametriSetup.AggiornaParametro("FontNome", ComboBox3.Text);
|
||||
_parametriSetup.AggiornaParametro("TestoTesto", TextBox4.Text);
|
||||
_parametriSetup.AggiornaParametro("TestoTesto", Model.HorizontalText);
|
||||
_parametriSetup.AggiornaParametro("TestoTrasparente", TextBox9.Text);
|
||||
_parametriSetup.AggiornaParametro("TestoMargine", TextBox12.Text);
|
||||
_parametriSetup.AggiornaParametro("TestoPosizione", ComboBox1.Text);
|
||||
|
|
@ -519,7 +519,7 @@ public partial class MainForm
|
|||
TextBox25.Text = "0";
|
||||
}
|
||||
|
||||
TextBox4.Text = _parametriSetup.LeggiParametroString("TestoTesto");
|
||||
Model.HorizontalText = _parametriSetup.LeggiParametroString("TestoTesto");
|
||||
TextBox9.Text = _parametriSetup.LeggiParametroString("TestoTrasparente");
|
||||
TextBox12.Text = _parametriSetup.LeggiParametroString("TestoMargine");
|
||||
ComboBox1.Text = _parametriSetup.LeggiParametroString("TestoPosizione");
|
||||
|
|
@ -611,7 +611,7 @@ public partial class MainForm
|
|||
PicSettings.NomeData = false;
|
||||
}
|
||||
|
||||
PicSettings.TestoFirmaStart = TextBox4.Text;
|
||||
PicSettings.TestoFirmaStart = Model.HorizontalText;
|
||||
PicSettings.TestoFirmaStartV = TextBox29.Text;
|
||||
PicSettings.DataPartenza = DateTimePicker1.Value;
|
||||
PicSettings.TestoOrario = TextBox18.Text;
|
||||
|
|
@ -1198,7 +1198,7 @@ public partial class MainForm
|
|||
ClsCreaImmagine.NomeData = false;
|
||||
}
|
||||
|
||||
ClsCreaImmagine.TestoFirmaStart = TextBox4.Text;
|
||||
ClsCreaImmagine.TestoFirmaStart = Model.HorizontalText;
|
||||
ClsCreaImmagine.TestoFirmaStartV = TextBox29.Text;
|
||||
ClsCreaImmagine.DataPartenza = DateTimePicker1.Value;
|
||||
ClsCreaImmagine.TestoOrario = TextBox18.Text;
|
||||
|
|
|
|||
|
|
@ -67,9 +67,9 @@ namespace ImageCatalog_2
|
|||
ServiceProvider = serviceCollection.BuildServiceProvider();
|
||||
|
||||
var mainForm = ServiceProvider.GetRequiredService<MainForm>();
|
||||
var mainViewModel = ServiceProvider.GetRequiredService<DataModel>();
|
||||
//var mainViewModel = ServiceProvider.GetRequiredService<DataModel>();
|
||||
|
||||
mainForm.Model = mainViewModel;
|
||||
//mainForm.Model = mainViewModel;
|
||||
|
||||
Application.Run(mainForm);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue