Beispiel #1
0
        private void AnimateTimer_Tick(object sender, EventArgs e)
        {
            if (FormEvent == eClose || FormEvent == eHide)
            {
                if (Convert.ToDecimal(this.Opacity) != Convert.ToDecimal(0.00))
                {
                    this.Opacity = Convert.ToDouble(Convert.ToDecimal(this.Opacity) - Convert.ToDecimal(0.05));
                }
                else
                {
                    AnimateTimer.Enabled = false;

                    if (FormEvent == eClose)
                    {
                        bShowed = false;

                        if (ClickEvent == nActivateModule)
                        {
                            LightStartForm.Activate();
                            //ActiveNotifySystem.StartModule(ModuleBtnName);

                            LightStartForm.StartModuleFromNotify(ModuleID);

                            this.Close();
                            return;
                        }

                        //if (ClickEvent == nActivateInfinium)
                        //{
                        //    LightStartForm.Activate();

                        //    this.Close();
                        //    return;
                        //}

                        if (ClickEvent == nCloseNotifyOnly)
                        {
                            this.Close();
                            return;
                        }
                    }

                    if (FormEvent == eHide)
                    {
                        this.Hide();
                    }
                }

                return;
            }


            if (FormEvent == eShow || FormEvent == eShow)
            {
                if (this.Opacity != 1)
                {
                    this.Opacity += 0.05;
                }
                else
                {
                    AnimateTimer.Enabled = false;
                    SplashForm.CloseS    = true;
                    bShowed = true;
                }

                return;
            }
        }
        private void AnimateTimer_Tick(object sender, EventArgs e)
        {
            if (!DatabaseConfigsManager.Animation)
            {
                this.Opacity = 1;

                if (FormEvent == eClose || FormEvent == eHide)
                {
                    AnimateTimer.Enabled = false;

                    if (FormEvent == eClose)
                    {
                        LightStartForm.CloseForm(this);
                    }

                    return;
                }

                if (FormEvent == eShow)
                {
                    AnimateTimer.Enabled = false;
                    SplashForm.CloseS    = true;
                    return;
                }
            }

            if (FormEvent == eClose || FormEvent == eHide)
            {
                if (Convert.ToDecimal(this.Opacity) != Convert.ToDecimal(0.00))
                {
                    this.Opacity = Convert.ToDouble(Convert.ToDecimal(this.Opacity) - Convert.ToDecimal(0.05));
                }
                else
                {
                    AnimateTimer.Enabled = false;

                    if (FormEvent == eClose)
                    {
                        LightStartForm.CloseForm(this);
                    }

                    if (FormEvent == eHide)
                    {
                        LightStartForm.Activate();
                    }
                }

                return;
            }


            if (FormEvent == eShow || FormEvent == eShow)
            {
                if (this.Opacity != 1)
                {
                    this.Opacity += 0.05;
                }
                else
                {
                    AnimateTimer.Enabled = false;
                    SplashForm.CloseS    = true;
                }

                return;
            }
        }