protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Main);

            RecyclerView        recyclerView  = FindViewById <RecyclerView>(Resource.Id.recycler_view);
            LinearLayoutManager layoutManager = new LinearLayoutManager(this);

            recyclerView.SetLayoutManager(layoutManager);

            List <Item> items = new List <Item>();

            items.Add(new Item(Item.Types.Category, "Telegram"));
            Item media = new Item(Item.Types.Category, "Media");

            media.items = new List <Item>()
            {
                new Item(Item.Types.Item, "Tenor"), new Item(Item.Types.Item, "Giphy")
            };
            items.Add(media);
            Item deprecated = new Item(Item.Types.Category, "Deprecated");

            deprecated.items = new List <Item>()
            {
                new Item(Item.Types.Item, "WhatsApp")
            };
            items.Add(deprecated);

            foreach (Item category in items)
            {
                category.data = new ItemData(new CategoryDelegates(category));
                if (category.items != null)
                {
                    foreach (Item item in category.items)
                    {
                        item.data = new ItemData(new ItemDelegates(item));
                    }
                }
            }

            CategoriesAdapterData adapterData = new CategoriesAdapterData(Resource.Layout.list_item_tag_group, Resource.Layout.list_item_tag);

            Helper.Adapter adapter = new Helper.Adapter(convertItemToIItem(items), adapterData);
            adapter.Set(recyclerView);
        }
Beispiel #2
0
 private void cboAdapterName_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (this.cboAdapterName.Text.Trim() != "")
         {
             Helper.Adapter list = Helper.GetAdapterInfo(this.cboAdapterName.Text.Trim());
             this.textBoxIPPrivate.Text     = list.IPAdress ?? "";
             this.textBoxSubnetPrivate.Text = list.Subnet ?? "";
             if (this.textBoxGatewayPrivate.Enabled)
             {
                 this.textBoxGatewayPrivate.Text = list.Gateway ?? "";
             }
             if (this.textBoxDNSPrivate.Enabled)
             {
                 this.textBoxDNSPrivate.Text = list.DNS ?? "";
             }
         }
     }
     catch (Exception ex)
     {
         Program.Log.Write(LogType.Error, ex.Message);
     }
 }