Example #1
0
        public FrmMain()
        {
            CLog4net.LogInfo("System starting!");

            InitializeComponent();
            this.systemController = new SystemController();
            FrmLoading frmLoading = new FrmLoading(this.systemController);

            frmLoading.ShowDialog();

            if (frmLoading.DialogResult == DialogResult.OK)
            {
                frmLoading.Hide();
                frmLoading.Close();
            }

            this.boxsManager      = BoxsManager.GetInstance();
            this.packageManager   = PackageManager.GetInstance();
            this.voiceService     = ServicesFactory.GetInstance().GetVoicService();
            this.serverService    = ServicesFactory.GetInstance().GetServerService();
            this.cameraService    = ServicesFactory.GetInstance().GetCameraService();
            this.about            = AboutConfig.GetInstance().GetAbout();
            this.infoCenterLister = InfoCenterLister.GetInsatnce();
            this.adManager        = ADManager.GetInstance();

            this.AddUCScene(Roster.Home, new Home(this, 0));
            this.AddUCScene(Roster.P_ControlPanel, new PostmanControlPanel(this, 5));
            this.AddUCScene(Roster.P_D_Verify, new PostmanVerify(this, 60));
            this.AddUCScene(Roster.P_D_ChooseBox, new PostmanChooseBox(this, 60));
            this.AddUCScene(Roster.P_D_DeliverPG, new PostmanDeliverPG(this, 120));
            this.AddUCScene(Roster.P_D_EntryPGInfo, new PostmanEntryPGInfo(this, 60));
            this.AddUCScene(Roster.P_D_PGVerify, new PostmanPGVerify(this, 60));
            this.AddUCScene(Roster.P_D_FinishWork, new PostmanFinishWork(this, 10));
            this.AddUCScene(Roster.P_D_Cancel, new PostmanCancelTask(this, 60));
            this.AddUCScene(Roster.P_D_CancelTask, new PostmanCancelTask(this, 60));
            this.AddUCScene(Roster.P_T_EntryPGInfo, new PostmanTBEntryPGInfo(this, 60));
            this.AddUCScene(Roster.P_T_FinishWork, new PostmanTBFinishWork(this, 60));
            this.AddUCScene(Roster.P_S_PGDelivered, new PostmanSPGDelivered(this, 60));
            this.AddUCScene(Roster.P_R_PGRegister, new PostmanRegister(this, 180));

            this.AddUCScene(Roster.C_ControlPanel, new CustomerControlPanel(this, 5));
            this.AddUCScene(Roster.C_T_Verify, new CustomerTBVerify(this, 60));
            this.AddUCScene(Roster.C_T_FinishWork, new CustomerTBFinishWork(this, 60));
            this.AddUCScene(Roster.C_S_EntryPGInfo, new CustomerSEntryPGInfo(this, 60));
            this.AddUCScene(Roster.C_S_PGSearched, new CustomerPGSearched(this, 60));

            this.AddUCScene(Roster.A_Verify, new AdminVerify(this, 60));
            this.AddUCScene(Roster.A_P_EntryBoxCode, new AdminProxyEntryBoxCode(this, 60));
            this.AddUCScene(Roster.A_P_FinishWork, new AdminProxyFinishWork(this, 60));
            this.AddUCScene(Roster.A_ControlPanel, new AdministratorControlPanel(this, 360));

            this.SceneTransit(Roster.Home);
            this.timerSceneInfo.Enabled = true;
            this.timerMain.Enabled      = true;

            CLog4net.LogInfo("启动完成");
        }
Example #2
0
        public FrmMain()
        {
            CLog4net.LogInfo("System starting!");
            InitializeComponent();

            //读取配置文件和Logo图片
            try
            {
                CLog4net.LogInfo("读取配置文件和Logo图片");
                string imagepath = Environment.CurrentDirectory + "\\configInfo\\logo.png";
                Image  image     = Image.FromFile(imagepath);
                Size   size      = new Size(logoPic.Width, logoPic.Height);
                Bitmap b         = new Bitmap(image, size);
                this.logoPic.BackgroundImage = b;

                IniConfigManager iniConfig = new IniConfigManager();
                tel.Text = iniConfig.GetAboutTel();
                url.Text = iniConfig.GetAboutUrl();
            }
            catch (Exception e)
            {
                CLog4net.LogError(e.ToString());
            }
            this.systemController = new SystemController();
            FrmLoading frmLoading = new FrmLoading(this.systemController);

            frmLoading.ShowDialog();

            if (frmLoading.DialogResult == DialogResult.OK)
            {
                frmLoading.Hide();
                frmLoading.Close();
            }

            this.boxsManager      = BoxsManager.GetInstance();
            this.packageManager   = PackageManager.GetInstance();
            this.voiceService     = ServicesFactory.GetInstance().GetVoicService();
            this.serverService    = ServicesFactory.GetInstance().GetServerService();
            this.cameraService    = ServicesFactory.GetInstance().GetCameraService();
            this.about            = AboutConfig.GetInstance().GetAbout();
            this.infoCenterLister = InfoCenterLister.GetInsatnce();

            timerNav.Interval = 1000;
            timerNav.Stop();

            this.timerMain.Enabled = true;
            this.timerMain.Start();

            currentPanel = panelName.mainPanel;
            mainPanel1.BringToFront();
            CLog4net.LogInfo("启动完成");
        }
Example #3
0
 /// <summary>
 /// 系统定时刷新逻辑接口
 /// </summary>
 /// <param name="sender"></param>
 private void SystemTimer_Elapsed(object sender)
 {
     CommLister.GetInstance().LogicInterface();
     InfoCenterLister.GetInsatnce().LogicInterface();
 }