示例#1
0
文件: Login.cs 项目: luinnx/android-2
 public override void Run()
 {
     try
     {
         IUserAuther auther = RometeClientManager.GetClient(PsPropertiesUtil.GetProperties(context, "loginUrl"), typeof(IUserAuther), 60000) as IUserAuther;
         context.user.LoginResult = auther.Login(context.user.UserName, context.user.Password, context.user.IMEI);
         context.handler.SendEmptyMessage(Login.RETURN);
     }
     catch (WebException e)
     {
         Log.Error("LoginActivity", e.ToString());
         LogUtil.SaveLogInfoToFile(e.ToString());
         context.handler.SendEmptyMessage(Login.NETERROR);
     }
     catch (System.Exception e1)
     {
         Log.Error("LoginActivity", e1.ToString());
         LogUtil.SaveLogInfoToFile(e1.ToString());
         context.handler.SendEmptyMessage(Login.ERROR);
     }
 }
示例#2
0
文件: Main.cs 项目: luinnx/android-2
 public override void Run()
 {
     try
     {
         ISharedPreferences mSharedPreference = context.GetSharedPreferences(Constant.Com_Fra, FileCreationMode.WorldWriteable);
         IEnvManagerSvr     newinfo           = RometeClientManager.GetClient(PsPropertiesUtil.GetProperties(context, "loadinfoUrl"), typeof(IEnvManagerSvr), 60000) as IEnvManagerSvr;
         AppEnvironment     appenvironment    = newinfo.GetUserEnv(mSharedPreference.GetString(Constant.PS_UTAG, ""), 0);
         Message            msg    = context.mainhandler.ObtainMessage();
         Bundle             bundle = new Bundle();
         bundle.PutString("HeaderURL", appenvironment.MainPage.HeadUrl);
         bundle.PutInt("HeaderHeight", appenvironment.MainPage.HeadHeight);
         bundle.PutString("LoadImg", appenvironment.SplashImg);
         ObjList  list       = appenvironment.MainPage.FuncDefs;
         string[] funsname   = new string[list.Count];
         string[] funurl     = new string[list.Count];
         string[] funiconurl = new string[list.Count];
         string[] funsbdnurl = new string[list.Count];
         for (int i = 0; i < list.Count; i++)
         {
             funsname[i]   = (list[i] as FuncEntry).Title;
             funurl[i]     = (list[i] as FuncEntry).Url;
             funiconurl[i] = (list[i] as FuncEntry).IconUrl;
             funsbdnurl[i] = (list[i] as FuncEntry).StateUrl;
         }
         bundle.PutStringArray("funsname", funsname);
         bundle.PutStringArray("funsurl", funurl);
         bundle.PutStringArray("funsiconurl", funiconurl);
         bundle.PutStringArray("funsbdnurl", funsbdnurl);
         msg.Data   = bundle;
         msg.What   = 1;
         msg.Target = context.mainhandler;
         msg.SendToTarget();
     }
     catch (System.Exception e)
     {
         throw;
     }
 }