'from AVCS CORE INIT_MAIN - inline function "AVCS_LoadAllProfMiscCommands"
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections
Imports System.Collections.Generic
Public Class VAInline
dim cmdIndex as Int32
dim cmdProfMax as Int32 = 16
dim phrase as string
dim phrases as string
dim phraseArray() as string
dim phrasesList() as string
dim profileUnique as string = ""
dim phrasesFinal as new list(of string) ()
dim activeProfile as string = "CORE"
Public Sub Main()
if ((VA.GetText("~profile_to_init")) IsNot nothing)
activeProfile = VA.GetText("~profile_to_init")
end if
if ((VA.GetInt("AVCS_" + activeProfile + "_PCMOS_MAX")) IsNot nothing)
cmdProfMax = Convert.ToInt32(VA.GetInt("AVCS_" + activeProfile + "_PCMOS_MAX"))
end if
'Load all Profile Commands (Miscellaneous)
for cmdIndex = 1 to cmdProfMax
if (((VA.GetText("AVCS_" + activeProfile + "_MISC_" + cmdIndex.ToString())) IsNot nothing) and ((VA.GetText("AVCS_" + activeProfile + "_DATA_MISC_" + cmdIndex.ToString())) IsNot nothing))
phrases = (VA.GetText("AVCS_" + activeProfile + "_MISC_" + cmdIndex.ToString()))
phraseArray = vaProxy.Utility.ExtractPhrases(phrases, true, true)
for each phrase in phraseArray
if ((not(phrase = "")) and (not(phrasesFinal.Contains(phrase))))
phrasesFinal.Add(phrase)
profileUnique = profileUnique + phrase + ";"
VA.SetText(phrase, cmdIndex.ToString())
end if
next
end if
next
if not (profileUnique = "")
VA.SetText("AVCS_" + activeProfile + "_COMMANDS_MISC", profileUnique)
else
VA.SetText("AVCS_" + activeProfile + "_COMMANDS_MISC", nothing)
end if
End Sub
End Class
Comments
0 B
|0 👍
/0 👎
0 B
|👍
/👎