初始化项目
This commit is contained in:
196
BLV_Studio/ReleaseControl.vb
Normal file
196
BLV_Studio/ReleaseControl.vb
Normal file
@@ -0,0 +1,196 @@
|
||||
Public Class ReleaseControl_frn
|
||||
|
||||
Public tmpMsgBox As String = ""
|
||||
|
||||
Public notegBox As String = ""
|
||||
|
||||
Public Firmware_txt As String = ""
|
||||
Public ComboBox1_txt As String = ""
|
||||
Public FirmwareList As List(Of Dictionary(Of String, String))
|
||||
|
||||
Private Firmwarefilename As New Dictionary(Of String, String())
|
||||
|
||||
Private Firmwarefilenamev4 As New Dictionary(Of String, String())
|
||||
|
||||
Public FromDic As New Dictionary(Of String, String())
|
||||
|
||||
Private Sub ReleaseControl_frn_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
Firmware_box.Items.Clear()
|
||||
ComboBox1.Items.Clear()
|
||||
Firmwarefilenamev4.Clear()
|
||||
Firmwarefilename.Clear()
|
||||
Dim cbo As ComboBox
|
||||
Dim ndic As Dictionary(Of String, String())
|
||||
If Not IsNothing(FirmwareList) AndAlso FirmwareList.Count > 0 Then
|
||||
'Firmwarefilename=New Dictionary(Of string,string)
|
||||
For Each dic In FirmwareList
|
||||
'Firmwarefilename.Add (dic.Item("FileName"),dic.Item("MD5Val"))
|
||||
|
||||
Dim buff(4) As String
|
||||
buff(0) = dic.Item("AppType")
|
||||
buff(1) = dic.Item("FileName")
|
||||
buff(2) = dic.Item("MD5Val")
|
||||
buff(3) = dic.Item("Remark")
|
||||
|
||||
If dic.Item("Luncher_Ver").Equals("C1_L2") Then
|
||||
|
||||
Firmware_box.Items.Add(dic.Item("FileName"))
|
||||
|
||||
|
||||
If Firmwarefilename.ContainsKey(dic.Item("FileName")) Then
|
||||
Firmwarefilename.Item(dic.Item("FileName")) = buff
|
||||
Else
|
||||
Firmwarefilename.Add(dic.Item("FileName"), buff)
|
||||
End If
|
||||
|
||||
If Firmware_txt.Equals(dic.Item("FileName")) Then
|
||||
Firmware_box.Text = dic.Item("FileName")
|
||||
Firmware_box.SelectedItem = dic.Item("FileName")
|
||||
End If
|
||||
|
||||
ElseIf dic.Item("Luncher_Ver").Equals("C1_L4") Then
|
||||
|
||||
ComboBox1.Items.Add(dic.Item("FileName"))
|
||||
|
||||
|
||||
If Firmwarefilenamev4.ContainsKey(dic.Item("FileName")) Then
|
||||
Firmwarefilenamev4.Item(dic.Item("FileName")) = buff
|
||||
Else
|
||||
Firmwarefilenamev4.Add(dic.Item("FileName"), buff)
|
||||
End If
|
||||
|
||||
If ComboBox1_txt.Equals(dic.Item("FileName")) Then
|
||||
ComboBox1.Text = dic.Item("FileName")
|
||||
ComboBox1.SelectedItem = dic.Item("FileName")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
UpdateVersion_lab.Text = tmpMsgBox
|
||||
ReleaseNotes_txt.Text = notegBox
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Public Event ReleaseControlData(ReleasePassword As String, ReleaseNote As String, Firmwarefilename As Dictionary(Of String, String))
|
||||
|
||||
|
||||
|
||||
Private Sub Confirm_btn_Click(sender As Object, e As EventArgs) Handles Confirm_btn.Click
|
||||
'ReleasePassword_txt
|
||||
If IsNothing(Firmwarefilename) OrElse Firmwarefilename.Count = 0 Then
|
||||
MsgBox($"No firmware selected")
|
||||
Return
|
||||
End If
|
||||
If String.IsNullOrEmpty(ReleaseNotes_txt.Text) Then
|
||||
MsgBox($"No release remarks are entered")
|
||||
Return
|
||||
End If
|
||||
If String.IsNullOrEmpty(ReleasePassword_txt.Text) Then
|
||||
MsgBox($"The publishing password is not entered")
|
||||
Return
|
||||
End If
|
||||
|
||||
If CheckBox2.Checked Then
|
||||
If IsNothing(Firmwarefilename) OrElse Firmwarefilename.Count = 0 Then
|
||||
MsgBox($"The LV2 firmware is not selected")
|
||||
Return
|
||||
Else
|
||||
If Firmwarefilename.ContainsKey(Firmware_box.Text) Then
|
||||
FromDic.Add("App_Cfg_For_L2", Firmwarefilename.Item(Firmware_box.Text))
|
||||
Else
|
||||
MsgBox($"Data on the LV2 firmware is lost")
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If CheckBox4.Checked Then
|
||||
If IsNothing(Firmwarefilenamev4) OrElse Firmwarefilenamev4.Count = 0 Then
|
||||
MsgBox($"LV4 firmware is not selected")
|
||||
Return
|
||||
Else
|
||||
If Firmwarefilenamev4.ContainsKey(ComboBox1.Text) Then
|
||||
FromDic.Add("App_Cfg_For_L4", Firmwarefilenamev4.Item(ComboBox1.Text))
|
||||
Else
|
||||
MsgBox($"LV4 firmware data is lost")
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
if CheckBox4.Checked OrElse CheckBox2.Checked Then
|
||||
Else
|
||||
MsgBox($"Firmware file is not selected!")
|
||||
Return
|
||||
End If
|
||||
|
||||
|
||||
Me.DialogResult = System.Windows.Forms.DialogResult.OK
|
||||
Me.Close()
|
||||
Return
|
||||
'RaiseEvent ReleaseControlData(ReleasePassword_txt.Text, ReleaseNotes_txt.Text, Firmwarefilename)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Cancel_btn_Click(sender As Object, e As EventArgs) Handles Cancel_btn.Click
|
||||
Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
||||
Me.Close()
|
||||
'RaiseEvent ReleaseControlData("", "")
|
||||
'Me.Hide()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub Firmware_box_SelectionChangeCommitted(sender As Object, e As EventArgs) Handles Firmware_box.SelectionChangeCommitted
|
||||
If Firmwarefilename.ContainsKey(Firmware_box.SelectedItem.ToString) Then
|
||||
TextBox1.Text = Firmwarefilename.Item(Firmware_box.SelectedItem.ToString)(3)
|
||||
End If
|
||||
'TextBox1.Text = Firmwarefilename.Item(Firmware_box.SelectedItem.ToString)(3)
|
||||
'If IsNothing(FirmwareList) OrElse FirmwareList.Count = 0 Then Return
|
||||
'If Firmwarefilename.ContainsKey (Firmware_box.Text) Then
|
||||
' FromDic .Add ("App_Cfg_For_L2",Firmwarefilename.Item (Firmware_box.Text))
|
||||
'End If
|
||||
'For Each fiemware In FirmwareList
|
||||
' If fiemware.Item("FileName").Equals(Firmware_box.Text) Then
|
||||
' Firmwarefilename.Clear()
|
||||
' Firmwarefilename = fiemware
|
||||
' TextBox1.Text = fiemware.Item("Remark")
|
||||
' End If
|
||||
'Next
|
||||
End Sub
|
||||
|
||||
Private Sub ComboBox1_SelectionChangeCommitted(sender As Object, e As EventArgs) Handles ComboBox1.SelectionChangeCommitted
|
||||
If Firmwarefilenamev4.ContainsKey(ComboBox1.SelectedItem.ToString) Then
|
||||
TextBox2.Text = Firmwarefilenamev4.Item(ComboBox1.SelectedItem.ToString)(3)
|
||||
End If
|
||||
|
||||
'TextBox2.Text = Firmwarefilenamev4.Item(ComboBox1.SelectedItem.ToString)(3)
|
||||
'If IsNothing(FirmwareList) OrElse FirmwareList.Count = 0 Then Return
|
||||
'For Each fiemware In FirmwareList
|
||||
' If fiemware.Item("FileName").Equals(ComboBox1.Text) Then
|
||||
' Firmwarefilenamev4.Clear()
|
||||
' Firmwarefilenamev4 = fiemware
|
||||
' TextBox2.Text = fiemware.Item("Remark")
|
||||
' End If
|
||||
'Next
|
||||
End Sub
|
||||
|
||||
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
|
||||
If Firmwarefilenamev4.ContainsKey(ComboBox1.SelectedItem.ToString) Then
|
||||
TextBox2.Text = Firmwarefilenamev4.Item(ComboBox1.SelectedItem.ToString)(3)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Firmware_box_SelectedIndexChanged(sender As Object, e As EventArgs) Handles Firmware_box.SelectedIndexChanged
|
||||
If Firmwarefilename.ContainsKey(Firmware_box.SelectedItem.ToString) Then
|
||||
TextBox1.Text = Firmwarefilename.Item(Firmware_box.SelectedItem.ToString)(3)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user