Ejemplo n.º 1
0
 private void updateAll(EmoticonLayer emoticonLayer)
 {
     emoticonLayer.SetEmoticons(emoticonDatabase.GetAll(emoticonLayer.Condition));
     emoticonLayer.UpdateElement();
 }
Ejemplo n.º 2
0
        public void Init()
        {
            historyEmoticonLayer = new EmoticonLayer()
            {
                Anchor = MainForm.anchorFull,
                colorScheme = colorScheme,
                MinimalWidth = 80,
                MinimalHeight = 25,
                Font = MainForm.OurFont
            };
            tableLayoutPanelLeftCenter.Controls.Add(historyEmoticonLayer);

            /* Scroll magic */
            historyEmoticonLayer.HorizontalScroll.Maximum = 100;
            historyEmoticonLayer.HorizontalScroll.Visible = false;
            historyEmoticonLayer.HorizontalScroll.Enabled = false;
            historyEmoticonLayer.VerticalScroll.Maximum = 0;
            historyEmoticonLayer.VerticalScroll.Visible = false;
            historyEmoticonLayer.AutoScroll = true;
            database.Subscribe(historyEmoticonLayer, changeEmo);
            database.Subscribe(historyEmoticonLayer, addEmo);
            database.Subscribe(historyEmoticonLayer, deleteEmo);

            historyEmoticonLayer.Start();

            previewEmoticonLayer = new EmoticonLayer()
            {
                Anchor = MainForm.anchorFull,
                colorScheme = colorScheme,
                MinimalWidth = 80,
                MinimalHeight = 25,
                Font = MainForm.OurFont
            };
            tableLayoutPanelLeftBottom.Controls.Add(previewEmoticonLayer);

            previewEmoticonLayer.Start();

            setupTags();
        }
Ejemplo n.º 3
0
        private void addEmoticonTab(string title, Predicate<Emoticon> condition)
        {
            TabPage tabPage = new TabPage() {
                Text = title,
                Anchor = anchorFull
            };
            tabControl.Controls.Add(tabPage);
            formMoveHook.SetupHandlers(tabPage);

            /* Init emoticonLayer */
            EmoticonLayer emoticonLayer = new EmoticonLayer(this)
            {
                Size = tabPage.ClientSize,
                MinimalWidth = 80,
                MinimalHeight = 25,
                Font = Font,
                colorScheme = colorScheme,
                Margin = new Padding(3,3,3,3)
            };
            emoticonLayer.Anchor = anchorFull;
            emoticonLayer.MouseClick += mouseClickHandlerRightClickGoTray;
            formMoveHook.SetupHandlers(emoticonLayer);
            emoticonLayer.SetEmoticons(emoticonDatabase.GetAll(condition));
            emoticonLayer.Condition = condition;

            /* Scroll magic */
            emoticonLayer.HorizontalScroll.Maximum = 100;
            emoticonLayer.HorizontalScroll.Visible = false;
            emoticonLayer.HorizontalScroll.Enabled = false;
            emoticonLayer.VerticalScroll.Maximum = 0;
            emoticonLayer.VerticalScroll.Visible = false;
            emoticonLayer.AutoScroll = true;

            /* Events */
            emoticonDatabase.Subscribe(emoticonLayer, EmoticonAddedHandler);
            emoticonDatabase.Subscribe(emoticonLayer, EmoticonDeletedHandler);
            emoticonDatabase.Subscribe(emoticonLayer, EmoticonChangedHandle);

            tabPage.Controls.Add(emoticonLayer);
        }