예제 #1
0
    private void on_treeview_load_button_release_event(object o, ButtonReleaseEventArgs args)
    {
        Gdk.EventButton e = args.Event;
        if (e.Button == 3) {
            Menu myMenu = new Menu ();
            Gtk.MenuItem myItem;

            myItem = new MenuItem (Catalog.GetString("Delete selected"));
            myItem.Activated += on_delete_selected_row_clicked;
            myMenu.Attach( myItem, 0, 1, 0, 1 );

            myMenu.Popup();
            myMenu.ShowAll();
        }
    }
예제 #2
0
    private void treeviewRunsIntervalContextMenu(RunInterval myRun)
    {
        Menu myMenu = new Menu ();
        Gtk.MenuItem myItem;

        /*
        myItem = new MenuItem ( Catalog.GetString("Play Video") + " " +
                myRun.Type + " (" + myRun.PersonName + ")");
        if(File.Exists(Util.GetVideoFileName(currentSession.UniqueID,
                Constants.TestTypes.RUN_I, myTreeViewRunsInterval.EventSelectedID))) {
            myItem.Activated += on_video_play_selected_run_interval_clicked;
            myItem.Sensitive = true;
        } else
            myItem.Sensitive = false;
        myMenu.Attach( myItem, 0, 1, 0, 1 );
        */

        myItem = new MenuItem ( Catalog.GetString("Edit selected") + " " + myRun.Type + " (" + myRun.PersonName + ")");
        myItem.Activated += on_edit_selected_run_interval_clicked;
        myMenu.Attach( myItem, 0, 1, 0, 1 );

        myItem = new MenuItem ( Catalog.GetString("Repair selected") + " " + myRun.Type + " (" + myRun.PersonName + ")");
        myItem.Activated += on_repair_selected_run_interval_clicked;
        myMenu.Attach( myItem, 0, 1, 1, 2 );

        Gtk.SeparatorMenuItem mySep = new SeparatorMenuItem();
        myMenu.Attach( mySep, 0, 1, 2, 3 );

        myItem = new MenuItem ( Catalog.GetString("Delete selected") + " " + myRun.Type + " (" + myRun.PersonName + ")");
        myItem.Activated += on_delete_selected_run_interval_clicked;
        myMenu.Attach( myItem, 0, 1, 3, 4 );

        myMenu.Popup();
        myMenu.ShowAll();
    }
예제 #3
0
    private void treeviewPersonsContextMenu(Person myPerson)
    {
        Menu myMenu = new Menu ();
        Gtk.MenuItem myItem;

        myItem = new MenuItem ( Catalog.GetString("Edit") + " " + myPerson.Name);
        myItem.Activated += on_edit_current_person_clicked;
        myMenu.Attach( myItem, 0, 1, 0, 1 );

        myItem = new MenuItem ( Catalog.GetString("Show all tests of") + " " + myPerson.Name);
        myItem.Activated += on_show_all_person_events_activate;
        myMenu.Attach( myItem, 0, 1, 1, 2 );

        Gtk.SeparatorMenuItem mySep = new SeparatorMenuItem();
        myMenu.Attach( mySep, 0, 1, 2, 3 );

        myItem = new MenuItem ( string.Format(Catalog.GetString("Delete {0} from this session"),myPerson.Name));
        myItem.Activated += on_delete_current_person_from_session_clicked;
        myMenu.Attach( myItem, 0, 1, 3, 4 );

        myMenu.Popup();
        myMenu.ShowAll();
    }
예제 #4
0
    private void treeviewMultiChronopicContextMenu(MultiChronopic mc)
    {
        Menu myMenu = new Menu ();
        Gtk.MenuItem myItem;

        /*
        myItem = new MenuItem ( Catalog.GetString("Play Video") + " " +
                mc.Type + " (" + mc.PersonName + ")");
        if(File.Exists(Util.GetVideoFileName(currentSession.UniqueID,
                Constants.TestTypes.MULTICHRONOPIC, myTreeViewMultiChronopic.EventSelectedID))) {
            myItem.Activated += on_video_play_selected_multi_chronopic_clicked;
            myItem.Sensitive = true;
        } else
            myItem.Sensitive = false;
        myMenu.Attach( myItem, 0, 1, 0, 1 );
        */

        myItem = new MenuItem ( Catalog.GetString("Edit selected") + " " + mc.Type + " (" + mc.PersonName + ")");
        myItem.Activated += on_edit_selected_multi_chronopic_clicked;
        myMenu.Attach( myItem, 0, 1, 0, 1 );

        /*
        myItem = new MenuItem ( Catalog.GetString("Repair selected") + " " + mc.Type + " (" + mc.PersonName + ")");
        myItem.Activated += on_repair_selected_multi_chronopic_clicked;
        myMenu.Attach( myItem, 0, 1, 2, 3 );
        */

        Gtk.SeparatorMenuItem mySep = new SeparatorMenuItem();
        myMenu.Attach( mySep, 0, 1, 1, 2 );

        myItem = new MenuItem ( Catalog.GetString("Delete selected") + " " + mc.Type + " (" + mc.PersonName + ")");
        myItem.Activated += on_delete_selected_multi_chronopic_clicked;
        myMenu.Attach( myItem, 0, 1, 2, 3 );

        myMenu.Popup();
        myMenu.ShowAll();
    }
예제 #5
0
    private void treeviewJumpsContextMenu(Jump myJump)
    {
        Menu myMenu = new Menu ();
        Gtk.MenuItem myItem;

        /*
        myItem = new MenuItem ( Catalog.GetString("Play Video") + " " +
                myJump.Type + " (" + myJump.PersonName + ")");
        if(File.Exists(Util.GetVideoFileName(currentSession.UniqueID,
                Constants.TestTypes.JUMP, myTreeViewJumps.EventSelectedID))) {
            myItem.Activated += on_video_play_selected_jump_clicked;
            myItem.Sensitive = true;
        } else
            myItem.Sensitive = false;
        myMenu.Attach( myItem, 0, 1, 0, 1 );
        */

        myItem = new MenuItem ( Catalog.GetString("Edit selected") + " " + myJump.Type + " (" + myJump.PersonName + ")");
        myItem.Activated += on_edit_selected_jump_clicked;
        myMenu.Attach( myItem, 0, 1, 0, 1 );

        Gtk.SeparatorMenuItem mySep = new SeparatorMenuItem();
        myMenu.Attach( mySep, 0, 1, 1, 2 );

        myItem = new MenuItem ( Catalog.GetString("Delete selected") + " " + myJump.Type + " (" + myJump.PersonName + ")");
        myItem.Activated += on_delete_selected_jump_clicked;
        myMenu.Attach( myItem, 0, 1, 2, 3 );

        myMenu.Popup();
        myMenu.ShowAll();
    }
예제 #6
0
    private void treeviewContextMenu()
    {
        menuCtx = new Menu ();
        Gtk.MenuItem myItem;

        if(genericWinContextMenu == Constants.ContextMenu.EDITDELETE) {
            myItem = new MenuItem ( Catalog.GetString("Edit selected") );
            myItem.Activated += on_edit_selected_clicked;
            menuCtx.Attach( myItem, 0, 1, 0, 1 );

            myItem = new MenuItem ( Catalog.GetString("Delete selected") );
            myItem.Activated += on_delete_selected_clicked;
            menuCtx.Attach( myItem, 0, 1, 1, 2 );
        }
        else if(genericWinContextMenu == Constants.ContextMenu.DELETE) {
            myItem = new MenuItem ( Catalog.GetString("Delete selected") );
            myItem.Activated += on_delete_selected_clicked;
            menuCtx.Attach( myItem, 0, 1, 0, 1 );
        } else {
            //don't show nothing if there are no options
            menuCtx.Popdown();
            return;
        }

        menuCtx.Popup();
        menuCtx.ShowAll();
    }