예제 #1
0
        public MainUIManager(ViewGui viewGui)
        {
            this.viewGui = viewGui;

            actions = new ActionGroup("Actions");

            ActionEntry actionEntryQuit;

            actionEntryQuit = new ActionEntry("Quitter", Gtk.Stock.Quit, null, "<control>Q", "Quitter l'environnement Sofia", new EventHandler(Quit));

            ActionEntry[] entries = new ActionEntry [] {
                new ActionEntry("Fichier", null, "_Fichier", null, null, null),
                new ActionEntry("Editer", null, "Editio_n", null, null, null),
                new ActionEntry("Rechercher", null, "Recher_cher", null, null, null),
                new ActionEntry("Aide", null, "_Aide", null, null, null),
                actionEntryQuit,
                new ActionEntry("Préférences", Gtk.Stock.Preferences, null, null, "Préférences", new EventHandler(Preferences)),
                new ActionEntry("RubriquesAide", Gtk.Stock.Help, "Rubriques d'_aide", "F1", "Aide - Rubriques d'aide", new EventHandler(Help)),
                new ActionEntry("APropos", Gtk.Stock.About, null, null, "A propos de l'environnement Sofia", new EventHandler(About))
            };
            actions.Add(entries);

            InsertActionGroup(actions, 0);
            this.viewGui.AddAccelGroup(AccelGroup);
            uint id = 0;

            try {
                id = AddUiFromFile("MainUIDef.xml");
            }
            catch {
                RemoveUi(id);
            }
        }
예제 #2
0
        public MainUIManager(ViewGui viewGui)
        {
            this.viewGui = viewGui;

            actions = new ActionGroup ("Actions");

            ActionEntry actionEntryQuit;
            actionEntryQuit = new ActionEntry("Quitter", Gtk.Stock.Quit,  null, "<control>Q", "Quitter l'environnement Sofia", new EventHandler (Quit));

            ActionEntry[] entries = new ActionEntry [] {
                new ActionEntry ("Fichier", null,	"_Fichier", null, null, null),
                new ActionEntry ("Editer", null,	"Editio_n", null, null, null),
                new ActionEntry ("Rechercher", null,	"Recher_cher", null, null, null),
                new ActionEntry ("Aide", null, "_Aide",  null, null, null),
                actionEntryQuit,
                new ActionEntry ("Préférences", Gtk.Stock.Preferences, null, null, "Préférences", new EventHandler (Preferences)),
                new ActionEntry ("RubriquesAide", Gtk.Stock.Help,  "Rubriques d'_aide",	 "F1", "Aide - Rubriques d'aide", new EventHandler (Help)),
                new ActionEntry ("APropos", Gtk.Stock.About, null, null, "A propos de l'environnement Sofia", new EventHandler (About))
            };
            actions.Add (entries);

            InsertActionGroup(actions, 0);
            this.viewGui.AddAccelGroup(AccelGroup);
            uint id = 0;
            try {
                id = AddUiFromFile("MainUIDef.xml");
            }
            catch {
                RemoveUi(id);
            }
        }
예제 #3
0
 /// <summary>
 /// Création de l'interface graphique 
 /// </summary>
 public void CreateGui(IController controller)
 {
     viewGui = new ViewGui();
     viewGui.Controller = controller;
     viewGui.Initialize();
 }
예제 #4
0
 /// <summary>
 /// Création de l'interface graphique
 /// </summary>
 public void CreateGui(IController controller)
 {
     viewGui            = new ViewGui();
     viewGui.Controller = controller;
     viewGui.Initialize();
 }