public override bool Initialize()
{
base.Initialize();
try
{
_ICAClient = (AxICAClient)Control;
_Info = InterfaceControl.Info;
_ICAClient.CreateControl();
while (!_ICAClient.Created)
{
Thread.Sleep(10);
Application.DoEvents();
}
_ICAClient.Address = _Info.Hostname;
SetCredentials();
SetResolution();
SetColors();
SetSecurity();
//Disable hotkeys for international users
_ICAClient.Hotkey1Shift = null;
_ICAClient.Hotkey1Char = null;
_ICAClient.Hotkey2Shift = null;
_ICAClient.Hotkey2Char = null;
_ICAClient.Hotkey3Shift = null;
_ICAClient.Hotkey3Char = null;
_ICAClient.Hotkey4Shift = null;
_ICAClient.Hotkey4Char = null;
_ICAClient.Hotkey5Shift = null;
_ICAClient.Hotkey5Char = null;
_ICAClient.Hotkey6Shift = null;
_ICAClient.Hotkey6Char = null;
_ICAClient.Hotkey7Shift = null;
_ICAClient.Hotkey7Char = null;
_ICAClient.Hotkey8Shift = null;
_ICAClient.Hotkey8Char = null;
_ICAClient.Hotkey9Shift = null;
_ICAClient.Hotkey9Char = null;
_ICAClient.Hotkey10Shift = null;
_ICAClient.Hotkey10Char = null;
_ICAClient.Hotkey11Shift = null;
_ICAClient.Hotkey11Char = null;
_ICAClient.PersistentCacheEnabled = _Info.CacheBitmaps;
_ICAClient.Title = _Info.Name;
return true;
}
catch (Exception ex)
{
Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, Language.strIcaSetPropsFailed + Environment.NewLine + ex.Message, true);
return false;
}
}