public void OnGUI(Rect rect, IListItem listItem, bool selected)
        {
            var item = listItem as CodeCompletionListItem;

            if (item == null)
            {
                Debug.LogError("item is not a CodeCompletionListItem");
                return;
            }

            const float iconSize     = 16f;
            const float spaceBetween = 2f;
            const float margin       = 5f;
            const float textOffset   = margin + iconSize + spaceBetween;

            // Icon
            Texture2D icon = GetIconFor(item);

            if (icon != null)
            {
                GUI.DrawTexture(new Rect(rect.x + margin, rect.y, iconSize, iconSize), icon);
            }

            // Text
            InitRichTextFor(item);
            _guiContent.text = item.RichText;
            GUI.Label(new Rect(rect.x + textOffset, rect.y, rect.width - textOffset, rect.height), _guiContent, selected ? _textSelected : _text);
        }
Exemplo n.º 2
0
		public void SetItem(IListItem value)
		{
			var imgitem = value as IImageListItem;
			if (imgitem != null && imgitem.Image != null)
				Image = ((IImageSource)imgitem.Image.Handler).GetImage();
			Text = (NSString)value.Text;
		}
Exemplo n.º 3
0
 protected void _newListSubItem(IListItem nListItem)
 {
     if (null != m_tNewListSubItem)
     {
         this.m_tNewListSubItem(nListItem);
     }
 }
Exemplo n.º 4
0
        public void Insert(IListItem item, int index)
        {
            IListItem _currentItem = _head;

            if (index > _count)
            {
                AddLast(item);
            }
            else
            {
                for (int i = 1; i < index; i++)
                {
                    _currentItem = _currentItem.Next;
                }

                if (_currentItem == _head)
                {
                    AddFirst(item);
                }
                else
                {
                    _currentItem.Prev.Next = item;
                    item.Next = _currentItem;
                    _count++;
                }
            }
        }
Exemplo n.º 5
0
        public virtual void UpdateItem(IListItem item, object rowData)
        {
            GEDCOMRecord rec = rowData as GEDCOMRecord;

            if (item == null || rec == null)
            {
                return;
            }

            Fetch(rec);

            int num = fColumnsMap.Count;

            for (int i = 1; i < num; i++)
            {
                MapColumnRec colrec = fColumnsMap[i];

                // aColIndex - from 1
                ListColumn cs  = fListColumns[colrec.ColType];
                object     val = GetColumnValueEx(colrec.ColType, colrec.ColSubtype, true);
                string     res = ConvertColumnValue(val, cs);

                item.AddSubItem(res);
            }
        }
Exemplo n.º 6
0
        public GLib.Value GetColumnValue(IListItem item, int column, int row)
        {
            switch (column)
            {
            case 0:
                if (item != null)
                {
                    return(new GLib.Value(item.Text));
                }
                else
                {
                    return(new GLib.Value((string)null));
                }

            case 1:
                var imageItem = item as IImageListItem;
                if (imageItem != null)
                {
                    var img = imageItem.Image;
                    if (img != null)
                    {
                        var imgHandler = img.Handler as IGtkPixbuf;
                        if (imgHandler != null)
                        {
                            return(new GLib.Value(imgHandler.GetPixbuf(MaxImageSize)));
                        }
                    }
                }
                return(new GLib.Value((Gdk.Pixbuf)null));

            default:
                throw new InvalidOperationException();
            }
        }
Exemplo n.º 7
0
        private void OKExecute(Window win)
        {
            if (win != null)
            {
                IDocumentService doc = ServiceLocator.Current.GetInstance <IDocumentService>();
                _document = doc.Document;

                foreach (var widget in widgetsList)
                {
                    IListBase list = widget as IListBase;
                    list.Items.Clear();

                    foreach (NodeViewModel node in NodeList)
                    {
                        IListItem item = list.CreateItem(node.Name);
                        item.IsSelected = node.IsChecked;
                    }
                    if (list.WidgetType == WidgetType.ListBox)
                    {
                        (list as IListBox).AllowMultiple = IsMultiple;
                    }
                }

                _document.IsDirty = true;
                win.DialogResult  = true;
                win.Close();
            }
        }
Exemplo n.º 8
0
        private View GetCell(int position, IListItem cVm, View convertView)
        {
            View cardCell = null;

            allViews.Remove(convertView);

            switch (cVm.ListItemType)
            {
            case ListItemType.Default:
                cardCell = AdapterHelpers.ProcessSocialCard(position, cVm as BaseContentCardViewModel, convertView, LayoutInflater);
                break;

            case ListItemType.Header:
                CleanupCard(convertView);
                cardCell = AdapterHelpers.ProcessHeaderCard(position, cVm, convertView);
                break;

            case ListItemType.MenuItem:
            default:
                CleanupCard(convertView);
                break;
            }
            if (cardCell == null)
            {
                cardCell = LayoutInflater.Inflate(Resource.Layout.DefaultCell, null, false);
            }

            allViews.Add(cardCell);
            return(cardCell);
        }
Exemplo n.º 9
0
        protected override void ConfigureSubviews(IListItem item)
        {
            ViewModel = item as BaseContentCardViewModel;

            InitUI();
            InitBindings();
        }
Exemplo n.º 10
0
 void _newListSubItem(IListItem nListItem)
 {
     ListSubItem listViewSubItem_ = new ListSubItem();
     listViewSubItem_._setListItem(nListItem);
     this.SubItems.Add(listViewSubItem_);
     nListItem._addListItem(this);
 }
Exemplo n.º 11
0
        /// <summary>
        /// Updates the specified cell displays.
        /// </summary>
        private void UpdateCell(IListItem item)
        {
            var mapsets = Model.MapsetList.Value;
            var cell    = (ResultCell)item;

            cell.Setup(mapsets[item.ItemIndex]);
        }
Exemplo n.º 12
0
    //вставить элемент перед элементом с указанным индексом
    //если элемента нет - вставить в конец
    public void Insert(IListItem item, int index)
    {
        if (index < 0)
        {
            return;
        }

        var listItem = first;
        int i        = 0;

        while (i != index)
        {
            i++;
            listItem = (IUpgradedListItem)listItem?.Next();

            if (listItem == null)
            {
                this.AddLast(item);
                return;
            }
        }

        var temp = (IUpgradedListItem)listItem.Prev();

        listItem.SetPrev(item);
        temp.SetNext(item);
        ((IUpgradedListItem)item).SetNext(listItem);
        ((IUpgradedListItem)item).SetPrev(temp);
    }
Exemplo n.º 13
0
        /// <summary>
        /// Event called on menu item update due to listview.
        /// </summary>
        private void OnUpdateMenuItem(IListItem item)
        {
            DropdownMenuItem menuItem = item as DropdownMenuItem;
            var itemData = context.Datas[item.ItemIndex];

            menuItem.Setup(itemData, context.Selection == itemData);
        }
Exemplo n.º 14
0
        public virtual void UpdateItem(int itemIndex, IListItem item, object rowData)
        {
            GDMRecord rec = rowData as GDMRecord;

            if (item == null || rec == null)
            {
                return;
            }

            Fetch(rec);

            int num = fColumnsMap.Count;

            for (int i = 1; i < num; i++)
            {
                MapColumnRec colrec = fColumnsMap[i];

                // aColIndex - from 1
                ListColumn cs  = fListColumns[colrec.ColType];
                object     val = GetColumnValueEx(colrec.ColType, colrec.ColSubtype, true);
                string     res = ConvertColumnValue(val, cs);

                item.AddSubItem(res);
            }

            if (GlobalOptions.Instance.ReadabilityHighlightRows && MathHelper.IsOdd(itemIndex))
            {
                item.SetBackColor(ChartRenderer.GetColor(ChartRenderer.LightGray));
            }
        }
 private void OnUpdateItem(IListItem item)
 {
     if (item is DummyItem dummy)
     {
         dummy.Refresh();
     }
 }
Exemplo n.º 16
0
        /// <summary>
        /// Find the DefaultIndex
        /// </summary>
        /// <returns></returns>
        public int FindDefaultIndex()
        {
            // locals
            int index        = -1;
            int defaultIndex = -1;

            // load the lists
            foreach (object item in this.ComboBox.Items)
            {
                // increment index
                index++;

                // cast the item as an IListItem
                IListItem listItem = item as IListItem;

                // if this is the default item
                if ((listItem != null) && (listItem.DefaultItem))
                {
                    // set the defaultIndex
                    defaultIndex = index;

                    // break out of the for loop
                    break;
                }
            }

            // return value
            return(defaultIndex);
        }
Exemplo n.º 17
0
        public void MarkItemAsChecked(IListItem item)
        {
            shoppingList.CheckItem(item);
            ShoppingItem i = (ShoppingItem)item;

            itemDbRepository.updateChecked(item.Id);
        }
Exemplo n.º 18
0
		protected override void ConfigureSubviews (IListItem item)
		{
			ViewModel = item as BaseContentCardViewModel;

			InitUI ();
			InitBindings ();
		}
Exemplo n.º 19
0
        //вставить элемент перед элементом с указанным индексом
        //если элемента нет - вставить в конец
        public void Insert(IListItem item, int index)
        {
            if (index < 0)
            {
                return;
            }
            if (index == 0)
            {
                AddFirst(item);
                return;
            }
            IListItem CurrItem = ListHead;

            for (int i = 0; i < index - 1; i++)
            {
                CurrItem = CurrItem.Next();
            }
            if ((CurrItem == null) || (CurrItem.Next() == null))
            {
                AddLast(item);
                return;
            }

            ListItem NewItem = new ListItem(item.Value, CurrItem);

            NewItem.NextElem = CurrItem.Next();

            ListItem PrevItem = CurrItem as ListItem;
            ListItem NextItem = CurrItem.Next() as ListItem;

            PrevItem.NextElem = NewItem;
            NextItem.PrevElem = NewItem;
        }
Exemplo n.º 20
0
        public void Swap(IListItem item0, IListItem item1)
        {
            if (item0 == null)
            {
                throw new System.ArgumentNullException("item0");
            }
            if (item1 == null)
            {
                throw new System.ArgumentNullException("item1");
            }

            int i0 = this.InnerList.IndexOf(item0),
                i1 = this.InnerList.IndexOf(item0);

            if (i0 < 0)
            {
                throw new System.ArgumentException(StringResources.GetString("CannotFindSpecifiedValueInCollection"), "item0");
            }
            if (i1 < 0)
            {
                throw new System.ArgumentException(StringResources.GetString("CannotFindSpecifiedValueInCollection"), "item1");
            }

            Swap(i0, i1);
        }
Exemplo n.º 21
0
 public void _addListItem(IListItem nListItem)
 {
     ListItemWidget listItemWidget_ = new ListItemWidget();
     listItemWidget_._setListItem(nListItem);
     mListView.Items.Add(listItemWidget_);
     nListItem._addListItem(listItemWidget_);
 }
Exemplo n.º 22
0
        public void updateCellAtIndex(int idx, int row)
        {
            if (cellsCount == 0)
            {
                return;
            }

            LGridViewCell cell = _onDataSourceAdapterHandler(dequeueCell(), idx);

            cell.idx = idx;
            cell.row = row;
            RectTransform rtran = cell.node.GetComponent <RectTransform>();

            rtran.pivot     = new Vector2(0, 1);
            rtran.sizeDelta = cellsSize;
            cell.node.SetActive(true);
            cell.node.transform.SetParent(container.transform);
            cell.node.transform.localPosition = cellPositionFromIndex(idx);
            cell.node.transform.localScale    = new Vector3(1, 1, 1);
            insertSortableCell(cell, idx);

            //新抽象出来的Item接口
            IListItem item = rtran.GetComponent <IListItem>();

            if (item != null)
            {
                item.Init(idx);
                item.OnRefresh();
            }

            _indices.Add(idx, 1);
        }
Exemplo n.º 23
0
 public ListItem(object obj, IListItem prev = null, IListItem next = null)
 {
     //логика инициализации
     this.Value = obj;
     this.prev  = prev;
     this.next  = next;
 }
Exemplo n.º 24
0
 public bool ChangeItem(IListItem selectedItem)
 {
     if (selectedItem.IsAccessibleDirectory())
     {
         currentItem = selectedItem;
     }
     return(selectedItem.IsAccessibleDirectory());
 }
Exemplo n.º 25
0
        /// <summary>
        /// Initializes the specified list item.
        /// </summary>
        private void SetupVersionCell(IListItem item)
        {
            var maps     = Model.MapList.Value;
            var cell     = item as VersionButton;
            var gameMode = Model.GameMode.Value;

            cell.Setup(maps[cell.ItemIndex].GetPlayable(gameMode));
        }
Exemplo n.º 26
0
 /// <summary>
 /// Raises TextChanged event of the collection.
 /// </summary>
 /// <param name="item">Item whose text have changed.</param>
 /// <param name="thumbInfo"></param>
 private void OnTextChanged(IListItem item, int textInfoId)
 {
     if (TextChanged != null)
     {
         TextChangedEventArgs args = new TextChangedEventArgs(item, textInfoId);
         TextChanged(this, args);
     }
 }
Exemplo n.º 27
0
 // Token: 0x0600222C RID: 8748 RVA: 0x0007E68C File Offset: 0x0007C88C
 internal OneDriveProItemsPage(int pageIndex, IListItem item)
 {
     this.PageIndex    = pageIndex;
     this.ID           = item["ID"].ToString();
     this.Name         = (string)item["FileLeafRef"];
     this.ObjectType   = (string)item["FSObjType"];
     this.SortBehavior = ((FieldLookupValue)item["SortBehavior"]).LookupValue;
 }
Exemplo n.º 28
0
 /// <summary>
 /// Raises IconChanged event of the collection.
 /// </summary>
 /// <param name="item">Item whose icon has been changed.</param>
 /// <param name="view">The view in which icon has been changed.</param>
 private void OnIconChanged(IListItem item, View view)
 {
     if (IconChanged != null)
     {
         IconChangedEventArgs args = new IconChangedEventArgs(item, view);
         IconChanged(this, args);
     }
 }
        private void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            IListItem selectedItem = (IListItem)listBox1.SelectedItem;

            listController.MarkItemAsChecked(selectedItem);

            updateListBox();
        }
Exemplo n.º 30
0
 /// <summary>
 /// Raises StateChanged event of the collection.
 /// </summary>
 /// <param name="item">Item whose state have changed.</param>
 /// <param name="stateType">State change type.</param>
 private void OnStateChanged(IListItem item, StateType stateType)
 {
     if (StateChanged != null)
     {
         StateChangedEventArgs args = new StateChangedEventArgs(item, stateType);
         StateChanged(this, args);
     }
 }
Exemplo n.º 31
0
 public int GetRowOfItem(IListItem item)
 {
     if (collection == null)
     {
         return(-1);
     }
     return(collection.IndexOf(item));
 }
Exemplo n.º 32
0
        protected override async void ConfigureSubviews(IListItem item)
        {
            ViewModel = item as BaseMenuItemViewModel;

            await ViewModel.DidLoad();

            InitUI();
            InitBindings();
        }
Exemplo n.º 33
0
 /// <summary>
 /// Removes an item to the combo box's items
 /// </summary>
 /// <param name="item">item to remove</param>
 public void RemoveItem(IListItem item)
 {
     if (_items == null)
     {
         return;
     }
     _items.Remove(item);
     OnItemRemoved(new ListItemEventArgs(item));
 }
Exemplo n.º 34
0
 /// <summary>
 /// Adds an item to the combo box's items
 /// </summary>
 /// <param name="item">item to add</param>
 public void AddItem(IListItem item)
 {
     if (_items == null)
     {
         _items = new List <IListItem>();
     }
     _items.Add(item);
     OnItemAdded(new ListItemEventArgs(item));
 }
Exemplo n.º 35
0
		protected override async void ConfigureSubviews (IListItem item)
		{
			ViewModel = item as BaseMenuItemViewModel;

			await ViewModel.DidLoad ();

			InitUI ();
			InitBindings ();
		}
Exemplo n.º 36
0
        /// <summary>
        /// Notifies the server control that an element, either XML or HTML, was parsed, and adds the element to the server control's <see cref="T:System.Web.UI.ControlCollection" /> object.
        /// </summary>
        /// <param name="obj">An <see cref="T:System.Object" /> that represents the parsed element.</param>
        protected override void AddParsedSubObject(object obj)
        {
            IListItem listItem = obj as IListItem;

            if (listItem != null)
            {
                this.Items.Add(listItem);
            }
        }
Exemplo n.º 37
0
 public void _setListItem(IListItem nListItem)
 {
     mListItem = nListItem;
     this.Text = nListItem._getListItemName();
     ImageSingleton imageSingleton_ = __singleton<ImageSingleton>._instance();
     string listItemImage_ = nListItem._getListItemImage();
     this.ImageIndex = imageSingleton_._getImageId(listItemImage_);
     nListItem.m_tListItemNameChange += this._setListItemName;
     nListItem.m_tNewListSubItem += this._newListSubItem;
 }
Exemplo n.º 38
0
        public ListItem(IListItem i)
            : base(i.GetName())
        {
            this.iListItem = i;
            this.type = i.GetTypeName();
            this.size = i.GetSize();
            this.date = i.GetDate();
            this.SetInfo();
            this.ImageIndex = (int) i.GetIconId();

            i.GetBaseObject().NameChanged += new EventHandler(NameChanged);
        }
Exemplo n.º 39
0
		protected override void ConfigureSubviews (IListItem item)
		{
			var viewModel = item as HeaderCardViewModel;

			TitleLabel.Text = viewModel.Title;

			if(viewModel.Position == Position.Top)
			{
				TimeLineViewTopConstraint.Constant = 18;
				TimeLineBottomConstraint.Constant = 0;
			}
			else if(viewModel.Position == Position.Middle)
			{
				TimeLineViewTopConstraint.Constant = 0;
				TimeLineBottomConstraint.Constant = 0;
			}
			else if(viewModel.Position == Position.Bottom)
			{
				TimeLineViewTopConstraint.Constant = 0;
				TimeLineBottomConstraint.Constant = 2;
			}
		}
Exemplo n.º 40
0
        public static View ProcessHeaderCard(int position, IListItem headerViewModel, View convertView)
        {
            var vm = headerViewModel as HeaderCardViewModel;
            var inflater = LayoutInflater.FromContext(Application.Context);
            HeaderCardViewHolder viewHolder = null;

            if (convertView == null || convertView.Id != Resource.Id.HeaderCellMainLayout || convertView.Tag == null)
            {
                if (convertView != null)
                    convertView.Tag = null;
                convertView = null;

                convertView = inflater.Inflate(Resource.Layout.HeaderCell, null, false);

                viewHolder = new HeaderCardViewHolder()
                    {
                        TopBar = convertView.FindViewById<View>(Resource.Id.HeaderTopBar),
                        MainText = convertView.FindViewById<TextView>(Resource.Id.HeaderText),
                        BottomBar = convertView.FindViewById<View>(Resource.Id.HeaderBottomBar),
                        LinkedVM = vm
                    };

                convertView.Tag = viewHolder;
            }
            else
            {
                viewHolder = convertView.Tag as HeaderCardViewHolder;
            }

            viewHolder.TopBar.Visibility = vm.Position == Position.Bottom || vm.Position == Position.Middle ? ViewStates.Visible : ViewStates.Invisible;

            viewHolder.BottomBar.Visibility = vm.Position == Position.Top || vm.Position == Position.Middle ? ViewStates.Visible : ViewStates.Invisible;

            viewHolder.MainText.Text = vm.Title;

            return convertView;
        }
		public void OnGUI(Rect rect, IListItem listItem, bool selected)
		{
			var item = listItem as CodeCompletionListItem;
			if (item == null)
			{
				Debug.LogError("item is not a CodeCompletionListItem");
				return;
			}
			
			const float iconSize = 16f;
			const float spaceBetween = 2f;
			const float margin = 5f;
			const float textOffset = margin + iconSize + spaceBetween;

			// Icon
			Texture2D icon = GetIconFor(item);
			if (icon != null)
				GUI.DrawTexture(new Rect(rect.x + margin, rect.y, iconSize, iconSize), icon);

			// Text
			InitRichTextFor(item);
			_guiContent.text = item.RichText;
			GUI.Label(new Rect(rect.x + textOffset, rect.y, rect.width - textOffset, rect.height), _guiContent, selected ? _textSelected : _text);
		}
Exemplo n.º 42
0
 public void ReFillList(IListItem item)
 {
     if (item == this.rootItem)
     {
         FillList();
     }
 }
Exemplo n.º 43
0
        public void SetRootItem(IListItem rootItem)
        {
            this.rootItem = rootItem;

            this.Invoke(new UpdateListHandler(this.FillListInternal));
        }
Exemplo n.º 44
0
 public ListItemWidget()
 {
     mListItem = null;
 }
Exemplo n.º 45
0
 public void ReFillList(IListItem changedItem)
 {
     if (null != this.infoView)
     {
         this.infoView.ReFillList(changedItem);
     }
 }
Exemplo n.º 46
0
		public TreeGridNode(TreeGridView owner, IListItem content):this(owner)
		{
			this.content = content;
		}
Exemplo n.º 47
0
 public IListNode Add(string text){
     IListItem item = new ListItem{Text = text};
     LastItem = item;
     ChildrenNodes.Add(item);
     return this;
 }
Exemplo n.º 48
0
		public void Configure (IListItem item)
		{
			ConfigureSubviews (item);

			ContentView.LayoutIfNeeded ();
		}
Exemplo n.º 49
0
 public void SetItem(IListItem value)
 {
     var imgitem = value as IImageListItem;
     if (imgitem != null && imgitem.Image != null)
         this.Image = imgitem.Image.ControlObject as NSImage;
     this.Text = (NSString)value.Text;
 }
Exemplo n.º 50
0
        public static View SetupMenuCell(int position, IListItem inVm, View convertView)
        {
            var vm = inVm as BaseMenuItemViewModel;

            var inflater = LayoutInflater.FromContext(Application.Context);

            MenuViewHolder viewHolder = null;

            if (convertView == null)
            {
                convertView = inflater.Inflate(Resource.Layout.DrawerCell, null, false);
                convertView.Tag = new MenuViewHolder
                    {
                        Image = convertView.FindViewById<ImageView>(Resource.Id.DrawerCellImage),
                        Title = convertView.FindViewById<TextView>(Resource.Id.DrawerCellText),
                        Subtitle = convertView.FindViewById<TextView>(Resource.Id.DrawerCellFooterText),
                        HolderVm = vm
                    };
                viewHolder = convertView.Tag as MenuViewHolder;
            }
            else
            {
                var oldViewHolder = convertView.Tag as MenuViewHolder;
                //null check and see if the viewHolder's Vm is the same type as our current vm
                if (oldViewHolder != null && oldViewHolder.HolderVm.GetType() != vm.GetType())
                {
                    //They are different, so lets unbind the previous vm's property changed
                    if(oldViewHolder.PropertyChanger != null)
                        oldViewHolder.HolderVm.PropertyChanged -= oldViewHolder.PropertyChanger;
                    //Lets go ahead and remove the on select method if it exists
                    if(oldViewHolder.OnSelect != null)
                        convertView.Click -= oldViewHolder.OnSelect;

                    viewHolder = oldViewHolder;
                    viewHolder.HolderVm = vm;
                }
                else
                    return convertView;
            }

            viewHolder.Image.SetImageResource(DrawableHelpers.GetDrawableResourceIdViaReflection(vm.ImageName));
            viewHolder.Title.Text = vm.Title;
            viewHolder.Subtitle.Text = vm.Subtitle;

            viewHolder.PropertyChanger = (object sender, System.ComponentModel.PropertyChangedEventArgs e) =>
                {
                    var senderVm = sender as BaseMenuItemViewModel;
                    switch (e.PropertyName)
                    {
                        case "Title":
                            viewHolder.Title.Text = senderVm.Title;
                            break;
                        case "Subtitle":
                            viewHolder.Subtitle.Text = senderVm.Subtitle;
                            break;
                        case "ImageName":
                            viewHolder.Image.SetImageResource(
                                DrawableHelpers.GetDrawableResourceIdViaReflection(senderVm.ImageName));
                            break;
                        case "UserInteractionEnabled":
                            convertView.Click -= viewHolder.OnSelect;
                            if(vm.UserInteractionEnabled)
                                convertView.Click += viewHolder.OnSelect;
                            break;
                    }
                };
            
            viewHolder.OnSelect = (sender, eventargs) => vm.Selected();

            vm.PropertyChanged += viewHolder.PropertyChanger;

            if (vm.UserInteractionEnabled)
            {
                convertView.Click += viewHolder.OnSelect;
            }

            convertView.Tag = viewHolder;

            return convertView;
        }
Exemplo n.º 51
0
        private View GetCell(int position, IListItem cVm, View convertView)
        {
            View cardCell = null;

            allViews.Remove(convertView);

            switch (cVm.ListItemType)
            {
                case ListItemType.Default:
                    cardCell = AdapterHelpers.ProcessSocialCard(position, cVm as BaseContentCardViewModel, convertView, LayoutInflater);
                    break;
                case ListItemType.Header:
                    CleanupCard(convertView);
                    cardCell = AdapterHelpers.ProcessHeaderCard(position, cVm, convertView);
                    break;
                case ListItemType.MenuItem:
                default:
                    CleanupCard(convertView);
                    break;
            }
            if(cardCell == null)
                cardCell = LayoutInflater.Inflate(Resource.Layout.DefaultCell, null, false);

            allViews.Add(cardCell);
            return cardCell;
        }
Exemplo n.º 52
0
 public void _setListItem(IListItem nListItem)
 {
     this.Text = nListItem._getListItemName();
     nListItem.m_tListItemNameChange += this._setListSubItemName;
 }
Exemplo n.º 53
0
 protected void OnItemSelected(IListItem item)
 {
     if (null != this.ItemSelected)
     {
         this.ItemSelected(item);
     }
 }
Exemplo n.º 54
0
		public  MacImageData(IListItem item)
		{
			SetItem(item);
		}
Exemplo n.º 55
0
 public ListAdapter(Context context, IListItem[] attributes)
 {
     this.context = context;
     items = attributes;
 }
Exemplo n.º 56
0
    public static int Main()
    {
        IListItem test = new IListItem();

        TestLibrary.TestFramework.BeginTestCase("IListItem");

        if (test.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return 100;
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return 0;
        }
    }
Exemplo n.º 57
0
		protected abstract void ConfigureSubviews (IListItem item);
Exemplo n.º 58
0
 public ListItemEventArgs(IListItem listItem)
 {
     this.listItem = listItem;
 }
Exemplo n.º 59
0
        public void UpdateMenu(IListItem item)
        {
            this.item = item;

            if (null == this.item)
            {
                mnuProperties.Enabled = false;
                mnuDel.Enabled = false;
                mnuRename.Enabled = false;
                mnuNewCat.Enabled = false;
                mnuNewBox.Enabled = false;
                mnuNewDisk.Enabled = false;
                mnuNewImage.Enabled = false;
            }
            else
            {
                mnuProperties.Enabled = this.item.HasProperties();
                mnuDel.Enabled = this.item.CanBeDeleted();
                mnuRename.Enabled = this.item.CanBeRenamed();
                mnuNewCat.Enabled = this.item.CanContainCategory();
                mnuNewBox.Enabled = this.item.CanContainBox();
                mnuNewDisk.Enabled = this.item.CanContainDisk();
                mnuNewImage.Enabled = this.item.CanContainImage();
            }
        }
Exemplo n.º 60
0
        void CodeCompletionCallback(IListItem selectedItem, int selectedIndex)
        {
            var item = selectedItem as CodeCompletionListItem;

            TextSpan curWord = _codeView.PreviousWordSpan();
            int delta = item.Text.Length - curWord.Length;
            int newColumn = _codeView.Caret.Column + delta;

            _document.Delete(curWord.Start, curWord.Length);
            _document.Insert(curWord.Start, item.Text);
            _codeView.Caret.SetPosition(_codeView.Caret.Row, newColumn);
            _codeView.SetKeyboardFocus();
        }