Ejemplo n.º 1
0
        //高级设置
        private void 高级HToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_Option   option = new frm_Option();
            DialogResult result = option.ShowDialog();

            if (result == DialogResult.OK)
            {
                while (result == DialogResult.OK && option.ServerPassWordChanged == PwdChangType.UNSUCCESED)
                {
                    MessageBox.Show("服务端密码修改不成功");
                    if (option != null)
                    {
                        result = option.ShowDialog();
                    }
                }
                if (option.ServerPassWordChanged == PwdChangType.CHANGED)
                {
                    GeneralControler.ChangeServerPassWord(option.ServerPassWord);
                }
                if (option.UpdatedFileChanged)
                {
                    ICanSeeYou.Configure.OptionManager.ChangeUpdatedFile(option.UpdatedFile, option.Version);
                    GeneralControler.UpdatedFile   = option.UpdatedFile;
                    GeneralControler.ServerVersion = option.Version;
                }
                while (result == DialogResult.OK && option.ClientPassWordChanged == PwdChangType.UNSUCCESED)
                {
                    MessageBox.Show("客户端密码修改不成功");
                    if (option != null)
                    {
                        result = option.ShowDialog();
                    }
                }
                if (option.ClientPassWordChanged == PwdChangType.CHANGED)
                {
                    string Md5Pwd = ICanSeeYou.Configure.PassWord.MD5Encrypt(option.ClientPassWord);
                    if (Md5Pwd != "")
                    {
                        ICanSeeYou.Configure.OptionManager.ChangePassWord(Md5Pwd);
                    }
                    else
                    {
                        MessageBox.Show("客户端的密码不能被加密!请重新修改!");
                    }
                }
            }
        }
Ejemplo n.º 2
0
        //�߼�����
        private void �߼�HToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frm_Option option = new frm_Option();
            DialogResult result= option.ShowDialog();
            if (result == DialogResult.OK)
            {
                while (result == DialogResult.OK && option.ServerPassWordChanged == PwdChangType.UNSUCCESED)
                {
                    MessageBox.Show("����������޸IJ��ɹ�");
                    if (option != null)
                        result = option.ShowDialog();
                }
                if (option.ServerPassWordChanged == PwdChangType.CHANGED)
                {
                    GeneralControler.ChangeServerPassWord(option.ServerPassWord);
                }
                if (option.UpdatedFileChanged)
                {
                    ICanSeeYou.Configure.OptionManager.ChangeUpdatedFile(option.UpdatedFile, option.Version);
                    GeneralControler.UpdatedFile = option.UpdatedFile;
                    GeneralControler.ServerVersion = option.Version;
                }
                while (result == DialogResult.OK && option.ClientPassWordChanged == PwdChangType.UNSUCCESED)
                {
                    MessageBox.Show("�ͻ��������޸IJ��ɹ�");
                    if(option !=null)
                        result = option.ShowDialog();
                }
                if (option.ClientPassWordChanged==PwdChangType.CHANGED)
                {
                    string Md5Pwd = ICanSeeYou.Configure.PassWord.MD5Encrypt(option.ClientPassWord);
                    if (Md5Pwd != "")
                        ICanSeeYou.Configure.OptionManager.ChangePassWord(Md5Pwd);
                    else
                        MessageBox.Show("�ͻ��˵����벻�ܱ�����!�������޸�!");
                }

            }
        }