Example #1
0
    public void SetPuppetMaster(puppet.PuppetMaster master)
    {
        m_puppetMaster = master;

        m_puppetMaster.RegisterNotificationSubscriber (new puppet.ReceiveNotificationsCallbackType
                                                       (NotificationUpdate));

        /*
        Gtk.TreeViewColumn userColumn = new Gtk.TreeViewColumn ();
        userColumn.Title = "User";
        Gtk.CellRendererText userColumnCell = new Gtk.CellRendererText ();
        userColumn.PackStart (userColumnCell, true);
        userColumn.SetCellDataFunc (userColumnCell, new Gtk.TreeCellDataFunc (RenderUser));

        Gtk.TreeViewColumn statusColumn = new Gtk.TreeViewColumn ();
        statusColumn.Title = "Status";
        Gtk.CellRendererText statusColumnCell = new Gtk.CellRendererText ();
        statusColumn.PackStart (statusColumnCell, true);
        statusColumn.SetCellDataFunc (statusColumnCell, new Gtk.TreeCellDataFunc (RenderStatus));

        m_userStore = new Gtk.ListStore (typeof (string));

        treeViewUsers.Model = m_userStore;
        treeViewUsers.AppendColumn (userColumn);
        //treeViewUsers.AppendColumn (statusColumn);

        ShowAll ();
        */
    }
Example #2
0
        public static void Main(string[] args)
        {
            // some sanity checks
            if (args.Length < 2)
            {
                Console.WriteLine ("Usage: puppet.exe <configfile> <instructionfile>");
                Environment.Exit(0);
            }

            if (!ConfigReader.ReadFile (args[0]))
                Environment.Exit (0);

            PuppetMaster puppetMaster = new PuppetMaster();
            puppetMaster.LoadConfig (args[0]);

            // load instructions
            PuppetConfigurationReader configreader = new PuppetConfigurationReader ();
            configreader.LoadFile (args[1]);
            puppetMaster.InstructionSet = configreader.ParseAllInstructions ();

            puppetMaster.InitPuppetMaster ();

            // initiate gui
            Application.Init ();
            MainWindow win = new MainWindow ();
            win.SetPuppetMaster(puppetMaster);
            win.Show ();
            Application.Run ();

            // terminate gracefully
            puppetMaster.Shutdown ();
            Environment.Exit (0);
        }
 public void SetPuppetMaster(PuppetMaster master)
 {
     m_master = master;
     m_master.m_sendReceiveMiddleLayer.RegisterReceiveCallback ("connect",
                                                                new ReceiveCallbackType (Receive));
     m_master.m_sendReceiveMiddleLayer.RegisterReceiveCallback ("disconnect",
                                                                new ReceiveCallbackType (Receive));
 }
Example #4
0
        public void SetPuppetMaster(PuppetMaster master)
        {
            if (master == null)
            {
                DebugFatal ("PuppetMaster not set");
            }

            m_puppetMaster = master;

            m_puppetMaster.m_sendReceiveMiddleLayer.RegisterReceiveCallback ("puppet_register",
                                                                             new ReceiveCallbackType (Receive));
            m_puppetMaster.m_sendReceiveMiddleLayer.RegisterReceiveCallback ("puppet_info",
                                                                             new ReceiveCallbackType (Receive));
        }
Example #5
0
 public void SetPuppetMaster(PuppetMaster master)
 {
     m_master = master;
 }