예제 #1
0
        public override void OnCreateOptionsMenu(IMenu menu, MenuInflater inflater)
        {
            base.OnCreateOptionsMenu(menu, inflater);
            var channelTab = ViewModel.SelectedTab as ChannelConversationViewModel;

            if (channelTab != null)
            {
                inflater.LocalizedInflate(Resource.Menu.chat_channel, menu);
                if (channelTab.ToggleAdsCommand.CanExecute())
                {
                    menu.Add(Menu.None, 1, 1, channelTab.ToggleAdsCommandName);                                                          //TODO
                }
            }
            else if (ViewModel.SelectedTab is CharacterConversationViewModel)
            {
                inflater.LocalizedInflate(Resource.Menu.chat_character, menu);
            }
            menu.Add(Menu.None, 2, 1, Strings.Chat_SaveChannels);             //TODO
        }
예제 #2
0
 public override bool OnCreateOptionsMenu(IMenu menu)
 {
     base.OnCreateOptionsMenu(menu);
     if (ViewModel.SelectedMember == null)
     {
         return(true);
     }
     MenuInflater.LocalizedInflate(Resource.Menu.channel_members, menu);
     if (ViewModel.SelectedMember.ChannelAdminActionsAvailable)
     {
         menu.Add(Menu.None, 1, Menu.None, Strings.Channel_Kick);
         menu.Add(Menu.None, 2, Menu.None, Strings.Channel_Ban);
         menu.Add(Menu.None, 3, Menu.None, ViewModel.SelectedMember.ChannelToggleOpCommandName);
     }
     return(true);
 }
예제 #3
0
        public override void OnCreateOptionsMenu(IMenu menu, MenuInflater inflater)
        {
            base.OnCreateOptionsMenu(menu, inflater);
            var character = ViewModel.SelectedCharacter;

            if (character == null)
            {
                return;
            }
            if (character.AdminActionsAvailable)
            {
                menu.Add(Menu.None, 1, Menu.None, Strings.Character_Kick);
                menu.Add(Menu.None, 2, Menu.None, Strings.Character_Ban);
                menu.Add(Menu.None, 3, Menu.None, character.ToggleOpCommandName);
            }
            inflater.LocalizedInflate(Resource.Menu.people, menu);
        }
예제 #4
0
 public override void OnCreateOptionsMenu(IMenu menu, MenuInflater inflater)
 {
     base.OnCreateOptionsMenu(menu, inflater);
     inflater.LocalizedInflate(Resource.Menu.channels, menu);
 }