/// <summary>
        /// Get an instance of the UserControl
        /// </summary>
        /// <returns></returns>
        public static Custom_Config_Panel GetInstance()
        {
            if (instance == null)
            {
                // Get an instance, if does not already exists
                instance = new Custom_Config_Panel();
            }

            return(instance);
        }
Exemple #2
0
        /// <summary>
        /// Initialization
        /// </summary>
        /// <param name="instance"></param>
        public Common(string instance)
        {
            InitializeComponent();

            // Check whcih window user wants to open
            if (instance == Main.SETTINGS_PANEL)
            {
                // Launch Settings_Panel
                Text = Main.SETTINGS_PANEL;
                panelContainer.Controls.Add(Settings_Panel.GetInstance());
            }
            else
            {
                // Launch Custom_Config_Panel
                Text = Main.CUSTOM_CONFIG_PANEL;
                panelContainer.Controls.Add(Custom_Config_Panel.GetInstance());
            }
        }