/// <summary>
		/// 设置参数值
		/// </summary>
		/// <param name="msgInfoParam">Message info parameter.</param>
		private void SetRestRequestParams(LoginInfoParam loginInfoParam)
		{
			if (!requestParams.ContainsKey ("key"))
				requestParams.Add ("key", loginInfoParam.Key);
			else
				requestParams ["key"] = loginInfoParam.Key;

			if (!requestParams.ContainsKey ("eaction"))
				requestParams.Add ("eaction", loginInfoParam.Eaction);
			else
				requestParams ["eaction"] = loginInfoParam.Eaction;
			
			if (!requestParams.ContainsKey ("eLoginName"))
				requestParams.Add ("eLoginName", loginInfoParam.EloginName);
			else
				requestParams ["eLoginName"] = loginInfoParam.EloginName;
			if (!requestParams.ContainsKey ("eLoginPwd"))
				requestParams.Add ("eLoginPwd", loginInfoParam.EloginPwd);
			else
				requestParams ["eLoginPwd"] = loginInfoParam.EloginPwd;
		
			if (!requestParams.ContainsKey ("md5"))
				requestParams.Add ("md5", loginInfoParam.Md5);
			else
				requestParams ["md5"] = loginInfoParam.Md5;
		}
		private void Login()
		{
			userNameValue = edit_userName.Text.ToString();
			passwordValue = edit_userPassword.Text.ToString();
			if(string.IsNullOrEmpty(userNameValue)||string.IsNullOrEmpty(passwordValue))
			{
				Toast.MakeText(this,"用户名或密码不能为空,请填写...",ToastLength.Long).Show();	
				return;
			}

			if (!EldYoungUtil.IsValidUserName (userNameValue)) {
				Toast.MakeText (this, "请输入正确规范用户名4-20位,由中英文、数字、下划线组成", ToastLength.Short).Show ();
				return;
			}
			if (!EldYoungUtil.IsPassWord (passwordValue)) {
				Toast.MakeText (this, "请输入正确规范用户名6-20位,建议由字母、数字和符号两种以上组成", ToastLength.Short).Show ();
				return;
			}

			ProgressDialogUtil.StartProgressDialog(this,GetString(Resource.String.loginMsg),true);
			//检测网络连接
			if(!EldYoungUtil.IsConnected(this))
			{
		        Toast.MakeText(this,"网络连接超时,请检测网络",ToastLength.Short).Show();	
				ProgressDialogUtil.StopProgressDialog();
				return;
			}

			//调用restapi service 登录
			var loginInfoParam = new LoginInfoParam () {
				LoginName = userNameValue,LoginPwd = passwordValue
			};

			//初始化请求参数
			SetRestRequestParams (loginInfoParam);

			var restSharpRequestHelp = new RestSharpRequestHelp(loginInfoParam.Url,requestParams);
			restSharpRequestHelp.ExcuteAsync ((response) => {
				if(response.ResponseStatus == RestSharp.ResponseStatus.Completed && response.StatusCode == System.Net.HttpStatusCode.OK)
				{
					//获取并解析返回resultJson获取安全码结果值
					var resultJson = response.Content;
					var loginJson = JsonConvert.DeserializeObject<LoginJson>(resultJson);
					if(loginJson.statuscode =="1")
					{
						Global.MyInfo = loginJson.data.Table[0];
						var Uid = Global.MyInfo.UId;
						Global.Guid = Uid;
						//登录成功,将登录guid写入refrence文件
						sp_userinfo.Edit().PutString(Global.refrence_Guid,Uid).Commit();
						var guidAsAlias = Uid.Replace("-","_");//使用用户guid作为推送别名
						_jpushUtil.SetAlias(guidAsAlias);
						//登录成功,且记住用户密码选中,才记录
						if(cb_passWord.Checked)    
						{
							sp_userinfo.Edit().PutString(Global.refrence_UserName,userNameValue).Commit();
							sp_userinfo.Edit().PutString(Global.refrence_Password,passwordValue).Commit();
							sp_userinfo.Edit().PutBoolean(Global.refrence_Password_Check,true).Commit();
						}
						RunOnUiThread (()=>
							{
								var  funcType = Intent.GetIntExtra(Global.FuncType,0);
								//跳转到功能界面
								var intent = new Intent(this,FuncTypeActivityFactory.CreateFuncActivityFactory(funcType));
								if(funcType==(int)FuncActivityType.Main)
									intent.SetFlags(ActivityFlags.ClearTask|ActivityFlags.NewTask);
								var bundle = Intent.Extras;
								if (bundle != null)
									intent.PutExtras (bundle);
								StartActivity(intent);						
								this.Finish();
								OverridePendingTransition(Android.Resource.Animation.FadeIn,Android.Resource.Animation.FadeOut);
								Toast.MakeText(this,"登录成功",ToastLength.Short).Show();
							});
					}
					else
					{
						RunOnUiThread(()=>
							{
								Toast.MakeText(this,loginJson.message,ToastLength.Short).Show();
							});
					}
				}
				else if(response.ResponseStatus == RestSharp.ResponseStatus.TimedOut)
				{
					RunOnUiThread(()=>
						{
							Toast.MakeText(this,"网络连接超时",ToastLength.Short).Show();
						});
				}
				else
				{
					RunOnUiThread(()=>
						{
							Toast.MakeText(this,response.StatusDescription,ToastLength.Short).Show();
						});
				}
				RunOnUiThread(()=>
					{
						ProgressDialogUtil.StopProgressDialog();
					
						return;
					});
			});


		}