Esempio n. 1
0
        void addToLine(string chars)
        {
            TweenLabel T = tweenLabels[tweenLabels.Count - 1];

            T.Text += chars;
            T.Text  = HttpUtility.UrlDecode(T.Text, Encoding.UTF8);
            T.Refresh();
        }
        void nTL_historyTimeout(TweenLabel l)
        {
            tweenLabels.Remove(l);

            if (settings.EnableWindowFade && tweenLabels.Count == 0)
            {
                FadeOut();
            }
        }
        public static TweenLabel getNewLabel(Form form, SettingsStore s)
        {
            if (unusedLabels.Count > 0)
            {
                return(unusedLabels.Pop().Init(form, s));
            }
            TweenLabel t = new TweenLabel().Init(form, s);

            t.debug_id    = debug_nextId;
            debug_nextId += 1;
            return(t);
        }
Esempio n. 4
0
        private bool removeLastChar()
        {
            TweenLabel T = tweenLabels[tweenLabels.Count - 1];

            if (T.Text.Length == 0)
            {
                return(false);
            }
            T.Text = T.Text.Substring(0, T.Text.Length - 1);
            NumberOfDeletionsAllowed -= 1;
            T.Text = HttpUtility.UrlDecode(T.Text, Encoding.UTF8);
            T.Refresh();
            return(true);
        }
Esempio n. 5
0
        void addNextLine(string chars)
        {
            TweenLabel nTL = TweenLabel.getNewLabel(this, settings);

            nTL.Size            = getLabelSize();
            nTL.Location        = getLabelStartPosition();
            nTL.historyTimeout += nTL_historyTimeout;

            nTL.Text = chars;
            this.Controls.Add(nTL);
            nTL.BringToFront();
            if (SettingsModeActivated)
            {
                BringSettingsControlsToFront();
            }

            int u = 0;

            foreach (Control T in this.Controls)
            {
                if (T.GetType() == typeof(TweenLabel) && T != nTL)
                {
                    u++;
                    ((TweenLabel)T).TweenMove(getLabelMoveDirection());
                }
            }

            nTL.tweenFadeIn();
            tweenLabels.Add(nTL);

            while (tweenLabels.Count > settings.HistoryLength)
            {
                System.Diagnostics.Debug.WriteLine(String.Format("Dele{0} {1} u{2}",
                                                                 tweenLabels.Count, this.Controls.Count, u));

                tweenLabels[0].FadeOutAndRecycle(null);
                tweenLabels.RemoveAt(0);
            }
        }
Esempio n. 6
0
 void nTL_historyTimeout(TweenLabel l)
 {
     tweenLabels.Remove(l);
 }