Beispiel #1
0
 //all data proceed
 public void allDataProceed()
 {
     object obj = "";
     if (Utility.isNetWorkConnected() && (
         settings["hasDateToSend"].ToString().Equals("1")
         ||Utility.isExistCrashLog()
         )
         )
     {
         Post post = new Post((int)UMSAgent.UMSApi.DataType.AllDATA, obj);
         post.stateChanged += new Post.stateChangedHandler(this.getData);
         post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.AllDATA));
     }
 }
Beispiel #2
0
 //event data proceed
 public void eventDataProceed(string eventid, string pagename, string lable = "",int acc=1,double count=0.0)
 {
     Event obj = model.getEventInfo(eventid, pagename, lable,acc);
     if (settings["repolicy"].Equals("1") && Utility.isNetWorkConnected())
     {
         Post post = new Post((int)UMSAgent.UMSApi.DataType.EVENTDATA, obj);
         post.stateChanged += new Post.stateChangedHandler(this.getData);
         post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.EVENTDATA));
     }
     else
     {
         FileSave.saveFile((int)UMSAgent.UMSApi.DataType.EVENTDATA, obj);
     }
 
 }
Beispiel #3
0
 //client data proceed
 public void clientDataProceed()
 {
     ClientData obj =  model.getClientData();
 
     if (Utility.isNetWorkConnected())
     {
         Post post = new Post((int)UMSAgent.UMSApi.DataType.CLIENTDATA, obj);
         post.stateChanged += new Post.stateChangedHandler(this.getData);
         post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.CLIENTDATA));
     }
     else
     {
         FileSave.saveFile((int)UMSAgent.UMSApi.DataType.CLIENTDATA, obj);
     }
 
 }
Beispiel #4
0
        //check new version
        public void checkNewVersionProceed(string version)
        {
            UpdatePreference obj = model.getUpdatePreference(version);

             if ((Utility.GetNetStates() == "WiFi" && settings["updateonlywifi"].Equals("1")) ||
                 (Utility.isNetWorkConnected() && !settings["updateonlywifi"].Equals("1")))
             {
                 Post post = new Post((int)UMSAgent.UMSApi.DataType.UPDATEDATA, obj);
                 post.stateChanged += new Post.stateChangedHandler(this.getData);
                 post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.UPDATEDATA));
             }
        }
Beispiel #5
0
 //tag data proceed
 public void tagDataProceed(string tags)
 {
     Tag obj = model.getTagData(tags);
     if (settings["repolicy"].Equals("1") && Utility.isNetWorkConnected())
     {
         Post post = new Post((int)UMSAgent.UMSApi.DataType.TAGDATA, obj);
         post.stateChanged += new Post.stateChangedHandler(this.getData);
         post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.TAGDATA));
     }
     else
     {
         FileSave.saveFile((int)UMSAgent.UMSApi.DataType.TAGDATA, obj);
     }
 }
Beispiel #6
0
        //page visit data proceed
        public void pageInfoDataProceed(PageInfo obj)
        {
            if (settings["repolicy"].Equals("1") && Utility.isNetWorkConnected())
            {
                Post post = new Post((int)UMSAgent.UMSApi.DataType.PAGEINFODATA, obj);
                post.stateChanged += new Post.stateChangedHandler(this.getData);

                post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.PAGEINFODATA));
            }
            else
            {
                FileSave.saveFile((int)UMSAgent.UMSApi.DataType.PAGEINFODATA, obj);
            }
        }
Beispiel #7
0
 //get online config preference
 public void onlineConfigProceed()
 {
     OnLineConfig obj = model.getOnlineConfig();
     if (Utility.isNetWorkConnected())
     {
         Post post = new Post((int)UMSAgent.UMSApi.DataType.CONFIGDATA, obj);
         post.stateChanged += new Post.stateChangedHandler(this.getData);
         post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.CONFIGDATA));
     }
 }
Beispiel #8
0
        //pushid data proceed
        public void pushidDataProceed(string pushid)
        {
            Pushid obj = model.getPushidData(pushid);
            Post post = new Post((int)UMSAgent.UMSApi.DataType.PUSHID, obj);
            post.stateChanged += new Post.stateChangedHandler(this.getData);
            post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.PUSHID));

        }
Beispiel #9
0
        //userid data proceed
        public void useridDataProceed(string userid)
        {
            Userid obj = model.getUseridData(userid);
            Post post = new Post((int)UMSAgent.UMSApi.DataType.USERID, obj);
            post.stateChanged += new Post.stateChangedHandler(this.getData);
            post.sendData(model.getUrl((int)UMSAgent.UMSApi.DataType.USERID));

        }