anx.framework/Tools/AnxSampleBrowser/SampleDataVisual.cs
SND\floAr_cp fa3091976f - added first version of sample browser
- implemented feature #537
2012-08-21 17:00:40 +00:00

57 lines
1.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
{
public partial class SampleDataVisual : UserControl
{
private SampleData _source;
private AnxSampleBrowser _parent;
public SampleDataVisual(SampleData source,AnxSampleBrowser parent)
{
InitializeComponent();
//until error is gone
_pImage.Visible = false;
_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);
_pImage.Image = b;
}
}
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");
}
}
}
}