У меня проблемы с добавлением UserControl в мою форму.
Код UserControl:
using System;
using System.Windows.Forms;
namespace Most.Mobile.AFV.UI.Controls
{
public partial class ListActionBar : UserControl
{
public ListActionBar()
{
InitializeComponent();
}
public bool ShowKeyboardButton
{
get { return mtbKeyboard.Visible; }
set { mtbKeyboard.Visible = value; }
}
public bool ShowOpenButton
{
get { return mtbMenu.Visible; }
set { mtbMenu.Visible = value; }
}
public bool ShowDeleteButton
{
get { return mtbDelete.Visible; }
set { mtbDelete.Visible = value; }
}
public bool ShowBackButton
{
get { return mtbBack.Visible; }
set { mtbBack.Visible = value; }
}
public bool ShowEditButton
{
get { return mtbEdit.Visible; }
set { mtbEdit.Visible = value; }
}
public bool ShowNewButton
{
get { return mtbNew.Visible; }
set { mtbNew.Visible = value; }
}
public event EventHandler NewClick;
public event EventHandler DeleteClick;
public event EventHandler EditClick;
public event EventHandler OpenClick;
private void mtbBack_Click(object sender, EventArgs e)
{
if (Parent == null)
return;
if (Parent is Form)
(Parent as Form).DialogResult = DialogResult.Cancel;
}
private void mtbKeyboard_Click(object sender, EventArgs e)
{
inp.Enabled = !inp.Enabled;
}
private void mtbNew_Click(object sender, EventArgs e)
{
if (NewClick != null)
NewClick(sender, e);
}
private void mtbEdit_Click(object sender, EventArgs e)
{
if (EditClick != null)
EditClick(sender, e);
}
private void mtbDelete_Click(object sender, EventArgs e)
{
if (DeleteClick != null)
DeleteClick(sender, e);
}
private void mtbMenu_Click(object sender, EventArgs e)
{
if (OpenClick != null)
OpenClick(sender, e);
}
}
}
Ниже изображение ошибки
Описание ошибки:
Не удалось создать компонент System.IO.FileLoadException: не удалось загрузить файл или сборку.PublicKeyToken = 969db8053d3322ac 'или одна из его зависимостей.