📄 frmadd.frm
字号:
VERSION 5.00
Begin VB.Form frmAdd
AutoRedraw = -1 'True
BackColor = &H00F3F3F3&
BorderStyle = 1 'Fixed Single
Caption = "层次关系生成向导"
ClientHeight = 4845
ClientLeft = 45
ClientTop = 330
ClientWidth = 3975
ControlBox = 0 'False
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
ScaleHeight = 4845
ScaleWidth = 3975
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton cmdCancel
BackColor = &H00F3F3F3&
Caption = "取消"
Height = 375
Left = 3240
Style = 1 'Graphical
TabIndex = 21
Top = 4380
Width = 615
End
Begin VB.CommandButton cmdFinish
BackColor = &H00F3F3F3&
Caption = "完成"
Height = 375
Left = 2640
Style = 1 'Graphical
TabIndex = 7
Top = 4380
Width = 615
End
Begin VB.CommandButton cmdNextStep
BackColor = &H00F3F3F3&
Caption = "下一步"
Height = 375
Left = 1560
Style = 1 'Graphical
TabIndex = 6
Top = 4380
Width = 855
End
Begin VB.CommandButton cmdLastStep
BackColor = &H00F3F3F3&
Caption = "上一步"
Height = 375
Left = 720
Style = 1 'Graphical
TabIndex = 5
Top = 4380
Width = 855
End
Begin VB.PictureBox pBox
AutoRedraw = -1 'True
BackColor = &H00F3F3F3&
Height = 4155
Index = 1
Left = 120
ScaleHeight = 4095
ScaleWidth = 3675
TabIndex = 14
Top = 120
Width = 3735
Begin VB.TextBox AssumeText
Height = 2355
Left = 120
MultiLine = -1 'True
ScrollBars = 1 'Horizontal
TabIndex = 15
Top = 720
Width = 3375
End
Begin VB.Label Label10
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "按指定的格式填写关联字符串:"
ForeColor = &H00004000&
Height = 180
Left = 120
TabIndex = 20
Top = 480
Width = 2430
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "[C1]=P1,P2,P4,P5"
ForeColor = &H000000C0&
Height = 180
Left = 120
TabIndex = 19
Top = 3840
Width = 1440
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "比如:准则C1与方案P1、P2、P4、P5等有关系,就将关联字符串写成如下样式:"
ForeColor = &H00000040&
Height = 360
Left = 120
TabIndex = 18
Top = 3420
Width = 3330
WordWrap = -1 'True
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "请将准则层的准则与方案层的方案进行关联:"
Height = 180
Left = 120
TabIndex = 17
Top = 120
Width = 3510
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用如下的格式进行关联:"
ForeColor = &H00800080&
Height = 180
Left = 120
TabIndex = 16
Top = 3180
Width = 1890
End
End
Begin VB.PictureBox pBox
AutoRedraw = -1 'True
BackColor = &H00F3F3F3&
Height = 4155
Index = 0
Left = 120
ScaleHeight = 4095
ScaleWidth = 3675
TabIndex = 0
Top = 120
Width = 3735
Begin VB.TextBox DecP
Enabled = 0 'False
Height = 915
Left = 120
MultiLine = -1 'True
ScrollBars = 1 'Horizontal
TabIndex = 10
Top = 2820
Width = 3375
End
Begin VB.TextBox DecC
Enabled = 0 'False
Height = 975
Left = 120
MultiLine = -1 'True
ScrollBars = 1 'Horizontal
TabIndex = 9
Top = 1560
Width = 3375
End
Begin VB.CommandButton cmdCreate
BackColor = &H00F3F3F3&
Caption = "生成准则(C)与方案(P)"
Height = 375
Left = 120
Style = 1 'Graphical
TabIndex = 8
Top = 840
Width = 3375
End
Begin VB.TextBox valC
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
Height = 315
Left = 2280
TabIndex = 4
Top = 53
Width = 1215
End
Begin VB.TextBox valP
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
Height = 315
Left = 2280
TabIndex = 3
Top = 413
Width = 1215
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "注:以上的声明以行为单位进行输入:O"
ForeColor = &H00800000&
Height = 180
Left = 120
TabIndex = 13
Top = 3840
Width = 3060
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "对各方案进行说明:"
Height = 180
Left = 120
TabIndex = 12
Top = 2580
Width = 1530
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "对各准则进行说明:"
Height = 180
Left = 120
TabIndex = 11
Top = 1320
Width = 1530
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "请输入方案层P的方案个数:"
Height = 180
Left = 120
TabIndex = 2
Top = 480
Width = 2160
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "请输入准则层C的准则个数:"
Height = 180
Left = 120
TabIndex = 1
Top = 120
Width = 2160
End
End
Begin VB.Image Image1
Height = 480
Left = 120
Picture = "frmAdd.frx":0000
Top = 4320
Width = 480
End
End
Attribute VB_Name = "frmAdd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim CanFinished As Boolean 'Button Finished can be Clicked or not
Dim CanNext As Boolean 'Button Next can be Clicked or not
Dim CanLast As Boolean 'Button Last can be Clicked or not
Private Sub cmdCancel_Click()
If MsgBox("确认取消吗?", vbYesNo + vbQuestion, "提示信息") = vbYes Then
Unload Me
End If
End Sub
'生成准则与方案
Private Sub cmdCreate_Click()
On Error GoTo errH
Dim i As Long
If Val(valP.Text) <= 1 Or Val(valC.Text) <= 1 Or Val(valP.Text) <> Int(Val(valP.Text)) Or Val(valC.Text) <> Int(Val(valC.Text)) Then
MsgBox "参数只可以是正整数(且均不小于2)!", vbOKOnly + vbInformation, "提示信息"
Exit Sub
End If
pLCount = Val(valP.Text)
cLCount = Val(valC.Text)
TotalGridNum = aLCount + cLCount
ReDim vLayer(0 To TotalGridNum) As TLayer
ReDim vDecC(1 To cLCount) As TDeclare
ReDim vDecP(1 To pLCount) As TDeclare
'对目标层进行初始化
With vLayer(1)
.Name = "A"
.ContainObj = ""
For i = 1 To cLCount
.ContainObj = .ContainObj + "C" + Trim(Str(i)) + vbTab
Next
.Style = LayerA
.txtInf = ""
.Finished = False
End With
'对准则层进行初始化
For i = 2 To TotalGridNum
With vLayer(i)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -