Пример #1
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);
            }
        }
Пример #2
0
        //page visit data proceed
        public void pageInfoDataProceed(PageInfo obj)
        {
            if ("1".Equals(ApplicationSettings.GetSetting <string>(SettingKeys.REPORT_POLICY)) && 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);
            }
        }
Пример #3
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);
            }
        }
Пример #4
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);
            }
        }
Пример #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);
            }
        }
Пример #6
0
        //event data proceed
        public void eventDataProceed(string eventid, string pagename, string lable = "", int acc = 1)
        {
            Event obj = model.getEventInfo(eventid, pagename, lable, acc);

            if ("1".Equals(ApplicationSettings.GetSetting <string>(SettingKeys.REPORT_POLICY)) && 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);
            }
        }