コード例 #1
0
ファイル: chronopic.cs プロジェクト: dineshkummarc/chronojump
    private void updateChronopicWin(bool state, string message)
    {
        Log.WriteLine("updateChronopicWin-1");

        //need to do this, if not it crashes because chronopicConnectionWin gets died by thread ending
        chronopicConnectionWin = ChronopicConnection.Show();

        Log.WriteLine("updateChronopicWin-2");
        if(state)
            chronopicConnectionWin.Connected(message);
        else
            chronopicConnectionWin.Disconnected(message);

        needUpdateChronopicWin = false;
    }
コード例 #2
0
ファイル: chronopic.cs プロジェクト: dineshkummarc/chronojump
    protected bool PulseGTK()
    {
        if(needUpdateChronopicWin || ! thread.IsAlive) {
            fakeConnectionButton.Click();
            Log.Write("dying");
            return false;
        }
        //need to do this, if not it crashes because chronopicConnectionWin gets died by thread ending
        chronopicConnectionWin = ChronopicConnection.Show();
        chronopicConnectionWin.Pulse();

        Thread.Sleep (50);
        Log.Write(thread.ThreadState.ToString());
        return true;
    }
コード例 #3
0
ファイル: chronopic.cs プロジェクト: dineshkummarc/chronojump
    void prepareChronopicConnection()
    {
        chronopicConnectionWin = ChronopicConnection.Show();
        chronopicConnectionWin.LabelFeedBackReset();

        //		chronopicConnectionWin.Button_cancel.Clicked += new EventHandler(on_chronopic_cancelled);

        fakeConnectionButton = new Gtk.Button();
        fakeConnectionButton.Clicked += new EventHandler(on_chronopic_detection_ended);

        needUpdateChronopicWin = false;
        thread = new Thread(new ThreadStart(waitChronopicStart));
        GLib.Idle.Add (new GLib.IdleHandler (PulseGTK));
        thread.Start();
    }
コード例 #4
0
    public static ChronopicConnection Show()
    {
        if (ChronopicConnectionBox == null) {
            ChronopicConnectionBox = new ChronopicConnection();
        }
        ChronopicConnectionBox.chronopic_connection.Show ();

        ChronopicConnectionBox.initialize ();

        return ChronopicConnectionBox;
    }