Exemple #1
0
 //读取配置文件
 private void ReadOptionFile()
 {
     ICanSeeYou.Configure.Option     option     = new ICanSeeYou.Configure.Option();
     ICanSeeYou.Configure.OptionFile optionFile = option.OptFile;
     txt_UpdatedFile.Text = optionFile.UpdatedFile;
     mtb_Version.Text     = optionFile.UpdatedVersion;
 }
Exemple #2
0
        /// <summary>
        /// 管理员登陆
        /// </summary>
        /// <returns>是否登陆成功</returns>
        private static bool Login()
        {
            string    md5TruePwd  = "";
            string    md5InputPwd = "";
            frm_Login login       = new frm_Login();

            if (System.IO.File.Exists(ICanSeeYou.Common.Constant.OptionFilename))
            {
                ICanSeeYou.Configure.Option     option     = new ICanSeeYou.Configure.Option();
                ICanSeeYou.Configure.OptionFile optionFile = option.OptFile;
                md5TruePwd = optionFile.PassWord;
                if (md5TruePwd != "")
                {
                    DialogResult result = login.ShowDialog();
                    if (result == DialogResult.OK)
                    {
                        md5InputPwd = ICanSeeYou.Configure.PassWord.MD5Encrypt(login.Password);
                    }
                    else
                    {
                        return(false);
                    }
                    while (md5TruePwd != md5InputPwd)
                    {
                        MessageBox.Show("密码错误!");
                        result = login.ShowDialog();
                        if (result == DialogResult.OK)
                        {
                            md5InputPwd = ICanSeeYou.Configure.PassWord.MD5Encrypt(login.Password);
                        }
                        else
                        {
                            return(false);
                        }
                    }
                    if (md5InputPwd == md5TruePwd)
                    {
                        return(true);
                    }
                }
                else
                {
                    MessageBox.Show("配置文件的密码丢失,不能登陆!");
                }
            }
            else
            {
                MessageBox.Show("配置文件丢失,不能登陆!");
            }
            return(false);
        }
        /// <summary>
        /// 初始化
        /// </summary>
        private void Initial()
        {
            imageKey = new Hashtable();
            System.Collections.Specialized.StringCollection keyCol = iml_ExplorerImages.Images.Keys;
            for (int i = 0; i < keyCol.Count; i++)
            {
                if (!imageKey.Contains(keyCol[i]))
                {
                    imageKey.Add(keyCol[i], keyCol[i]);
                }
            }
            //总控制端初始化
            GeneralControler                        = new Clients.Controlers(imageKey);
            GeneralControler.pic_Screen             = pic_Screen;
            GeneralControler.ltv_HostExplorer       = ltv_hostexplorer;
            GeneralControler.ltv_Log                = ltv_Log;
            GeneralControler.ltv_MyExplorer         = ltv_myexplorer;
            GeneralControler.rtb_Content            = rtb_Content;
            GeneralControler.DosResult_rTB          = DosResult_rtb;
            GeneralControler.ComputerInfoResult_rTB = computerInfo_rtb;
            GeneralControler.Process_lV             = process_lv;
            GeneralControler.Service_lV             = Service_lv;
            GeneralControler.Startup_lV             = Startup_lv;
            GeneralControler.PSS_rTB                = PSS_rtb;
            GeneralControler.lv_Regeidt             = Reg_lV;
            GeneralControler.tv_Regedit             = Reg_tV;
            GeneralControler.rtb_Regedit            = Reg_rTB;
            GeneralControler.rtb_Script             = Script_rtb;
            GeneralControler.trv_HostView           = trv_HostView;
            GeneralControler.txb_HostExploer        = txt_hostexplorer;
            GeneralControler.txb_MyExplorer         = txt_myexplorer;
            GeneralControler.lbl_Message            = lbl_Display;
            ICanSeeYou.Configure.Option     option     = new ICanSeeYou.Configure.Option();
            ICanSeeYou.Configure.OptionFile optionFile = option.OptFile;
            if (optionFile != null)
            {
                GeneralControler.UpdatedFile   = optionFile.UpdatedFile;
                GeneralControler.ServerVersion = optionFile.UpdatedVersion;
            }

            //未开始截屏
            ScreenOpen = false;
            //默认截屏间隔时间(一秒),即截屏速度为中.
            ScreenTimer.Interval        = 1000;
            中MToolStripMenuItem.Checked = true;
            //  this.ShowInTaskbar = false;
        }
Exemple #4
0
        /// <summary>
        /// 管理员登陆
        /// </summary>
        /// <returns>是否登陆成功</returns>
        private static bool Login()
        {
            string md5TruePwd = "";
            string md5InputPwd = "";
            frm_Login login = new frm_Login();
            if (System.IO.File.Exists(ICanSeeYou.Common.Constant.OptionFilename))
            {

                ICanSeeYou.Configure.Option option = new ICanSeeYou.Configure.Option();
                ICanSeeYou.Configure.OptionFile optionFile = option.OptFile;
                md5TruePwd = optionFile.PassWord;
                if (md5TruePwd != "")
                {
                    DialogResult result = login.ShowDialog();
                    if (result == DialogResult.OK)
                        md5InputPwd = ICanSeeYou.Configure.PassWord.MD5Encrypt(login.Password);
                    else
                        return false;
                    while (md5TruePwd != md5InputPwd)
                    {
                        MessageBox.Show("密码错误!");
                        result = login.ShowDialog();
                        if (result == DialogResult.OK)
                            md5InputPwd =ICanSeeYou.Configure.PassWord.MD5Encrypt(login.Password);
                        else
                            return false;
                    }
                    if (md5InputPwd == md5TruePwd)
                        return true;
                }
                else
                    MessageBox.Show("配置文件的密码丢失,不能登陆!");
            }
            else
                MessageBox.Show("配置文件丢失,不能登陆!");
            return false;
        }
 //升级服务端
 private void 升级服务端UtoolStripMenuItem_Click(object sender, EventArgs e)
 {
     ICanSeeYou.Configure.Option option = new ICanSeeYou.Configure.Option(ICanSeeYou.Common.Constant.OptionFilename);
     if (!option.Read())
     {
         MessageBox.Show("配置文件丢失,请重新设置.");
     }
     if (option.OptFile == null)
     {
         MessageBox.Show("配置文件发生错误,请重新设置.");
     }
     else
     {
         string UpdatedFile = option.OptFile.UpdatedFile;
         if (UpdatedFile != null && System.IO.File.Exists(UpdatedFile))
         {
             GeneralControler.UpdateServer();
         }
         else
         {
             MessageBox.Show("配置文件发生错误或升级文件丢失.");
         }
     }
 }
Exemple #6
0
 //��ȡ�����ļ�
 private void ReadOptionFile()
 {
     ICanSeeYou.Configure.Option option= new ICanSeeYou.Configure.Option();
     ICanSeeYou.Configure.OptionFile optionFile = option.OptFile;
     txt_UpdatedFile.Text = optionFile.UpdatedFile;
     mtb_Version.Text = optionFile.UpdatedVersion;
 }
Exemple #7
0
 //���������
 private void ���������UtoolStripMenuItem_Click(object sender, EventArgs e)
 {
     ICanSeeYou.Configure.Option option = new ICanSeeYou.Configure.Option(ICanSeeYou.Common.Constant.OptionFilename);
     if(!option.Read()) MessageBox.Show("�����ļ���ʧ,����������.");
     if (option.OptFile == null)MessageBox.Show("�����ļ���������,����������.");
     else{
         string UpdatedFile = option.OptFile.UpdatedFile;
         if (UpdatedFile != null && System.IO.File.Exists(UpdatedFile))
             GeneralControler.UpdateServer();
         else
             MessageBox.Show("�����ļ���������������ļ���ʧ.");
     }
 }
Exemple #8
0
        /// <summary>
        /// ��ʼ��
        /// </summary>
        private void Initial()
        {
            imageKey = new Hashtable();
            System.Collections.Specialized.StringCollection keyCol = iml_ExplorerImages.Images.Keys;
            for (int i = 0; i < keyCol.Count; i++)
                if (!imageKey.Contains(keyCol[i]))
                    imageKey.Add(keyCol[i], keyCol[i]);
            //�ܿ��ƶ˳�ʼ��
            GeneralControler = new Clients.Controlers(imageKey);
            GeneralControler.pic_Screen = pic_Screen;
            GeneralControler.ltv_HostExplorer = ltv_hostexplorer;
            GeneralControler.ltv_Log = ltv_Log;
            GeneralControler.ltv_MyExplorer = ltv_myexplorer;
            GeneralControler.rtb_Content = rtb_Content;
            GeneralControler.trv_HostView = trv_HostView;
            GeneralControler.txb_HostExploer = txt_hostexplorer;
            GeneralControler.txb_MyExplorer = txt_myexplorer;
            GeneralControler.lbl_Message = lbl_Display;

            ICanSeeYou.Configure.Option option = new ICanSeeYou.Configure.Option();
            ICanSeeYou.Configure.OptionFile optionFile = option.OptFile;
            if (optionFile != null)
            {
                GeneralControler.UpdatedFile = optionFile.UpdatedFile;
                GeneralControler.ServerVersion = optionFile.UpdatedVersion;
            }

            //δ��ʼ����
            ScreenOpen = false;
            //Ĭ�Ͻ������ʱ��(һ��),�������ٶ�Ϊ��.
            ScreenTimer.Interval = 1000;
            ��MToolStripMenuItem.Checked = true;
              //  this.ShowInTaskbar = false;
        }