Beispiel #1
0
        private void AddAttachmentTap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            ((Control)this).Focus();
            List <NamedAttachmentType> attachmentTypes;
            int maxCount;

            if (this.WallPostVM.CanAddMoreAttachments)
            {
                attachmentTypes = new List <NamedAttachmentType>((IEnumerable <NamedAttachmentType>)AttachmentTypes.AttachmentTypesWithPhotoFromGalleryAndLocation);
                if (this.WallPostVM.CanAddPollAttachment)
                {
                    attachmentTypes.Add(AttachmentTypes.PollAttachmentType);
                }
                if (this.WallPostVM.CannAddTimerAttachment)
                {
                    attachmentTypes.Add(AttachmentTypes.TimerAttachmentType);
                }
                maxCount = this.WallPostVM.NumberOfAttAllowedToAdd;
            }
            else
            {
                if (!this.WallPostVM.CannAddTimerAttachment)
                {
                    return;
                }
                attachmentTypes = new List <NamedAttachmentType>()
                {
                    AttachmentTypes.TimerAttachmentType
                };
                maxCount = 1;
            }
            this._pickerUC = AttachmentPickerUC.Show(attachmentTypes, maxCount, (Action)(() => this.HandleInputParams(null)), this._excludeLocation, this.CommonParameters.IsGroup ? -this.CommonParameters.UserOrGroupId : this.CommonParameters.UserOrGroupId, this._adminLevel, null);
        }
 private void AddAttachTap()
 {
     AttachmentPickerUC.Show(AttachmentTypes.AttachmentTypesWithPhotoFromGalleryAndLocation, this._commentVM.NumberOfAttAllowedToAdd, (Action)(() =>
     {
         PostCommentsPage.HandleInputParams(this._commentVM);
         this.UpdateAppBar();
     }), true, 0, 0, (ConversationInfo)null);
 }
Beispiel #3
0
 private void _appBarButtonAddAttachment_Click(object sender, EventArgs e)
 {
     ((Control)this).Focus();
     this._pickerUC = AttachmentPickerUC.Show(AttachmentTypes.AttachmentTypesWithPhotoFromGalleryAndLocation, 10, (Action)(() => this.HandleInputParams(null)), this._excludeLocation, this.CommonParameters.IsGroup ? -this.CommonParameters.UserOrGroupId : this.CommonParameters.UserOrGroupId, 0, null);
 }
Beispiel #4
0
 private void AddAttach()
 {
     AttachmentPickerUC.Show(AttachmentTypes.AttachmentTypesWithPhotoFromGalleryAndLocation, this._commentVM.NumberOfAttAllowedToAdd, (Action)(() => PostCommentsPage.HandleInputParams(this._commentVM)), true, 0L, 0, null);
 }