Example #1
0
        public getHelpInfo()
        {
            InitializeComponent();
            this.DoubleBuffered = true;
            IniConfigManager iniConfig = new IniConfigManager();

            this.labelVersion.Text = "客户端版本号:" + iniConfig.GetAboutVersion();
        }
Example #2
0
        public DatabaseServiceImpl()
        {
            IniConfigManager iniManager = new IniConfigManager();

            this.ip       = iniManager.GetDatabaseIp();
            this.username = iniManager.GetDatabaseUsername();
            this.password = iniManager.GetDatabasePassword();
            this.database = iniManager.GetDatabaseName();
        }
Example #3
0
        private void FrmMain_Load(object sender, EventArgs e)
        {
            this.RunOnce();

            SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            SetStyle(ControlStyles.DoubleBuffer, true);
            SetStyle(ControlStyles.UserPaint, true);

            IniConfigManager ini = new IniConfigManager();
            //this.labelTel.Text = ini.GetAboutTel();
            //this.labelUrl.Text = ini.GetAboutUrl();
        }
Example #4
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 #5
0
        public ServerServiceImpl()
        {
            IniConfigManager iniManager = new IniConfigManager();

            try
            {
                timeoutMSecond = Convert.ToInt32(iniManager.GetServerTimeup());
            }
            catch (Exception e)
            {
                CLog4net.LogError(e);
            }
        }
        public override void Start(params object[] args)
        {
            CLog4net.LogInfo("点击后台,进入超级管理员控制面板");
            base.Start();
            base.labelMessage.Text = "提示信息:修改参数后请重启系统";

            IniConfigManager iniConfig = new IniConfigManager();

            Init();
            this.circularProgressUpdate.Visible = false;
            this.code.Text        = frmMain.about.CabinetCode;
            this.createdTime.Text = iniConfig.GetAboutCommissioningData();
        }
Example #7
0
        public void Loading()
        {
            this.about            = AboutConfig.GetInstance().GetAbout();
            this.adress.Text      = about.Address;
            this.companyName.Text = about.CompanyName;
            this.name.Text        = about.Name;
            this.code.Text        = about.CabinetCode;
            this.telNum.Text      = about.TelNum;

            IniConfigManager iniConfig = new IniConfigManager();

            this.labelVersion.Text = "客户端版本号:" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
            this.createdTime.Text  = iniConfig.GetAboutCommissioningData();
        }
Example #8
0
        public override void Start(params object[] args)
        {
            CLog4net.LogInfo("点击后台,进入身份验证界面");

            base.Start();
            base.labelMessage.Text    = "提示信息:刷卡或输入卡号密码";
            this.textBoxUser.Text     = "";
            this.textBoxPassword.Text = "";
            this.textBoxUser.Focus();

            IniConfigManager iniConfig = new IniConfigManager();

            this.labelVersion.Text = "客户端版本号:" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
        }
Example #9
0
        public void Load()
        {
            this.about = ServicesFactory.GetInstance().GetDatabaseService().GetAbout();
            if (about.Model == "b")
            {
                this.IsEnable        = true;
                this.server          = Service.Factory.ServicesFactory.GetInstance().GetServerService();
                this.packageManager  = PackageManager.GetInstance();
                this.remoteLinstener = new Timer(new TimerCallback(RemoteOpenListen), null, Timeout.Infinite, Timeout.Infinite);
                IniConfigManager ini = new IniConfigManager();
                this.timeSpan = Convert.ToInt32(ini.GetServerTimeup());
            }
            else
            {
                this.IsEnable = false;
            }

            CLog4net.LogInfo("RemoteOpenLogic is loaded");
        }
Example #10
0
        private void RunUpdate()
        {
            try
            {
                IniConfigManager ini        = new IniConfigManager();
                string           updatePath = ini.GetUpdateAppPath();
                string           parm       = updatePath + "/" + AboutConfig.appName + ".txt" + ";SC.View2";
                string           updateApp  = ini.GetUpdateAppName();

                StartApp(updatePath, "SC.Update", parm);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                this.frmMain.Close();
            }
        }
Example #11
0
        public bool Init()
        {
            IniConfigManager iniconfig = new IniConfigManager();

            try
            {
                timeout = Convert.ToByte(iniconfig.GetCanTimeout());
                if (iniconfig.GetCanDebug().Equals("true"))
                {
                    isDebug = true;
                }
            }
            catch (Exception e)
            {
                isDebug = false;
                timeout = 2;
                CLog4net.LogError("读Can ini错误:" + e);
            }

            return(CanManager.GetInsatnce().Load());
        }
Example #12
0
        public CameraServiceImplByAforge()
        {
            sPath = string.Format(@"{0}\DataResources\ImageData", GetPath.GetStartupPath());
            if (!Directory.Exists(sPath))
            {
                Directory.CreateDirectory(sPath);
            }
            IniConfigManager iniManager = new IniConfigManager();

            try
            {
                this.photoCountLimit = Convert.ToInt32(iniManager.GetPhotoLength());
            }
            catch (Exception e)
            {
                CLog4net.LogError(e);
            }

            try
            {
                // 枚举所有视频输入设备
                videoDevices = new FilterInfoCollection(FilterCategory.VideoInputDevice);

                if (videoDevices.Count == 0)
                {
                    CemmberData.Instance.IsCameraConnectFail = true;
                    CLog4net.LogError("未检测到摄像头");
                }
                else
                {
                    CemmberData.Instance.IsCameraConnectFail = false;
                }
            }
            catch (ApplicationException)
            {
                CemmberData.Instance.IsCameraConnectFail = true;
                CLog4net.LogError("No local capture devices");
                videoDevices = null;
            }
        }
Example #13
0
        private void InitCamera()
        {
            try
            {
                sPath = string.Format(@"{0}\DataResources\ImageData", GetPath.GetStartupPath());
                if (!Directory.Exists(sPath))
                {
                    Directory.CreateDirectory(sPath);
                }
                IniConfigManager iniManager = new IniConfigManager();
                try
                {
                    this.photoCountLimit = Convert.ToInt32(iniManager.GetPhotoLength());
                }
                catch (Exception e)
                {
                    CLog4net.LogError(e);
                }

                this.panelCamera = new Panel();
                //
                // panelCamera
                //
                this.panelCamera.BackColor = System.Drawing.Color.SlateGray;
                //this.panelCamera.Location = new System.Drawing.Point(320, 9);
                this.panelCamera.Name = "panelCamera";
                this.panelCamera.Size = new System.Drawing.Size(400, 300);

                myPick = new Pick(this.panelCamera.Handle, 0 + 5, 0 + 5, this.panelCamera.Width - 10, this.panelCamera.Height - 10);

                this.myPick.Start();
            }
            catch
            {
                System.Windows.Forms.MessageBox.Show("Camera Module Fault");
            }
        }