Exemplo n.º 1
0
        internal Stopwatch(TeaTimer._TeaTimer oTT, TeaTimer oParent, double dOpacity)
        {
            InitializeComponent();
            this._oTT     = oTT;
            this._oParent = oParent;

            //get embedded images
            System.Reflection.Assembly oAssembly = System.Reflection.Assembly.GetExecutingAssembly();
            imgPause      = new Bitmap(oAssembly.GetManifestResourceStream("TeaTimer.smallpause.gif"));
            imgPlay       = new Bitmap(oAssembly.GetManifestResourceStream("TeaTimer.smallplay.gif"));
            btnStop.Image = new Bitmap(oAssembly.GetManifestResourceStream("TeaTimer.smallstop.gif"));

            //tooltips
            tip.SetToolTip(btnStop, "Stop and Remove timer");
            tip.SetToolTip(btnPause, "Pause/Resume timer");
            tip.SetToolTip(tbarOpacity, "Adjust opacity");

            updatePauseBtn();
            TeaTimer.dispIcon(pbxIcon, oTT.VisualAlert);
            update();
            FadeForm(dOpacity);
            tbarOpacity.Value = (int)(dOpacity * 100);

            //event handlers
            timUpdate.Tick     += new EventHandler(timUpdate_Tick);
            _oExpired           = new EventHandler(_oTT_Expired);
            _oTT.Expired       += _oExpired;
            _oStatusChanged     = new EventHandler(_oTT_StatusChanged);
            _oTT.StatusChanged += _oStatusChanged;

            timUpdate.Start();
        }
Exemplo n.º 2
0
 internal Stopwatch(EventHandler oScrollHandler, double dOpacity)
 {
     InitializeComponent();
     TeaTimer.dispIcon(pbxIcon, "App.ico");
     this.Text        = "Set my opactiy";
     lblName.Text     = "Slide me -->";
     btnPause.Visible = false;
     btnStop.Visible  = false;
     FadeForm(dOpacity);
     tbarOpacity.Value   = (int)(dOpacity * 100);
     tbarOpacity.Scroll += oScrollHandler;
     tip.SetToolTip(tbarOpacity, "Adjust opacity");
 }
Exemplo n.º 3
0
        public TimerPop(string sName, string sIcon, string sSoundFile, bool bMovable)
        {
            InitializeComponent();

            this.FormBorderStyle = bMovable?FormBorderStyle.FixedToolWindow:FormBorderStyle.None;
            lblName.Text         = sName;
            this.Text            = sName + " (Tea Timer)";
            if (sIcon != null)
            {
                TeaTimer.dispIcon(pictureBox1, sIcon);
            }
            this.FadeForm(Fade.Up);
            if (sSoundFile != null)
            {
                TeaTimer.playSound(sSoundFile);
            }
        }