public UbuntuOneMusicStoreSource()
            : base(Catalog.GetString ("Ubuntu One Music Store"),
            Catalog.GetString ("Ubuntu One Music Store"),
            sort_order, "ubuntu-one-music-store")
        {
            Properties.SetString ("Icon.Name", "ubuntuone");

            if (custom_view == null) {
                Properties.Set<ISourceContents> ("Nereid.SourceContents", custom_view = new CustomView ());
            }

            // So we can handle u1ms:// URIs
            var dbus_service = ServiceManager.Get<DBusCommandService> ();
            if (dbus_service != null) {
                dbus_service.ArgumentPushed += OnCommandLineArgument;
            }

            // make sure that the u1ms uri gets handled on banshee startup
            foreach (string uri in ApplicationContext.CommandLine.Files) {
                if (IsU1msUri (uri)) {
                    LoadU1msUri (uri);
                    break;
                }
            }
        }
        public static IView View()
        {
            var scrollPos = new Vector2(0, 0);
            var vesselsToAlign = new List<Vessel>();
            var vesselList = new CustomView(() =>
                {
                    scrollPos = GUILayout.BeginScrollView(scrollPos, GUILayout.MinHeight(300));
                    vesselsToAlign.RemoveAll(v => !Model.SmaAligner.AvailableVessels.Contains(v));
                    foreach (var vessel in Model.SmaAligner.AvailableVessels)
                    {
                        var alreadyIn = vesselsToAlign.Contains(vessel);
                        var newIn = GUILayout.Toggle(alreadyIn, vessel.vesselName);
                        if (!alreadyIn && newIn)
                            vesselsToAlign.Add(vessel);
                        if (alreadyIn && !newIn)
                            vesselsToAlign.Remove(vessel);
                    }
                    GUILayout.EndScrollView();
                });
            var align = new ConditionalView(() => vesselsToAlign.Count > 1,
                            new ButtonView("Align", "Sets all semi-major axes of selected vessels to be equal, so they all have the same period",
                                () => Model.SmaAligner.Align(vesselsToAlign)));

            return new VerticalView(new IView[]
                {
                    vesselList,
                    align
                });
        }
		public void TopLevelObjectsHaveANameScope ()
		{
			var xaml = @"
				<View 
				xmlns=""http://xamarin.com/schemas/2014/forms""
				xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml"" />";

			var view = new CustomView ().LoadFromXaml (xaml);

			Assert.IsNotNull (Forms.Internals.NameScope.GetNameScope (view));
			Assert.That (Forms.Internals.NameScope.GetNameScope (view), Is.TypeOf<Forms.Internals.NameScope> ());
		}
Exemple #4
0
        public static string GetPascalName(ModelRoot model, CustomView view)
        {
            string retval = model.Database.TablePrefix;

            if (retval != "")
            {
                return(retval + "_" + view.PascalName);
            }
            else
            {
                return(view.PascalName);
            }
        }
        public UbuntuOneMusicStoreSource () : base (
            Catalog.GetString ("Ubuntu One Music Store"),
            Catalog.GetString ("Ubuntu One Music Store"),
            sort_order, "ubuntu-one-music-store")
        {
            Properties.SetString ("Icon.Name", "ubuntuone");

            if (custom_view == null) {
                Properties.Set<ISourceContents> ("Nereid.SourceContents", custom_view = new CustomView ());
            }

            // So we can handle u1ms:// URIs
            ServiceManager.Get<DBusCommandService> ().ArgumentPushed += OnCommandLineArgument;
        }
Exemple #6
0
        void ReleaseDesignerOutlets()
        {
            if (SearchFieldCell != null)
            {
                SearchFieldCell.Dispose();
                SearchFieldCell = null;
            }

            if (BackForwardToolBarItem != null)
            {
                BackForwardToolBarItem.Dispose();
                BackForwardToolBarItem = null;
            }

            if (ConnectionToolBarItem != null)
            {
                ConnectionToolBarItem.Dispose();
                ConnectionToolBarItem = null;
            }

            if (CustomView != null)
            {
                CustomView.Dispose();
                CustomView = null;
            }

            if (LoggedInLabel != null)
            {
                LoggedInLabel.Dispose();
                LoggedInLabel = null;
            }

            if (RefreshToolBarItem != null)
            {
                RefreshToolBarItem.Dispose();
                RefreshToolBarItem = null;
            }

            if (SearchToolBarItem != null)
            {
                SearchToolBarItem.Dispose();
                SearchToolBarItem = null;
            }

            if (ShowServerInfoToolBarItem != null)
            {
                ShowServerInfoToolBarItem.Dispose();
                ShowServerInfoToolBarItem = null;
            }
        }
        public UbuntuOneMusicStoreSource() : base(
                Catalog.GetString("Ubuntu One Music Store"),
                Catalog.GetString("Ubuntu One Music Store"),
                sort_order, "ubuntu-one-music-store")
        {
            Properties.SetString("Icon.Name", "ubuntuone");

            if (custom_view == null)
            {
                Properties.Set <ISourceContents> ("Nereid.SourceContents", custom_view = new CustomView());
            }

            // So we can handle u1ms:// URIs
            ServiceManager.Get <DBusCommandService> ().ArgumentPushed += OnCommandLineArgument;
        }
        private void AppendProperties()
        {
            sb.AppendLine("		#region Properties");
            sb.AppendLine();

            var index = 0;

            foreach (var column in _item.GetColumns().OrderBy(x => x.Name))
            {
                CustomView typeTable = null;

                sb.AppendLine("		/// <summary>");
                if (!string.IsNullOrEmpty(column.Description))
                {
                    StringHelper.LineBreakCode(sb, column.Description, "		/// ");
                }

                sb.AppendLine("		/// </summary>");
                if (column.IsPrimaryKey)
                {
                    sb.AppendLine("		[System.ComponentModel.DataAnnotations.Key]");
                }

                if (!string.IsNullOrEmpty(column.Description))
                {
                    sb.AppendLine("		[System.ComponentModel.Description(\""+ StringHelper.ConvertTextToSingleLineCodeString(column.Description) + "\")]");
                }

                sb.AppendLine("		[System.Diagnostics.DebuggerNonUserCode()]");

                if (column.DataType.IsTextType() && column.IsMaxLength())
                {
                    sb.AppendLine("		[StringLengthUnbounded]");
                }
                else if (column.DataType.IsTextType() && !column.IsMaxLength())
                {
                    sb.AppendLine($"		[System.ComponentModel.DataAnnotations.StringLength({column.Length})]");
                }

                sb.AppendLine("		public virtual "+ column.GetCodeType() + " " + column.PascalName + " { get; protected set; }");
                sb.AppendLine();
                index++;
            }

            sb.AppendLine("		#endregion");
            sb.AppendLine();
        }
Exemple #9
0
        public void CustomViewConstructor()
        {
            tlog.Debug(tag, $"CustomViewConstructor START");

            ViewStyle style = new ViewStyle()
            {
                Padding = new Extents(3, 3, 3, 3),
            };

            var testingTarget = new CustomView("CustomView", CustomViewBehaviour.ViewBehaviourDefault, style);

            Assert.IsNotNull(testingTarget, "Can't create success object CustomView");
            Assert.IsInstanceOf <CustomView>(testingTarget, "Should be an instance of CustomView type.");

            testingTarget.Dispose();
            tlog.Debug(tag, $"CustomViewConstructor END (OK)");
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.activity_bcr_customview);
            linearLayout = (FrameLayout)FindViewById(Resource.Id.rim);
            light_layout = (View)FindViewById(Resource.Id.light_layout);
            img          = (ImageView)FindViewById(Resource.Id.imageButton2);
            callback     = new CustomViewBcrResultCallback(this);
            // Calculate the coordinate information of the custom interface
            Rect mScanRect = CreateScanRectFromCamera();

            remoteView = new CustomView.Builder()
                         .SetContext(this)
                         // Set the rectangular coordinate setting of the scan frame, required, otherwise it will not be recognized.
                         .SetBoundingBox(mScanRect)
                         // Set the type of result that the bank card identification expects to return.
                         // MLBcrCaptureConfig.ResultSimple:Only identify the card number and validity period information.
                         // MLBcrCaptureConfig.ResultAll:Identify information such as card number, expiration date, issuing bank, issuing organization, and card type.
                         .SetResultType(MLBcrCaptureConfig.ResultSimple)
                         // Set result monitoring
                         .SetOnBcrResultCallback(callback).Build();

            // External calls need to be made explicitly, depending on the life cycle of the current container Activity or ViewGroup
            remoteView.OnCreate(savedInstanceState);
            FrameLayout.LayoutParams lparams = new FrameLayout.LayoutParams(LinearLayout.LayoutParams.MatchParent,
                                                                            LinearLayout.LayoutParams.MatchParent);
            linearLayout.AddView(remoteView, lparams);
            // Draw custom interface according to coordinates
            // In this step, you can also draw other such as scan lines, masks, and draw prompts or other buttons according to your needs.
            AddMainView(mScanRect);

            light_layout.Click += delegate
            {
                remoteView.SwitchLight();
                isLight = !isLight;
                if (isLight)
                {
                    img.SetBackgroundResource(Resource.Drawable.rn_eid_ic_hivision_light_act);
                }
                else
                {
                    img.SetBackgroundResource(Resource.Drawable.rn_eid_ic_hivision_light);
                }
            };
        }
Exemple #11
0
        public static string BuildSelectList(CustomView view, ModelRoot model)
        {
            int           index  = 0;
            StringBuilder output = new StringBuilder();

            foreach (Reference columnRef in view.GeneratedColumns)
            {
                CustomViewColumn dc = (CustomViewColumn)columnRef.Object;
                output.Append("CONVERT(" + dc.DatabaseType + ", [view_" + view.DatabaseName + "].[" + dc.DatabaseName + "]) AS [" + dc.DatabaseName + "]");
                if (index < view.GeneratedColumns.Count - 1)
                {
                    output.Append(",");
                }
                output.AppendLine();
                index++;
            }
            return(output.ToString());
        }
Exemple #12
0
        void ReleaseDesignerOutlets()
        {
            if (CustomView != null)
            {
                CustomView.Dispose();
                CustomView = null;
            }

            if (ToggleButton != null)
            {
                ToggleButton.Dispose();
                ToggleButton = null;
            }

            if (PanelButton != null)
            {
                PanelButton.Dispose();
                PanelButton = null;
            }
        }
Exemple #13
0
        /// <summary>
        /// Called directly from DALi C++ type registry to create a control (view) using no marshalling.
        /// </summary>
        /// <returns>Pointer to the control (views) handle.</returns>
        /// <param name="cPtrControlName">C pointer to the control (view) name.</param>
        private static IntPtr CreateControl(IntPtr cPtrControlName)
        {
            string controlName = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(cPtrControlName);

            NUILog.Debug("Create controlled called from C++ create a " + controlName);

            Func <CustomView> controlConstructor;

            // find the control constructor
            if (Instance._constructorMap.TryGetValue(controlName, out controlConstructor))
            {
                // Create the control
                CustomView newControl = controlConstructor();
                return(newControl.GetPtrfromView());  // return pointer to handle
            }
            else
            {
                throw new global::System.InvalidOperationException("C# View not registererd with ViewRegistry" + controlName);
            }
        }
Exemple #14
0
        public void CustomViewFocusNavigationSupport()
        {
            tlog.Debug(tag, $"CustomViewFocusNavigationSupport START");

            ViewStyle style = new ViewStyle()
            {
                Padding = new Extents(3, 3, 3, 3),
            };

            var testingTarget = new CustomView("CustomView", CustomViewBehaviour.ViewBehaviourDefault, style);

            Assert.IsNotNull(testingTarget, "Can't create success object CustomView");
            Assert.IsInstanceOf <CustomView>(testingTarget, "Should be an instance of CustomView type.");

            Assert.AreEqual(false, testingTarget.FocusNavigationSupport, "Should be equal!");

            testingTarget.FocusNavigationSupport = true;
            Assert.AreEqual(true, testingTarget.FocusNavigationSupport, "Should be equal!");

            testingTarget.Dispose();
            tlog.Debug(tag, $"CustomViewFocusNavigationSupport END (OK)");
        }
Exemple #15
0
        public void SetBadage(int num)
        {
            if (BadageLabel == null)
            {
                BadageLabel = new UILabel(new CGRect(ViewConstant.BADAGE_ORIGIN_X, ViewConstant.BADAGE_ORIGIN_Y, ViewConstant.BADAGE_SIZE_DIAMETER, ViewConstant.BADAGE_SIZE_DIAMETER));
                BadageLabel.BackgroundColor     = UIColor.Red;
                BadageLabel.TextColor           = UIColor.White;
                BadageLabel.TextAlignment       = UITextAlignment.Center;
                BadageLabel.Font                = UIFont.SystemFontOfSize(ViewConstant.BADAGE_FONT_SIZE);
                BadageLabel.Layer.CornerRadius  = ViewConstant.BADAGE_SIZE_DIAMETER / 2;
                BadageLabel.Layer.MasksToBounds = true;
            }

            if (num > 0)
            {
                BadageLabel.Text = num.ToString();

                CustomView.AddSubview(BadageLabel);
            }
            else
            {
                BadageLabel.RemoveFromSuperview();
            }
        }
		public DomainViewGeneratedTemplate(ModelRoot model, CustomView currentView)
		{
			_model = model;
			_currentView = currentView;
		}
        protected CardShimmerCollectionView(IntPtr handle) : base(handle)
        {
            CustomView _image = new CustomView();

            _image.BackgroundColor    = UIColor.FromRGB(230, 230, 230);
            _image.ClipsToBounds      = true;
            _image.Layer.CornerRadius = 15;
            ContentView.AddSubview(_image);
            _image.AutoPinEdgeToSuperviewEdge(ALEdge.Left);
            _image.AutoPinEdgeToSuperviewEdge(ALEdge.Top);
            _image.AutoPinEdgeToSuperviewEdge(ALEdge.Right);
            _image.AutoSetDimension(ALDimension.Height, ContentView.Frame.Width * 190f / 335f);

            _shadowHelper.BackgroundColor = UIColor.White;
            ContentView.AddSubview(_shadowHelper);
            _shadowHelper.AutoPinEdge(ALEdge.Left, ALEdge.Left, _image, 20);
            _shadowHelper.AutoPinEdge(ALEdge.Right, ALEdge.Right, _image, -20);
            _shadowHelper.AutoPinEdge(ALEdge.Bottom, ALEdge.Bottom, _image);
            _shadowHelper.AutoPinEdge(ALEdge.Top, ALEdge.Top, _image);
            ContentView.BringSubviewToFront(_image);

            var loginBackground = new UIView();

            loginBackground.ClipsToBounds      = true;
            loginBackground.Layer.CornerRadius = 15;
            loginBackground.BackgroundColor    = Constants.R255G255B255.ColorWithAlpha(0.5f);

            _image.AddSubview(loginBackground);

            loginBackground.AutoSetDimensionsToSize(new CGSize(140, 32));
            loginBackground.AutoPinEdgeToSuperviewEdge(ALEdge.Right, -20);
            loginBackground.AutoPinEdgeToSuperviewEdge(ALEdge.Top, 21);

            UILabel _balanceLabel = new UILabel();

            _balanceLabel.Font               = Constants.Semibold14;
            _balanceLabel.Text               = "Steem balance";
            _balanceLabel.ClipsToBounds      = true;
            _balanceLabel.Layer.CornerRadius = 9;
            _balanceLabel.TextColor          = UIColor.Clear;
            _balanceLabel.BackgroundColor    = Constants.R255G255B255.ColorWithAlpha(0.5f);
            _image.AddSubview(_balanceLabel);

            _balanceLabel.AutoAlignAxis(ALAxis.Horizontal, loginBackground);
            _balanceLabel.AutoPinEdgeToSuperviewEdge(ALEdge.Left, 30);

            _equivalentBalance.Text               = "2422,222";
            _equivalentBalance.Font               = Constants.Bold34;
            _equivalentBalance.ClipsToBounds      = true;
            _equivalentBalance.Layer.CornerRadius = 22;
            _equivalentBalance.TextColor          = UIColor.Clear;
            _equivalentBalance.BackgroundColor    = Constants.R255G255B255.ColorWithAlpha(0.5f);
            _image.AddSubview(_equivalentBalance);

            _equivalentBalance.AutoPinEdgeToSuperviewEdge(ALEdge.Left, 30);
            _equivalentBalance.AutoPinEdge(ALEdge.Top, ALEdge.Bottom, loginBackground);

            var bottomContainer = new UIView();

            _image.AddSubview(bottomContainer);

            bottomContainer.AutoPinEdgeToSuperviewEdge(ALEdge.Left, 30);
            bottomContainer.AutoPinEdgeToSuperviewEdge(ALEdge.Right, 30);
            bottomContainer.AutoPinEdgeToSuperviewEdge(ALEdge.Bottom);
            bottomContainer.AutoPinEdge(ALEdge.Top, ALEdge.Bottom, _equivalentBalance);

            var steemContainer = new CustomView();

            bottomContainer.AddSubview(steemContainer);

            steemContainer.AutoPinEdgeToSuperviewEdge(ALEdge.Left);
            steemContainer.AutoAlignAxisToSuperviewAxis(ALAxis.Horizontal);
            steemContainer.AutoMatchDimensionWithMultiplier(ALDimension.Width, ALDimension.Width, bottomContainer, 0.5f);

            _firstTokenLabel.Text               = "Steem";
            _firstTokenLabel.ClipsToBounds      = true;
            _firstTokenLabel.Layer.CornerRadius = 10;
            _firstTokenLabel.TextColor          = UIColor.Clear;
            _firstTokenLabel.BackgroundColor    = Constants.R255G255B255.ColorWithAlpha(0.5f);
            _firstTokenLabel.Font               = Constants.Semibold14;
            steemContainer.AddSubview(_firstTokenLabel);

            _firstTokenLabel.AutoPinEdgeToSuperviewEdge(ALEdge.Left);
            _firstTokenLabel.AutoPinEdgeToSuperviewEdge(ALEdge.Top);

            _firstTokenValue.Text               = "999.999";
            _firstTokenValue.ClipsToBounds      = true;
            _firstTokenValue.Font               = Constants.Semibold20;
            _firstTokenValue.Layer.CornerRadius = 15;
            _firstTokenValue.TextColor          = UIColor.Clear;
            _firstTokenValue.BackgroundColor    = Constants.R255G255B255.ColorWithAlpha(0.5f);
            steemContainer.AddSubview(_firstTokenValue);

            _firstTokenValue.AutoPinEdgeToSuperviewEdge(ALEdge.Left);
            _firstTokenValue.AutoPinEdgeToSuperviewEdge(ALEdge.Bottom);
            _firstTokenValue.AutoPinEdge(ALEdge.Top, ALEdge.Bottom, _firstTokenLabel, 5);

            var steemPowerContainer = new CustomView();

            bottomContainer.AddSubview(steemPowerContainer);

            steemPowerContainer.AutoPinEdgeToSuperviewEdge(ALEdge.Right);
            steemPowerContainer.AutoAlignAxisToSuperviewAxis(ALAxis.Horizontal);
            steemPowerContainer.AutoMatchDimensionWithMultiplier(ALDimension.Width, ALDimension.Width, bottomContainer, 0.5f);

            _secondTokenLabel.ClipsToBounds      = true;
            _secondTokenLabel.Text               = "Steem Power";
            _secondTokenLabel.Font               = Constants.Semibold14;
            _secondTokenLabel.Layer.CornerRadius = 10;
            _secondTokenLabel.TextColor          = UIColor.Clear;
            _secondTokenLabel.BackgroundColor    = Constants.R255G255B255.ColorWithAlpha(0.5f);
            _secondTokenLabel.Font               = Constants.Semibold14;
            steemPowerContainer.AddSubview(_secondTokenLabel);

            _secondTokenLabel.AutoPinEdgeToSuperviewEdge(ALEdge.Left);
            _secondTokenLabel.AutoPinEdgeToSuperviewEdge(ALEdge.Top);

            _secondTokenValue.ClipsToBounds      = true;
            _secondTokenValue.Text               = "999.999";
            _secondTokenValue.Font               = Constants.Semibold20;
            _secondTokenValue.Layer.CornerRadius = 15;
            _secondTokenValue.TextColor          = UIColor.Clear;
            _secondTokenValue.BackgroundColor    = Constants.R255G255B255.ColorWithAlpha(0.5f);
            steemPowerContainer.AddSubview(_secondTokenValue);

            _secondTokenValue.AutoPinEdgeToSuperviewEdge(ALEdge.Left);
            _secondTokenValue.AutoPinEdgeToSuperviewEdge(ALEdge.Bottom);
            _secondTokenValue.AutoPinEdge(ALEdge.Top, ALEdge.Bottom, _secondTokenLabel, 5);

            _image.SubviewLayouted += () =>
            {
                Constants.ApplyShimmer(_balanceLabel);
                Constants.ApplyShimmer(loginBackground);
                Constants.ApplyShimmer(_equivalentBalance);
            };

            steemContainer.SubviewLayouted += () =>
            {
                Constants.ApplyShimmer(_firstTokenLabel);
                Constants.ApplyShimmer(_firstTokenValue);
            };

            steemContainer.SubviewLayouted += () =>
            {
                Constants.ApplyShimmer(_secondTokenLabel);
                Constants.ApplyShimmer(_secondTokenValue);
            };
        }
 public SQLSelectViewTemplate(ModelRoot model, CustomView currentView, StringBuilder grantSB)
 {
     _model       = model;
     _currentView = currentView;
     _grantSB     = grantSB;
 }
    public DomainViewExtenderTemplate(ModelRoot model, CustomView currentView)
    {
      _model = model;
      _currentView = currentView;
		}
 public DomainViewCollectionExtenderTemplate(ModelRoot model, CustomView currentView)
 {
     _model       = model;
     _currentView = currentView;
 }
 public BusinessViewCollectionGeneratedTemplate(ModelRoot model, CustomView currentView)
 {
     _model       = model;
     _currentView = currentView;
 }
Exemple #22
0
 public BusinessViewExtenderTemplate(ModelRoot model, CustomView currentView)
 {
     _model       = model;
     _currentView = currentView;
 }
        //private void PopulateRelationships(TreeNode parentNode)
        //{
        //  try
        //  {
        //    Random rnd = new Random();
        //    SortedList<string, DataTreeItem> relationList = new SortedList<string, DataTreeItem>();

        //    //Current Tables
        //    foreach (Table t in this.CurrentDatabase.Tables)
        //    {
        //      //Remove invalid links. Something is very wrong
        //      RelationCollection relationCollection = t.GetRelations();
        //      for (int ii = relationCollection.Count - 1; ii >= 0; ii--)
        //      {
        //        Relation relationshipItem = relationCollection[ii];
        //        int errorCount = 0;
        //        foreach (ColumnRelationship relationshipLinkItem in relationshipItem.ColumnRelationships)
        //        {
        //          if ((relationshipLinkItem.ChildColumnRef == null) || (relationshipLinkItem.ParentColumnRef == null))
        //            errorCount++;
        //        }
        //        if (errorCount > 0) t.Relationships.RemoveAt(ii);
        //      }
        //      //Remove Errors

        //      //If the table exists in the new graph...
        //      foreach (Relation relation in relationCollection)
        //      {
        //        Table t2 = this.NewDatabase.Tables[t.Name];
        //        DataTreeItem dti = new DataTreeItem(relation.RoleName);
        //        dti.Name = relation.ToLongString();
        //        if (t2 == null)
        //        {
        //          //The table was removed so the relationship was removed
        //          dti.State = DataTreeItem.DataTreeItemStateConstants.Delete;
        //        }
        //        else
        //        {
        //          //If the name changed then it was modified
        //          Relation[] r2List = t2.GetRelations().GetFromMatch(relation);
        //          if (r2List.Length == 0)
        //          {
        //            dti.State = DataTreeItem.DataTreeItemStateConstants.Delete;
        //          }
        //          else if (r2List.Length == 1)
        //          {
        //            if (r2List[0].RoleName != relation.RoleName)
        //              dti.State = DataTreeItem.DataTreeItemStateConstants.Modified;
        //          }
        //          else if (r2List.Length > 1)
        //          {
        //            //There are multiple relationships for this table/column combination
        //            bool found = false;
        //            foreach (Relation r2 in r2List)
        //            {
        //              #region OLD CODE
        //              //if (r2.RoleName == relation.RoleName) found = true;
        //              //string parentTableName1 = ((Table)r2.ParentTableRef.Object).Name;
        //              //string parentTableName2 = ((Table)relation.ParentTableRef.Object).Name;

        //              //SortedDictionary<string, ColumnRelationship> list1 = new SortedDictionary<string,ColumnRelationship>();
        //              //foreach (ColumnRelationship cr in r2.ColumnRelationships)
        //              //{
        //              //  list1.Add(((Column)cr.ChildColumnRef.Object).Name, cr);
        //              //}

        //              //SortedDictionary<string, ColumnRelationship> list2 = new SortedDictionary<string, ColumnRelationship>();
        //              //foreach (ColumnRelationship cr in relation.ColumnRelationships)
        //              //{
        //              //  list2.Add(((Column)cr.ChildColumnRef.Object).Name, cr);
        //              //}

        //              //string parentColName1 = string.Empty;
        //              //foreach (string key in list1.Keys)
        //              //{
        //              //  parentColName1 += key;
        //              //}

        //              //string parentColName2 = string.Empty;
        //              //foreach (string key in list2.Keys)
        //              //{
        //              //  parentColName2 += key;
        //              //}

        //              ////string parentCol
        //              //if ((parentTableName1 == parentTableName2) && (parentColName1 == parentColName2))
        //              //  found = true;
        //              #endregion

        //              if (r2.Equals(relation)) found = true;

        //            }
        //            if (!found)
        //              dti.State = DataTreeItem.DataTreeItemStateConstants.Modified;
        //          }

        //        }

        //        //If there is a duplicate then add a FAKE ROLE to it
        //        if (relationList.ContainsKey(relation.ToLongString().ToLower()))
        //        {
        //          relation.RoleName = "ROLE" + rnd.Next(10000, 100000);
        //          relationList.Add(relation.ToLongString().ToLower(), dti);
        //        }
        //        else
        //        {
        //          relationList.Add(relation.ToLongString().ToLower(), dti);
        //        }

        //      }
        //    }

        //    //Added Relationships
        //    foreach (Table t in this.NewDatabase.Tables)
        //    {
        //      foreach (Reference reference in t.Relationships)
        //      {
        //        Relation r = (Relation)reference.Object;
        //        string relationName = r.ToLongString();
        //        if (this.CurrentDatabase.Tables.Contains(t.Name))
        //        {
        //          //If the old model has this table
        //          Table t2 = this.CurrentDatabase.Tables[t.Name];
        //          if ((t2 != null) && (t2.GetRelations().GetFromMatch(r).Length == 0))
        //            relationList.Add(relationName.ToLower(), new DataTreeItem(relationName, DataTreeItem.DataTreeItemStateConstants.Added));
        //        }
        //        else
        //        {
        //          //Table and Relation not in old model
        //          if (!relationList.ContainsKey(relationName.ToLower()))
        //          {
        //            relationList.Add(relationName.ToLower(), new DataTreeItem(relationName, DataTreeItem.DataTreeItemStateConstants.Added));
        //          }
        //          else
        //          {
        //            int loop = 1;
        //            while (relationList.ContainsKey((relationName + "_RELATION" + loop).ToLower()))
        //            {
        //              loop++;
        //            }
        //            relationName += "_RELATION" + loop;
        //            relationList.Add(relationName.ToLower(), new DataTreeItem(relationName, DataTreeItem.DataTreeItemStateConstants.Added));
        //          }
        //        }
        //      }
        //    }

        //    //Now add to tree
        //    foreach (string relationKey in relationList.Keys)
        //    {
        //      var relationNode = new TreeNode(relationList[relationKey].Name);
        //      relationNode.Tag = relationList[relationKey];
        //      if (relationList[relationKey].State == DataTreeItem.DataTreeItemStateConstants.Added)
        //        relationNode.ForeColor = Color.Green;
        //      if (relationList[relationKey].State == DataTreeItem.DataTreeItemStateConstants.Delete)
        //        relationNode.ForeColor = Color.Red;
        //      if (relationList[relationKey].State == DataTreeItem.DataTreeItemStateConstants.Modified)
        //        relationNode.ForeColor = Color.Blue;

        //      parentNode.Nodes.Add(relationNode);
        //    }

        //    this.BrandNodes(parentNode.Nodes);

        //  }
        //  catch (Exception ex)
        //  {
        //    throw;
        //  }
        //}
        #endregion

        #region PopulateStoredProcedures
        //private void PopulateStoredProcedures(TreeNode parentNode)
        //{
        //  try
        //  {
        //    SortedList<string, DataTreeItem> itemCache = new SortedList<string, DataTreeItem>();

        //    //Current Items
        //    foreach (CustomStoredProcedure storedProcedure in this.CurrentDatabase.CustomStoredProcedures)
        //    {
        //      DataTreeItem dti = new DataTreeItem(storedProcedure.Name);
        //      if (this.NewDatabase.CustomStoredProcedures.Contains(storedProcedure.Name))
        //        dti.Name = this.NewDatabase.CustomStoredProcedures[storedProcedure.Name].Name;

        //      //Check for deleted status
        //      if (!this.NewDatabase.CustomStoredProcedures.Contains(storedProcedure.Name))
        //        dti.State = DataTreeItem.DataTreeItemStateConstants.Delete;
        //      else if (this.NewDatabase.CustomStoredProcedures[storedProcedure.Name].Name != storedProcedure.Name)
        //        dti.State = DataTreeItem.DataTreeItemStateConstants.Modified;
        //      else if (this.NewDatabase.CustomStoredProcedures[storedProcedure.Name].GetColumns().GetCorePropertiesHash() != storedProcedure.GetColumns().GetCorePropertiesHash())
        //        dti.State = DataTreeItem.DataTreeItemStateConstants.Modified;

        //      itemCache.Add(storedProcedure.Name.ToLower(), dti);
        //    }

        //    //Added Items
        //    foreach (CustomStoredProcedure t in this.NewDatabase.CustomStoredProcedures)
        //    {
        //      if (!this.CurrentDatabase.CustomStoredProcedures.Contains(t.Name))
        //        itemCache.Add(t.Name.ToLower(), new DataTreeItem(t.Name, DataTreeItem.DataTreeItemStateConstants.Added));
        //    }

        //    //Now add to tree
        //    foreach (string storedProcedureKey in itemCache.Keys)
        //    {
        //      var newNode = new TreeNode(itemCache[storedProcedureKey].Name);
        //      newNode.Tag = itemCache[storedProcedureKey];
        //      if (itemCache[storedProcedureKey].State == DataTreeItem.DataTreeItemStateConstants.Added)
        //        newNode.ForeColor = Color.Green;
        //      if (itemCache[storedProcedureKey].State == DataTreeItem.DataTreeItemStateConstants.Delete)
        //        newNode.ForeColor = Color.Red;
        //      if (itemCache[storedProcedureKey].State == DataTreeItem.DataTreeItemStateConstants.Modified)
        //        newNode.ForeColor = Color.Blue;

        //      parentNode.Nodes.Add(newNode);

        //      CustomStoredProcedure oldStoredProcedure = this.CurrentDatabase.CustomStoredProcedures[storedProcedureKey];
        //      CustomStoredProcedure newStoredProcedure = this.NewDatabase.CustomStoredProcedures[storedProcedureKey];
        //      if (oldStoredProcedure == null) oldStoredProcedure = new CustomStoredProcedure(this.CurrentDatabase.Root);
        //      if (newStoredProcedure == null) newStoredProcedure = new CustomStoredProcedure(this.NewDatabase.Root);

        //      //Create list of all columns (new and old)
        //      SortedList<string, DataTreeItem> columns = new SortedList<string, DataTreeItem>();
        //      foreach (Reference r in oldStoredProcedure.Columns)
        //      {
        //        CustomStoredProcedureColumn column = (CustomStoredProcedureColumn)r.Object;
        //        DataTreeItem dti = new DataTreeItem(column.Name);

        //        //Check for deleted status
        //        if (this.NewDatabase.CustomStoredProcedures.Contains(itemCache[oldStoredProcedure.Name.ToLower()].Name))
        //        {
        //          CustomStoredProcedureColumn statusColumn = this.NewDatabase.CustomStoredProcedures[itemCache[oldStoredProcedure.Name.ToLower()].Name].GetColumns().FirstOrDefault(x => x.Name == column.Name);
        //          if (statusColumn == null)
        //            dti.State = DataTreeItem.DataTreeItemStateConstants.Delete;
        //          else if (column.CorePropertiesHash != statusColumn.CorePropertiesHash)
        //            dti.State = DataTreeItem.DataTreeItemStateConstants.Modified;
        //        }

        //        columns.Add(column.Name.ToLower(), dti);

        //      }

        //      //Added Columns
        //      if (oldStoredProcedure.Name == string.Empty)
        //      {
        //        foreach (CustomStoredProcedureColumn column in this.NewDatabase.CustomStoredProcedures[storedProcedureKey].GetColumns())
        //        {
        //          columns.Add(column.Name.ToLower(), new DataTreeItem(column.Name, DataTreeItem.DataTreeItemStateConstants.Added));
        //        }
        //      }
        //      else
        //      {
        //        if (this.NewDatabase.CustomStoredProcedures.Contains(itemCache[oldStoredProcedure.Name.ToLower()].Name))
        //        {
        //          foreach (CustomStoredProcedureColumn column in this.NewDatabase.CustomStoredProcedures[itemCache[oldStoredProcedure.Name.ToLower()].Name].GetColumns())
        //          {
        //            CustomStoredProcedureColumn statusColumn = this.CurrentDatabase.CustomStoredProcedures[itemCache[oldStoredProcedure.Name.ToLower()].Name].GetColumns().FirstOrDefault(x => x.Name == column.Name);
        //            if (statusColumn == null)
        //              columns.Add(column.Name.ToLower(), new DataTreeItem(column.Name, DataTreeItem.DataTreeItemStateConstants.Added));
        //          }
        //        }
        //      }

        //      //Now load columns into tree
        //      if (this.NewDatabase.CustomStoredProcedures.Contains(oldStoredProcedure.Name))
        //      {
        //        foreach (string columnKey in columns.Keys)
        //        {
        //          var columnNode = new TreeNode(columns[columnKey].Name);
        //          if (columns[columnKey].State == DataTreeItem.DataTreeItemStateConstants.Added)
        //            columnNode.ForeColor = Color.Green;
        //          if (columns[columnKey].State == DataTreeItem.DataTreeItemStateConstants.Delete)
        //            columnNode.ForeColor = Color.Red;
        //          if (columns[columnKey].State == DataTreeItem.DataTreeItemStateConstants.Modified)
        //            columnNode.ForeColor = Color.Blue;

        //          columnNode.Tag = columns[columnKey];
        //          newNode.Nodes.Add(columnNode);
        //        }
        //      }

        //    }

        //    this.BrandNodes(parentNode.Nodes);

        //  }
        //  catch (Exception ex)
        //  {
        //    throw;
        //  }
        //}
        #endregion

        private void PopulateViews(TreeNode parentNode)
        {
            try
            {
                var itemCache = new SortedList <string, DataTreeItem>();

                //Current Items
                foreach (CustomView view in this.CurrentDatabase.CustomViews)
                {
                    var dti = new DataTreeItem(view.Name);
                    if (this.NewDatabase.CustomViews.Contains(view.Name))
                    {
                        dti.Name = this.NewDatabase.CustomViews[view.Name].Name;
                    }

                    //Check for deleted status
                    if (!this.NewDatabase.CustomViews.Contains(view.Name))
                    {
                        dti.State = DataTreeItem.DataTreeItemStateConstants.Delete;
                    }
                    else if (this.NewDatabase.CustomViews[view.Name].Name != view.Name)
                    {
                        dti.State = DataTreeItem.DataTreeItemStateConstants.Modified;
                    }
                    else if (this.NewDatabase.CustomViews[view.Name].GetColumns().GetCorePropertiesHash() != view.GetColumns().GetCorePropertiesHash())
                    {
                        dti.State = DataTreeItem.DataTreeItemStateConstants.Modified;
                    }

                    itemCache.Add(view.Name.ToLower(), dti);
                }

                //Added Items
                foreach (CustomView t in this.NewDatabase.CustomViews)
                {
                    if (!this.CurrentDatabase.CustomViews.Contains(t.Name))
                    {
                        itemCache.Add(t.Name.ToLower(), new DataTreeItem(t.Name, DataTreeItem.DataTreeItemStateConstants.Added));
                    }
                }

                //Now add to tree
                foreach (var viewKey in itemCache.Keys)
                {
                    var viewNode = new TreeNode(itemCache[viewKey].Name);
                    viewNode.Checked    = true;
                    viewNode.ImageIndex = 4;
                    viewNode.Tag        = itemCache[viewKey];
                    //if (itemCache[viewKey].State == DataTreeItem.DataTreeItemStateConstants.Added)
                    //  viewNode.ForeColor = Color.Green;
                    //if (itemCache[viewKey].State == DataTreeItem.DataTreeItemStateConstants.Delete)
                    //  viewNode.ForeColor = Color.Red;
                    //if (itemCache[viewKey].State == DataTreeItem.DataTreeItemStateConstants.Modified)
                    //  viewNode.ForeColor = Color.Blue;

                    parentNode.Nodes.Add(viewNode);

                    var oldView = this.CurrentDatabase.CustomViews[viewKey];
                    var newView = this.NewDatabase.CustomViews[viewKey];
                    if (oldView == null)
                    {
                        oldView = new CustomView(this.CurrentDatabase.Root);
                    }
                    if (newView == null)
                    {
                        newView = new CustomView(this.NewDatabase.Root);
                    }

                    //Create list of all columns (new and old)
                    var columns = new SortedList <string, DataTreeItem>();
                    foreach (Reference r in oldView.Columns)
                    {
                        var column = (CustomViewColumn)r.Object;
                        var dti    = new DataTreeItem(column.Name);

                        //Check for deleted status
                        if (this.NewDatabase.CustomViews.Contains(itemCache[oldView.Name.ToLower()].Name))
                        {
                            var statusColumn = this.NewDatabase.CustomViews[itemCache[oldView.Name.ToLower()].Name].GetColumns().FirstOrDefault(x => x.Name == column.Name);
                            if (statusColumn == null)
                            {
                                dti.State = DataTreeItem.DataTreeItemStateConstants.Delete;
                            }
                            else if (column.CorePropertiesHash != statusColumn.CorePropertiesHash)
                            {
                                dti.State = DataTreeItem.DataTreeItemStateConstants.Modified;
                            }
                        }

                        columns.Add(column.Name.ToLower(), dti);
                    }

                    #region Added Columns
                    //if (oldView.Name == string.Empty)
                    //{
                    //  foreach (CustomViewColumn column in this.NewDatabase.CustomViews[viewKey].GetColumns())
                    //  {
                    //    columns.Add(column.Name.ToLower(), new DataTreeItem(column.Name, DataTreeItem.DataTreeItemStateConstants.Added));
                    //  }
                    //}
                    //else
                    //{
                    //  if (this.NewDatabase.CustomViews.Contains(itemCache[oldView.Name.ToLower()].Name))
                    //  {
                    //    foreach (CustomViewColumn column in this.NewDatabase.CustomViews[itemCache[oldView.Name.ToLower()].Name].GetColumns())
                    //    {
                    //      CustomViewColumn statusColumn = this.CurrentDatabase.CustomViews[itemCache[oldView.Name.ToLower()].Name].GetColumns().FirstOrDefault(x => x.Name == column.Name);
                    //      if (statusColumn == null)
                    //        columns.Add(column.Name.ToLower(), new DataTreeItem(column.Name, DataTreeItem.DataTreeItemStateConstants.Added));
                    //    }
                    //  }
                    //}

                    ////Now load columns into tree
                    //if (this.NewDatabase.CustomViews.Contains(oldView.Name))
                    //{
                    //  foreach (string columnKey in columns.Keys)
                    //  {
                    //    var columnNode = new TreeNode(columns[columnKey].Name);
                    //    if (columns[columnKey].State == DataTreeItem.DataTreeItemStateConstants.Added)
                    //      columnNode.ForeColor = Color.Green;
                    //    if (columns[columnKey].State == DataTreeItem.DataTreeItemStateConstants.Delete)
                    //      columnNode.ForeColor = Color.Red;
                    //    if (columns[columnKey].State == DataTreeItem.DataTreeItemStateConstants.Modified)
                    //      columnNode.ForeColor = Color.Blue;

                    //    columnNode.Tag = columns[columnKey];
                    //    viewNode.Nodes.Add(columnNode);
                    //  }
                    //}
                    #endregion
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
 public SQLStoredProcedureViewAllTemplate(ModelRoot model, CustomView view)
 {
     _model = model;
     _view  = view;
 }
 public DatasiteViewItemTemplate(ModelRoot model, CustomView item, string templateLocation)
     : base(model)
 {
     _item             = item;
     _templateLocation = templateLocation;
 }
 public CustomViewListener(CustomView s)
 {
     _target = s;
 }
Exemple #27
0
 public static string GetPascalName(ModelRoot model, CustomView view)
 {
   string retval = model.Database.TablePrefix;
   if(retval != "")
     return retval + "_" + view.PascalName;
   else
     return view.PascalName;
 }
Exemple #28
0
 public static string BuildSelectList(CustomView view, ModelRoot model)
 {
   int index = 0;
   StringBuilder output = new StringBuilder();
   foreach (Reference columnRef in view.GeneratedColumns)
   {
     CustomViewColumn dc = (CustomViewColumn)columnRef.Object;
     output.Append("CONVERT(" + dc.DatabaseType + ", [view_" + view.DatabaseName + "].[" + dc.DatabaseName + "]) AS [" + dc.DatabaseName + "]");
     if (index < view.GeneratedColumns.Count - 1)
       output.Append(",");
     output.AppendLine();
     index++;
   }
   return output.ToString();
 }
 public SQLSelectViewByOrTemplate(ModelRoot model, CustomView currentView)
 {
     _model       = model;
     _currentView = currentView;
 }
 public SQLSelectViewByAndTemplate(ModelRoot model, CustomView currentView)
 {
   _model = model;
   _currentView = currentView;
 }
Exemple #31
0
 public DomainViewGeneratedTemplate(ModelRoot model, CustomView currentView)
 {
     _model       = model;
     _currentView = currentView;
 }
Exemple #32
0
 public ViewsTemplate(ModelRoot model, CustomView view)
     : base(model)
 {
     _view = view;
 }
    public DefinedViewSelectCommandExtenderTemplate(ModelRoot model, CustomView currentView)
    {
      _model = model;
      _currentView = currentView;
		}
 public ViewEntityGeneratedTemplate(ModelRoot model, CustomView view)
     : base(model)
 {
     _item = view;
 }
Exemple #35
0
 public ImportColumns(CustomView view, ReferenceCollection columnList)
     : this()
 {
     _view       = view;
     _columnList = columnList;
 }
        public static void Show(UIView viewToAdd)
        {
            var warningView = new CustomView();

            warningView.ClipsToBounds   = true;
            warningView.BackgroundColor = Constants.R255G34B5;
            warningView.Alpha           = 0;
            Constants.CreateShadow(warningView, Constants.R231G72B0, 0.5f, 6, 10, 12);
            viewToAdd.AddSubview(warningView);

            warningView.AutoPinEdgeToSuperviewEdge(ALEdge.Left, 15);
            warningView.AutoPinEdgeToSuperviewEdge(ALEdge.Right, 15);
            var warningViewToTopConstraint    = warningView.AutoPinEdge(ALEdge.Top, ALEdge.Bottom, viewToAdd);
            var warningViewToBottomConstraint = warningView.AutoPinEdge(ALEdge.Bottom, ALEdge.Bottom, viewToAdd, -20);

            warningViewToBottomConstraint.Active = false;

            var warningImage = new UIImageView();

            warningImage.Image = UIImage.FromBundle("ic_info");

            var warningLabel = new UILabel();

            warningLabel.Text      = AppSettings.LocalizationManager.GetText(LocalizationKeys.PostDelay);
            warningLabel.Lines     = 5;
            warningLabel.Font      = Constants.Regular12;
            warningLabel.TextColor = UIColor.FromRGB(255, 255, 255);

            warningView.AddSubview(warningLabel);
            warningView.AddSubview(warningImage);

            warningImage.AutoPinEdgeToSuperviewEdge(ALEdge.Left, 20);
            warningImage.AutoAlignAxisToSuperviewAxis(ALAxis.Horizontal);
            warningImage.SetContentCompressionResistancePriority(999, UILayoutConstraintAxis.Horizontal);

            warningLabel.AutoPinEdge(ALEdge.Left, ALEdge.Right, warningImage, 20);
            warningLabel.AutoPinEdgeToSuperviewEdge(ALEdge.Top, 20);
            warningLabel.AutoPinEdgeToSuperviewEdge(ALEdge.Bottom, 20);
            warningLabel.AutoPinEdgeToSuperviewEdge(ALEdge.Right, 20);

            warningView.SubviewLayouted += () =>
            {
                UIView.Animate(0.3f, 0f, UIViewAnimationOptions.CurveEaseOut, () =>
                {
                    warningViewToTopConstraint.Active    = false;
                    warningViewToBottomConstraint.Active = true;
                    warningView.Alpha = 1;
                    viewToAdd.LayoutIfNeeded();
                }, () =>
                {
                    UIView.Animate(0.2f, 7f, UIViewAnimationOptions.CurveEaseIn, () =>
                    {
                        warningViewToTopConstraint.Active    = true;
                        warningViewToBottomConstraint.Active = false;
                        warningView.Alpha = 0;
                        viewToAdd.LayoutIfNeeded();
                    }, () => {
                        warningView?.RemoveFromSuperview();
                        warningView = null;
                    });
                });
            };
        }
    public BusinessViewExtenderTemplate(ModelRoot model, CustomView currentView)
    {
      _model = model;
      _currentView = currentView;
		}
		public SQLPagedSelectViewTemplate(ModelRoot model, CustomView currentView)
		{
			_model = model;
			_currentView = currentView;
		}
		public BusinessViewCollectionGeneratedTemplate(ModelRoot model, CustomView currentView)
		{
			_model = model;
			_currentView = currentView;
		}
Exemple #40
0
 public DefinedViewSelectCommandExtenderTemplate(ModelRoot model, CustomView currentView)
 {
     _model       = model;
     _currentView = currentView;
 }
 public ViewEntityExtenderTemplate(ModelRoot model, CustomView table)
     : base(model)
 {
     _currentView = table;
 }
        protected TransactionShimmerCollectionViewCell(IntPtr handle) : base(handle)
        {
            var sideMargin = DeviceHelper.IsSmallDevice ? 15 : 30;

            var background = new CustomView();

            background.BackgroundColor    = UIColor.FromRGB(230, 230, 230);
            background.Layer.CornerRadius = 16;
            ContentView.AddSubview(background);

            background.AutoPinEdgeToSuperviewEdge(ALEdge.Left, 60);
            background.AutoPinEdgeToSuperviewEdge(ALEdge.Top, 5);
            background.AutoPinEdgeToSuperviewEdge(ALEdge.Right, 10);
            background.AutoPinEdgeToSuperviewEdge(ALEdge.Bottom, 5);

            var emptyBackground = new UIView();

            ContentView.AddSubview(emptyBackground);

            emptyBackground.AutoPinEdge(ALEdge.Right, ALEdge.Left, background);
            emptyBackground.AutoPinEdgeToSuperviewEdge(ALEdge.Left);
            emptyBackground.AutoPinEdgeToSuperviewEdge(ALEdge.Top);
            emptyBackground.AutoPinEdgeToSuperviewEdge(ALEdge.Bottom);

            var leftContainer = new CustomView();

            background.AddSubview(leftContainer);

            leftContainer.AutoPinEdgeToSuperviewEdge(ALEdge.Left, sideMargin);
            leftContainer.AutoAlignAxisToSuperviewAxis(ALAxis.Horizontal);

            _action.ClipsToBounds      = true;
            _action.Layer.CornerRadius = 7.5f;
            _action.BackgroundColor    = UIColor.White.ColorWithAlpha(0.5f);
            leftContainer.AddSubview(_action);

            _action.AutoPinEdgeToSuperviewEdge(ALEdge.Top);
            _action.AutoPinEdgeToSuperviewEdge(ALEdge.Left);
            _action.AutoSetDimensionsToSize(new CGSize(80, 15));

            var _to = new UIView();

            _to.ClipsToBounds      = true;
            _to.Layer.CornerRadius = 7.5f;
            _to.BackgroundColor    = UIColor.White.ColorWithAlpha(0.5f);
            leftContainer.AddSubview(_to);

            _to.AutoPinEdge(ALEdge.Top, ALEdge.Bottom, _action, 10);
            _to.AutoPinEdgeToSuperviewEdge(ALEdge.Bottom);
            _to.AutoPinEdgeToSuperviewEdge(ALEdge.Left);
            _to.AutoSetDimensionsToSize(new CGSize(120, 15));

            _amount.ClipsToBounds      = true;
            _amount.Layer.CornerRadius = 10f;
            _amount.BackgroundColor    = UIColor.White.ColorWithAlpha(0.5f);
            background.AddSubview(_amount);

            _amount.AutoSetDimensionsToSize(new CGSize(80, 20));
            _amount.AutoPinEdge(ALEdge.Left, ALEdge.Right, leftContainer);
            _amount.AutoAlignAxis(ALAxis.Horizontal, leftContainer);
            _amount.AutoPinEdgeToSuperviewEdge(ALEdge.Right, sideMargin);

            var circle = new UIView();

            circle.BackgroundColor    = UIColor.FromRGB(230, 230, 230);
            circle.Layer.CornerRadius = 4;
            emptyBackground.AddSubview(circle);

            circle.AutoSetDimensionsToSize(new CGSize(8, 8));
            circle.AutoAlignAxisToSuperviewAxis(ALAxis.Horizontal);
            circle.AutoAlignAxisToSuperviewAxis(ALAxis.Vertical);

            _topLine = new UIView();
            _topLine.BackgroundColor    = UIColor.FromRGB(240, 240, 240);
            _topLine.Layer.CornerRadius = 1;
            emptyBackground.AddSubview(_topLine);

            _topLine.AutoSetDimension(ALDimension.Width, 2);
            _topLine.AutoAlignAxisToSuperviewAxis(ALAxis.Vertical);
            _topLine.AutoPinEdgeToSuperviewEdge(ALEdge.Top);
            _topLine.AutoPinEdge(ALEdge.Bottom, ALEdge.Top, circle, -16);

            _bottomLine = new UIView();
            _bottomLine.BackgroundColor    = UIColor.FromRGB(240, 240, 240);
            _bottomLine.Layer.CornerRadius = 1;
            emptyBackground.AddSubview(_bottomLine);

            _bottomLine.AutoSetDimension(ALDimension.Width, 2);
            _bottomLine.AutoAlignAxisToSuperviewAxis(ALAxis.Vertical);
            _bottomLine.AutoPinEdgeToSuperviewEdge(ALEdge.Bottom);
            _bottomLine.AutoPinEdge(ALEdge.Top, ALEdge.Bottom, circle, 16);

            leftContainer.SubviewLayouted += () =>
            {
                Constants.ApplyShimmer(_action);
                Constants.ApplyShimmer(_to);
            };

            background.SubviewLayouted += () =>
            {
                Constants.ApplyShimmer(_amount);
            };
        }
 public ViewEntityGeneratedTemplate(ModelRoot model, CustomView currentTable)
     : base(model)
 {
     _item = currentTable;
 }
		public SQLStoredProcedureViewAllTemplate(ModelRoot model, CustomView view)
		{
			_model = model;
			_view = view;
		}