Ejemplo n.º 1
0
        public static FrmShow Create()
        {
            if (instance == null)
            {
                instance = new FrmShow();
            }

            return(instance);
        }
Ejemplo n.º 2
0
		public FrmMain()
		{
			InitializeComponent();

            if (ckbActiveAward.Checked)
            {
                timer1.Enabled = true;
            }
            else
            {
                timer1.Enabled = false;
            }

            if (checkBox1.Checked)
            {
                this.TopMost = true;
            }
            else
            {
                this.TopMost = false;
            }

			this.systemConfig = SystemConfig.ReadConfig();

			frmShow = FrmShow.Create();
			frmShow.VisibleChanged += new EventHandler(frmShow_VisibleChanged);
			frmShow.LotteryCompleted = new FrmShow.LotteryCompeletedDelegate(FrmShow_LotteryCompeleted);

			TabPageUpdateMap = new Hashtable();
			TabPageUpdateMap.Add(tpShow, null);
			TabPageUpdateMap.Add(tpEmployeeList, ctrlEmployeeList1);
			TabPageUpdateMap.Add(tpPrizewinnerList, ctrlPrizewinnerList1);
			TabPageUpdateMap.Add(tpAward, ctrlAward1);
			TabPageUpdateMap.Add(tpSetting, ctrlSetting1);
            TabPageUpdateMap.Add(tpDetail, ctrlDetail1);
            BindGroup();
			BindAward();

			LoadSetting();
            UpdateStateData(false, true,false);
            tabControl1.SelectedTab = tpShow;

		}