Inheritance: ModuleRules
Esempio n. 1
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            MyView myholder = holder as MyView;

            myholder.Task.Text = Mitems[position].Task_name;
            //  myholder.Description.Text = Mitems[position].Description;
            myholder.Deadline_date.Text = Mitems[position].deadline_date.ToString();
            DateTime dateTime = DateTime.Parse(Mitems[position].deadline_date);

            //   myholder.Mark_to.Text = Mitems[position].mark_to;
            //myholder.Task_status.Text = Mitems[position].task_status;
            myholder.Description.Text = Mitems[position].mark_to;
            var local = new LocalOnClickListener();

            myholder.Linear.SetOnClickListener(local);
            local.HandleOnClick = () =>
            {
                string id = Mitems[position].Task_id;
                ComplainceFrag_OutBox nextFrag = new ComplainceFrag_OutBox();
                FragmentTransaction   ft       = fragment.BeginTransaction();
                ft.Hide(fragment.FindFragmentByTag("MainFrag"));
                ft.Add(Resource.Id.container, nextFrag, "ComplainceFrag_OutBox");
                ft.AddToBackStack(null);
                ft.SetTransition(FragmentTransaction.TransitFragmentOpen);
                ft.Commit();
                // fragment.BeginTransaction().Replace(Resource.Id.container, nextFrag).Commit();
                Bundle bundle = new Bundle();
                bundle.PutString("task_id", id);
                nextFrag.Arguments = bundle;
            };
            myholder.time_left.Text = date_difference(DateTime.Now, dateTime);
            //  myholder.time_left.Text = date_difference(DateTime.Now, Mitems[position].deadlineDate);
        }
Esempio n. 2
0
        void ScreenPositionTest()
        {
            parent                 = new TextLabel("This is parent view: Position(100,100) ParentOrigin & PivotPoint are all TopLeft, Push OK button! then Grid coordinate will be updated!");
            parent.PixelSize       = 17;
            parent.Size2D          = new Size2D(1000, 50);
            parent.Position2D      = new Position2D(100, 100);
            parent.Name            = "parent view";
            parent.BackgroundColor = Color.Yellow;
            Window.Instance.Add(parent);

            myView1            = new MyView("my view1", new Size2D(500, 100), parent, 20);
            myView1.MyPosition = new Position2D(100, 100);

            myView2            = new MyView("my view2", new Size2D(500, 100), myView1.myView, 20);
            myView2.MyPosition = new Position2D(100, 100);

            myView3            = new MyView("my view3", new Size2D(500, 100), myView2.myView, 20);
            myView3.MyPosition = new Position2D(100, 100);

            timer       = new Timer(300);
            timer.Tick += Timer_Tick;
            timer.Start();

            ani = new Animation();
            ani.AnimateTo(myView1.myView, "Position", new Position(1000, 100, 0), 1000, 50000);
            ani.AnimateTo(myView2.myView, "Position", new Position(100, 1000, 0), 1000, 50000);
            ani.AnimateTo(myView3.myView, "Position", new Position(-800, 100, 0), 1000, 50000);
            ani.EndAction = Animation.EndActions.Discard;
            ani.Looping   = true;
            ani.Play();
        }
Esempio n. 3
0
        /// <summary>
        /// Main method to start application
        /// </summary>
        /// <param name="args">Arguments to pass to start program. Always empty.</param>
        static void Main(string[] args)
        {
            MyView view = new MyView();

            view.MountMainMenu();
            view.MonitoringKeyPressed();
        }
Esempio n. 4
0
        public void Numbers()
        {
            var view   = new MyView();
            var output = Mustache.render("{{aNumber}} believes", view);

            Assert.AreEqual("13 believes", output);
        }
Esempio n. 5
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            MyView myholder = holder as MyView;

            myholder.Task.Text          = Mitems[position].task_name;
            myholder.Create_by.Text     = Mitems[position].task_created_by;
            myholder.Deadline_date.Text = Mitems[position].deadlineDate.ToString();
            // myholder.time_left.Text = Mitems[position].mark_to;
            var local = new LocalOnClickListener();

            myholder.Linear.SetOnClickListener(local);
            local.HandleOnClick = () =>
            {
                string id = Mitems[position].task_id;

                ComplainceFrag nextFrag = new ComplainceFrag();
                Android.Support.V4.App.FragmentTransaction ft = fragment.BeginTransaction();
                //ft.Replace(Resource.Id.container, nextFrag, "ComplainceFragment");
                ft.Hide(fragment.FindFragmentByTag("MainFrag"));
                ft.Add(Resource.Id.container, nextFrag, "ComplainceFragment");
                ft.AddToBackStack("TaskInboxFrag");
                ft.SetTransition(FragmentTransaction.TransitFragmentOpen);
                ft.Commit();
                // fragment.BeginTransaction().Replace(Resource.Id.container, nextFrag).Commit();
                Bundle bundle = new Bundle();
                bundle.PutString("task_id", id);
                nextFrag.Arguments = bundle;
            };


            myholder.time_left.Text = date_difference(DateTime.Now, Mitems[position].deadlineDate);
        }
        public static Result CrearVista(MyView vista)
        {
            var result = new Result();
            var sql    = new StringBuilder();

            var nombresCampos = vista.Campos.Select(campo => campo.Replace(".", "_")).ToList();

            var tablas = vista.Campos.Select(campo => campo.Substring(0, campo.IndexOf('.'))).Distinct().ToList();

            try
            {
                sql.Append(@"CREATE VIEW " + vista.Nombre + "( \r\n");

                sql.Append(string.Join(",", nombresCampos) + ") \r\nAS \r\nSELECT\r\n");

                var campos = string.Join(",", vista.Campos);

                sql.Append(campos + "\r\nFROM\r\n");

                sql.Append(string.Join(",", tablas));

                result.Message = sql.ToString().ToUpper();
            }
            catch (Exception ex)
            {
                result.Message = ex.Message;
            }

            return(result);
        }
Esempio n. 7
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View listitem = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.savedtask_layout, parent, false);

            taskname         = listitem.FindViewById <TextView>(Resource.Id.taskname_saved);
            taskdescription  = listitem.FindViewById <TextView>(Resource.Id.taskdescription_saved);
            taskdeadlinedate = listitem.FindViewById <TextView>(Resource.Id.taskdeadlinedate_saved);
            taskdeadlinetime = listitem.FindViewById <TextView>(Resource.Id.taskdeadlinetime_saved);
            //linear1 = listitem.FindViewById<LinearLayout>(Resource.Id.linear1_saved);
            //linear2 = listitem.FindViewById<LinearLayout>(Resource.Id.linear2_saved);
            //linear3 = listitem.FindViewById<LinearLayout>(Resource.Id.linear3_saved);

            //TimeSpan span = (TaskInboxFrag.deadline - DateTime.Now);
            //String.Format("{0} days, {1} hours, {2} minutes, {3} seconds",

            //span.Days, span.Hours, span.Minutes, span.Seconds);
            //timeleft.Text = span.ToString();
            //TextView txtnumber = listitem.FindViewById<TextView>(Resource.Id.txtnumber);
            MyView view = new MyView(listitem)
            {
                TaskName         = taskname,
                TaskDescription  = taskdescription,
                TaskDeadlineTime = taskdeadlinetime,
                TaskDeadlineDate = taskdeadlinedate,
                //Linear1 = linear1,
                //Linear2 = linear2,
                //Linear3 = linear3,
            };

            return(view);
        }
Esempio n. 8
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View listitem = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.taskoutboxdata, parent, false);

            task        = listitem.FindViewById <TextView>(Resource.Id.tv1);
            description = listitem.FindViewById <TextView>(Resource.Id.tv3);
            dead_line   = listitem.FindViewById <TextView>(Resource.Id.tv2);
            time_left   = listitem.FindViewById <TextView>(Resource.Id.time_left);
            //task_status = listitem.FindViewById<TextView>(Resource.Id.tv5);
            //task_created_by = listitem.FindViewById<TextView>(Resource.Id.tv6);
            //task_creation_date = listitem.FindViewById<TextView>(Resource.Id.tv7);
            linear  = listitem.FindViewById <LinearLayout>(Resource.Id.ll);
            Filter2 = new ChemicalFilter2(this);
            //TextView txtnumber = listitem.FindViewById<TextView>(Resource.Id.txtnumber);
            MyView view = new MyView(listitem)
            {
                Task               = task,
                Description        = description,
                Deadline_date      = dead_line,
                Mark_to            = mark_to,
                Task_status        = task_status,
                Task_created_by    = task_created_by,
                Task_creation_date = task_creation_date,
                time_left          = time_left,
                Linear             = linear,
                Text1              = tv,
            };

            return(view);
        }
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View   ServiceView = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.custom_services_cart_item, parent, false);
            MyView mholder     = new MyView(ServiceView);

            return(mholder);
        }
Esempio n. 10
0
            public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
            {
                int itemType = GetItemViewType(position);

                if (itemType == 0)
                {
                    MyView view = holder as MyView;

                    int indexPosition = (lista_wydarzen.Count - 1) - position;
                    //iew.mMainView.Click += mMainView_Click;
                    view.ETitle.Text = lista_wydarzen[indexPosition].etitle;
                    view.EFTeam.Text = lista_wydarzen[indexPosition].efteam;
                    view.ESTeam.Text = lista_wydarzen[indexPosition].esteam;
                    view.EDate.Text  = lista_wydarzen[indexPosition].edate;
                    view.EGame.Text  = lista_wydarzen[indexPosition].egame;
                    //view.mTime.Text = Convert.ToString(lista_wydarzen[indexPosition].czy_turniej);
                    view.mLayout.SetBackgroundResource(Resource.Drawable.Tournament);
                }
                else
                {
                    MyView view = holder as MyView;

                    int indexPosition = (lista_wydarzen.Count - 1) - position;
                    //iew.mMainView.Click += mMainView_Click;
                    view.ETitle.Text = lista_wydarzen[indexPosition].etitle;
                    //view.Description.Text = lista_wydarzen[indexPosition].desc;
                    view.EDate.Text = lista_wydarzen[indexPosition].edate;
                    view.EGame.Text = lista_wydarzen[indexPosition].egame;
                    //view.mTime.Text = Convert.ToString(lista_wydarzen[indexPosition].czy_turniej);
                    view.mLayout.SetBackgroundResource(Resource.Drawable.QuickGame);
                }
            }
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            MyView myholder = holder as MyView;

            myholder.mtxtcontactname.SetImageResource(Mitems[position].Image);
            myholder.mtxtcontactnumber.Text = Mitems[position].Name;
        }
Esempio n. 12
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View itemView = LayoutInflater.From(context)
                            .Inflate(Resource.Layout.raw_layout, parent, false);

            TextView     txtTime     = itemView.FindViewById <TextView>(Resource.Id.txt_raw_time);
            TextView     txtStatus   = itemView.FindViewById <TextView>(Resource.Id.txt_raw_status);
            TextView     txtLocation = itemView.FindViewById <TextView>(Resource.Id.txt_raw_location);
            TextView     txtMoney    = itemView.FindViewById <TextView>(Resource.Id.txt_raw_money);
            ImageView    imgMoney    = itemView.FindViewById <ImageView>(Resource.Id.imgMoney);
            ImageView    imgLocation = itemView.FindViewById <ImageView>(Resource.Id.imgLocation);
            LinearLayout layout      = itemView.FindViewById <LinearLayout>(Resource.Id.lnrLayout);

            MyView view = new MyView(itemView)
            {
                txtTime     = txtTime,
                txtStatus   = txtStatus,
                txtMoney    = txtMoney,
                txtLocation = txtLocation,
                imgMoney    = imgMoney,
                imgLocation = imgLocation,
                lnrLayout   = layout
            };


            return(view);
        }
Esempio n. 13
0
        public void NonEmptyLists()
        {
            var view = new MyView()
            {
                stooges = new List <string> {
                    "Moe", "Larry", "Curly"
                },
            };
            var output = Mustache.render("Shown{{#stooges}} {{.}}{{/stooges}}", view);

            Assert.AreEqual("Shown Moe Larry Curly", output);

            var context = new MyView()
            {
                subberList = new List <SubObj> {
                    new SubObj {
                        whatever = "abc"
                    }, new SubObj {
                        whatever = "xyz"
                    }
                }
            };

            output = Mustache.render("={{#subberList}}-{{whatever}}{{/subberList}}", context);
            Assert.AreEqual("=-abc-xyz", output);

            output = Mustache.render("={{#subberList}}-{{uppers}}{{/subberList}}", context);
            Assert.AreEqual("=-ABC-XYZ", output);
        }
Esempio n. 14
0
 /// <summary>
 /// 推出程序
 /// </summary>
 public void Exit()
 {
     MyView.Exit();
     MyModel.Exit();
     MyView.FlushListBox(ref MyModel);
     Application.Exit();
 }
Esempio n. 15
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            MyView mHolder = holder as MyView;

            mHolder.Name.Text     = mListService[position].serviceName;
            mHolder.Duration.Text = mListService[position].duration.ToString() + " Minutes";
        }
 public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
 {
     var row = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.row, parent, false);
     var image = row.FindViewById<ImageView>(Resource.Id.myImage);
     var view = new MyView(row) {image = image};
     return view;
 }
Esempio n. 17
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View listitem = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.taskinboxdata, parent, false);

            task      = listitem.FindViewById <TextView>(Resource.Id.task_name);
            create_by = listitem.FindViewById <TextView>(Resource.Id.create_by);
            dead_line = listitem.FindViewById <TextView>(Resource.Id.deadline);
            time_left = listitem.FindViewById <TextView>(Resource.Id.time_left);
            linear    = listitem.FindViewById <LinearLayout>(Resource.Id.ll);
            Filter1   = new ChemicalFilter1(this);


            //TextView txtnumber = listitem.FindViewById<TextView>(Resource.Id.txtnumber);
            MyView view = new MyView(listitem)
            {
                Task          = task,
                Create_by     = create_by,
                Deadline_date = dead_line,
                time_left     = time_left,
                Linear        = linear,
                Text1         = tv,
            };

            return(view);
        }
Esempio n. 18
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            MyView myHolder = holder as MyView;

            myHolder.mName.Text = mCollections[position].Name;
            myHolder.mImage.SetImageResource(mCollections[position].Image);
        }
Esempio n. 19
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            MyView myHolder = holder as MyView;

            myHolder.mimageView.SetImageResource(thumbIds[position]);
            myHolder.mTenHV.Text  = mhoiVienDetails[position].TenHV;
            myHolder.mChucVu.Text = mhoiVienDetails[position].ChucVu;
        }
Esempio n. 20
0
        static void Main(string[] args)
        {
            IModel      model     = new MyModel();
            IView       view      = new MyView();
            MyPresenter presenter = new MyPresenter(model, view);

            view.Start();
        }
Esempio n. 21
0
    public void SomeTest()
    {
        var view = new MyView();

        // swap the client manager in the test
        ObjectFactory.Register <IClientManager>(() => new MockClientManager());
        // Asserts
    }
    public void SomeTest()
    {
        var view = new MyView();

        // swap the client manager in the test
        InstanceLocator.Register <IClientManager>(() => new MockClientManager());
        // Asserts
    }
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            var view = new MyView();

            view.Frame = new CoreGraphics.CGRect(40, 40, 100, 100);
            Add(view);
        }
Esempio n. 24
0
 /// <summary>
 /// Remove a previously registered <c>ICommand</c> to <c>INotification</c> mapping.
 /// </summary>
 /// <param name="notificationName">the name of the <c>INotification</c> to remove the <c>ICommand</c> mapping for</param>
 public virtual void RemoveCommand(string notificationName)
 {
     if (!CommandMap.ContainsKey(notificationName))
     {
         return;
     }
     MyView.RemoveObserver(notificationName, this);
 }
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            MyView mHolder = holder as MyView;

            mHolder.Name.Text      = services[position].serviceName;
            mHolder.Duration.Text  = services[position].duration.ToString() + " minutes";
            mHolder.mDelete.Click += delegate { DeleteButtonClick(services[position].serviceName); };
        }
Esempio n. 26
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View row = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.layout_Lista, parent, false);

            MyView myViewHolder = new MyView(row, OnClick);

            return(myViewHolder);
        }
Esempio n. 27
0
 public void RemoveUiEventInterest(string key)
 {
     if (UiEventsMap.ContainsKey(key))
     {
         UiEventsMap.Remove(key);
     }
     MyView.RemoveUiEventListener(key);
 }
Esempio n. 28
0
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            MyView myHolder = holder as MyView;

            myHolder.mimageView.SetImageResource(thumbIds[position]);
            myHolder.mDetails.Text         = muudaiItemDetails[position].Details;
            myHolder.mItemTietietkiem.Text = muudaiItemDetails[position].ItemTienTietKiem;
            myHolder.mTenCongty.Text       = muudaiItemDetails[position].TenCongty;
        }
Esempio n. 29
0
        /// <summary>
        /// The method displays a menu for selecting a product category to be deleted.
        /// </summary>
        #region Remove menu
        public void RemoveMenu()
        {
            MyView.StartMenu();

            Console.Write("\rRemove a product? ");
            Console.ForegroundColor = ConsoleColor.Red;
            Console.Write("(Y/N) ");
            Console.ForegroundColor = ConsoleColor.Gray;
        }
Esempio n. 30
0
 public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
 {
     View row = LayoutInflater.From (parent.Context).Inflate (Resource.Layout.PhotoLayout, parent, false);
     TextView txtName = row.FindViewById<TextView> (Resource.Id.labtest_name);
     TextView txtValue = row.FindViewById<TextView> (Resource.Id.labtest_value);
     ImageView buttonRound = row.FindViewById<ImageView> (Resource.Id.roundButton);
     MyView view = new MyView (row) { _Name = txtName, _Value = txtValue, _ButtonImage = buttonRound };
     return view;
 }
        public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
        {
            // throw new NotImplementedException();
            MyView myholder = holder as MyView;

            myholder.Name.Text         = names[position];
            myholder.IsChecked.Checked = check;
            check = !check;
        }
Esempio n. 32
0
 public void DotNotation()
 {
     var view = new MyView
     {
         title = "Joe"
     };
     var output = Mustache.Render("{{title}} believes {{subber.whatever}}", view);
     Assert.AreEqual("Joe believes life is 42", output);
 }
Esempio n. 33
0
            public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position)
            {
                MyView myholder = holder as MyView;

                myholder.mtxtcontactname.Text   = Mitems[position].ContactName;
                myholder.mtxtcontactnumber.Text = Mitems[position].Number;

                myholder.mainview.Click += Mainview_Click;
            }
Esempio n. 34
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View row = LayoutInflater.From(parent.Context).Inflate(Android.Resource.Layout.SimpleListItem1, parent, false);

            TextView name = row.FindViewById<TextView>(Android.Resource.Id.Text1);

            MyView view = new MyView(row){ Name = name };
            return view;
        }
Esempio n. 35
0
 public void Lambdas()
 {
     var template = @"{{#wrapped}} {{title}} is awesome. {{/wrapped}}";
     var view = new MyView
     {
         title = "Willy"
     };
     var output = Mustache.Render(template, view);
     Assert.AreEqual("<b> Willy is awesome. </b>", output);
 }
Esempio n. 36
0
	public override void FinishedLaunching (NSObject notification)
	{
		view = new MyView (new RectangleF (10, 10, 200, 200));

		text = new NSTextField (new RectangleF (44, 32, 232, 31)) {
			StringValue = "Hello Mono Mac!"
		};
			
		window = new NSWindow (new RectangleF (50, 50, 400, 400), (NSWindowStyle) (1 | (1 << 1) | (1 << 2) | (1 << 3)), 0, false);
		window.ContentView.AddSubview (text);
		window.ContentView.AddSubview (view);



		window.MakeKeyAndOrderFront (this);
	}
Esempio n. 37
0
        public void NonEmptyLists()
        {
            var view = new MyView
            {
                stooges = new List<string> {"Moe", "Larry", "Curly"}
            };
            var output = Mustache.Render("Shown{{#stooges}} {{.}}{{/stooges}}", view);
            Assert.AreEqual("Shown Moe Larry Curly", output);

            var context = new MyView
            {
                subberList = new List<SubObj> {new SubObj {whatever = "abc"}, new SubObj {whatever = "xyz"}}
            };

            output = Mustache.Render("={{#subberList}}-{{whatever}}{{/subberList}}", context);
            Assert.AreEqual("=-abc-xyz", output);

            output = Mustache.Render("={{#subberList}}-{{uppers}}{{/subberList}}", context);
            Assert.AreEqual("=-ABC-XYZ", output);
        }
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View row = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.cardViewRow, parent, false);

            TextView mTxtDwmc = row.FindViewById<TextView>(Resource.Id.txtDwmc);
            TextView mTxtBjjb = row.FindViewById<TextView>(Resource.Id.txtBjjb);
            TextView mTxtBjsj = row.FindViewById<TextView>(Resource.Id.txtBjsj);
            TextView mTxtBn = row.FindViewById<TextView>(Resource.Id.txtBn);
            TextView mTxtCount = row.FindViewById<TextView> (Resource.Id.txtCount);
            TextView mBaojingxinxi = row.FindViewById<TextView> (Resource.Id.txtBaojingxinxi);
            TextView mjibie = row.FindViewById<TextView> (Resource.Id.txtSubject);
            TextView mshijian = row.FindViewById<TextView> (Resource.Id.txtMessage);
            ImageView mimage = row.FindViewById<ImageView> (Resource.Id.mImageView);

            MyView view = new MyView(row) { mDwmc = mTxtDwmc, mBjjb = mTxtBjjb, mBjsj = mTxtBjsj, mBn=mTxtBn,mCount=mTxtCount,mBaojing=mBaojingxinxi,mJiBie=mjibie,mShiJian=mshijian,mImage=mimage};

            return view;
        }
Esempio n. 39
0
 public override View GetView(int position, View convertView, ViewGroup parent)
 {
     MyView view;
     if (convertView == null)
     {
         view = new MyView();
         convertView = mInflater.Inflate(Resource.Layout.list_pro_type_item, null);
         view.icon = (ImageView)convertView.FindViewById(Resource.Id.typeicon);
         view.name = (TextView)convertView.FindViewById(Resource.Id.typename);
         convertView.Tag = view;
     }
     else {
         view = (MyView)convertView.Tag;
     }
     #region
     if (list != null && list.Count > 0)
     {
         type = list[position];
         view.name.Text=type.GetTypename();
         if (type.GetTypename().Contains("电脑办公"))
         {
             view.icon.SetBackgroundResource(Resource.Drawable.diannao);
         }
         else if (type.GetTypename().Contains("个护化妆"))
         {
             view.icon.SetBackgroundResource(Resource.Drawable.huazhuang);
         }
         else if (type.GetTypename().Contains("鞋靴箱包"))
         {
             view.icon.SetBackgroundResource(Resource.Drawable.nvxie);
         }
         else if (type.GetTypename().Contains("潮流女装"))
         {
             view.icon.SetBackgroundResource(Resource.Drawable.nvzhuang);
         }
         else if (type.GetTypename().Contains("图书"))
         {
             view.icon.SetBackgroundResource(Resource.Drawable.shuji);
         }
         else if (type.GetTypename().Contains("玩具乐器"))
         {
             view.icon.SetBackgroundResource(Resource.Drawable.wanju);
         }
         else if (type.GetTypename().Contains("音像制品"))
         {
             view.icon.SetBackgroundResource(Resource.Drawable.yingshi);
         }
         else if (type.GetTypename().Contains("常用分类"))
         {
             view.icon.SetBackgroundResource(Resource.Drawable.yiyong);
         }
         else if (type.GetTypename().Contains("品牌男装"))
         {
             view.icon.SetBackgroundResource(Resource.Drawable.nanzhuang);
         }
         else if (type.GetTypename().Contains("内衣配饰"))
         {
             view.icon.SetBackgroundResource(Resource.Drawable.neiyi);
         }
         else if (type.GetTypename().Contains("家用电器"))
         {
             view.icon.SetBackgroundResource(Resource.Drawable.dianqi);
         }
         else if (type.GetTypename().Contains("手机数码"))
         {
             view.icon.SetBackgroundResource(Resource.Drawable.shouji);
         }
         else {
             view.icon.SetBackgroundResource(Resource.Drawable.nvzhuang);
         }
     }
     #endregion//图标
     return convertView;
 }
Esempio n. 40
0
        public void Sections()
        {
            var view = new MyView
            {
                title = "Joe"
            };
            var output = Mustache.Render("Shown.{{#person}}Never shown!{{/person}}", view);
            Assert.AreEqual("Shown.", output);

            output = Mustache.Render("Shown.{{#stooges}}Never shown!{{/stooges}}", view);
            Assert.AreEqual("Shown.", output);

            output = Mustache.Render("Shown.{{#stoogesArray}}Never shown!{{/stoogesArray}}", view);
            Assert.AreEqual("Shown.", output);
        }
Esempio n. 41
0
        public void Tutorial()
        {
            var view = new MyView
            {
                title = "Joe"
            };

            var output = Mustache.Render("{{title}} spends {{calc}}", view);
            Assert.AreEqual("Joe spends 6", output);
        }
Esempio n. 42
0
 public void Numbers()
 {
     var view = new MyView();
     var output = Mustache.Render("{{aNumber}} believes", view);
     Assert.AreEqual("13 believes", output);
 }
Esempio n. 43
0
            public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
            {
                View row = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.row, parent, false);

                TextView studyOwner = row.FindViewById<TextView>(Resource.Id.studyOwner);
                TextView studyCourse = row.FindViewById<TextView>(Resource.Id.studyCourse);
                TextView studyTopic = row.FindViewById<TextView>(Resource.Id.studyTopic);
                MyView view = new MyView(row) { mOwner = studyOwner, mCourse = studyCourse, mTopic = studyTopic };
                return view;
            }
Esempio n. 44
0
        public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType)
        {
            View Entry = LayoutInflater.From(parent.Context).Inflate(Resource.Layout.StatsListElement, parent, false);

            TextView Name = Entry.FindViewById<TextView>(Resource.Id.stats_name);
            TextView Description = Entry.FindViewById<TextView>(Resource.Id.stats_description);
            TextView Value = Entry.FindViewById<TextView>(Resource.Id.stats_value);
            ImageView Image = Entry.FindViewById<ImageView>(Resource.Id.stats_image);

            MyView View = new MyView(Entry) { StatsName = Name, StatsDescription = Description, StatsValue = Value, StatsImage = Image };
            return View;
        }