Example #1
0
        private void ShowTabPageFunc(string tabPageName)
        {
            string nIndex = IniInfoHelper.GetInstance().GetValueInfo("GeneralConfiguration", "Index");

            if (nIndex == "0")
            {
            }
            else if (nIndex == "1")
            {
            }
        }
Example #2
0
        private void FrmUserLogin_Load(object sender, EventArgs e)
        {
            iniFilePath = Application.StartupPath + "\\TIEVision.ini";
            parsedData  = fileIniData.ReadFile(iniFilePath);
            LoginInfo   = parsedData["GeneralConfiguration"]["LoginInfo"];

            if (!ValidationService.CheckNull(LoginInfo))
            {
                string[] UserPass = EncodeHelper.DesDecrypt(LoginInfo).Split('|');
                if (UserPass.Length == 2)
                {
                    textBox_UserName.Text = UserPass[0];
                    textBox_Password.Text = UserPass[1];
                }
            }
            else
            {
                checkBoxRemember.Checked = false;
            }


            string nIndex = IniInfoHelper.GetInstance().GetValueInfo("GeneralConfiguration", "Index");

            radioGroup1.SelectedIndex = Convert.ToInt32(nIndex);
            radioGroup1_SelectedIndexChanged(null, null);
            //Bitmap img = new Bitmap("D:\\images\\body.jpg");
            //FileStream fs = new FileStream("D:\\cie1931_500x500.rgb", FileMode.Open, FileAccess.Read);
            //int nBytes = (int)fs.Length;
            //byte[] byteArray = new byte[nBytes];
            //int nBytesRead = fs.Read(byteArray, 0, nBytes);
            //using (MemoryStream br = new MemoryStream(byteArray))
            //{
            //    Image image = System.Drawing.Image.FromStream(br);
            //    btn_login.Image = image;
            //}
            //Console.WriteLine(img.Size);
            //SplashScreenManager.ShowForm(typeof(WaitForm1));
        }
Example #3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            //Type t = typeof(Image);
            //Console.Write( t.FullName);

            this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
            this.WindowState = FormWindowState.Maximized;
            string nIndex = IniInfoHelper.GetInstance().GetValueInfo("GeneralConfiguration", "Index");

            if (nIndex == "0")
            {
                SetTargetStatues(false);
                SetFaceStatus(false);
                //FrmVehicleTask frmVehicleTask = new FrmVehicleTask();
                //frmVehicleTask.FormBorderStyle = FormBorderStyle.None;
                //frmVehicleTask.Dock = DockStyle.Fill;
                //frmVehicleTask.TopLevel = false;
                //this.xtraTabPage6.Controls.Add(frmVehicleTask);
                //frmVehicleTask.Show();


                FrmMarking frmMarking = new FrmMarking();
                frmMarking.FormBorderStyle = FormBorderStyle.None;
                frmMarking.Dock            = DockStyle.Fill;
                frmMarking.TopLevel        = false;
                this.xtraTabPage6.Controls.Add(frmMarking);
                frmMarking.Show();

                //FrmVehicleSearch frmVehicleSearch = new FrmVehicleSearch();
                //frmVehicleSearch.FormBorderStyle = FormBorderStyle.None;
                //frmVehicleSearch.Dock = DockStyle.Fill;
                //frmVehicleSearch.TopLevel = false;
                //this.xtraTabPage7.Controls.Add(frmVehicleSearch);
                //frmVehicleSearch.Show();
                FrmCrossing frmCrossing = new FrmCrossing();
                frmCrossing.FormBorderStyle = FormBorderStyle.None;
                frmCrossing.Dock            = DockStyle.Fill;
                frmCrossing.TopLevel        = false;
                this.xtraTabPage7.Controls.Add(frmCrossing);
                frmCrossing.Show();

                FrmVehSearchByPic frmVehSearchByPic = new FrmVehSearchByPic();
                frmVehSearchByPic.FormBorderStyle = FormBorderStyle.None;
                frmVehSearchByPic.Dock            = DockStyle.Fill;
                frmVehSearchByPic.TopLevel        = false;
                this.xtraTabPage8.Controls.Add(frmVehSearchByPic);
                frmVehSearchByPic.Show();



                this.xtraTabControl1.SelectedTabPage = xtraTabPage6;

                this.xtraTabPage8.PageVisible = false;

                /*
                 * try
                 * {
                 *  bool isExist = ServiceHelper.IsServiceExisted("HCarRegWorker");
                 *  if (isExist)
                 *  {
                 *      ServiceHelper.StartService("HCarRegWorker");
                 *  }
                 *  isExist = ServiceHelper.IsServiceExisted("HCarRegProxy");
                 *  if (isExist)
                 *  {
                 *      ServiceHelper.StartService("HCarRegProxy");
                 *  }
                 * }
                 * catch (Exception ex)
                 * {
                 *  LogHelper.WriteLog(typeof(FrmMain), ex.Message);
                 * }
                 * */
            }
            else if (nIndex == "1")
            {
            }
            else if (nIndex == "2")
            {
            }

            //系统设置
            FrmSystemSet frmSystemSet = new FrmSystemSet();

            frmSystemSet.FormBorderStyle = FormBorderStyle.None;
            frmSystemSet.Dock            = DockStyle.Fill;
            frmSystemSet.TopLevel        = false;
            this.xtraTabPage4.Controls.Add(frmSystemSet);
            frmSystemSet.Show();

            /*
             * TestObject obj = new TestObject();
             * Bitmap bmp = (Bitmap)Image.FromFile(@"D:\images\33.jpg");
             * MemoryStream ms = null;
             * try
             * {
             *  ms = new MemoryStream();
             *  bmp.Save(ms, bmp.RawFormat);
             *  byte[] byteImage = new Byte[ms.Length];
             *  byteImage = ms.ToArray();
             *  //return byteImage;
             *  obj.BinaryData = byteImage;
             *  TestMongoDAL.GetInstance().Add(obj);
             * }
             * catch (ArgumentNullException ex)
             * {
             *  throw ex;
             * }
             * finally
             * {
             *  ms.Close();
             * }
             */
        }