<commit_before>Attribute VB_Name = "GMain"
Option Explicit

''
' Description here
'
'@/

'@================================================================================
' Enums
'@================================================================================

'@================================================================================
' Types
'@================================================================================

'@================================================================================
' Constants
'@================================================================================

Public Const ProjectName                            As String = "TradeSkilDemo27"
Private Const ModuleName                            As String = "GMain"

Public Const ConfigFileVersion                      As String = "1.3"

Public Const ConfigSectionApplication               As String = "Application"
'Public Const ConfigSectionChart                     As String = "Chart"
Public Const ConfigSectionCharts                    As String = "Charts"
Public Const ConfigSectionConfigEditor              As String = "ConfigEditor"
'Public Const ConfigSectionContract                  As String = "Contract"
Public Const ConfigSectionDefaultStudyConfigs       As String = "DefaultStudyConfigs"
Public Const ConfigSectionChartStyles               As String = "/ChartStyles"
Public Const ConfigSectionFloatingFeaturesPanel     As String = "FloatingFeaturesPanel"
Public Const ConfigSectionFloatingInfoPanel         As String = "FloatingInfoPanel"
Public Const ConfigSectionHistoricCharts            As String = "HistoricCharts"
Public Const ConfigSectionMainForm                  As String = "MainForm"
Public Const ConfigSectionOrderTicket               As String = "OrderTicket"
Public Const ConfigSectionTickerGrid                As String = "TickerGrid"

Public Const ConfigSettingDataSourceKey             As String = "&DataSourceKey"
Public Const ConfigSettingHistorical                As String = "&Historical"
Public Const ConfigSettingHeight                    As String = "&Height"
Public Const ConfigSettingLeft                      As String = "&Left"
Public Const ConfigSettingTop                       As String = "&Top"
Public Const ConfigSettingWidth                     As String = "&Width"
Public Const ConfigSettingWindowstate               As String = "&Windowstate"
Public Const ConfigSettingFeaturesPanelHidden       As String = "&FeaturesPanelHidden"
Public Const ConfigSettingFeaturesPanelPinned       As String = "&FeaturesPanelPinned"
Public Const ConfigSettingInfoPanelHidden           As String = "&InfoPanelHidden"
Public Const ConfigSettingInfoPanelPinned           As String = "&InfoPanelPinned"
Public Const ConfigSettingCurrentTheme              As String = "&CurrentTheme"

Public Const ConfigSettingCurrentChartStyle         As String = "&CurrentChartStyle"
Public Const ConfigSettingCurrentHistChartStyle     As String = "&CurrentHistChartStyle"

Public Const ConfigSettingAppCurrentChartStyle      As String = ConfigSectionApplication & ConfigSettingCurrentChartStyle
Public Const ConfigSettingAppCurrentHistChartStyle  As String = ConfigSectionApplication & ConfigSettingCurrentHistChartStyle

Public Const ConfigSettingConfigEditorLeft          As String = ConfigSectionConfigEditor & ConfigSettingLeft
Public Const ConfigSettingConfigEditorTop           As String = ConfigSectionConfigEditor & ConfigSettingTop

Public Const ConfigSettingMainFormHeight            As String = ConfigSectionMainForm & ConfigSettingHeight
Public Const ConfigSettingMainFormLeft              As String = ConfigSectionMainForm & ConfigSettingLeft
Public Const ConfigSettingMainFormTop               As String = ConfigSectionMainForm & ConfigSettingTop
Public Const ConfigSettingMainFormWidth             As String = ConfigSectionMainForm & ConfigSettingWidth
Public Const ConfigSettingMainFormWindowstate       As String = ConfigSectionMainForm & ConfigSettingWindowstate

Public Const ConfigSettingOrderTicketLeft           As String = ConfigSectionOrderTicket & ConfigSettingLeft
Public Const ConfigSettingOrderTicketTop            As String = ConfigSectionOrderTicket & ConfigSettingTop

Public Const ConfigSettingFloatingFeaturesPanelLeft As String = ConfigSectionFloatingFeaturesPanel & ConfigSettingLeft
Public Const ConfigSettingFloatingFeaturesPanelTop  As String = ConfigSectionFloatingFeaturesPanel & ConfigSettingTop
Public Const ConfigSettingFloatingFeaturesPanelWidth  As String = ConfigSectionFloatingFeaturesPanel & ConfigSettingWidth
Public Const ConfigSettingFloatingFeaturesPanelHeight As String = ConfigSectionFloatingFeaturesPanel & ConfigSettingHeight

Public Const ConfigSettingFloatingInfoPanelLeft     As String = ConfigSectionFloatingInfoPanel & ConfigSettingLeft
Public Const ConfigSettingFloatingInfoPanelTop      As String = ConfigSectionFloatingInfoPanel & ConfigSettingTop
Public Const ConfigSettingFloatingInfoPanelWidth    As String = ConfigSectionFloatingInfoPanel & ConfigSettingWidth
Public Const ConfigSettingFloatingInfoPanelHeight   As String = ConfigSectionFloatingInfoPanel & ConfigSettingHeight

Private Const DefaultAppInstanceConfigName          As String = "Default Config"

Public Const ChartStyleNameAppDefault               As String = "Application default"
Public Const ChartStyleNameBlack                    As String = "Black"
Public Const ChartStyleNameDarkBlueFade             As String = "Dark blue fade"
Public Const ChartStyleNameGoldFade                 As String = "Gold fade"

Public Const LB_SETHORZEXTENT                       As Long = &H194

' the SSTAB control subtracts this amount from the Left property of controls
' that are not on the active tab to ensure they aren't visible
Public Const SSTabInactiveControlAdjustment         As Long = 75000

' command line switch indicating which configuration to load
' when the programs starts (if not specified, the default configuration
' is loaded)
Public Const SwitchConfig                           As String = "config"

Public Const WindowStateMaximized                   As String = "Maximized"
Public Const WindowStateMinimized                   As String = "Minimized"
Public Const WindowStateNormal                      As String = "Normal"

'@================================================================================
' Member variables
'@================================================================================

Private mIsInDev                                    As Boolean

Private mConfigStore                                As ConfigurationStore
Private mConfigChangeMonitor                        As ConfigChangeMonitor

Private mEditConfig                                 As Boolean

Private mFatalErrorHandler                          As FatalErrorHandler

Private mMainForm                                   As fTradeSkilDemo

Private mConfigEditor                               As fConfigEditor

Private mSplash                                     As fSplash

Private mFinished                                   As Boolean

'@================================================================================
' Class Event Handlers
'@================================================================================

'@================================================================================
' XXXX Interface Members
'@================================================================================

'@================================================================================
' XXXX Event Handlers
'@================================================================================

'@================================================================================
' Properties
'@================================================================================

Public Property Get gAppTitle() As String
gAppTitle = App.ProductName & _
                " v" & _
                App.Major & "." & App.Minor & App.Revision
End Property

Public Property Get gCommandLineParser() As CommandLineParser
Const ProcName As String = "gCommandLineParser"
Static clp As CommandLineParser

On Error GoTo Err

If clp Is Nothing Then Set clp = CreateCommandLineParser(Command)
Set gCommandLineParser = clp

Exit Property
<commit_msg>Fix version number in window title<commit_after>Attribute VB_Name = "GMain"
Option Explicit

''
' Description here
'
'@/

'@================================================================================
' Enums
'@================================================================================

'@================================================================================
' Types
'@================================================================================

'@================================================================================
' Constants
'@================================================================================

Public Const ProjectName                            As String = "TradeSkilDemo27"
Private Const ModuleName                            As String = "GMain"

Public Const ConfigFileVersion                      As String = "1.3"

Public Const ConfigSectionApplication               As String = "Application"
'Public Const ConfigSectionChart                     As String = "Chart"
Public Const ConfigSectionCharts                    As String = "Charts"
Public Const ConfigSectionConfigEditor              As String = "ConfigEditor"
'Public Const ConfigSectionContract                  As String = "Contract"
Public Const ConfigSectionDefaultStudyConfigs       As String = "DefaultStudyConfigs"
Public Const ConfigSectionChartStyles               As String = "/ChartStyles"
Public Const ConfigSectionFloatingFeaturesPanel     As String = "FloatingFeaturesPanel"
Public Const ConfigSectionFloatingInfoPanel         As String = "FloatingInfoPanel"
Public Const ConfigSectionHistoricCharts            As String = "HistoricCharts"
Public Const ConfigSectionMainForm                  As String = "MainForm"
Public Const ConfigSectionOrderTicket               As String = "OrderTicket"
Public Const ConfigSectionTickerGrid                As String = "TickerGrid"

Public Const ConfigSettingDataSourceKey             As String = "&DataSourceKey"
Public Const ConfigSettingHistorical                As String = "&Historical"
Public Const ConfigSettingHeight                    As String = "&Height"
Public Const ConfigSettingLeft                      As String = "&Left"
Public Const ConfigSettingTop                       As String = "&Top"
Public Const ConfigSettingWidth                     As String = "&Width"
Public Const ConfigSettingWindowstate               As String = "&Windowstate"
Public Const ConfigSettingFeaturesPanelHidden       As String = "&FeaturesPanelHidden"
Public Const ConfigSettingFeaturesPanelPinned       As String = "&FeaturesPanelPinned"
Public Const ConfigSettingInfoPanelHidden           As String = "&InfoPanelHidden"
Public Const ConfigSettingInfoPanelPinned           As String = "&InfoPanelPinned"
Public Const ConfigSettingCurrentTheme              As String = "&CurrentTheme"

Public Const ConfigSettingCurrentChartStyle         As String = "&CurrentChartStyle"
Public Const ConfigSettingCurrentHistChartStyle     As String = "&CurrentHistChartStyle"

Public Const ConfigSettingAppCurrentChartStyle      As String = ConfigSectionApplication & ConfigSettingCurrentChartStyle
Public Const ConfigSettingAppCurrentHistChartStyle  As String = ConfigSectionApplication & ConfigSettingCurrentHistChartStyle

Public Const ConfigSettingConfigEditorLeft          As String = ConfigSectionConfigEditor & ConfigSettingLeft
Public Const ConfigSettingConfigEditorTop           As String = ConfigSectionConfigEditor & ConfigSettingTop

Public Const ConfigSettingMainFormHeight            As String = ConfigSectionMainForm & ConfigSettingHeight
Public Const ConfigSettingMainFormLeft              As String = ConfigSectionMainForm & ConfigSettingLeft
Public Const ConfigSettingMainFormTop               As String = ConfigSectionMainForm & ConfigSettingTop
Public Const ConfigSettingMainFormWidth             As String = ConfigSectionMainForm & ConfigSettingWidth
Public Const ConfigSettingMainFormWindowstate       As String = ConfigSectionMainForm & ConfigSettingWindowstate

Public Const ConfigSettingOrderTicketLeft           As String = ConfigSectionOrderTicket & ConfigSettingLeft
Public Const ConfigSettingOrderTicketTop            As String = ConfigSectionOrderTicket & ConfigSettingTop

Public Const ConfigSettingFloatingFeaturesPanelLeft As String = ConfigSectionFloatingFeaturesPanel & ConfigSettingLeft
Public Const ConfigSettingFloatingFeaturesPanelTop  As String = ConfigSectionFloatingFeaturesPanel & ConfigSettingTop
Public Const ConfigSettingFloatingFeaturesPanelWidth  As String = ConfigSectionFloatingFeaturesPanel & ConfigSettingWidth
Public Const ConfigSettingFloatingFeaturesPanelHeight As String = ConfigSectionFloatingFeaturesPanel & ConfigSettingHeight

Public Const ConfigSettingFloatingInfoPanelLeft     As String = ConfigSectionFloatingInfoPanel & ConfigSettingLeft
Public Const ConfigSettingFloatingInfoPanelTop      As String = ConfigSectionFloatingInfoPanel & ConfigSettingTop
Public Const ConfigSettingFloatingInfoPanelWidth    As String = ConfigSectionFloatingInfoPanel & ConfigSettingWidth
Public Const ConfigSettingFloatingInfoPanelHeight   As String = ConfigSectionFloatingInfoPanel & ConfigSettingHeight

Private Const DefaultAppInstanceConfigName          As String = "Default Config"

Public Const ChartStyleNameAppDefault               As String = "Application default"
Public Const ChartStyleNameBlack                    As String = "Black"
Public Const ChartStyleNameDarkBlueFade             As String = "Dark blue fade"
Public Const ChartStyleNameGoldFade                 As String = "Gold fade"

Public Const LB_SETHORZEXTENT                       As Long = &H194

' the SSTAB control subtracts this amount from the Left property of controls
' that are not on the active tab to ensure they aren't visible
Public Const SSTabInactiveControlAdjustment         As Long = 75000

' command line switch indicating which configuration to load
' when the programs starts (if not specified, the default configuration
' is loaded)
Public Const SwitchConfig                           As String = "config"

Public Const WindowStateMaximized                   As String = "Maximized"
Public Const WindowStateMinimized                   As String = "Minimized"
Public Const WindowStateNormal                      As String = "Normal"

'@================================================================================
' Member variables
'@================================================================================

Private mIsInDev                                    As Boolean

Private mConfigStore                                As ConfigurationStore
Private mConfigChangeMonitor                        As ConfigChangeMonitor

Private mEditConfig                                 As Boolean

Private mFatalErrorHandler                          As FatalErrorHandler

Private mMainForm                                   As fTradeSkilDemo

Private mConfigEditor                               As fConfigEditor

Private mSplash                                     As fSplash

Private mFinished                                   As Boolean

'@================================================================================
' Class Event Handlers
'@================================================================================

'@================================================================================
' XXXX Interface Members
'@================================================================================

'@================================================================================
' XXXX Event Handlers
'@================================================================================

'@================================================================================
' Properties
'@================================================================================

Public Property Get gAppTitle() As String
gAppTitle = App.ProductName & _
                " v" & _
                App.Major & "." & App.Minor & "." & App.Revision
End Property

Public Property Get gCommandLineParser() As CommandLineParser
Const ProcName As String = "gCommandLineParser"
Static clp As CommandLineParser

On Error GoTo Err

If clp Is Nothing Then Set clp = CreateCommandLineParser(Command)
Set gCommandLineParser = clp

Exit Property

{'fraction_non_alphanumeric': 0.18585081444972051, 'fraction_numerical': 0.0014425677706317245, 'mean_word_length': 3.755072877965133, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4710446', 'n_tokens_mistral': 3357, 'n_tokens_neox': 3165, 'n_words': 1069}