Esempio n. 1
0
        protected override void OnElementChanged(ElementChangedEventArgs <Entry> e)
        {
            base.OnElementChanged(e);
            GradientDrawable gd = new GradientDrawable();

            if (e.OldElement != null && e.NewElement == null)
            {
                return;
            }
            jEntry = (JEntry)Element;
            gd.SetColor(global::Android.Graphics.Color.Transparent);
            gd.SetCornerRadius(10);
            gd.SetStroke(jEntry.BorderWidth, jEntry.BorderColor.ToAndroid());
            Control.SetBackground(gd);
            //Control.SetPadding(10, 10, 10, 10);
            Control.SetPadding((int)jEntry.Padding.Left, (int)jEntry.Padding.Top, (int)jEntry.Padding.Right, (int)jEntry.Padding.Bottom);
            Control.SetRawInputType(InputTypes.TextFlagNoSuggestions);

            if (!string.IsNullOrEmpty(jEntry.LeftIcon))
            {
                Control.SetCompoundDrawablesWithIntrinsicBounds(GetDrawable(jEntry.LeftIcon), null, null, null);
                Control.CompoundDrawablePadding = 10;
            }

            if (!string.IsNullOrEmpty(jEntry.RightIcon))
            {
                Control.SetCompoundDrawablesWithIntrinsicBounds(null, null, null, GetDrawable(jEntry.RightIcon));
                Control.CompoundDrawablePadding = 10;
            }
        }
Esempio n. 2
0
        private void ProcessActionInternally(Action_DeliveryEnsurer _Action, Action <string> _ErrorMessageAction = null)
        {
            switch (_Action.QueryType)
            {
            //FS
            case Action_DeliveryEnsurer.QUERY_TYPE_FS_DELETE_FILE:
            {
                var Casted = (Action_DeliveryEnsurer_FS_DeleteFile)_Action;

                FS_DeleteFile_FireAndForget_Internal(Casted.BucketName, Casted.KeyName, Casted.RetryCount, _ErrorMessageAction);
                break;
            }

            case Action_DeliveryEnsurer.QUERY_TYPE_FS_DELETE_FOLDER:
            {
                var Casted = (Action_DeliveryEnsurer_FS_DeleteFolder)_Action;

                FS_DeleteFolder_FireAndForget_Internal(Casted.BucketName, Casted.KeyName, Casted.RetryCount, _ErrorMessageAction);
                break;
            }

            //DB
            case Action_DeliveryEnsurer.QUERY_TYPE_DB_UPDATE_ITEM:
            case Action_DeliveryEnsurer.QUERY_TYPE_DB_PUT_ITEM:
            {
                var Casted = (Action_DeliveryEnsurer_DB_UpdateOrPutItem)_Action;

                DB_UpdateOrPutItem_FireAndForget_Internal(
                    Casted.QueryType,
                    Casted.TableName,
                    Casted.KeyName,
                    Casted.KeyValue.GetKeyValuePrimitiveReference(),
                    JObject.Parse(Casted.UpdateItemStringified),
                    Casted.RetryCount,
                    _ErrorMessageAction);
                break;
            }

            case Action_DeliveryEnsurer.QUERY_TYPE_DB_DELETE_ITEM:
            {
                var Casted = (Action_DeliveryEnsurer_DB_DeleteItem)_Action;

                DB_DeleteItem_FireAndForget_Internal(
                    Casted.TableName,
                    Casted.KeyName,
                    Casted.KeyValue.GetKeyValuePrimitiveReference(),
                    Casted.RetryCount,
                    _ErrorMessageAction);
                break;
            }

            case Action_DeliveryEnsurer.QUERY_TYPE_DB_ADD_ELEMENTS_TO_ARRAY_ITEM:
            case Action_DeliveryEnsurer.QUERY_TYPE_DB_REMOVE_ELEMENTS_FROM_ARRAY_ITEM:
            {
                var Casted       = (Action_DeliveryEnsurer_DB_Add_Remove_ElementsToArrayItem)_Action;
                var ValueEntries = new List <BPrimitiveType>();
                foreach (var JEntry in Casted.ElementValueEntries)
                {
                    ValueEntries.Add(JEntry.GetKeyValuePrimitiveReference());
                }

                DB_AddOrRemoveElementsFromArrayItem_FireAndForget_Internal(
                    Casted.QueryType,
                    Casted.TableName,
                    Casted.KeyName,
                    Casted.KeyValue.GetKeyValuePrimitiveReference(),
                    Casted.ElementName,
                    ValueEntries.ToArray(),
                    Casted.RetryCount,
                    _ErrorMessageAction);
                break;
            }
            }
        }