Esempio n. 1
0
        public Cite_Video GetVideoSettings()
        {
            Cite_Video citeVideo = new Cite_Video();

            if (this.IsConnected)
            {
                int num  = 0;
                int num1 = 0;
                int num2 = 5;
                int num3 = 0;
                int num4 = 0;
                int num5 = 0;
                try
                {
                    if (CiteDLL.XX_GetVideoRecordSetting(this.CamSerial, out num, out num1, out num2, out num3, out num4, out num5))
                    {
                        citeVideo.CycleRecord  = num4;
                        citeVideo.PreRecord    = num5;
                        citeVideo.FileType     = num3;
                        citeVideo.RecordBlock  = num2;
                        citeVideo.ImageQuality = num1;
                        citeVideo.Resolution   = num;
                    }
                }
                catch
                {
                }
            }
            return(citeVideo);
        }
Esempio n. 2
0
        public Cite_Other GetOtherSettings()
        {
            Cite_Other citeOther = new Cite_Other();
            int        num       = 0;
            int        num1      = 0;
            int        num2      = 0;
            int        num3      = 0;
            int        num4      = 0;
            int        num5      = 0;
            int        num6      = 0;

            if (this.IsConnected)
            {
                try
                {
                    CiteDLL.XX_GetOtherSetting(this.CamSerial, out num, out num1, out num2, out num3, out num4, out num5, out num6);
                    citeOther.pKeyBeep            = num;
                    citeOther.pSoundIndicator     = num1;
                    citeOther.pAutoSwitchIR       = num2;
                    citeOther.pShowID             = num3;
                    citeOther.pEnableMotionDetect = num4;
                    citeOther.Int32_0             = num5;
                    citeOther.pFlickerHz          = num6;
                }
                catch
                {
                }
            }
            return(citeOther);
        }
Esempio n. 3
0
        public Cite_Userinfo GetUserInfo()
        {
            Cite_Userinfo citeUserinfo = new Cite_Userinfo();

            if (this.IsConnected)
            {
                byte[] numArray  = new byte[32];
                byte[] numArray1 = new byte[32];
                byte[] numArray2 = new byte[32];
                byte[] numArray3 = new byte[32];
                byte[] numArray4 = new byte[32];
                byte[] numArray5 = new byte[32];
                try
                {
                    if (CiteDLL.XX_GetUserInfo(this.CamSerial, numArray, numArray1, numArray2, numArray3, numArray4, numArray5))
                    {
                        citeUserinfo.DeptName = CiteLib.ConvertByteArrayToString(numArray).Trim();
                        citeUserinfo.DeptID   = CiteLib.ConvertByteArrayToString(numArray1).Trim();
                        citeUserinfo.UserName = CiteLib.ConvertByteArrayToString(numArray2).Trim();
                        citeUserinfo.BadgeNum = CiteLib.ConvertByteArrayToString(numArray3).Trim();
                        citeUserinfo.FWVer    = CiteLib.ConvertByteArrayToString(numArray5).Trim();
                        citeUserinfo.UniqueID = CiteLib.ConvertByteArrayToString(numArray4).Trim();
                    }
                }
                catch (Exception exception)
                {
                    this.ErrorMsg = exception.Message;
                }
            }
            return(citeUserinfo);
        }
Esempio n. 4
0
        public bool SetOtherSettings(Cite_Other cOther)
        {
            bool flag = false;

            if (this.IsConnected)
            {
                flag = CiteDLL.XX_SetOtherSetting(this.CamSerial, cOther.pKeyBeep, cOther.pSoundIndicator, cOther.pAutoSwitchIR, cOther.pShowID, cOther.pEnableMotionDetect, cOther.Int32_0, cOther.pFlickerHz);
            }
            return(flag);
        }
Esempio n. 5
0
        public bool SetTextSettings(Cite_Overlay co)
        {
            bool flag = false;

            if (this.IsConnected)
            {
                flag = CiteDLL.XX_SetTextStampSetting(this.CamSerial, co.TextPos, co.Red, co.Green, co.Blue, co.AddBadge, co.AddGPS);
            }
            return(flag);
        }
Esempio n. 6
0
 public void SetDateFormat(int i)
 {
     try
     {
         CiteDLL.XX_SetTime(this.CamSerial, i);
     }
     catch
     {
     }
 }
Esempio n. 7
0
        public bool SetVisualIndicators(int nLEDIndicator, int nLaserIndicator, int nSimGpsLedIndicator)
        {
            bool flag = false;

            if (this.IsConnected)
            {
                flag = CiteDLL.XX_SetViaualIndicatorSetting(this.CamSerial, nLEDIndicator, nLaserIndicator, nSimGpsLedIndicator);
            }
            return(flag);
        }
Esempio n. 8
0
        public bool Format()
        {
            bool flag = false;

            if (this.IsConnected)
            {
                flag = CiteDLL.XX_Format(this.CamSerial);
            }
            return(flag);
        }
Esempio n. 9
0
        public bool FactoryReset()
        {
            bool flag = false;

            if (this.IsConnected)
            {
                flag = CiteDLL.XX_FactorySettingReset(this.CamSerial);
            }
            return(flag);
        }
Esempio n. 10
0
        public void GetPhotoSettings(out int Res, out int mp)
        {
            int num  = -1;
            int num1 = -1;

            if (this.IsConnected)
            {
                CiteDLL.XX_GetPhotographSetting(this.CamSerial, out num, out num1);
            }
            Res = num;
            mp  = num1;
        }
Esempio n. 11
0
        public bool SetPhotoSettings(int Res, int mp)
        {
            bool flag = false;

            if (this.IsConnected)
            {
                try
                {
                    flag = CiteDLL.XX_SetPhotographSetting(this.CamSerial, Res, mp);
                }
                catch
                {
                }
            }
            return(flag);
        }
Esempio n. 12
0
        public int LoginAdmin(string password)
        {
            int num = -1;

            try
            {
                if (this.IsConnected)
                {
                    num = CiteDLL.XX_CheckSystemPwd(this.CamSerial, password);
                }
            }
            catch
            {
            }
            return(num);
        }
Esempio n. 13
0
        public bool SetVideoSettings(Cite_Video cVid)
        {
            bool flag = false;

            if (this.IsConnected)
            {
                try
                {
                    flag = CiteDLL.XX_SetVideoRecordSetting(this.CamSerial, cVid.Resolution, cVid.ImageQuality, cVid.RecordBlock, cVid.FileType, cVid.CycleRecord, cVid.PreRecord);
                }
                catch
                {
                }
            }
            return(flag);
        }
Esempio n. 14
0
        public bool SetGPSSetting(int Open, int ToFile)
        {
            bool flag = false;

            if (this.IsConnected)
            {
                try
                {
                    flag = CiteDLL.XX_SetGPSSetting(this.CamSerial, Open, ToFile);
                }
                catch
                {
                }
            }
            return(flag);
        }
Esempio n. 15
0
 public void GetVisualIndicators(out int nLEDIndicator, out int nLaserIndicator, out int nSimGpsLedIndicator)
 {
     nLEDIndicator       = 0;
     nLaserIndicator     = 0;
     nSimGpsLedIndicator = 0;
     if (this.IsConnected)
     {
         try
         {
             CiteDLL.XX_GetViaualIndicatorSetting(this.CamSerial, out nLEDIndicator, out nLaserIndicator, out nSimGpsLedIndicator);
         }
         catch
         {
         }
     }
 }
Esempio n. 16
0
        public bool SetCiteSerialNumber(string sn)
        {
            bool flag = false;

            try
            {
                if (this.IsConnected)
                {
                    flag = CiteDLL.XX_SetDeviceSerial(this.CamSerial, sn);
                }
            }
            catch
            {
            }
            return(flag);
        }
Esempio n. 17
0
        public bool SetCameraMenu(CameraMenu cm)
        {
            bool flag = false;

            try
            {
                if (CiteDLL.XX_EnableMenuItems(this.CamSerial, cm.nEnableVideoResolutionItem, cm.nEnableCameraModeSelectionItem, cm.nEnableMotionDetectItem, cm.nEnablePreRecordLastRecordItem, cm.nEnableVioceAnnouncementItem, cm.nEnableButtonSelectSoundItem, cm.nEnableAllVisualIndicatorItem, cm.nEnableLEDIndicatorItem, cm.nEnableLaserIndicatorItem, cm.nEnableInfraredControlItem, cm.nEnableFWVersionItem, cm.nEnableSerialNumberItem, cm.nEnableLanguageItem))
                {
                    flag = true;
                }
            }
            catch
            {
            }
            return(flag);
        }
Esempio n. 18
0
        public bool ResetUserPassword(string OldPwd, string NewPwd)
        {
            bool flag = false;

            try
            {
                if (this.IsConnected && CiteDLL.XX_SetUserPwd(this.CamSerial, OldPwd, NewPwd) == 0)
                {
                    flag = true;
                }
            }
            catch
            {
            }
            return(flag);
        }
Esempio n. 19
0
        public int GetDateFormat()
        {
            int num  = -1;
            int num1 = 0;
            int num2 = 0;

            try
            {
                CiteDLL.XX_GetTime(this.CamSerial, out num1, out num2, out num);
            }
            catch (Exception exception)
            {
                string message = exception.Message;
                num = -1;
            }
            return(num);
        }
Esempio n. 20
0
        public bool RebootCamera()
        {
            bool flag = false;

            try
            {
                if (this.IsConnected && CiteDLL.XX_Reboot(this.CamSerial))
                {
                    flag = true;
                }
            }
            catch (Exception exception)
            {
                string message = exception.Message;
            }
            return(flag);
        }
Esempio n. 21
0
        public bool CheckAdminPassword(string pwd, bool mount_usb)
        {
            bool flag = false;

            try
            {
                if (CiteDLL.XX_CheckSystemPwd(this.CamSerial, pwd, mount_usb) == 0)
                {
                    flag = true;
                }
            }
            catch (Exception exception)
            {
                flag = false;
            }
            return(flag);
        }
Esempio n. 22
0
        public bool PowerOff()
        {
            bool flag = false;

            try
            {
                if (CiteDLL.XX_PowerOff(this.CamSerial))
                {
                    flag = true;
                }
            }
            catch (Exception exception)
            {
                string message = exception.Message;
            }
            return(flag);
        }
Esempio n. 23
0
        public bool SetUserInfo(string DeptName, string DeptID, string UserName, string BadgeNo, string CamNo)
        {
            bool flag = false;

            if (this.IsConnected)
            {
                try
                {
                    flag = CiteDLL.XX_SetUserInfo(this.CamSerial, DeptName, DeptID, UserName, BadgeNo, CamNo);
                }
                catch (Exception exception)
                {
                    this.ErrorMsg = exception.Message;
                }
            }
            return(flag);
        }
Esempio n. 24
0
        public void GetGPS(out int Open, out int ToFile)
        {
            int num  = -1;
            int num1 = -1;

            if (this.IsConnected)
            {
                try
                {
                    CiteDLL.XX_GetGPSSetting(this.CamSerial, out num, out num1);
                }
                catch
                {
                }
            }
            Open   = num;
            ToFile = num1;
        }
Esempio n. 25
0
        public CameraMenu GetCameraMenu()
        {
            CameraMenu cameraMenu = new CameraMenu();
            int        num        = 0;
            int        num1       = 0;
            int        num2       = 0;
            int        num3       = 0;
            int        num4       = 0;
            int        num5       = 0;
            int        num6       = 0;
            int        num7       = 0;
            int        num8       = 0;
            int        num9       = 0;
            int        num10      = 0;
            int        num11      = 0;
            int        num12      = 0;

            try
            {
                if (CiteDLL.XX_GetMenuItemsStatus(this.CamSerial, out num, out num1, out num2, out num3, out num4, out num5, out num6, out num7, out num8, out num9, out num10, out num11, out num12))
                {
                    cameraMenu.nEnableVideoResolutionItem     = num;
                    cameraMenu.nEnableCameraModeSelectionItem = num1;
                    cameraMenu.nEnableMotionDetectItem        = num2;
                    cameraMenu.nEnablePreRecordLastRecordItem = num3;
                    cameraMenu.nEnableVioceAnnouncementItem   = num4;
                    cameraMenu.nEnableButtonSelectSoundItem   = num5;
                    cameraMenu.nEnableAllVisualIndicatorItem  = num6;
                    cameraMenu.nEnableLEDIndicatorItem        = num7;
                    cameraMenu.nEnableLaserIndicatorItem      = num8;
                    cameraMenu.nEnableInfraredControlItem     = num9;
                    cameraMenu.nEnableFWVersionItem           = num10;
                    cameraMenu.nEnableSerialNumberItem        = num11;
                    cameraMenu.nEnableLanguageItem            = num12;
                }
            }
            catch (Exception exception)
            {
                string message = exception.Message;
            }
            return(cameraMenu);
        }
Esempio n. 26
0
        public Cite_Overlay GetTextSettings()
        {
            Cite_Overlay citeOverlay = new Cite_Overlay();
            int          num         = 0;
            int          num1        = 0;
            int          num2        = 0;
            int          num3        = 0;
            int          num4        = 0;
            int          num5        = 0;

            if (this.IsConnected && CiteDLL.XX_GetTextStampSetting(this.CamSerial, out num, out num1, out num2, out num3, out num4, out num5))
            {
                citeOverlay.AddBadge = num4;
                citeOverlay.AddGPS   = num5;
                citeOverlay.TextPos  = num;
                citeOverlay.Red      = num1;
                citeOverlay.Green    = num2;
                citeOverlay.Blue     = num3;
            }
            return(citeOverlay);
        }
Esempio n. 27
0
 public void MountDevice()
 {
     try
     {
         char[,] chrArray = new char[26, 33];
         for (int i = 0; i < 26; i++)
         {
             for (int j = 0; j < 33; j++)
             {
                 chrArray[i, j] = '\0';
             }
         }
         if (!CiteDLL.XX_GetDevSerial(chrArray))
         {
             this.Callback(this, new CmdCiteEventArgs(DEV_ACTIONS.NO_ACTION));
         }
         else
         {
             StringBuilder stringBuilder = new StringBuilder();
             for (int k = 0; k < 26; k++)
             {
                 char[] chrArray1 = new char[33];
                 for (int l = 0; l < 33 && chrArray[k, l] != 0; l++)
                 {
                     chrArray1[l] = chrArray[k, l];
                 }
                 if (chrArray1[0] != 0)
                 {
                     stringBuilder.Append(new string(chrArray1));
                 }
             }
             this.CamSerial = stringBuilder.ToString().Substring(0, stringBuilder.ToString().IndexOf('\0'));
             if (this.CamSerial.Length > 0)
             {
                 int num  = 0;
                 int num1 = 0;
                 if (CiteDLL.XX_GetDeviceBattery(this.CamSerial, out num, out num1))
                 {
                     this.BatteryPercent = num;
                     this.BatteryToFull  = num1;
                 }
                 int num2 = 0;
                 int num3 = 0;
                 if (CiteDLL.XX_GetDeriveCap(this.CamSerial, out num2, out num3))
                 {
                     this.TotalDiskSpace = num2;
                     this.FreeDiskSpace  = num3;
                 }
                 if (this.SyncCameraTime)
                 {
                     int dateFormat = this.GetDateFormat();
                     CiteDLL.XX_SetTime(this.CamSerial, dateFormat);
                 }
                 this.IsConnected = true;
                 this.Callback(this, new CmdCiteEventArgs(DEV_ACTIONS.IS_CITE));
             }
         }
     }
     catch (Exception exception)
     {
         this.ErrorMsg = exception.Message;
     }
 }