CTDB metadata support

This commit is contained in:
chudov
2011-05-21 23:28:33 +00:00
parent d5fdd19735
commit b289629143
14 changed files with 304 additions and 23 deletions

View File

@@ -60,6 +60,11 @@
<DependentUpon>Options.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="FormMetadata.resx">
@@ -68,6 +73,10 @@
<EmbeddedResource Include="Options.resx">
<DependentUpon>Options.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CUETools.AccurateRip\CUETools.AccurateRip.csproj">
@@ -90,6 +99,12 @@
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\favicon.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\ctdb.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -33,6 +33,7 @@
this.listView1 = new System.Windows.Forms.ListView();
this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// progressBar1
@@ -81,12 +82,25 @@
this.button1.UseVisualStyleBackColor = true;
this.button1.Visible = false;
//
// button2
//
this.button2.DialogResult = System.Windows.Forms.DialogResult.OK;
this.button2.Location = new System.Drawing.Point(438, 204);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 3;
this.button2.Text = "OK";
this.button2.UseVisualStyleBackColor = true;
this.button2.Visible = false;
//
// FormMetadata
//
this.AcceptButton = this.button2;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button1;
this.ClientSize = new System.Drawing.Size(607, 233);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.progressBar1);
this.Controls.Add(this.listView1);
@@ -106,5 +120,6 @@
private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
}
}

View File

@@ -5,13 +5,13 @@ using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CUETools.CTDB.EACPlugin.Properties;
namespace CUETools.CTDB.EACPlugin
{
public partial class FormMetadata : Form
{
private CUEToolsDB ctdb;
private CTDBResponseMeta meta;
private string agent;
public FormMetadata(CUEToolsDB ctdb, string agent)
@@ -25,12 +25,15 @@ namespace CUETools.CTDB.EACPlugin
{
get
{
return this.meta;
return this.DialogResult != DialogResult.Cancel &&
listView1.SelectedItems.Count > 0 ?
listView1.SelectedItems[0].Tag as CTDBResponseMeta : null;
}
}
private void FormMetadata_Load(object sender, EventArgs e)
{
this.Icon = Resources.ctdb;
this.backgroundWorker1.RunWorkerAsync();
}
@@ -43,10 +46,9 @@ namespace CUETools.CTDB.EACPlugin
{
this.progressBar1.Visible = false;
this.button1.Visible = true;
CTDBResponseMeta bestMeta = null;
this.button2.Visible = true;
foreach (var metadata in ctdb.Metadata)
{
bestMeta = metadata;
uint td = 0, dn = 0;
var disccount = metadata.disccount ?? "1";
var discnumber = metadata.discnumber ?? "1";
@@ -57,6 +59,8 @@ namespace CUETools.CTDB.EACPlugin
if (metadata.label != null)
foreach (var l in metadata.label)
label = (label == "" ? "" : label + ": ") + (l.name ?? "") + (l.name != null && l.catno != null ? " " : "") + (l.catno ?? "");
if (metadata.releasedate != null)
label = (label == "" ? "" : label + ": ") + metadata.releasedate;
var text = string.Format("{0}{1} - {2}{3}{4}", metadata.year != null ? metadata.year + ": " : "",
metadata.artist == null ? "Unknown Artist" : metadata.artist,
metadata.album == "" ? "Unknown Title" : metadata.album,
@@ -65,19 +69,21 @@ namespace CUETools.CTDB.EACPlugin
listView1.Items.Add(new ListViewItem(text) { Tag = metadata });
}
this.listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
this.meta = bestMeta;
if (listView1.Items.Count < 2)
this.Close();
if (listView1.Items.Count == 0)
{
this.DialogResult = DialogResult.Cancel;
return;
}
listView1.Items[0].Selected = true;
if (listView1.Items.Count == 1)
this.DialogResult = DialogResult.OK;
}
private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)
{
var ht = listView1.HitTest(e.Location);
if (ht.Item != null)
{
meta = ht.Item.Tag as CTDBResponseMeta;
this.Close();
}
this.DialogResult = DialogResult.OK;
}
}
}

View File

@@ -10,6 +10,8 @@ using CUETools.CDImage;
using CUETools.AccurateRip;
using CUETools.Codecs;
using CUETools.CTDB;
using CUETools.CTDB.EACPlugin.Properties;
using System.Drawing.Imaging;
namespace MetadataPlugIn
{
@@ -81,7 +83,9 @@ namespace MetadataPlugIn
public Array GetPluginLogo()
{
return null; // File.ReadAllBytes(@"C:\Work\cuetoolsnet\CUETools\Resources\accuraterip.bmp");
MemoryStream ms = new MemoryStream();
Resources.ctdb.Save(ms);
return ms.ToArray();
}
public string GetPluginName()

View File

@@ -32,12 +32,14 @@ namespace AudioDataPlugIn
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Location = new System.Drawing.Point(147, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(139, 13);
this.label1.TabIndex = 0;
@@ -45,16 +47,16 @@ namespace AudioDataPlugIn
//
// label2
//
this.label2.Location = new System.Drawing.Point(12, 71);
this.label2.Location = new System.Drawing.Point(147, 67);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(260, 52);
this.label2.Size = new System.Drawing.Size(230, 74);
this.label2.TabIndex = 1;
this.label2.Text = "Copyright (c) 2011 Gregory S. Chudov";
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(12, 39);
this.linkLabel1.Location = new System.Drawing.Point(147, 36);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(164, 13);
this.linkLabel1.TabIndex = 3;
@@ -62,19 +64,32 @@ namespace AudioDataPlugIn
this.linkLabel1.Text = "http://db.cuetools.net/about.php";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// pictureBox1
//
this.pictureBox1.Image = global::CUETools.CTDB.EACPlugin.Properties.Resources.ctdb1;
this.pictureBox1.Location = new System.Drawing.Point(13, 13);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(128, 128);
this.pictureBox1.TabIndex = 4;
this.pictureBox1.TabStop = false;
//
// Options
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 124);
this.ClientSize = new System.Drawing.Size(402, 158);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.linkLabel1);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Options";
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Options";
this.Load += new System.EventHandler(this.Options_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -85,5 +100,6 @@ namespace AudioDataPlugIn
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.PictureBox pictureBox1;
}
}

View File

@@ -5,7 +5,7 @@ using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CUETools.CTDB.EACPlugin.Properties;
namespace AudioDataPlugIn
{
@@ -20,5 +20,10 @@ namespace AudioDataPlugIn
{
System.Diagnostics.Process.Start(linkLabel1.Text);
}
private void Options_Load(object sender, EventArgs e)
{
this.Icon = Resources.ctdb;
}
}
}

View File

@@ -0,0 +1,77 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.4211
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CUETools.CTDB.EACPlugin.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CUETools.CTDB.EACPlugin.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
internal static System.Drawing.Icon ctdb {
get {
object obj = ResourceManager.GetObject("ctdb", resourceCulture);
return ((System.Drawing.Icon)(obj));
}
}
internal static System.Drawing.Bitmap ctdb1 {
get {
object obj = ResourceManager.GetObject("ctdb1", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="ctdb" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\favicon.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ctdb1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ctdb.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -18,7 +18,7 @@ namespace CUETools.CTDB
{
public class CUEToolsDB
{
const string urlbase = "http://dbnew.cuetools.net";
const string urlbase = "http://db.cuetools.net";
string userAgent;
string driveName;

View File

@@ -363,7 +363,7 @@ namespace CUETools.Processor
metadata.Artist == "" ? "Unknown Artist" : metadata.Artist,
metadata.Title == "" ? "Unknown Title" : metadata.Title,
metadata.DiscNumberAndTotal != "" ? " (disc " + metadata.DiscNumberAndTotal + (metadata.DiscName != "" ? ": " + metadata.DiscName : "") + ")" : "",
metadata.Label == "" ? "" : " (" + metadata.Label + ")");
metadata.Label == "" && metadata.ReleaseDate == "" ? "" : " (" + metadata.Label + (metadata.Label != "" && metadata.ReleaseDate != "" ? ": " : "" ) + metadata.ReleaseDate + ")");
}
}
}

View File

@@ -181,6 +181,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.CTDB.EACPlugin", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.TestHelpers", "..\CUETools.TestHelpers\CUETools.TestHelpers.csproj", "{84EBB7CB-02C9-40A9-9D32-C641B822DAA2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CUETools.CLParity", "..\CUETools.CLParity\CUETools.CLParity.csproj", "{D41FEFF9-9D43-4049-BF9B-B13D9AC7E192}"
EndProject
Global
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = CUETools1.vsmdi
@@ -1052,6 +1054,20 @@ Global
{84EBB7CB-02C9-40A9-9D32-C641B822DAA2}.Release|Win32.ActiveCfg = Release|Any CPU
{84EBB7CB-02C9-40A9-9D32-C641B822DAA2}.Release|x64.ActiveCfg = Release|Any CPU
{84EBB7CB-02C9-40A9-9D32-C641B822DAA2}.Release|x86.ActiveCfg = Release|Any CPU
{D41FEFF9-9D43-4049-BF9B-B13D9AC7E192}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D41FEFF9-9D43-4049-BF9B-B13D9AC7E192}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D41FEFF9-9D43-4049-BF9B-B13D9AC7E192}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{D41FEFF9-9D43-4049-BF9B-B13D9AC7E192}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{D41FEFF9-9D43-4049-BF9B-B13D9AC7E192}.Debug|Win32.ActiveCfg = Debug|Any CPU
{D41FEFF9-9D43-4049-BF9B-B13D9AC7E192}.Debug|x64.ActiveCfg = Debug|Any CPU
{D41FEFF9-9D43-4049-BF9B-B13D9AC7E192}.Debug|x86.ActiveCfg = Debug|Any CPU
{D41FEFF9-9D43-4049-BF9B-B13D9AC7E192}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D41FEFF9-9D43-4049-BF9B-B13D9AC7E192}.Release|Any CPU.Build.0 = Release|Any CPU
{D41FEFF9-9D43-4049-BF9B-B13D9AC7E192}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{D41FEFF9-9D43-4049-BF9B-B13D9AC7E192}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{D41FEFF9-9D43-4049-BF9B-B13D9AC7E192}.Release|Win32.ActiveCfg = Release|Any CPU
{D41FEFF9-9D43-4049-BF9B-B13D9AC7E192}.Release|x64.ActiveCfg = Release|Any CPU
{D41FEFF9-9D43-4049-BF9B-B13D9AC7E192}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -902,7 +902,7 @@ namespace JDP {
{
frmChoice dlg = new frmChoice();
dlg.CUE = cueSheet;
dlg.LookupAlbumInfo(checkBoxUseFreeDb.Checked, checkBoxUseMusicBrainz.Checked, false, _profile._config.advanced.CacheMetadata, true);
dlg.LookupAlbumInfo(checkBoxUseFreeDb.Checked, false, checkBoxUseMusicBrainz.Checked, _profile._config.advanced.CacheMetadata, true);
dlgRes = dlg.ShowDialog(this);
if (dlgRes == DialogResult.Cancel)
{
@@ -2128,7 +2128,7 @@ namespace JDP {
CueSheet.UseLocalDB(_localDB);
frmChoice dlg = new frmChoice();
dlg.CUE = CueSheet;
dlg.LookupAlbumInfo(true, true, true, true, node is FileSystemTreeNodeLocalDBEntry);
dlg.LookupAlbumInfo(true, false, true, true, node is FileSystemTreeNodeLocalDBEntry);
var dlgRes = dlg.ShowDialog(this);
if (dlgRes == DialogResult.OK && dlg.ChosenRelease != null)
{