2012-08-21 17:00:40 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
|
|
|
|
namespace AnxSampleBrowser
|
|
|
|
|
{
|
2012-09-08 08:40:36 +00:00
|
|
|
|
public partial class SampleDataHalfVisual : UserControl
|
2012-08-21 17:00:40 +00:00
|
|
|
|
{
|
|
|
|
|
private SampleData _source;
|
|
|
|
|
private AnxSampleBrowser _parent;
|
|
|
|
|
|
2012-09-08 08:40:36 +00:00
|
|
|
|
public SampleDataHalfVisual(SampleData source, AnxSampleBrowser parent)
|
2012-08-21 17:00:40 +00:00
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
InitializeComponent();
|
2012-09-08 08:40:36 +00:00
|
|
|
|
|
|
|
|
|
|
2012-08-21 17:00:40 +00:00
|
|
|
|
//until error is gone
|
2012-09-08 08:40:36 +00:00
|
|
|
|
// _pImage.Visible = false;
|
2012-08-21 17:00:40 +00:00
|
|
|
|
|
|
|
|
|
_rDescription.ReadOnly = true;
|
|
|
|
|
_parent = parent;
|
|
|
|
|
_source = source;
|
|
|
|
|
|
|
|
|
|
this._lName.Text = _source.Name;
|
|
|
|
|
this._rDescription.Text = _source.Description;
|
|
|
|
|
if (source.ImagePath.Length > 0)
|
|
|
|
|
{
|
|
|
|
|
Bitmap b = new Bitmap(source.ImagePath);
|
2012-09-08 08:40:36 +00:00
|
|
|
|
_pImage.BackgroundImage = b;
|
2012-08-21 17:00:40 +00:00
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void _bLaunch_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
System.Diagnostics.Process.Start(_parent.SamplePath + _source.ExecPath);
|
|
|
|
|
}
|
|
|
|
|
catch (Win32Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageBox.Show("Can´t find the specified file at " + _parent.SamplePath + _source.ExecPath + '\n' + '\n' + '\n' + ex.Message,"Sample file not found");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|