Corrected delegate.

This commit is contained in:
2017-05-19 18:07:24 +01:00
parent 358885d6b3
commit cf095b8957
6 changed files with 18 additions and 19 deletions

View File

@@ -1,3 +1,9 @@
2017-05-19 Natalia Portillo <claunia@claunia.com>
* dlgAdd.xeto.cs:
* frmMain.xeto.cs:
Corrected delegate.
2017-05-19 Natalia Portillo <claunia@claunia.com>
* dlgAdd.xeto:

View File

@@ -100,7 +100,7 @@ namespace osrepodbmgr.Eto
#pragma warning restore 0649
#endregion XAML UI elements
public delegate void OnAddedOSDelegate(DBEntry os, bool existsInRepo, string pathInRepo);
public delegate void OnAddedOSDelegate(DBEntry os);
public event OnAddedOSDelegate OnAddedOS;
public dlgAdd()
@@ -850,13 +850,7 @@ namespace osrepodbmgr.Eto
// TODO: Update OS table
if(OnAddedOS != null)
OnAddedOS(Context.dbInfo, true, System.IO.Path.Combine(osrepodbmgr.Core.Settings.Current.RepositoryPath,
Context.dbInfo.mdid[0].ToString(),
Context.dbInfo.mdid[1].ToString(),
Context.dbInfo.mdid[2].ToString(),
Context.dbInfo.mdid[3].ToString(),
Context.dbInfo.mdid[4].ToString(),
Context.dbInfo.mdid) + ".zip");
OnAddedOS(Context.dbInfo);
lblProgress.Visible = false;
prgProgress.Visible = false;

View File

@@ -336,7 +336,7 @@ namespace osrepodbmgr.Eto
protected void OnBtnAddClicked(object sender, EventArgs e)
{
dlgAdd _dlgAdd = new dlgAdd();
_dlgAdd.OnAddedOS += (os, existsInRepo, pathInRepo) =>
_dlgAdd.OnAddedOS += (os) =>
{
lstOSes.Add(new DBEntryForEto(os));
};

View File

@@ -1,3 +1,9 @@
2017-05-19 Natalia Portillo <claunia@claunia.com>
* dlgAdd.cs:
* frmMain.cs:
Corrected delegate.
2017-05-19 Natalia Portillo <claunia@claunia.com>
* dlgAdd.cs:

View File

@@ -52,7 +52,7 @@ public partial class dlgAdd : Dialog
ListStore osView;
int knownFiles;
public delegate void OnAddedOSDelegate(DBEntry os, bool existsInRepo, string pathInRepo);
public delegate void OnAddedOSDelegate(DBEntry os);
public event OnAddedOSDelegate OnAddedOS;
public dlgAdd()
@@ -828,13 +828,7 @@ public partial class dlgAdd : Dialog
// TODO: Update OS table
if(OnAddedOS != null)
OnAddedOS(Context.dbInfo, true, System.IO.Path.Combine(osrepodbmgr.Core.Settings.Current.RepositoryPath,
Context.dbInfo.mdid[0].ToString(),
Context.dbInfo.mdid[1].ToString(),
Context.dbInfo.mdid[2].ToString(),
Context.dbInfo.mdid[3].ToString(),
Context.dbInfo.mdid[4].ToString(),
Context.dbInfo.mdid) + ".zip");
OnAddedOS(Context.dbInfo);
prgProgress.Visible = false;
btnClose.Sensitive = true;

View File

@@ -259,9 +259,8 @@ namespace osrepodbmgr
protected void OnBtnAddClicked(object sender, EventArgs e)
{
dlgAdd _dlgAdd = new dlgAdd();
_dlgAdd.OnAddedOS += (os, existsInRepo, pathInRepo) =>
_dlgAdd.OnAddedOS += (os) =>
{
string color = existsInRepo ? "green" : "red";
osView.AppendValues(os.developer, os.product, os.version, os.languages, os.architecture, os.machine,
os.format, os.description, os.oem, os.upgrade, os.update, os.source,
os.files, os.netinstall, os.id, os.mdid);