cell.ctl

来自「采用VB编写的一个电路分析系统」· CTL 代码 · 共 1,237 行 · 第 1/3 页

CTL
1,237
字号
      UserControl.CurrentX = 0
      UserControl.CurrentY = 0
      UserControl.Print ("+   VCVS" + CStr(cellindex))
     Case 2
      UserControl.Line (400, 200)-(400, 400)
     UserControl.CurrentX = 0
      UserControl.CurrentY = 0
         UserControl.Print ("+   VCAS" + CStr(cellindex))
     
     Case 3
     UserControl.Line (200, 300)-(600, 300)
     UserControl.CurrentX = 0
      UserControl.CurrentY = 0
     UserControl.Print ("+   ACVS" + CStr(cellindex))
     Case 4
    UserControl.Line (400, 200)-(400, 400)
       UserControl.CurrentX = 0
      UserControl.CurrentY = 0
     UserControl.Print ("+   ACAS" + CStr(cellindex))
      
    End Select
  Case 6
     UserControl.Line (100, 100)-(700, 500), 0, B
      UserControl.Line (0, 300)-(100, 300)
      UserControl.Line (700, 300)-(800, 300)
      UserControl.CurrentX = 140
      UserControl.CurrentY = 210
      UserControl.Print "信号源"
End Select
Else
   UserControl.Height = 800
   UserControl.Width = 800
     n1x = 300
    n1y = 0
   n2x = 300
    n2y = 800
    Select Case celltype
     Case 0
      UserControl.Line (200, 200)-(400, 600), 1, B
      UserControl.Line (300, 0)-(300, 200)
      UserControl.Line (300, 600)-(300, 800)
      UserControl.CurrentX = 0
      UserControl.CurrentY = 250
      UserControl.Print ("R")
       UserControl.Print (CStr(cellindex))
      UserControl.CurrentX = 450
      UserControl.CurrentY = 250
      UserControl.Print (CStr(cellvalue))
      UserControl.CurrentX = 400
      UserControl.CurrentY = 400
      UserControl.Print ("ΚΩ")
    Case 1
      UserControl.Line (200, 350)-(400, 350)
      UserControl.Line (200, 450)-(400, 450)
      UserControl.Line (300, 0)-(300, 350)
      UserControl.Line (300, 450)-(300, 800)
     UserControl.CurrentX = 0
      UserControl.CurrentY = 250
      UserControl.Print ("C")
       UserControl.Print (CStr(cellindex))
      UserControl.CurrentX = 450
      UserControl.CurrentY = 250
      UserControl.Print (CStr(cellvalue))
      UserControl.CurrentX = 400
      UserControl.CurrentY = 400
      UserControl.Print ("μF")
    Case 2
      UserControl.Line (300, 200)-(200, 266)
      UserControl.Line (200, 266)-(400, 333)
      UserControl.Line (400, 333)-(200, 400)
      UserControl.Line (200, 400)-(400, 466)
      UserControl.Line (400, 466)-(200, 533)
      UserControl.Line (200, 533)-(300, 600)
      UserControl.Line (300, 0)-(300, 200)
      UserControl.Line (300, 600)-(300, 800)
      UserControl.CurrentX = 0
      UserControl.CurrentY = 250
      UserControl.Print ("L")
       UserControl.Print (CStr(cellindex))
      UserControl.CurrentX = 450
      UserControl.CurrentY = 250
      UserControl.Print (CStr(cellvalue))
      UserControl.CurrentX = 400
      UserControl.CurrentY = 400
      UserControl.Print ("mH")
    Case 3
      UserControl.Circle (300, 400), 100
      UserControl.Line (300, 0)-(300, 800)
      UserControl.CurrentX = 0
      UserControl.CurrentY = 250
      UserControl.Print ("+")
      UserControl.Print (" ")
      
      UserControl.Print ("U")
       UserControl.Print (CStr(cellindex))
       UserControl.Print (" ")
      UserControl.Print ("-")
      
      UserControl.CurrentX = 450
      UserControl.CurrentY = 250
      If celltag = 0 Then
      UserControl.Print (CStr(cellvalue))
      Else
      UserControl.Print (CStr(sourcemat(cellvalue).a))
      End If
      UserControl.CurrentX = 400
      UserControl.CurrentY = 400
      UserControl.Print ("V")
   Case 4
      UserControl.Circle (300, 400), 100
      UserControl.Line (200, 400)-(400, 400)
      UserControl.Line (300, 0)-(300, 300)
      UserControl.Line (300, 500)-(300, 800)
      UserControl.CurrentX = 0
      UserControl.CurrentY = 250
       UserControl.Print ("+")
      UserControl.Print (" ")
      
      UserControl.Print ("I")
       UserControl.Print (CStr(cellindex))
       UserControl.Print (" ")
      UserControl.Print ("-")
      UserControl.CurrentX = 450
      UserControl.CurrentY = 250
      If celltag = 0 Then
      UserControl.Print (CStr(cellvalue))
      Else
      UserControl.Print (CStr(sourcemat(cellvalue).a))
      End If
      UserControl.CurrentX = 400
      UserControl.CurrentY = 400
      UserControl.Print ("A")
    Case 5
      UserControl.Circle (300, 400), 100
      UserControl.CurrentX = 322
      UserControl.CurrentY = 220
      UserControl.Print ("∽")
      UserControl.Line (0, 300)-(300, 300)
      UserControl.Line (500, 300)-(800, 300)
      UserControl.CurrentX = 0
      UserControl.CurrentY = 250
       UserControl.Print ("+")
      UserControl.Print (" ")
      
      UserControl.Print ("U")
       UserControl.Print (CStr(cellindex))
       UserControl.Print (" ")
      UserControl.Print ("-")
      UserControl.CurrentX = 450
      UserControl.CurrentY = 250
      UserControl.Print (CStr(cellvalue))
      UserControl.CurrentX = 400
      UserControl.CurrentY = 400
      UserControl.Print ("V")
    Case 6
      UserControl.Circle (300, 400), 100
      UserControl.CurrentX = 360
      UserControl.CurrentY = 210
      UserControl.Print ("S")
      UserControl.Line (0, 300)-(300, 300)
      UserControl.Line (500, 300)-(800, 300)
      UserControl.CurrentX = 0
      UserControl.CurrentY = 250
       UserControl.Print ("+")
      UserControl.Print (" ")
      
      UserControl.Print ("I")
       UserControl.Print (CStr(cellindex))
       UserControl.Print (" ")
      UserControl.Print ("-")
      UserControl.CurrentX = 450
      UserControl.CurrentY = 250
      UserControl.Print (CStr(cellvalue))
      UserControl.CurrentX = 400
      UserControl.CurrentY = 400
      UserControl.Print ("A")
   Case 6
   UserControl.Line (100, 100)-(700, 500), 0, B
      UserControl.Line (0, 300)-(100, 300)
      UserControl.Line (700, 300)-(800, 300)
      UserControl.CurrentX = 140
      UserControl.CurrentY = 210
      UserControl.Print "信号源"
 End Select
End If
End Sub
'注意!不要删除或修改下列被注释的行!
'MemberInfo=12,0,0,0
Public Property Get cellvalue() As Variant
    cellvalue = m_cellvalue
End Property

Public Property Let cellvalue(ByVal New_cellvalue As Variant)
    m_cellvalue = New_cellvalue
    PropertyChanged "cellvalue"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=7,0,0,0
Public Property Get cellinbranch() As Integer
    cellinbranch = m_cellinbranch
End Property

Public Property Let cellinbranch(ByVal New_cellinbranch As Integer)
    m_cellinbranch = New_cellinbranch
    PropertyChanged "cellinbranch"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=7,0,0,0
Public Property Get celln1() As Integer
    celln1 = m_celln1
End Property

Public Property Let celln1(ByVal New_celln1 As Integer)
    m_celln1 = New_celln1
    PropertyChanged "celln1"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=7,0,0,0
Public Property Get celln2() As Integer
    celln2 = m_celln2
End Property

Public Property Let celln2(ByVal New_celln2 As Integer)
    m_celln2 = New_celln2
    PropertyChanged "celln2"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=14,0,0,0
Public Property Get cellinhole1() As Variant
    cellinhole1 = m_cellinhole1
End Property

Public Property Let cellinhole1(ByVal New_cellinhole1 As Variant)
    m_cellinhole1 = New_cellinhole1
    PropertyChanged "cellinhole1"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=14,0,0,0
Public Property Get cellinhole2() As Variant
    cellinhole2 = m_cellinhole2
End Property

Public Property Let cellinhole2(ByVal New_cellinhole2 As Variant)
    m_cellinhole2 = New_cellinhole2
    PropertyChanged "cellinhole2"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=14,0,0,0
Public Property Get celltag() As Variant
    celltag = m_celltag
End Property

Public Property Let celltag(ByVal New_celltag As Variant)
    m_celltag = New_celltag
    PropertyChanged "celltag"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=12,0,0,0
Public Property Get n1volt() As Single
    n1volt = m_n1volt
End Property

Public Property Let n1volt(ByVal New_n1volt As Single)
    m_n1volt = New_n1volt
    PropertyChanged "n1volt"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=12,0,0,0
Public Property Get n2volt() As Single
    n2volt = m_n2volt
End Property

Public Property Let n2volt(ByVal New_n2volt As Single)
    m_n2volt = New_n2volt
    PropertyChanged "n2volt"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=12,0,0,0
Public Property Get cellcurrent() As Single
    cellcurrent = m_cellcurrent
End Property

Public Property Let cellcurrent(ByVal New_cellcurrent As Single)
    m_cellcurrent = New_cellcurrent
    PropertyChanged "cellcurrent"
End Property
Public Sub incall()
UserControl.Cls
Call drawface
End Sub

'注意!不要删除或修改下列被注释的行!
'MemberInfo=7,0,0,0
Public Property Get mytag() As Integer
    mytag = m_mytag
End Property

Public Property Let mytag(ByVal New_mytag As Integer)
    m_mytag = New_mytag
    PropertyChanged "mytag"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=12,0,0,0
Public Property Get n1x() As Single
    n1x = m_n1x
End Property

Public Property Let n1x(ByVal New_n1x As Single)
    m_n1x = New_n1x
    PropertyChanged "n1x"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=12,0,0,300
Public Property Get n1y() As Single
    n1y = m_n1y
End Property

Public Property Let n1y(ByVal New_n1y As Single)
    m_n1y = New_n1y
    PropertyChanged "n1y"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=12,0,0,800
Public Property Get n2x() As Single
    n2x = m_n2x
End Property

Public Property Let n2x(ByVal New_n2x As Single)
    m_n2x = New_n2x
    PropertyChanged "n2x"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=12,0,0,300
Public Property Get n2y() As Single
    n2y = m_n2y
End Property

Public Property Let n2y(ByVal New_n2y As Single)
    m_n2y = New_n2y
    PropertyChanged "n2y"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=7,0,0,0
Public Property Get isnew() As Integer
    isnew = m_isnew
End Property

Public Property Let isnew(ByVal New_isnew As Integer)
    m_isnew = New_isnew
    PropertyChanged "isnew"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=7,0,0,0
Public Property Get main1() As Integer
    main1 = m_main1
End Property

Public Property Let main1(ByVal New_main1 As Integer)
    m_main1 = New_main1
    PropertyChanged "main1"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=7,0,0,0
Public Property Get main2() As Integer
    main2 = m_main2
End Property

Public Property Let main2(ByVal New_main2 As Integer)
    m_main2 = New_main2
    PropertyChanged "main2"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=7,0,0,0
Public Property Get n1tag() As Integer
    n1tag = m_n1tag
End Property

Public Property Let n1tag(ByVal New_n1tag As Integer)
    m_n1tag = New_n1tag
    PropertyChanged "n1tag"
End Property

'注意!不要删除或修改下列被注释的行!
'MemberInfo=7,0,0,0
Public Property Get n2tag() As Integer
    n2tag = m_n2tag
End Property

Public Property Let n2tag(ByVal New_n2tag As Integer)
    m_n2tag = New_n2tag
    PropertyChanged "n2tag"
End Property

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?