/*
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * Portions created by the Initial Developer are
 * Copyright (C) 2012 the Initial Developer.
 * All Rights Reserved.
 *
 * The Original Code is "http://semi-frame.googlecode.com/svn/trunk/".
 *
 * The Initial Developer of the Original Code is the author below.
 */

/**
 * @file MasterPool.cs
 * @brief auto generated.
 * @author mornongcloud
 * @date 2011/07/21
 */
 
namespace masterframe.control
{
    /// <summary>
    /// instance keep control class
    /// </summary>
    public class MasterPool
    {
        private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
        private static bool startup = false;

        internal static masterframe.Properties.Settings settings = null;

        //public static Entity Vehicles;
        public static model.config.Column columnsetting;

        /// <summary>
        /// @brief load parameter 
        /// </summary>
        /// <returns></returns>
        static public bool Startup()
        {
            if (!startup)
            {
                startup = true;
                bool bl = Init(false);
                return bl;
            }
            return false;
        }

        /// <summary>
        /// @brief load parameter 
        /// </summary>
        /// <returns>result true=success</returns>
        public static bool Init(bool parrent = true)
        {
            bool ret = true;
            //if (parrent) ret = masterframe.control.CommonMasterPool.Init();
            //if (!ret) return ret;

            MasterPool.settings = new masterframe.Properties.Settings();

            //MasterPool.Vehicles = new Vehicles(settings.DataSource);
            columnsetting = new masterframe.model.config.Column();

            logger.Info("initialize MasterPool(MasterPool) ");

            return ret;
        }
    }
}
