Esempio n. 1
0
    static public SessionUploadWindow Show(Gtk.Window parent)
    {
        if (SessionUploadWindowBox == null)
        {
            SessionUploadWindowBox = new SessionUploadWindow(parent);
        }
        SessionUploadWindowBox.session_upload.Show();

        return(SessionUploadWindowBox);
    }
Esempio n. 2
0
    private static bool pulseGTKServer()
    {
        if (!thread.IsAlive)
        {
            sessionUploadWin.UploadFinished();
            LogB.Information("dying");
            return(false);
        }

        if (serverSessionError)
        {
            new DialogMessage(Constants.MessageTypes.WARNING, Catalog.GetString("Error uploading session to server"));
            return(false);
        }

        //need to do this, if not it crashes because chronopicWin gets died by thread ending
        sessionUploadWin = SessionUploadWindow.Show(app1);

        if (countPersons == 0)
        {
            sessionUploadWin.PulseProgressbar();
        }

        //activity on pulsebar
        sessionUploadWin.UpdatePulsebar();

        if (needUpdateServerSession && !updatingServerSession)
        {
            //prevent that FillData is called again with same data
            updatingServerSession = true;

            //update progressBar
            sessionUploadWin.UpdateProgressbar(
                Util.DivideSafeFraction(++countPersons, progressBarPersonsNum));

            //fill data
            sessionUploadWin.FillData(sessionUploadPersonData);

            //not need to update until there's more data coming from the other thread
            updatingServerSession   = false;
            needUpdateServerSession = false;
        }

        Thread.Sleep(50);
        LogB.Debug(thread.ThreadState.ToString());
        return(true);
    }
Esempio n. 3
0
 void on_session_upload_delete_event(object o, DeleteEventArgs args)
 {
     SessionUploadWindowBox.session_upload.Hide();
     SessionUploadWindowBox = null;
 }
Esempio n. 4
0
 void on_button_close_clicked(object o, EventArgs args)
 {
     SessionUploadWindowBox.session_upload.Hide();
     SessionUploadWindowBox = null;
 }
Esempio n. 5
0
    public static SessionUploadWindow Show(Gtk.Window parent)
    {
        if (SessionUploadWindowBox == null) {
            SessionUploadWindowBox = new SessionUploadWindow (parent);
        }
        SessionUploadWindowBox.session_upload.Show ();

        return SessionUploadWindowBox;
    }
Esempio n. 6
0
    private static bool pulseGTKServer()
    {
        if(! thread.IsAlive) {
            sessionUploadWin.UploadFinished();
            Log.Write("dying");
            return false;
        }

        if (serverSessionError) {
            new DialogMessage(Constants.MessageTypes.WARNING, Catalog.GetString("Error uploading session to server"));
            return false;
        }

        //need to do this, if not it crashes because chronopicWin gets died by thread ending
        sessionUploadWin = SessionUploadWindow.Show(app1);

        if(countPersons == 0)
            sessionUploadWin.PulseProgressbar();

        //activity on pulsebar
        sessionUploadWin.UpdatePulsebar();

        if(needUpdateServerSession && !updatingServerSession) {
            //prevent that FillData is called again with same data
            updatingServerSession = true;

            //update progressBar
            sessionUploadWin.UpdateProgressbar(
                    Util.DivideSafeFraction(++countPersons, progressBarPersonsNum));

            //fill data
            sessionUploadWin.FillData(sessionUploadPersonData);

            //not need to update until there's more data coming from the other thread
            updatingServerSession = false;
            needUpdateServerSession = false;
        }

        Thread.Sleep (50);
        Log.Write(thread.ThreadState.ToString());
        return true;
    }
Esempio n. 7
0
 void on_session_upload_delete_event(object o, DeleteEventArgs args)
 {
     SessionUploadWindowBox.session_upload.Hide();
     SessionUploadWindowBox = null;
 }
Esempio n. 8
0
 void on_button_close_clicked(object o, EventArgs args)
 {
     SessionUploadWindowBox.session_upload.Hide();
     SessionUploadWindowBox = null;
 }