public override void OnAttached()
        {
            base.OnAttached();
            BotViewModel   botViewModel = Bot.GetViewModel();
            LayoutDocument layout       = botViewModel.AddDocument(this, () => new CharacterInfoView());

            layout.Title    = "Character Info";
            layout.CanClose = false;
        }
        public static void HandleBotAddedMessage(object dummy, BotAddedMessage message)
        {
            var model = new BotViewModel(message.Bot);
            var layout = UIManager.Instance.AddDocument(model, () => new BotControl());
            if (layout == null) return;
            layout.Title = "Bot #" + message.Bot.Id;

            layout = model.AddDocument(new GeneralTabViewModel(message.Bot), () => new GeneralTab());
            layout.Title = "General";
        }
Example #3
0
        public override void OnAttached()
        {
            base.OnAttached();

            Bot.Dispatcher.MessageDispatched += OnMesssageDispatched;

            BotViewModel   viewModel = Bot.GetViewModel();
            LayoutDocument layout    = viewModel.AddDocument(this, () => new SnifferView());

            layout.Title    = "Sniffer";
            layout.CanClose = false;

            View.Dispatcher.Invoke(new Action(() => (m_collectionViewSource = View.Resources["Messages"] as CollectionViewSource).Filter += FilterMethod));
        }
Example #4
0
        public static void HandleBotAddedMessage(object dummy, BotAddedMessage message)
        {
            var model  = new BotViewModel(message.Bot);
            var layout = UIManager.Instance.AddDocument(model, () => new BotControl());

            if (layout == null)
            {
                return;
            }
            layout.Title = "Bot #" + message.Bot.Id;

            layout       = model.AddDocument(new GeneralTabViewModel(message.Bot), () => new GeneralTab());
            layout.Title = "General";
        }
        public override void OnAttached()
        {
            base.OnAttached();

            var settings = Bot.Settings.GetOrAddEntry <BasicPluginSettings>();

            m_floodEntries         = new ObservableCollection <FloodEntry>(settings.FloodEntries);
            m_readOnlyFloodEntries = new ReadOnlyObservableCollection <FloodEntry>(m_floodEntries);

            BotViewModel   viewModel = Bot.GetViewModel();
            LayoutDocument layout    = viewModel.AddDocument(this, () => new ChatView());

            layout.Title    = "Chat";
            layout.CanClose = false;
            View.Dispatcher.Invoke(new Action(() => m_channelNameConverter = View.Resources["ChannelNameConverter"] as ChannelNameConverter));
        }