I created an application form which accesses tag's in another program. I used a dll to Access the tags IOM.InTouchDataAccess. I run the program, It works until I write a tag and press select. Error : Could not load file or assembly 'IOM.InTouchDataAccess, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. I'm still a novice programmer.
The program stops in Program.cs at
Application.Run(new InTouchTagBrowser());
Form code
public partial class InTouchTagBrowser : Form
{
public string tagName;
public InTouchTagBrowser()
{
InitializeComponent();
}
private void TagBrowser_Load(object sender, EventArgs e)
{
}
private void SelectButton_Click(object sender, EventArgs e)
{
try
{
tagName = tagNameBox.Text;
InTouchDdeWrapper inTouchWrapper = new InTouchDdeWrapper();
string value = inTouchWrapper.Read(tagName);
TagDotField tagDotField = new TagDotField(tagName);
string description = inTouchWrapper.Read(tagDotField.Description);
string engUnits = inTouchWrapper.Read(tagDotField.EngUnits);
descriptionlbl.Text = description;
englbl.Text = engUnits;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void WriteButton_Click(object sender, EventArgs e)
{
try
{
if (tagName != "")
{
MessageBox.Show("Please enter a tag!");
}
else
{
string inputValue = ValueBox.Text;
InTouchDdeWrapper inTouchWrapperWriter = new InTouchDdeWrapper();
TagDotField tagWriter = new TagDotField(inputValue);
inTouchWrapperWriter.Write(tagName, inputValue);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
finally
{
MessageBox.Show("Tag change successfull");
}
}