示例#1
0
        public LoginViewModel(Gdxj gdxj)
        {
            this.gdxj = gdxj;

            VerificationCodeImageRefresh = new DelegateCommand(() => { this.gdxj.Login.VerificationCodeImageRefresh(); });
            LoginCommand = new DelegateCommand(() =>
            {
                if (Username.Length < 1)
                {
                    LoginInfo = "´íÎó£ºÕ˺Ų»ÄÜΪ¿Õ£¡"; return;
                }
                gdxj.Login.Username         = Username;
                gdxj.Login.Password         = Password;
                gdxj.Login.VerificationCode = VerificationCode;
                gdxj.Login.Login();
            })
            {
                IsEnabled = false
            };

            Username = "******";
            Password = "******";

            gdxj.Subscribe(Login);
            gdxj.Initialization();
        }
示例#2
0
        private bool Initialization()
        {
            bool result = true;

            try
            {
                //ccoa.AttachSavePath = System.IO.Directory.GetCurrentDirectory() + Setting.System.GetSystemSetting("AttachSavePath");
                //ccoa.AttachTempPath = System.IO.Directory.GetCurrentDirectory() + Setting.System.GetSystemSetting("AttachTempPath");
                //System.IO.Directory.CreateDirectory(ccoa.AttachSavePath);
                //System.IO.Directory.CreateDirectory(ccoa.AttachTempPath);
                gdxj.Subscribe(Login);
            }
            catch (Exception e)
            {
                result = false;
                throw (e);
            }
            return(result);
        }