VERSION 5.00
Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} LinkTypeDlg 
   Caption         =   "Выбор типа ссылки"
   ClientHeight    =   4485
   ClientLeft      =   45
   ClientTop       =   375
   ClientWidth     =   3765
   OleObjectBlob   =   "LinkTypeDlg.frx":0000
   StartUpPosition =   1  'CenterOwner
End
Attribute VB_Name = "LinkTypeDlg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Const OPT_LT_PRE = "optLT"

Public isCancelled_ As Boolean

Private openFile_ As Boolean
Private link_ As TLinkType

Private Sub UserForm_Initialize()
  openFile_ = False
  isCancelled_ = True
  link_ = T_LINK_DEFAULT
  
  Call PositionInMiddle(Me)
End Sub

Public Function Init(lnkType As TLinkType)
  isCancelled_ = True
  link_ = lnkType
  openFile_ = False
  btnAspekt.BackColor = IIf(lnkType = T_LINK_ASPECT, &HC0FFC0, &HC0FFFF)
  btnConcrete.BackColor = IIf(lnkType = T_LINK_DEFINITION, &HC0FFC0, &HC0FFFF)
  btnFoundation.BackColor = IIf(lnkType = T_LINK_FOUNDATION, &HC0FFC0, &HC0FFFF)
End Function

Public Property Get NeedOpenFile() As Boolean
  NeedOpenFile = openFile_
End Property

Public Property Get LType() As TLinkType
  LType = link_
End Property

Property Get ApplyToAll() As Boolean
  ApplyToAll = CheckBox1.Value
End Property

Property Get ApplyToSelected() As Boolean
  ApplyToSelected = CheckBox2.Value
End Property

' ===========
Private Sub btnAspekt_Click()
  link_ = T_LINK_ASPECT
  isCancelled_ = False
  Call Me.Hide
End Sub

Private Sub btnConcrete_Click()
  link_ = T_LINK_DEFINITION
  isCancelled_ = False
  Call Me.Hide
End Sub

Private Sub btnFoundation_Click()
  link_ = T_LINK_FOUNDATION
  isCancelled_ = False
  Call Me.Hide
End Sub

Private Sub btnCancel_Click()
  isCancelled_ = True
  Call Me.Hide
End Sub

Private Sub btnOpenGarant_Click()
  openFile_ = True
  isCancelled_ = False
  Call Me.Hide
End Sub
