public static Task Track(
     this IUserActivity instance,
     string eventName,
     params long[] users)
 {
     return(Track(instance, eventName, false, users));
 }
Esempio n. 2
0
		public TodoItemPage (bool isNew = false)
		{
			InitializeComponent ();
			isNewItem = isNew;

			if (Device.OS == TargetPlatform.iOS) {
				userActivity = DependencyService.Get<IUserActivity> ();
			}
		}
Esempio n. 3
0
        public TodoItemPage(bool isNew = false)
        {
            InitializeComponent();
            isNewItem = isNew;

            if (Device.RuntimePlatform == Device.iOS)
            {
                userActivity = DependencyService.Get <IUserActivity>();
            }
        }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Control       control          = LoadControl("~/UserControls/Repeaters/UserActivities.ascx");
            IUserActivity objectActivities = (IUserActivity)control;

            objectActivities.OutputTemplate         = "UserActivities.ascx";
            objectActivities.UserActivityParameters = new UserActivityParameters {
                ObjectID = UserProfile.Current.ProfileCommunityID, ObjectType = Helper.GetObjectTypeNumericID("ProfileCommunity"), IgnoreCache = true
            };
            Cnt.Controls.Add(control);
        }
Esempio n. 5
0
        private void LoadUserActivities()
        {
            PnlCnt.Controls.Clear();
            Control       control          = LoadControl("~/UserControls/Repeaters/UserActivities.ascx");
            IUserActivity objectActivities = (IUserActivity)control;

            objectActivities.OutputTemplate         = "UserActivities.ascx";
            objectActivities.UserActivityParameters = new UserActivityParameters {
                ObjectID = UserProfile.Current.ProfileCommunityID, ObjectType = Helper.GetObjectTypeNumericID("ProfileCommunity"), IgnoreCache = true
            };
            PnlCnt.Controls.Add(control);
        }
 public static Task Track(
     this IUserActivity instance,
     string eventName,
     bool publishable,
     params long[] users)
 {
     return(Track(
                instance,
                eventName,
                DateTime.UtcNow,
                publishable,
                users));
 }
        public static UserActivityReport Report(
            this IUserActivity instance,
            string eventName,
            DateTime timestamp)
        {
            if (instance == null)
            {
                throw new ArgumentNullException("instance");
            }

            return(instance.Report(
                       eventName,
                       instance.Settings.Timeframe,
                       timestamp));
        }
        public static Task Track(
            this IUserActivity instance,
            string eventName,
            DateTime timestamp,
            bool publishable,
            params long[] users)
        {
            if (instance == null)
            {
                throw new ArgumentNullException("instance");
            }

            return(instance.Track(
                       eventName,
                       instance.Settings.Timeframe,
                       timestamp,
                       publishable,
                       users));
        }
    protected void Add_Click(object sender, EventArgs e)
    {
        ListItemCollection removeList = new ListItemCollection();

        // deselect all items
        foreach (ListItem item in SelectedMembers.Items)
        {
            item.Selected = false;
        }

        for (int i = 0; i < AvailableMembers.Items.Count; i++)
        {
            ListItem li = AvailableMembers.Items[i];
            if (!li.Selected)
            {
                continue;
            }

            // check to see if user is already selected
            IUserActivity attendee = Activity.Attendees.FindAttendee(li.Value);
            if (attendee != null)
            {
                continue;
            }

            li.Attributes.Add("style", "color:lightgrey");
            li.Attributes.Add("status", "unconfirmed");
            SelectedMembers.Items.Add(li);
            Activity.Attendees.Add(li.Value);
            removeList.Add(li);
        }

        foreach (ListItem li in removeList)
        {
            AvailableMembers.Items.Remove(li);
        }
    }
 public static UserActivityReport Report(
     this IUserActivity instance,
     string eventName)
 {
     return(Report(instance, eventName, DateTime.UtcNow));
 }
Esempio n. 11
0
        private void Reload(bool ignoreCache)
        {
            PnlCnt.Controls.Clear();
            PnlInput.Visible = false;
            UserDataContext udc = UserDataContext.GetUserDataContext();

            if (udc.IsAuthenticated)
            {
                if (_4screen.CSB.DataAccess.Business.DataAccessConfiguration.UserActivityIsActivityActiv(UserActivityWhat.DoNowThis))
                {
                    if (this._Host.ParentObjectType == 19) // Profile
                    {
                        DataObject profile = DataObject.Load <DataObject>(this._Host.ParentCommunityID);
                        if (udc.UserID == profile.UserID.Value)
                        {
                            hasContent       = true;
                            PnlInput.Visible = true;
                        }
                    }
                    else
                    {
                        hasContent       = true;
                        PnlInput.Visible = true;
                    }
                }
            }

            try
            {
                string template = "UserActivities.ascx";
                string repeater = "UserActivities.ascx";
                if (_Host.OutputTemplate != null)
                {
                    if (!string.IsNullOrEmpty(_Host.OutputTemplate.OutputTemplateControl))
                    {
                        template = _Host.OutputTemplate.OutputTemplateControl;
                    }

                    if (!string.IsNullOrEmpty(_Host.OutputTemplate.RepeaterControl))
                    {
                        repeater = _Host.OutputTemplate.RepeaterControl;
                    }
                }

                Control       control          = LoadControl("~/UserControls/Repeaters/UserActivities.ascx");
                IUserActivity objectActivities = (IUserActivity)control;
                objectActivities.OutputTemplate         = template;
                objectActivities.UserActivityParameters = new UserActivityParameters {
                    ObjectID = this._Host.ParentCommunityID, ObjectType = this._Host.ParentObjectType, IgnoreCache = ignoreCache
                };

                PnlCnt.Controls.Add(control);
                if (objectActivities.HasContent && !PnlInput.Visible)
                {
                    hasContent = true;
                }
            }
            catch
            {
            }

            PnlInput.ID = null;
        }