Example #1
0
        public frmMain()
        {
            InitializeComponent();

            clsAutUserBO bo = new clsAutUserBO();
            DataTable dt = bo.GetCommonMenu();
            mnuMain = BuildMenu(dt);
            this.Menu = mnuMain;

            try
            {
                string filename = clsSystemConfig.ImageFolder + ConfigurationManager.AppSettings["Background"];
                if(File.Exists(filename))
                {
                    this.BackgroundImage = Image.FromFile(clsSystemConfig.ImageFolder + ConfigurationManager.AppSettings["Background"]);
                    this.BackgroundImageLayout = ImageLayout.Stretch;
                }
            }
            catch(Exception ex)
            {
                log.Error(ex.Message, ex);
            }
        }