Ejemplo n.º 1
0
        /// <summary>
        /// Driver that builds, links, and manages the portrait container UI
        /// </summary>
        /// <param name="is_gm">Is the current user the GM</param>
        public Portraits_Driver(Boolean is_gm)
        {
            if (is_gm)
            {
                // todo
                gui        = new GM_Portraits_GUI();
                controller = new GM_Portraits_Controller();
            }
            else
            {
                gui        = new PlayerPortrait_GUI();
                controller = new PlayerPortrait_Controller();
            }

            // Link controller with GUI
            controller.add_portrait    += gui.addPortrait;
            controller.remove_portrait += gui.removePortrait;

            // Provided links from Controller to outside the module.
            removePortrait  += controller.removePortrait;
            addPortrait     += controller.addPortrait;
            updateCharacter += controller.updateCharacter;

            gui.Show();
        }
Ejemplo n.º 2
0
 public void AddPortraitGUI(Portraits_GUI input)
 {
     PortraitPane.Controls.Add(input);
     input.Show();
 }