Blame | Last modification | View Log
VERSION 5.00Begin VB.Form frmAddEditBorderStyle = 1 'Fixed SingleCaption = "Add/Edit a connection"ClientHeight = 2715ClientLeft = 45ClientTop = 435ClientWidth = 5115Icon = "frmAddEdit.frx":0000LinkTopic = "Form1"MaxButton = 0 'FalseMinButton = 0 'FalseScaleHeight = 181ScaleMode = 3 'PixelScaleWidth = 341StartUpPosition = 2 'CenterScreenBegin VB.TextBox Text2Appearance = 0 'FlatHeight = 315Left = 1200TabIndex = 1Top = 675Width = 2040EndBegin VB.TextBox Text1Appearance = 0 'FlatHeight = 315Left = 1200TabIndex = 0Top = 315Width = 3750EndBegin VNCstarter.jjButton jjButton1Default = -1 'TrueHeight = 405Left = 2475TabIndex = 2Top = 2175Width = 1230_ExtentX = 2170_ExtentY = 714BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}Name = "MS Sans Serif"Size = 8.25Charset = 0Weight = 400Underline = 0 'FalseItalic = 0 'FalseStrikethrough = 0 'FalseEndPropertyCaption = "Save"jjButtonStyle = 9EndBegin VNCstarter.jjButton jjButton2Height = 405Left = 3750TabIndex = 3Top = 2175Width = 1230_ExtentX = 2170_ExtentY = 714BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}Name = "MS Sans Serif"Size = 8.25Charset = 0Weight = 400Underline = 0 'FalseItalic = 0 'FalseStrikethrough = 0 'FalseEndPropertyCaption = "Cancel"jjButtonStyle = 9EndBegin VB.Label Label3Caption = $"frmAddEdit.frx":014AHeight = 690Left = 315TabIndex = 6Top = 1380Width = 4185EndBegin VB.Label Label2AutoSize = -1 'TrueCaption = "IP-address:"Height = 195Left = 360TabIndex = 5Top = 720Width = 795EndBegin VB.Label Label1AutoSize = -1 'TrueCaption = "Comments:"Height = 195Left = 360TabIndex = 4Top = 360Width = 780EndEndAttribute VB_Name = "frmAddEdit"Attribute VB_GlobalNameSpace = FalseAttribute VB_Creatable = FalseAttribute VB_PredeclaredId = TrueAttribute VB_Exposed = FalseOption ExplicitPrivate Sub Form_Load()If gNyAdresse = False ThenText1.Text = frmMainWindow.ListView1.SelectedItem.TextText2.Text = frmMainWindow.ListView1.SelectedItem.SubItems(1)End IfEnd SubPrivate Sub jjButton1_Click()On Error GoTo PROC_ERRIf Text1.Text = "" Then MsgBox "You must enter a comment for this connection"If Text2.Text = "" Then MsgBox "You must enter an IP-address for this connection"Dim NyAdresse As StringDim NyKommentar As StringDim Dato As StringDim FilNr As IntegerDim f As LongDim retval As Long'gNyAdresse = TrueNyAdresse = Trim(Text2.Text)If NyAdresse = "" Or NyAdresse = "http://" ThenUnload MeGoTo PROC_EXITEnd IfNyKommentar = Text1If NyAdresse <> "" Or NyKommentar <> "" Then'Om ny adresse, vis denne i adresse listenIf gNyAdresse = True ThenWith frmMainWindow.ListView1.Sorted = False.Visible = False.ListItems.Add , , NyKommentar.ListItems.Item(.ListItems.Count).SubItems(1) = NyAdresse.Sorted = True.Visible = TrueEnd With'Om bare endring av merket feltElseFor f = frmMainWindow.ListView1.ListItems.Count To 1 Step -1If frmMainWindow.ListView1.ListItems(f).Selected = True ThenfrmMainWindow.ListView1.ListItems.Item(f).Text = NyKommentarfrmMainWindow.ListView1.ListItems.Item(f).SubItems(1) = NyAdresseEnd IfNext fEnd If'Lagre hele listen på nyCall LagreFavoritterEnd IfUnload MePROC_EXIT:Exit SubPROC_ERR:'Call ShowError(Me.Name, "General_Ok", Err.Number, Err.Description)GoTo PROC_EXITEnd SubPrivate Sub jjButton2_Click()Unload MeEnd Sub