This repository has been archived on 2025-05-23. You can view files and clone it, but cannot push or open issues or pull requests.
Files
CICMMetadata/pnlStrings.xeto.cs
Natalia Portillo 7f040db5a5 Use libexeinfo to retrieve strings and version from found executable files.
Find possible readme files.
Present all of that information to the user as a way to fill fields when adding an application.
2018-03-17 21:56:18 +00:00

64 lines
1.8 KiB
C#

using System;
using Eto.Forms;
using Eto.Serialization.Xaml;
namespace apprepodbmgr.Eto
{
public class pnlStrings : Panel
{
public pnlStrings()
{
XamlReader.Load(this);
treeStrings.AllowMultipleSelection = false;
treeStrings.ShowHeader = false;
treeStrings.Columns.Add(new GridColumn
{
DataCell = new TextBoxCell {Binding = Binding.Property<string, string>(r => r)},
HeaderText = "String"
});
}
void OnBtnDeveloperClick(object sender, EventArgs eventArgs)
{
txtDeveloper.Text = "";
if(!(treeStrings.SelectedItem is string str)) return;
txtDeveloper.Text = str;
}
void OnBtnPublisherClick(object sender, EventArgs eventArgs)
{
txtPublisher.Text = "";
if(!(treeStrings.SelectedItem is string str)) return;
txtPublisher.Text = str;
}
void OnBtnProductClick(object sender, EventArgs eventArgs)
{
txtProduct.Text = "";
if(!(treeStrings.SelectedItem is string str)) return;
txtProduct.Text = str;
}
void OnBtnVersionClick(object sender, EventArgs eventArgs)
{
txtVersion.Text = "";
if(!(treeStrings.SelectedItem is string str)) return;
txtVersion.Text = str;
}
#region XAML UI elements
#pragma warning disable 0649
public TextBox txtDeveloper;
public TextBox txtPublisher;
public TextBox txtProduct;
public TextBox txtVersion;
public GridView treeStrings;
#pragma warning restore 0649
#endregion XAML UI elements
}
}