anx.framework/Tools/AnxSampleBrowser/SampleDataHalfVisual.cs
SND\floAr_cp 91cef16007 Redesigned SampleBrowser
Added pagination
Added missing features
2012-09-08 08:40:36 +00:00

59 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 SampleDataHalfVisual : UserControl
{
private SampleData _source;
private AnxSampleBrowser _parent;
public SampleDataHalfVisual(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.BackgroundImage = 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");
}
}
}
}