Click or drag to resize

FormActMain Class

The main ACT form
Inheritance Hierarchy
SystemObject
  SystemMarshalByRefObject
    System.ComponentModelComponent
      System.Windows.FormsControl
        System.Windows.FormsScrollableControl
          System.Windows.FormsContainerControl
            System.Windows.FormsForm
              Advanced_Combat_TrackerFormActMain

Namespace:  Advanced_Combat_Tracker
Assembly:  Advanced Combat Tracker (in Advanced Combat Tracker.exe) Version: 3.8.2.285
Syntax
C#
public class FormActMain : Form

The FormActMain type exposes the following members.

Constructors
  NameDescription
Public methodFormActMain
Initializes a new instance of the FormActMain class
Top
Properties
  NameDescription
Public propertyActColorSettings
Contains controls that make up the ACT color options. Retrieve/change colors or subscribe to change events. (ForeColorSettingChanged)
Public propertyActiveCustomTriggers
Gets a list of Custom Triggers currently enabled
Public propertyActiveZone
The ZoneData object that represents the last zone an encounter was added to
Public propertyActPlugins
List of plugins shown in the UI. Call PluginsApplyOrderToUI() if modified. Avoid adding or removing entries, only reorder.
Public propertyAfterCombatActionDataLock
While this object is locked, ACT will not add data to encounters. This may prevent an encounter from ending if there is data queued. Usage: lock(AfterCombatActionDataLock) { code here; }
Public propertyAppDataFolder
ACT's application data folder for logs, config files, etc... %APPDATA%\Advanced Combat Tracker\
Public propertyCharacterFileNameRegex
Regex used to determine the character's name from the log's file path. The character name will be set as the first capturing group.
Public propertyCurrentZone
Public propertyCustomTriggers
All current Custom Trigger Definitions
Public propertyDefaultPersonalTextFormat
The text export format to use when there are no presets
Public propertyDefaultTextFormat
The text export format to use when there are no presets
Public propertyDpiScale
The scaling factor of the monitor that ACT is on
Public propertyEncDatabase
Public propertyGameMacroFolder
The base folder where ACT generated macro exports should go. In EQ2 this is simply the base game folder.
Public propertyGlobalTimeSorter
Used to sort log entries of the same timestamp and match up events with log lines in the View Logs window
Public propertyInCombat
If ACT thinks it is currently in active combat. It is a VERY bad idea to set this variable. Please allow it to be set by SetEncounter() and EndCombat().
Public propertyInitActDone
Evaluates to true if ACT has finished initializing
Public propertyIoControlSets
Contains the controls to be visible given a certain Node.FullPath of IoTreeView
Public propertyIoTreeView
The TreeView for the Import/Export tab
Public propertyIsActClosing
Public propertyKnownActAssemblyNames
ACT will warn the user if ACT's folder contains assemblies not on this list. This is to curtail the bad practice of putting plugins in the default search path.
Public propertyLastEstimatedTime
The last known time by reading the time stamps of the log file plus the number of seconds since the last update
Public propertyLastHostileTime
The last time SetEncounter was called by a parsing event.
Public propertyLastKnownTime
The last known time by reading the time stamps of the log file
Public propertyLastLogLine
Public propertyLogEncoding
The encoding ACT will open a log with. (Default is UTF8) If you change this value, you should call OpenLog() for it to take effect.
Public propertyLogFileFilter
The file filter to use in order to find log files, such as "eq2log*.txt"
Public propertyLogFileParentFolderName
The base logs folder name. This is used to determine if the folder one or more levels up is the base log folder or hidden through a UNC path share For example, the log file is C:\EQ2\Logs\Permafrost\eq2log_Aditu.txt If "Logs" is entered here, ACT will search all sub-folders of Logs for updated log files. In the case that the file path of the currently open file does not contain this value, like a UNC share path, ACT will not look farther than the current folder for log files.
Public propertyLogFilePath
Currently used log file. To open a new log file, change this property and call OpenLog()
Public propertyLogPathHasCharName
Public propertyMainTreeView
The TreeView object of the main window. You should not navigate through the nodes to enumerate things as the node collection is populated dynamically as nodes are expanded
Public propertyOptionsControlSets
Contains the controls to be visible given a certain Node.FullPath of OptionsTreeView
Public propertyOptionsTreeView
The TreeView for the Options tab
Public propertyOriginalLoglineCustomTriggers
When enabled, the log lines passed to Custom Triggers are the original log lines instead of the version modified by plugins.
Public propertyOriginalLoglineViewLogs
When enabled, the log lines appearing in View Logs are the original log lines instead of the version modified by plugins.
Public propertyPortable
If ACT started in Portable mode and is trying to keep files out of %APPDATA%/%TEMP%
Public propertyReadThreadLock
Suspends log file reading of the currently open log file
Public propertySnippetShareRegex
Used to parse arbitrary log lines for XML snippet sharing. By default it follows a EQ2 specific format; should fail quickly otherwise.
Public propertyTemporaryFolder
The temp folder that ACT uses. May be in %TEMP%.
Public propertyTextExportFormats
A list of TextExportFormatOptions that ACT uses for text exports in mini-parse, clipboard exports, etc. Do NOT directly modify. Use AddTextFormat() / RemoveTextFormat()
Public propertyTextExportFormatterCap1
The left mark that offsets a text export format variable such as '{' or '<format>'
Public propertyTextExportFormatterCap2
The right mark that offsets a text export format variable such as '}' or '</format>'
Public propertyTextExportFormatterRegex
This regex must split apart a text export formatting string into matches containing an export formatter or plain text If a match is a formatting variable, it must be put into the "formatter" capture group If a match is plain text, it must be put into the "text" capture group What is left and right of the "formatter" must be assigned to TextExportFormatterCap1 and TextExportFormatterCap2 respectively Default is: "{(?<formatter>[^}]+)}|(?<text>[^{]+)"
Public propertyTimeStampLen
The number of characters the full timestamp takes from the beginning of the line until the first character of the rest of the line Include spaces.
Public propertyZoneChangeRegex
The full Regex to detect zone changes within a log file. This is specifically used by a quick scan method to find the zone name without the normal parsing engine encountering the line.
Public propertyZoneDatabase
Public propertyZoneList
Contains a list of ZoneData objects that exist in memory
Top
Methods
  NameDescription
Public methodActCommands
Accepts text commands to perform specific functions. In EQ2, if someone were to type "/act end", the parser would split apart the resulting text and send "end" to this method.
Public methodAddCombatAction(MasterSwing)
Runs the parsed data through the renaming checks(Data Correction tab), raises API events, notifies the Spell Timers window and adds the data to the current encounter
Public methodAddCombatAction(Int32, Boolean, String, String, String, Dnum, DateTime, Int32, String, String)
Runs the parsed data through the renaming checks(Data Correction tab), raises API events, notifies the Spell Timers window and adds the data to the current encounter
Public methodAddEditCustomTrigger
Public methodAddPluginPanel
Public methodAddTextFormat
Adds a new text export format to TextExportFormats and updates ACT's dropdown controls
Public methodChangeZone
Change the current zone name and update history DB
Public methodStatic memberCondenseGCMemory
Public methodCornerControlAdd
Add a control to the upper-right corner of ACT. Avoid heights greater than 24px
Public methodCornerControlRemove
Remove a control reference from the corner controls layout
Public methodCreateAssemblyReport
Public methodCreateDamageString
Protected methodDispose
Clean up any resources being used.
(Overrides FormDispose(Boolean).)
Public methodEncDatabaseAdd
Public methodEncountersToXml
Outputs Encounters as XML CombatActions
Public methodEndCombat
Sets the InCombat flag to false, ends the currently active encounters, updates their treeview labels, enters the data into the history database and if applicable runs the export functions
Public methodExportControlChildrenText
Public methodExportControlTextXML(Stream)
Export the Text property of all Form controls to an XML stream
Public methodExportControlTextXML(String)
Exports the Text property of all Form controls to an XML file (the -exportcontroltext switch for ACT can demonstrate this)
Public methodGetAttackTypeColumns
Gets a list of column names(Usable in GetColumnByName()) for the AttackType view table
Public methodGetAutomaticUpdatesAllowed
Gets whether the user preferences allow ACT to automatically check for updates
Public methodGetCombatantDataColumns
Gets a list of column names(Usable in GetColumnByName()) for the Combatant view table
Public methodGetCompanionFilePath
Creates a file path of a Companion Log file given a Main Log file and Companion name
Public methodGetDamageTypeDataColumns
Gets a list of column names(Usable in GetColumnByName()) for the DamageType view table
Public methodGetEncounterDataColumns
Gets a list of column names(Usable in GetColumnByName()) for the Encounter view table
Public methodGetGraphFillColors
Gets an array of Color structures defined by the Graph Color settings
Public methodGetPersonalTextExport
Public methodGetTextExport(EncounterData, TextExportFormatOptions)
Gets a text export of an encounter using formatters
Public methodGetTextExport(Int32, Int32, TextExportFormatOptions)
Gets a text export of an encounter using formatters
Public methodGetTextExport(Int32, Int32, Int32)
Gets a text export of an encounter using formatters
Public methodGetTextExport(EncounterData, TextExportFormatOptions, Font, Int32)
Public methodGetTextExport(Int32, Int32, TextExportFormatOptions, Font, Int32)
Public methodGetTextExport(Int32, Int32, Int32, Font, Int32)
Gets a text export of an encounter using formatters and column alignment
Public methodGetVersion
Gets the current version of ACT
Public methodStatic memberGetWindowRect
Public methodImportControlChilderenText
Public methodImportControlTextXML(Stream)
Imports an XML stream to replace the Text property of controls in this Form
Public methodImportControlTextXML(String)
Imports an XML file to replace the Text property of controls in this Form
Public methodStatic memberInvokeAddXmlShareToList
Public methodLoadNewSettings
Public methodLoadXmlRecords
Public methodMakeAbsolutePathString
Make an absolute path from a relative path and its reference path
Public methodMakeRelativePathString
Make a path relative to the given folder.
Public methodMemCompressGZip
Compresses an array of bytes with GZip
Public methodMemDecompressGzip
Uncompresses an array of bytes compressed with GZip
Public methodNotificationAdd
Add a notification to the main window Notifications tab
Public methodOpenCompanionLogs
Public methodOpenLog
Aborts the current log reading thread and opens the log file specified in the LogFilePath property
Public methodParseRawLogLine
Insert a log line into the parsing engine You should increment GlobalTimeSorter if you expect this line to generate combat data
Public methodPlayCommandSound
Plays the sound configured in Options -> Sound -> Command sound
Public methodPlayExportSound
Plays the sound configured in Options -> Sound -> Export sound
Public methodPlayMiscSound
Plays the sound configured in Options -> Sound -> Misc sound
Public methodPlaySound
Plays a PCM wave file using the currently selected implementation in PlaySoundMethod.
Public methodPlaySoundNull
Public methodPlaySoundWinApi
Public methodPlaySoundWmpApi
Public methodPlayTtsDirect
Public methodPlayTtsWavIntermediary
Public methodPluginCornerControlAdd
Add a control to the upper-right corner of the Plugin Listing tab. Avoid heights greater than 22px
Public methodPluginCornerControlRemove
Remove a control reference from the plugin corner controls layout
Public methodPluginDownload
Downloads a plugin file. May use WININET caching if requested more than once per ACT execution.
Public methodPluginGetGithubApi
Gets the GitHub API cache file of the plugin at advancedcombattracker.com (No rate limit) If the plugin is not GitHub hosted, this will throw an exception. The cache file is updated every 3 minutes if GitHub says it needs to be.
Public methodPluginGetRemoteDateUtc
Gets the DateTime of the plugin at advancedcombattracker.com
Public methodPluginGetRemoteVersion
Gets the version string of the plugin at advancedcombattracker.com
Public methodPluginGetSelfData
Gets the data about the current plugin instance
Public methodPluginGetSelfDateUtc
Gets the DateTime of the currently running plugin
Public methodPluginsApplyOrderToUI
Reads the ActPlugins List and reorders the GUI plugins page.
Public methodStatic memberPrintWindow(IntPtr)
Public methodStatic memberPrintWindow(IntPtr, IntPtr, Int32)
Public methodRebuildActiveCustomTriggers
Public methodRemoveTextFormat
Remove a text export format from TextExportFormats and update ACT's dropdown controls
Public methodResetCheckLogs
Resets the file watcher to use current settings and enables it if the associated checkbox allows.
Public methodResizeLVCols
Resizes the columns on a ListView depending on the column header length and column content length
Public methodRestartACT
Prompts the user to restart ACT with a non-blocking message. (thread-safe)
Public methodSaveXmlRecords
Public methodSelectiveListAdd
Add a player to the Selective Parsing list; checkmarked
Public methodSelectiveListClear
Completely clears the Seletive Parsing list
Public methodSelectiveListGetMode
Gets the currently configured Selective Parsing mode from Options
Public methodSelectiveListGetSelected
Determines if a combatant is in the Selective Parsing list and checkmarked
Public methodSelectiveListRemove
Remove a player from the Selective Parsing list; unchecking or removing
Public methodSelectiveListUncheckAll
Unchecks all combatants in the Selective Parsing list
Public methodSendHtmlToClipboard
Sends HTML formatted data to the clipboard in plain text format and CF_HTML format, which can be viewed with WYSIWYG applications.
Public methodSendToClipboard
Sends text to the Windows Clipboard in three different ways, if any previous one fails. Also may send clipboard data to the ACT Clipboard Sharer if connected.
Public methodSendToMacroFile
Sends a text file to the EQ2 folder
Public methodSetEncounter
This method ensures combat actions are sent to the correct encounter instance and sets the InCombat flag. It also checks the Selective Parsing list to see if the action should be entered into the encounter or ignored.
Public methodSetIoHelpText
Sets the the text of the help panel in the Import/Export tab
Public methodSetOptionsHelpText
Sets the the text of the help panel in the Options tab
Public methodTraySliderAdd
Creates and returns a TraySlider on the UI thread with an OK button for 15 seconds and shows within 250ms
Public methodTTS
Performs Text to Speech using the currently selected implementation in PlayTtsMethod. (Default ACT implementation uses a intermediary WAV file to avoid buggy cutoffs during high CPU usage)
Public methodUnblockFiles
Scans a folder and subfolders for files with the downloaded zone identifier which might affect running code, then prompts the user to automatically unblock them
Public methodUncachedFileSave(FileInfo, MemoryStream)
Bypass Windows disk write caching to save a file. If the file exists, it will be deleted first. If the file destination file already contains the data, the entire operation is skipped.
Public methodUncachedFileSave(FileInfo, MemoryStream, Boolean)
Bypass Windows disk write caching to save a file. If the file exists, it will be deleted first.
Public methodUnZip
Unzips a file to a folder
Public methodUpdateMiniEnc
Immediately force an update to the Mini Window
Public methodValidateLists
Makes sure that the ACT options pages list all of the available columns. (Drop down selectors)
Public methodValidateTableSetup
Makes sure that the ACT options pages list all of the available columns. (Main table columns/sorters)
Public methodWriteDebugLog
Writes debugging information to the error log *if* ACT was started with the -debug switch.
Public methodWriteExceptionLog
Writes an exception to ACT's default error log
Public methodWriteInfoLog
Writes an informational message to the error log
Public methodXmlToEncounters
Parses an XML stream created by EncountersToXml()
Public methodZoneDatabaseAdd
Top
Events
  NameDescription
Public eventActLifecycleChanged
Receives events for the different stages of ACT startup and when it initially starts to close
Public eventAfterCombatAction
A parsed combat action after it is entered as data. Subscribing to this event shows the data in its final form. Changing the action now would yield no meaningful results.
Public eventBeforeClipboardSet
Public eventBeforeCombatAction
A parsed combat action before it is entered as data. Subscribing to this event allows you to change parsed data in real time.
Public eventBeforeLogLineRead
Every time a log line is read. Parsing plugins should subscribe to this event. Plugins can change the log line before OnLogLineRead subscribers see it or before it is saved in View Logs or passed to the Custom Trigger engine.
Public eventLogFileChanged
When a different log file is opened by ACT; manually or automatically
Public eventLogFileRenamed
When a log file is renamed to an archive name, typically before the old filename is re-opened as blank
Public eventOnCombatEnd
When an active encounter is ended
Public eventOnCombatStart
When a new encounter is started, before any data is entered
Public eventOnLogLineRead
Every time a log line passes through the parsing engine. May be modified by BeforeLogLineRead subscribers.
Public eventUpdateCheckClicked
Triggered when the user manually checks for ACT updates
Public eventUrlRequest
Handle a client requesting a URL from ACT's web interface
Public eventXmlSnippetAdded
Event for when ACT is instructed to add the data from an XML snippet (the XML data should be parsed and commited)
Top
Fields
  NameDescription
Public fieldGenerateAttackTypeGraph
A replaceable method which will alter graphing of the main tab
Public fieldGenerateCombatantGraph
A replaceable method which will alter graphing of the main tab
Public fieldGenerateDamageTypeGraph
A replaceable method which will alter graphing of the main tab
Public fieldGenerateEncounterGraph
A replaceable method which will alter graphing of the main tab
Public fieldGetDateTimeFromLog
A replacable method that will parse the DateTime from a log line
Public fieldPlaySoundMethod
A replacable method that will handle sound output. Save this to a local variable if you plan on restoring the ACT default later.
Public fieldPlayTtsMethod
A replacable method that will handle Text to Speech. Save this to a local variable if you plan on restoring the ACT default later.
Public fieldWebIndexLinks
A collection of links to display on the web server's index page
Top
See Also