home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 7_2009-2012.ISO / data / zips / Video_Surv21911810202010.psc / FrmSettings.frm < prev    next >
Text File  |  2010-04-08  |  9KB  |  286 lines

  1. VERSION 5.00
  2. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  3. Begin VB.Form FrmSettings 
  4.    Caption         =   "Settings"
  5.    ClientHeight    =   5070
  6.    ClientLeft      =   60
  7.    ClientTop       =   450
  8.    ClientWidth     =   7515
  9.    LinkTopic       =   "Form2"
  10.    ScaleHeight     =   5070
  11.    ScaleWidth      =   7515
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.CommandButton Command2 
  14.       Caption         =   "Save and close"
  15.       Height          =   375
  16.       Left            =   5640
  17.       TabIndex        =   18
  18.       Top             =   4200
  19.       Width           =   1335
  20.    End
  21.    Begin VB.TextBox Text2 
  22.       Height          =   285
  23.       Left            =   2280
  24.       TabIndex        =   15
  25.       Top             =   3960
  26.       Width           =   615
  27.    End
  28.    Begin VB.TextBox Text3 
  29.       Height          =   285
  30.       Left            =   1200
  31.       TabIndex        =   14
  32.       Top             =   3480
  33.       Width           =   615
  34.    End
  35.    Begin VB.CheckBox Check1 
  36.       Caption         =   "Beep on motion detection"
  37.       Height          =   255
  38.       Left            =   360
  39.       TabIndex        =   13
  40.       Top             =   4560
  41.       Width           =   2775
  42.    End
  43.    Begin VB.TextBox Text1 
  44.       Height          =   285
  45.       Left            =   3240
  46.       TabIndex        =   9
  47.       Top             =   2400
  48.       Width           =   615
  49.    End
  50.    Begin VB.CommandButton Command1 
  51.       Caption         =   "..."
  52.       Height          =   255
  53.       Left            =   1680
  54.       TabIndex        =   8
  55.       Top             =   3000
  56.       Width           =   255
  57.    End
  58.    Begin MSComctlLib.Slider Slider1 
  59.       Height          =   615
  60.       Left            =   1920
  61.       TabIndex        =   0
  62.       Top             =   240
  63.       Width           =   5055
  64.       _ExtentX        =   8916
  65.       _ExtentY        =   1085
  66.       _Version        =   393216
  67.       LargeChange     =   10
  68.       SmallChange     =   5
  69.       Min             =   1
  70.       Max             =   150
  71.       SelStart        =   15
  72.       TickStyle       =   1
  73.       TickFrequency   =   5
  74.       Value           =   15
  75.    End
  76.    Begin MSComctlLib.Slider Slider2 
  77.       Height          =   495
  78.       Left            =   1920
  79.       TabIndex        =   1
  80.       Top             =   720
  81.       Width           =   5055
  82.       _ExtentX        =   8916
  83.       _ExtentY        =   873
  84.       _Version        =   393216
  85.       Min             =   1
  86.       Max             =   1000
  87.       SelStart        =   1
  88.       TickStyle       =   1
  89.       TickFrequency   =   50
  90.       Value           =   1
  91.    End
  92.    Begin MSComctlLib.Slider Slider3 
  93.       Height          =   495
  94.       Left            =   1920
  95.       TabIndex        =   2
  96.       Top             =   1200
  97.       Width           =   5055
  98.       _ExtentX        =   8916
  99.       _ExtentY        =   873
  100.       _Version        =   393216
  101.       Min             =   1
  102.       Max             =   5
  103.       SelStart        =   2
  104.       TickStyle       =   1
  105.       Value           =   2
  106.    End
  107.    Begin MSComctlLib.Slider Slider4 
  108.       Height          =   255
  109.       Left            =   1920
  110.       TabIndex        =   6
  111.       Top             =   1920
  112.       Width           =   5055
  113.       _ExtentX        =   8916
  114.       _ExtentY        =   450
  115.       _Version        =   393216
  116.       Min             =   1
  117.       Max             =   2000
  118.       SelStart        =   50
  119.       TickFrequency   =   50
  120.       Value           =   50
  121.    End
  122.    Begin VB.Label Label10 
  123.       Caption         =   "Minutes to split video files:"
  124.       Height          =   255
  125.       Left            =   240
  126.       TabIndex        =   17
  127.       Top             =   3960
  128.       Width           =   2055
  129.    End
  130.    Begin VB.Label Label11 
  131.       Caption         =   "Avi FPS:"
  132.       Height          =   255
  133.       Left            =   240
  134.       TabIndex        =   16
  135.       Top             =   3480
  136.       Width           =   735
  137.    End
  138.    Begin VB.Label Label5 
  139.       Caption         =   "Time to record after last motion(seconds)"
  140.       Height          =   255
  141.       Left            =   240
  142.       TabIndex        =   12
  143.       Top             =   2520
  144.       Width           =   3375
  145.    End
  146.    Begin VB.Label Label8 
  147.       Caption         =   "Path for video files:"
  148.       Height          =   255
  149.       Left            =   240
  150.       TabIndex        =   11
  151.       Top             =   3000
  152.       Width           =   1575
  153.    End
  154.    Begin VB.Label Label9 
  155.       Height          =   255
  156.       Left            =   1920
  157.       TabIndex        =   10
  158.       Top             =   3000
  159.       Width           =   2895
  160.    End
  161.    Begin VB.Label Label7 
  162.       Alignment       =   1  'Right Justify
  163.       Caption         =   "Poll freq (ms)"
  164.       Height          =   375
  165.       Left            =   480
  166.       TabIndex        =   7
  167.       Top             =   1920
  168.       Width           =   1095
  169.    End
  170.    Begin VB.Label Label1 
  171.       Alignment       =   1  'Right Justify
  172.       Caption         =   "Noise Reduction:"
  173.       BeginProperty Font 
  174.          Name            =   "Arial Narrow"
  175.          Size            =   8.25
  176.          Charset         =   0
  177.          Weight          =   400
  178.          Underline       =   0   'False
  179.          Italic          =   0   'False
  180.          Strikethrough   =   0   'False
  181.       EndProperty
  182.       Height          =   375
  183.       Left            =   720
  184.       TabIndex        =   5
  185.       Top             =   360
  186.       Width           =   1215
  187.    End
  188.    Begin VB.Label Label2 
  189.       Alignment       =   1  'Right Justify
  190.       Caption         =   "MotionTrigger Level:"
  191.       Height          =   255
  192.       Left            =   240
  193.       TabIndex        =   4
  194.       Top             =   960
  195.       Width           =   1695
  196.    End
  197.    Begin VB.Label Label3 
  198.       Alignment       =   1  'Right Justify
  199.       Caption         =   "Scan grid Density:"
  200.       Height          =   255
  201.       Left            =   240
  202.       TabIndex        =   3
  203.       Top             =   1320
  204.       Width           =   1455
  205.    End
  206. End
  207. Attribute VB_Name = "FrmSettings"
  208. Attribute VB_GlobalNameSpace = False
  209. Attribute VB_Creatable = False
  210. Attribute VB_PredeclaredId = True
  211. Attribute VB_Exposed = False
  212. Private Sub Check1_Click()
  213.    BeepOnDetection = Check1.Value
  214. End Sub
  215.  
  216. Private Sub Command1_Click()
  217. Dim cadena As String
  218. cadena = SelectDir(FIleDIr)
  219. If cadena <> "" Then
  220.    FIleDIr = cadena
  221.    Label9.Caption = FIleDIr
  222. End If
  223. End Sub
  224.  
  225. Private Sub Command2_Click()
  226. SaveSetting "MotionDetect", "Param", "NoiseReductionLevel", Str(NoiseReductionLevel)
  227. SaveSetting "MotionDetect", "Param", "MotionTriggerLevel", Str(MotionTriggerLevel)
  228. SaveSetting "MotionDetect", "Param", "ScanGridDensity", Str(ScanGridDensity)
  229. SaveSetting "MotionDetect", "Param", "SecondsLen", Str(SecondsLen)
  230. SaveSetting "MotionDetect", "Param", "Turno", Str(Turno)
  231. SaveSetting "MotionDetect", "Param", "FileLenSegundos", Str(FileLenSegundos)
  232. SaveSetting "MotionDetect", "Param", "ScanFreq", Str(ScanFreq)
  233. SaveSetting "MotionDetect", "Param", "FileDir", FIleDIr
  234. SaveSetting "MotionDetect", "Param", "MinutosSplit", Str(MinutosSplit)
  235. SaveSetting "MotionDetect", "Param", "AviFps", Str(AviFps)
  236. SaveSetting "MotionDetect", "Param", "BeepOnDetection", Str(BeepOnDetection)
  237. FrmSettings.Visible = False
  238. End Sub
  239.  
  240. Private Sub Form_Load()
  241. Slider1.Value = NoiseReductionLevel
  242. Slider2.Value = MotionTriggerLevel
  243. Slider3.Value = ScanGridDensity
  244. Slider4.Value = ScanFreq
  245. Text1.Text = SecondsLen
  246. Text2.Text = MinutosSplit
  247. Text3.Text = AviFps
  248. Label9.Caption = FIleDIr
  249. Check1.Value = BeepOnDetection
  250. End Sub
  251.  
  252. Private Sub Slider1_Click()
  253. NoiseReductionLevel = Slider1.Value
  254. End Sub
  255.  
  256. Private Sub Slider2_Click()
  257. MotionTriggerLevel = Slider2.Value
  258. Call Progress(Form1.Picture6, MotionTriggerLevel, 1000, vbGreen, vbRed)
  259. End Sub
  260.  
  261. Private Sub Slider3_Click()
  262. ScanGridDensity = Slider3.Value
  263. Form1.Picture1.Picture = Nothing
  264. End Sub
  265.  
  266. Private Sub Slider4_Click()
  267. ScanFreq = Val(Slider4.Value)
  268. Form1.Timer1.Interval = ScanFreq
  269. End Sub
  270.  
  271. Private Sub Text1_Change()
  272. SecondsLen = Val(Text1.Text)
  273. End Sub
  274.  
  275. Private Sub Text2_Change()
  276. If Val(Text2.Text) > 0 Then
  277.    MinutosSplit = Val(Text2.Text)
  278. End If
  279. End Sub
  280.  
  281. Private Sub Text3_Change()
  282. If Val(Text3.Text) > 0 Then
  283.    AviFps = Val(Text3.Text)
  284. End If
  285. End Sub
  286.