예제 #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 void readMessageToStart()
 {
     if (messageToShowOnBoot.Length > 0)
     {
         if (chronojumpHasToExit)
         {
             if (quitNowCjTwoTimes)
             {
                 splashWin.UpdateLabel(messageToShowOnBoot);
                 splashWin.FakeButtonClose.Clicked += new EventHandler(on_message_boot_accepted_quit_not_deleting_runningfilename);
             }
             else
             {
                 messageToShowOnBoot += "\n<b>" + string.Format(Catalog.GetString("Chronojump will exit now.")) + "</b>\n";
                 splashWin.UpdateLabel(messageToShowOnBoot);
                 splashWin.Show_button_open_database_folder();
                 splashWin.Button_close.Clicked += new EventHandler(on_message_boot_accepted_quit_nice);
             }
             splashWin.ShowButtonClose();
         }
         else
         {
             if (configChronojump.Compujump)
             {
                 startChronojump(false);                     //don't sendLog
             }
             else
             {
                 startChronojump(true);                     //sendLog
             }
         }
     }
     else
     {
         startChronojump(false);
     }
 }
예제 #3
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;
    }