//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)); } }
//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); } }
//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); } }
//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)); } }
//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); } }
//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); } }
//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)); } }
//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)); }
//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)); }