Exemplo n.º 1
0
        private void CheckIca()
        {
            pnlCheck4.Visible = true;

            try
            {
                using (var ica = new AxICAClient {
                    Parent = this
                })
                {
                    ica.CreateControl();

                    while (!ica.Created)
                    {
                        Thread.Sleep(10);
                        System.Windows.Forms.Application.DoEvents();
                    }

                    pbCheck4.Image      = Resources.Good_Symbol;
                    lblCheck4.ForeColor = Color.DarkOliveGreen;
                    lblCheck4.Text      = @"ICA (Citrix ICA) " + Language.strCcCheckSucceeded;
                    txtCheck4.Text      = string.Format(Language.strCcICAOK, ica.Version);
                }
            }
            catch (Exception ex)
            {
                pbCheck4.Image      = Resources.Bad_Symbol;
                lblCheck4.ForeColor = Color.Firebrick;
                lblCheck4.Text      = @"ICA (Citrix ICA) " + Language.strCcCheckFailed;
                txtCheck4.Text      = Language.strCcICAFailed;

                Runtime.MessageCollector.AddMessage(Messages.MessageClass.WarningMsg, "ICA " + Language.strCcNotInstalledProperly, true);
                Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg, ex.Message, true);
            }
        }
Exemplo n.º 2
0
        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(MessageClass.ErrorMsg,
                                                    Language.strIcaSetPropsFailed + Environment.NewLine + ex.Message,
                                                    true);
                return(false);
            }
        }
        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;
            }
        }
        public override bool SetProps()
        {
            base.SetProps();

            try
            {
                ICA_Client = (AxICAClient)this.Control;
                Info = this.InterfaceControl.Info;

                ICA_Client.CreateControl();

                while (!this.ICA_Client.Created)
                {
                    Thread.Sleep(10);
                    System.Windows.Forms.Application.DoEvents();
                }

                ICA_Client.Address = Info.Hostname;

                this.SetCredentials();

                this.SetResolution();
                this.SetColors();

                this.SetSecurity();

                //Disable hotkeys for international users
                ICA_Client.Hotkey1Shift = null;
                ICA_Client.Hotkey1Char = null;
                ICA_Client.Hotkey2Shift = null;
                ICA_Client.Hotkey2Char = null;
                ICA_Client.Hotkey3Shift = null;
                ICA_Client.Hotkey3Char = null;
                ICA_Client.Hotkey4Shift = null;
                ICA_Client.Hotkey4Char = null;
                ICA_Client.Hotkey5Shift = null;
                ICA_Client.Hotkey5Char = null;
                ICA_Client.Hotkey6Shift = null;
                ICA_Client.Hotkey6Char = null;
                ICA_Client.Hotkey7Shift = null;
                ICA_Client.Hotkey7Char = null;
                ICA_Client.Hotkey8Shift = null;
                ICA_Client.Hotkey8Char = null;
                ICA_Client.Hotkey9Shift = null;
                ICA_Client.Hotkey9Char = null;
                ICA_Client.Hotkey10Shift = null;
                ICA_Client.Hotkey10Char = null;
                ICA_Client.Hotkey11Shift = null;
                ICA_Client.Hotkey11Char = null;

                ICA_Client.PersistentCacheEnabled = Info.CacheBitmaps;

                ICA_Client.Title = Info.Name;

                return true;
            }
            catch (Exception ex)
            {
                Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
                                                    Language.strIcaSetPropsFailed + Constants.vbNewLine + ex.Message,
                                                    true);
                return false;
            }
        }
Exemplo n.º 5
0
        public override bool SetProps()
        {
            base.SetProps();

            try
            {
                ICA_Client = (AxICAClient)this.Control;
                Info       = this.InterfaceControl.Info;

                ICA_Client.CreateControl();

                while (!this.ICA_Client.Created)
                {
                    Thread.Sleep(10);
                    System.Windows.Forms.Application.DoEvents();
                }

                ICA_Client.Address = Info.Hostname;

                this.SetCredentials();

                this.SetResolution();
                this.SetColors();

                this.SetSecurity();

                //Disable hotkeys for international users
                ICA_Client.Hotkey1Shift  = null;
                ICA_Client.Hotkey1Char   = null;
                ICA_Client.Hotkey2Shift  = null;
                ICA_Client.Hotkey2Char   = null;
                ICA_Client.Hotkey3Shift  = null;
                ICA_Client.Hotkey3Char   = null;
                ICA_Client.Hotkey4Shift  = null;
                ICA_Client.Hotkey4Char   = null;
                ICA_Client.Hotkey5Shift  = null;
                ICA_Client.Hotkey5Char   = null;
                ICA_Client.Hotkey6Shift  = null;
                ICA_Client.Hotkey6Char   = null;
                ICA_Client.Hotkey7Shift  = null;
                ICA_Client.Hotkey7Char   = null;
                ICA_Client.Hotkey8Shift  = null;
                ICA_Client.Hotkey8Char   = null;
                ICA_Client.Hotkey9Shift  = null;
                ICA_Client.Hotkey9Char   = null;
                ICA_Client.Hotkey10Shift = null;
                ICA_Client.Hotkey10Char  = null;
                ICA_Client.Hotkey11Shift = null;
                ICA_Client.Hotkey11Char  = null;

                ICA_Client.PersistentCacheEnabled = Info.CacheBitmaps;

                ICA_Client.Title = Info.Name;

                return(true);
            }
            catch (Exception ex)
            {
                Runtime.MessageCollector.AddMessage(Messages.MessageClass.ErrorMsg,
                                                    Language.strIcaSetPropsFailed + Constants.vbNewLine + ex.Message,
                                                    true);
                return(false);
            }
        }