Correct readonlyness in add dialog.

This commit is contained in:
2018-03-16 15:44:21 +00:00
parent 5afe5be82b
commit f81336e02a

View File

@@ -177,27 +177,37 @@ namespace apprepodbmgr.Eto
treeApps.AllowMultipleSelection = false; treeApps.AllowMultipleSelection = false;
txtArchitecture.ToolTip = "This field contains a comma separated list of architectures the application can run on. To edit its contents use the metadata editor."; txtArchitecture.ToolTip =
"This field contains a comma separated list of architectures the application can run on. To edit its contents use the metadata editor.";
txtDescription.ToolTip = "This field contains a free-form text description of this application."; txtDescription.ToolTip = "This field contains a free-form text description of this application.";
txtDeveloper.ToolTip = "This field contains the developer of the application."; txtDeveloper.ToolTip =
txtFormat.ToolTip = "This field is contains the name of the format of the disk images, when it is not a byte-by-byte format like .iso or .img."; "This field contains the developer of the application. To edit its contents use the metadata editor.";
txtLanguages.ToolTip = "This field contains a comma separated list of languages the application includes."; txtFormat.ToolTip =
txtProduct.ToolTip = "This field contains the application name."; "This field is contains the name of the format of the disk images, when it is not a byte-by-byte format like .iso or .img.";
txtTargetOs.ToolTip = "This field contains a comma separated list of operating systems this application can run on."; txtLanguages.ToolTip =
txtVersion.ToolTip = "This field contains the application version."; "This field contains a comma separated list of languages the application includes. To edit its contents use the metadata editor.";
txtProduct.ToolTip =
"This field contains the application name. To edit its contents use the metadata editor.";
txtTargetOs.ToolTip =
"This field contains a comma separated list of operating systems this application can run on. To edit its contents use the metadata editor.";
txtVersion.ToolTip =
"This field contains the application version. To edit its contents use the metadata editor.";
chkFiles.ToolTip = "If this field is checked it indicates the application is already installed."; chkFiles.ToolTip = "If this field is checked it indicates the application is already installed.";
chkInstaller.ToolTip = "If this field is checked it indicates the application comes as an installer (one or several files), but it's not installed neither disk images."; chkInstaller.ToolTip =
chkOem.ToolTip = "If this field is checked it indicates the application came bundled with hardware (aka OEM distributed)."; "If this field is checked it indicates the application comes as an installer (one or several files), but it's not installed neither disk images.";
chkOem.ToolTip =
"If this field is checked it indicates the application came bundled with hardware (aka OEM distributed).";
chkSource.ToolTip = "If this field is checked it indicates this is the source code for the application."; chkSource.ToolTip = "If this field is checked it indicates this is the source code for the application.";
chkUpdate.ToolTip = "If this field is checked it indicates this version is a minor version update that requires a previous version of the application already installed."; chkUpdate.ToolTip =
chkUpgrade.ToolTip = "If this field is checked it indicates this version is a major version upgrade that requires a previous version of the application already installed."; "If this field is checked it indicates this version is a minor version update that requires a previous version of the application already installed.";
chkUpgrade.ToolTip =
"If this field is checked it indicates this version is a major version upgrade that requires a previous version of the application already installed.";
txtArchitecture.ReadOnly = true; txtArchitecture.ReadOnly = true;
txtDeveloper.ReadOnly = true; txtDeveloper.ReadOnly = true;
txtFormat.ReadOnly = true; txtLanguages.ReadOnly = true;
txtLanguages.ReadOnly = true; txtProduct.ReadOnly = true;
txtProduct.ReadOnly = true; txtTargetOs.ReadOnly = true;
txtTargetOs.ReadOnly = true; txtVersion.ReadOnly = true;
txtVersion.ReadOnly = true;
} }
public event OnAddedAppDelegate OnAddedApp; public event OnAddedAppDelegate OnAddedApp;
@@ -374,20 +384,14 @@ namespace apprepodbmgr.Eto
btnRemoveFile.Enabled = true; btnRemoveFile.Enabled = true;
btnToggleCrack.Enabled = true; btnToggleCrack.Enabled = true;
txtFormat.ReadOnly = false; txtFormat.ReadOnly = false;
txtTargetOs.ReadOnly = false; txtDescription.ReadOnly = false;
txtProduct.ReadOnly = false; chkOem.Enabled = true;
txtVersion.ReadOnly = false; chkFiles.Enabled = true;
txtLanguages.ReadOnly = false; chkUpdate.Enabled = true;
txtDeveloper.ReadOnly = false; chkUpgrade.Enabled = true;
txtDescription.ReadOnly = false; chkInstaller.Enabled = true;
txtArchitecture.ReadOnly = false; chkSource.Enabled = true;
chkOem.Enabled = true;
chkFiles.Enabled = true;
chkUpdate.Enabled = true;
chkUpgrade.Enabled = true;
chkInstaller.Enabled = true;
chkSource.Enabled = true;
btnMetadata.Visible = true; btnMetadata.Visible = true;
if(Context.Metadata != null) if(Context.Metadata != null)
@@ -478,34 +482,28 @@ namespace apprepodbmgr.Eto
appView.Clear(); appView.Clear();
} }
txtFormat.ReadOnly = true; txtFormat.ReadOnly = true;
txtTargetOs.ReadOnly = true; txtDescription.ReadOnly = true;
txtProduct.ReadOnly = true; chkOem.Enabled = false;
txtVersion.ReadOnly = true; chkFiles.Enabled = false;
txtLanguages.ReadOnly = true; chkUpdate.Enabled = false;
txtDeveloper.ReadOnly = true; chkUpgrade.Enabled = false;
txtDescription.ReadOnly = true; chkInstaller.Enabled = false;
txtArchitecture.ReadOnly = true; chkSource.Enabled = false;
chkOem.Enabled = false; txtFormat.Text = "";
chkFiles.Enabled = false; txtTargetOs.Text = "";
chkUpdate.Enabled = false; txtProduct.Text = "";
chkUpgrade.Enabled = false; txtVersion.Text = "";
chkInstaller.Enabled = false; txtLanguages.Text = "";
chkSource.Enabled = false; txtDeveloper.Text = "";
txtFormat.Text = ""; txtDescription.Text = "";
txtTargetOs.Text = ""; txtArchitecture.Text = "";
txtProduct.Text = ""; chkOem.Checked = false;
txtVersion.Text = ""; chkFiles.Checked = false;
txtLanguages.Text = ""; chkUpdate.Checked = false;
txtDeveloper.Text = ""; chkUpgrade.Checked = false;
txtDescription.Text = ""; chkInstaller.Checked = false;
txtArchitecture.Text = ""; chkSource.Checked = false;
chkOem.Checked = false;
chkFiles.Checked = false;
chkUpdate.Checked = false;
chkUpgrade.Checked = false;
chkInstaller.Checked = false;
chkSource.Checked = false;
if(Context.TmpFolder != null) if(Context.TmpFolder != null)
{ {
@@ -724,25 +722,19 @@ namespace apprepodbmgr.Eto
void AddToDatabase() void AddToDatabase()
{ {
btnRemoveFile.Enabled = false; btnRemoveFile.Enabled = false;
btnToggleCrack.Enabled = false; btnToggleCrack.Enabled = false;
btnPack.Enabled = false; btnPack.Enabled = false;
btnClose.Enabled = false; btnClose.Enabled = false;
prgProgress.Visible = true; prgProgress.Visible = true;
txtFormat.ReadOnly = true; txtFormat.ReadOnly = true;
txtTargetOs.ReadOnly = true; txtDescription.ReadOnly = true;
txtProduct.ReadOnly = true; chkOem.Enabled = false;
txtVersion.ReadOnly = true; chkFiles.Enabled = false;
txtLanguages.ReadOnly = true; chkUpdate.Enabled = false;
txtDeveloper.ReadOnly = true; chkUpgrade.Enabled = false;
txtDescription.ReadOnly = true; chkInstaller.Enabled = false;
txtArchitecture.ReadOnly = true; chkSource.Enabled = false;
chkOem.Enabled = false;
chkFiles.Enabled = false;
chkUpdate.Enabled = false;
chkUpgrade.Enabled = false;
chkInstaller.Enabled = false;
chkSource.Enabled = false;
Workers.UpdateProgress += UpdateProgress; Workers.UpdateProgress += UpdateProgress;
Workers.Finished += AddFilesToDbFinished; Workers.Finished += AddFilesToDbFinished;
@@ -832,28 +824,22 @@ namespace apprepodbmgr.Eto
protected void OnBtnPackClicked(object sender, EventArgs e) protected void OnBtnPackClicked(object sender, EventArgs e)
{ {
btnRemoveFile.Enabled = false; btnRemoveFile.Enabled = false;
btnToggleCrack.Enabled = false; btnToggleCrack.Enabled = false;
btnPack.Enabled = false; btnPack.Enabled = false;
btnClose.Enabled = false; btnClose.Enabled = false;
prgProgress.Visible = true; prgProgress.Visible = true;
prgProgress2.Visible = true; prgProgress2.Visible = true;
lblProgress.Visible = true; lblProgress.Visible = true;
lblProgress2.Visible = true; lblProgress2.Visible = true;
txtFormat.ReadOnly = true; txtFormat.ReadOnly = true;
txtTargetOs.ReadOnly = true; txtDescription.ReadOnly = true;
txtProduct.ReadOnly = true; chkOem.Enabled = false;
txtVersion.ReadOnly = true; chkFiles.Enabled = false;
txtLanguages.ReadOnly = true; chkUpdate.Enabled = false;
txtDeveloper.ReadOnly = true; chkUpgrade.Enabled = false;
txtDescription.ReadOnly = true; chkInstaller.Enabled = false;
txtArchitecture.ReadOnly = true; chkSource.Enabled = false;
chkOem.Enabled = false;
chkFiles.Enabled = false;
chkUpdate.Enabled = false;
chkUpgrade.Enabled = false;
chkInstaller.Enabled = false;
chkSource.Enabled = false;
Workers.UpdateProgress += UpdateProgress; Workers.UpdateProgress += UpdateProgress;
Workers.UpdateProgress2 += UpdateProgress2; Workers.UpdateProgress2 += UpdateProgress2;
@@ -911,28 +897,22 @@ namespace apprepodbmgr.Eto
thdPackFiles?.Abort(); thdPackFiles?.Abort();
btnRemoveFile.Enabled = true; btnRemoveFile.Enabled = true;
btnToggleCrack.Enabled = true; btnToggleCrack.Enabled = true;
btnPack.Enabled = true; btnPack.Enabled = true;
btnClose.Enabled = true; btnClose.Enabled = true;
prgProgress.Visible = false; prgProgress.Visible = false;
prgProgress2.Visible = false; prgProgress2.Visible = false;
lblProgress.Visible = false; lblProgress.Visible = false;
lblProgress2.Visible = false; lblProgress2.Visible = false;
txtFormat.ReadOnly = false; txtFormat.ReadOnly = false;
txtTargetOs.ReadOnly = false; txtDescription.ReadOnly = false;
txtProduct.ReadOnly = false; chkOem.Enabled = true;
txtVersion.ReadOnly = false; chkFiles.Enabled = true;
txtLanguages.ReadOnly = false; chkUpdate.Enabled = true;
txtDeveloper.ReadOnly = false; chkUpgrade.Enabled = true;
txtDescription.ReadOnly = false; chkInstaller.Enabled = true;
txtArchitecture.ReadOnly = false; chkSource.Enabled = true;
chkOem.Enabled = true;
chkFiles.Enabled = true;
chkUpdate.Enabled = true;
chkUpgrade.Enabled = true;
chkInstaller.Enabled = true;
chkSource.Enabled = true;
}); });
} }