예제 #1
0
    protected bool PulseGTK()
    {
        if (quitNow)
        {
            return(false);
        }

        //if( ( needEndSplashWin && pingEnd )
        //		|| ! thread.IsAlive) {
        if (needEndSplashWin || !thread.IsAlive)
        {
            LogB.ThreadEnding();
            fakeSplashButton.Click();

            LogB.Information("splash window ending here");
            LogB.ThreadEnded();
            return(false);
        }
        //need to do this, if not it crashes because chronopicWin gets died by thread ending
        splashWin = SplashWindow.Show();
        //Log.WriteLine("splash");

        if (updatingDB)
        {
            splashWin.ShowProgressbar("updating");
            splashWin.UpdateLabel(splashMessage + " " + Sqlite.PrintConversionText());

            splashWin.UpdateProgressbar("version", Sqlite.PrintConversionVersion());
            splashWin.UpdateProgressbar("rate", Sqlite.PrintConversionRate());
            splashWin.UpdateProgressbar("subrate", Sqlite.PrintConversionSubRate());
        }
        else if (creatingDB)
        {
            splashWin.ShowProgressbar("creating");
            splashWin.UpdateProgressbar("version", Sqlite.PrintCreation());

            //splashWin.UpdateProgressbar("rate", Sqlite.PrintConversionRate());
            splashWin.UpdateProgressbar("subrate", Sqlite.PrintConversionSubRate());
        }

        if (needUpdateSplashMessage)
        {
            splashWin.UpdateLabel(splashMessage);
            needUpdateSplashMessage = false;
        }


        Thread.Sleep(50);
        //Log.Write(" (PulseGTK:" + thread.ThreadState.ToString() + ") ");
        return(true);
    }
예제 #2
0
    protected bool PulseGTK()
    {
        if(quitNow)
            return false;

        if( ( needEndSplashWin && pingEnd )
                || ! thread.IsAlive) {
            fakeSplashButton.Click();
            Log.Write("splash window ending here");
            return false;
        }
        //need to do this, if not it crashes because chronopicWin gets died by thread ending
        splashWin = SplashWindow.Show();
        //Log.WriteLine("splash");

        if(updatingDB) {
            splashWin.ShowProgressbar("updating");
            splashWin.UpdateLabel(splashMessage + " " + Sqlite.PrintConversionText());

            splashWin.UpdateProgressbar("version", Sqlite.PrintConversionVersion());
            splashWin.UpdateProgressbar("rate", Sqlite.PrintConversionRate());
            splashWin.UpdateProgressbar("subrate", Sqlite.PrintConversionSubRate());

        } else if(creatingDB) {
            splashWin.ShowProgressbar("creating");
            splashWin.UpdateProgressbar("version", Sqlite.PrintCreation());

            //splashWin.UpdateProgressbar("rate", Sqlite.PrintConversionRate());
            splashWin.UpdateProgressbar("subrate", Sqlite.PrintConversionSubRate());
        }

        if(needUpdateSplashMessage) {
            splashWin.UpdateLabel(splashMessage);
            needUpdateSplashMessage = false;
        }

        Thread.Sleep (50);
        //Log.Write(" (PulseGTK:" + thread.ThreadState.ToString() + ") ");
        return true;
    }