Exemplo n.º 1
0
        /// <summary>
        /// Load事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void window_Loaded(object sender, RoutedEventArgs e)
        {
            if (CkCitrix.CheckCitrix())
            {
                this.TxtCitrix.Text = "Citrix已安装";
            }
            else
            {
                this.TxtCitrix.Text = "Citrix未安装";
            }
            string[] trustlist = new TrustyStation().GetTrustyStations();
            switch (trustlist.Length)
            {
            case 0:
                this.Txt_trust1.Text = this.Txt_trust2.Text = this.Txt_trust3.Text = "";
                break;

            case 1:
                this.Txt_trust1.Text = trustlist[0];
                this.Txt_trust2.Text = this.Txt_trust3.Text = "";
                break;

            case 2:
                this.Txt_trust1.Text = trustlist[0];
                this.Txt_trust2.Text = trustlist[1];
                this.Txt_trust3.Text = "";
                break;

            default:
                this.Txt_trust1.Text = trustlist[0];
                this.Txt_trust2.Text = trustlist[1];
                this.Txt_trust3.Text = trustlist[2];
                break;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 修复Citrix
        /// </summary>
        /// <param name="url">
        /// String.Empty或null:citrix.com默认的下载地址;
        /// 其他值:自己保存的http地址
        /// </param>
        public void CitrixRep(string url)
        {
            if (url == null ||  url == String.Empty)
            {
                url = "https://downloadplugins.citrix.com/Windows/CitrixReceiver.exe";
            }
            //判断Citrix是否已经安装
            bool isExisted = CkCitrix.CheckCitrix();

            if (!isExisted)
            {
                //保存到目录
                string fullPath = Application.StartupPath + "//CitrixReciver.exe";
                if (File.Exists(fullPath))
                {
                    MessageBox.Show("已下载安装包,即将开始安装");
                    System.Diagnostics.Process.Start(fullPath);
                }
                else
                {
                    MessageBox.Show("即将开始下载,请耐心等待");
                    bool flag = Download(url, fullPath);
                    if (flag)
                    {
                        MessageBox.Show("下载完成,即将开始安装");
                        System.Diagnostics.Process.Start(fullPath);
                    }
                }
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// 正在检测Citrix组件Timer处理事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void Tick_checkingCitrix(object sender, EventArgs e)
        {
            bool result = CkCitrix.CheckCitrix();

            if (result)
            {
                this.checkingCitrix_Txt1.Text             = "Citrix组件";
                this.checkingCitrixResult_Txt1.Text       = "已安装";
                this.checkingCitrixResult_Txt1.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("Green"));
                timer_checkingCitrix.Stop();//Citrix组件检测只有一个,所以检测完后立刻关闭计时器
                checkSuccessCitrix = true;
                hardwareInfo.CheckingCount++;
                SuccessedCount++;
            }
            else
            {
                this.checkingCitrix_Txt1.Text             = "Citrix组件";
                this.checkingCitrixResult_Txt1.Text       = "未安装";
                this.checkingCitrixResult_Txt1.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("Red"));
                hardwareInfo.CheckingCount++;
                hardwareInfo.CheckingErrorCount++;
                timer_checkingCitrix.Stop();
                checkSuccessCitrix = true;
                SuccessedCount++;
            }
        }
Exemplo n.º 4
0
        public Repair()
        {
            TrustyStation trust = new TrustyStation();

            TrustyNormal = trust.TrustyStationNormal();
            NormalList   = new List <string>();
            NormalList.AddRange(TrustyNormal);
            TrustyError  = trust.TrustyStationError();
            ErrorList    = new List <string>();
            CitrixNormal = new List <string>();
            CitrixError  = new List <string>();
            ErrorList.AddRange(TrustyError);
            if (CkCitrix.CheckCitrix())
            {
                CitrixError.Add("Citrix组件未安装");
            }
            else
            {
                CitrixNormal.Add("Citrix组件已安装");
            }
        }