Change database and interface fields to more appropriate descriptions.

This commit is contained in:
2018-03-15 15:55:59 +00:00
parent 4c79151c31
commit 3825b483ee
4 changed files with 149 additions and 156 deletions

View File

@@ -70,9 +70,9 @@ namespace apprepodbmgr.Eto
get { return _item.Architecture; }
set { }
}
public string machine
public string targetos
{
get { return _item.Machine; }
get { return _item.TargetOs; }
set { }
}
public string format
@@ -110,9 +110,9 @@ namespace apprepodbmgr.Eto
get { return _item.Files; }
set { }
}
public bool netinstall
public bool Installer
{
get { return _item.Netinstall; }
get { return _item.Installer; }
set { }
}
public byte[] xml

View File

@@ -43,9 +43,9 @@
</StackLayoutItem>
<StackLayoutItem HorizontalAlignment="Stretch">
<StackLayout Orientation="Horizontal">
<Label>Machine</Label>
<Label>Target OS</Label>
<StackLayoutItem Expand="True">
<TextBox ID="txtMachine" />
<TextBox ID="txtTargetOs" />
</StackLayoutItem>
</StackLayout>
</StackLayoutItem>
@@ -91,7 +91,7 @@
<CheckBox ID="chkSource">source</CheckBox>
</StackLayoutItem>
<StackLayoutItem Expand="True" HorizontalAlignment="Right">
<CheckBox ID="chkNetinstall">netinstall</CheckBox>
<CheckBox ID="chkInstaller">installer</CheckBox>
</StackLayoutItem>
</StackLayout>
</StackLayoutItem>

View File

@@ -31,6 +31,7 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Threading;
using System.Xml.Serialization;
using apprepodbmgr.Core;
@@ -130,8 +131,8 @@ namespace apprepodbmgr.Eto
});
treeApps.Columns.Add(new GridColumn
{
DataCell = new TextBoxCell {Binding = Binding.Property<DBEntryForEto, string>(r => r.machine)},
HeaderText = "Machine"
DataCell = new TextBoxCell {Binding = Binding.Property<DBEntryForEto, string>(r => r.targetos)},
HeaderText = "Target OS"
});
treeApps.Columns.Add(new GridColumn
{
@@ -170,8 +171,8 @@ namespace apprepodbmgr.Eto
});
treeApps.Columns.Add(new GridColumn
{
DataCell = new CheckBoxCell {Binding = Binding.Property<DBEntryForEto, bool?>(r => r.netinstall)},
HeaderText = "NetInstall?"
DataCell = new CheckBoxCell {Binding = Binding.Property<DBEntryForEto, bool?>(r => r.Installer)},
HeaderText = "Installer?"
});
treeApps.AllowMultipleSelection = false;
@@ -352,7 +353,7 @@ namespace apprepodbmgr.Eto
btnToggleCrack.Enabled = true;
txtFormat.ReadOnly = false;
txtMachine.ReadOnly = false;
txtTargetOs.ReadOnly = false;
txtProduct.ReadOnly = false;
txtVersion.ReadOnly = false;
txtLanguages.ReadOnly = false;
@@ -363,7 +364,7 @@ namespace apprepodbmgr.Eto
chkFiles.Enabled = true;
chkUpdate.Enabled = true;
chkUpgrade.Enabled = true;
chkNetinstall.Enabled = true;
chkInstaller.Enabled = true;
chkSource.Enabled = true;
btnMetadata.Visible = true;
@@ -393,11 +394,12 @@ namespace apprepodbmgr.Eto
txtArchitecture.Text += architecture;
}
if(Context.Metadata.Systems != null)
foreach(string machine in Context.Metadata.Systems)
if(Context.Metadata.RequiredOperatingSystems != null)
foreach(string targetos in Context
.Metadata.RequiredOperatingSystems.Select(os => os.Name).Distinct())
{
if(!string.IsNullOrWhiteSpace(txtMachine.Text)) txtMachine.Text += ",";
txtMachine.Text += machine;
if(!string.IsNullOrWhiteSpace(txtTargetOs.Text)) txtTargetOs.Text += ",";
txtTargetOs.Text += targetos;
}
btnMetadata.BackgroundColor = Colors.Green;
@@ -455,7 +457,7 @@ namespace apprepodbmgr.Eto
}
txtFormat.ReadOnly = true;
txtMachine.ReadOnly = true;
txtTargetOs.ReadOnly = true;
txtProduct.ReadOnly = true;
txtVersion.ReadOnly = true;
txtLanguages.ReadOnly = true;
@@ -466,10 +468,10 @@ namespace apprepodbmgr.Eto
chkFiles.Enabled = false;
chkUpdate.Enabled = false;
chkUpgrade.Enabled = false;
chkNetinstall.Enabled = false;
chkInstaller.Enabled = false;
chkSource.Enabled = false;
txtFormat.Text = "";
txtMachine.Text = "";
txtTargetOs.Text = "";
txtProduct.Text = "";
txtVersion.Text = "";
txtLanguages.Text = "";
@@ -480,7 +482,7 @@ namespace apprepodbmgr.Eto
chkFiles.Checked = false;
chkUpdate.Checked = false;
chkUpgrade.Checked = false;
chkNetinstall.Checked = false;
chkInstaller.Checked = false;
chkSource.Checked = false;
if(Context.TmpFolder != null)
@@ -507,10 +509,8 @@ namespace apprepodbmgr.Eto
{
if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner))
lblProgress.Text = $"{text}: {inner}";
else if(!string.IsNullOrWhiteSpace(inner))
lblProgress.Text = inner;
else
lblProgress.Text = text;
else if(!string.IsNullOrWhiteSpace(inner)) lblProgress.Text = inner;
else lblProgress.Text = text;
if(maximum > 0)
{
if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue ||
@@ -535,10 +535,8 @@ namespace apprepodbmgr.Eto
{
if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner))
lblProgress2.Text = $"{text}: {inner}";
else if(!string.IsNullOrWhiteSpace(inner))
lblProgress2.Text = inner;
else
lblProgress2.Text = text;
else if(!string.IsNullOrWhiteSpace(inner)) lblProgress2.Text = inner;
else lblProgress2.Text = text;
if(maximum > 0)
{
if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue ||
@@ -710,7 +708,7 @@ namespace apprepodbmgr.Eto
btnClose.Enabled = false;
prgProgress.Visible = true;
txtFormat.ReadOnly = true;
txtMachine.ReadOnly = true;
txtTargetOs.ReadOnly = true;
txtProduct.ReadOnly = true;
txtVersion.ReadOnly = true;
txtLanguages.ReadOnly = true;
@@ -721,7 +719,7 @@ namespace apprepodbmgr.Eto
chkFiles.Enabled = false;
chkUpdate.Enabled = false;
chkUpgrade.Enabled = false;
chkNetinstall.Enabled = false;
chkInstaller.Enabled = false;
chkSource.Enabled = false;
Workers.UpdateProgress += UpdateProgress;
@@ -733,11 +731,11 @@ namespace apprepodbmgr.Eto
Context.DbInfo.Developer = txtDeveloper.Text;
Context.DbInfo.Format = txtFormat.Text;
Context.DbInfo.Languages = txtLanguages.Text;
Context.DbInfo.Machine = txtMachine.Text;
Context.DbInfo.TargetOs = txtTargetOs.Text;
Context.DbInfo.Product = txtProduct.Text;
Context.DbInfo.Version = txtVersion.Text;
Context.DbInfo.Files = chkFiles.Checked.Value;
Context.DbInfo.Netinstall = chkNetinstall.Checked.Value;
Context.DbInfo.Installer = chkInstaller.Checked.Value;
Context.DbInfo.Oem = chkOem.Checked.Value;
Context.DbInfo.Source = chkSource.Checked.Value;
Context.DbInfo.Update = chkUpdate.Checked.Value;
@@ -821,7 +819,7 @@ namespace apprepodbmgr.Eto
lblProgress.Visible = true;
lblProgress2.Visible = true;
txtFormat.ReadOnly = true;
txtMachine.ReadOnly = true;
txtTargetOs.ReadOnly = true;
txtProduct.ReadOnly = true;
txtVersion.ReadOnly = true;
txtLanguages.ReadOnly = true;
@@ -832,7 +830,7 @@ namespace apprepodbmgr.Eto
chkFiles.Enabled = false;
chkUpdate.Enabled = false;
chkUpgrade.Enabled = false;
chkNetinstall.Enabled = false;
chkInstaller.Enabled = false;
chkSource.Enabled = false;
Workers.UpdateProgress += UpdateProgress;
@@ -845,11 +843,11 @@ namespace apprepodbmgr.Eto
Context.DbInfo.Developer = txtDeveloper.Text;
Context.DbInfo.Format = txtFormat.Text;
Context.DbInfo.Languages = txtLanguages.Text;
Context.DbInfo.Machine = txtMachine.Text;
Context.DbInfo.TargetOs = txtTargetOs.Text;
Context.DbInfo.Product = txtProduct.Text;
Context.DbInfo.Version = txtVersion.Text;
Context.DbInfo.Files = chkFiles.Checked.Value;
Context.DbInfo.Netinstall = chkNetinstall.Checked.Value;
Context.DbInfo.Installer = chkInstaller.Checked.Value;
Context.DbInfo.Oem = chkOem.Checked.Value;
Context.DbInfo.Source = chkSource.Checked.Value;
Context.DbInfo.Update = chkUpdate.Checked.Value;
@@ -900,7 +898,7 @@ namespace apprepodbmgr.Eto
lblProgress.Visible = false;
lblProgress2.Visible = false;
txtFormat.ReadOnly = false;
txtMachine.ReadOnly = false;
txtTargetOs.ReadOnly = false;
txtProduct.ReadOnly = false;
txtVersion.ReadOnly = false;
txtLanguages.ReadOnly = false;
@@ -911,7 +909,7 @@ namespace apprepodbmgr.Eto
chkFiles.Enabled = true;
chkUpdate.Enabled = true;
chkUpgrade.Enabled = true;
chkNetinstall.Enabled = true;
chkInstaller.Enabled = true;
chkSource.Enabled = true;
});
}
@@ -1085,12 +1083,13 @@ namespace apprepodbmgr.Eto
txtArchitecture.Text += architecture;
}
if(string.IsNullOrWhiteSpace(txtMachine.Text))
if(Context.Metadata.Systems != null)
foreach(string machine in Context.Metadata.Systems)
if(string.IsNullOrWhiteSpace(txtTargetOs.Text))
if(Context.Metadata.RequiredOperatingSystems != null)
foreach(string targetos in Context.Metadata.RequiredOperatingSystems.Select(os => os.Name)
.Distinct())
{
if(!string.IsNullOrWhiteSpace(txtMachine.Text)) txtMachine.Text += ",";
txtMachine.Text += machine;
if(!string.IsNullOrWhiteSpace(txtTargetOs.Text)) txtTargetOs.Text += ",";
txtTargetOs.Text += targetos;
}
btnMetadata.BackgroundColor = Colors.Green;
@@ -1151,7 +1150,7 @@ namespace apprepodbmgr.Eto
TextBox txtVersion;
TextBox txtLanguages;
TextBox txtArchitecture;
TextBox txtMachine;
TextBox txtTargetOs;
TextBox txtFormat;
TextBox txtDescription;
CheckBox chkOem;
@@ -1159,7 +1158,7 @@ namespace apprepodbmgr.Eto
CheckBox chkUpgrade;
CheckBox chkFiles;
CheckBox chkSource;
CheckBox chkNetinstall;
CheckBox chkInstaller;
GridView treeFiles;
TabPage tabApps;
GridView treeApps;

View File

@@ -89,8 +89,8 @@ namespace apprepodbmgr.Eto
});
treeApps.Columns.Add(new GridColumn
{
DataCell = new TextBoxCell {Binding = Binding.Property<DBEntryForEto, string>(r => r.machine)},
HeaderText = "Machine"
DataCell = new TextBoxCell {Binding = Binding.Property<DBEntryForEto, string>(r => r.targetos)},
HeaderText = "Target OS"
});
treeApps.Columns.Add(new GridColumn
{
@@ -129,8 +129,8 @@ namespace apprepodbmgr.Eto
});
treeApps.Columns.Add(new GridColumn
{
DataCell = new CheckBoxCell {Binding = Binding.Property<DBEntryForEto, bool?>(r => r.netinstall)},
HeaderText = "NetInstall?"
DataCell = new CheckBoxCell {Binding = Binding.Property<DBEntryForEto, bool?>(r => r.Installer)},
HeaderText = "Installer?"
});
treeApps.AllowMultipleSelection = false;
@@ -268,10 +268,8 @@ namespace apprepodbmgr.Eto
{
if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner))
lblProgress.Text = $"{text}: {inner}";
else if(!string.IsNullOrWhiteSpace(inner))
lblProgress.Text = inner;
else
lblProgress.Text = text;
else if(!string.IsNullOrWhiteSpace(inner)) lblProgress.Text = inner;
else lblProgress.Text = text;
if(maximum > 0)
{
if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue ||
@@ -296,10 +294,8 @@ namespace apprepodbmgr.Eto
{
if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner))
lblProgress2.Text = $"{text}: {inner}";
else if(!string.IsNullOrWhiteSpace(inner))
lblProgress2.Text = inner;
else
lblProgress2.Text = text;
else if(!string.IsNullOrWhiteSpace(inner)) lblProgress2.Text = inner;
else lblProgress2.Text = text;
if(maximum > 0)
{
if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue ||
@@ -691,7 +687,8 @@ namespace apprepodbmgr.Eto
if(thdScanFile != null) thdScanFile = null;
if((!outIter.HasVirus.HasValue || outIter.HasVirus.HasValue && !outIter.HasVirus.Value) &&
file.HasVirus.HasValue && file.HasVirus.Value) infectedFiles++;
file.HasVirus.HasValue &&
file.HasVirus.Value) infectedFiles++;
lstFiles.Remove(outIter);
AddFile(file);
@@ -764,7 +761,8 @@ namespace apprepodbmgr.Eto
if(thdScanFile != null) thdScanFile = null;
if((!outIter.HasVirus.HasValue || outIter.HasVirus.HasValue && !outIter.HasVirus.Value) &&
file.HasVirus.HasValue && file.HasVirus.Value) infectedFiles++;
file.HasVirus.HasValue &&
file.HasVirus.Value) infectedFiles++;
lstFiles.Remove(outIter);
AddFile(file);
@@ -806,10 +804,8 @@ namespace apprepodbmgr.Eto
{
if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner))
lblProgressFiles1.Text = $"{text}: {inner}";
else if(!string.IsNullOrWhiteSpace(inner))
lblProgressFiles1.Text = inner;
else
lblProgressFiles1.Text = text;
else if(!string.IsNullOrWhiteSpace(inner)) lblProgressFiles1.Text = inner;
else lblProgressFiles1.Text = text;
if(maximum > 0)
{
if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue ||
@@ -834,10 +830,8 @@ namespace apprepodbmgr.Eto
{
if(!string.IsNullOrWhiteSpace(text) && !string.IsNullOrWhiteSpace(inner))
lblProgressFiles2.Text = $"{text}: {inner}";
else if(!string.IsNullOrWhiteSpace(inner))
lblProgressFiles2.Text = inner;
else
lblProgressFiles2.Text = text;
else if(!string.IsNullOrWhiteSpace(inner)) lblProgressFiles2.Text = inner;
else lblProgressFiles2.Text = text;
if(maximum > 0)
{
if(current < int.MinValue || current > int.MaxValue || maximum < int.MinValue ||