Update comments

This commit is contained in:
Andy McFadden 2023-04-06 18:26:14 -07:00
parent 08243bf19c
commit ca50730611
7 changed files with 17 additions and 8 deletions

View File

@ -323,7 +323,8 @@ namespace PluginCommon {
/// Will be null for direct-color images. Do not modify.
/// </summary>
/// <remarks>
/// It's possible, but weird, for the array to have a length of zero.
/// It's possible, but weird, for the array to have a length of zero. For best results
/// with GIF images, only one palette entry should be transparent.
/// </remarks>
int[] GetPalette();

View File

@ -64,6 +64,12 @@ namespace PluginCommon {
return mPalette[pix];
}
/// <summary>
/// Gets the color index for a single pixel.
/// </summary>
/// <param name="x">X coordinate.</param>
/// <param name="y">Y coordinate.</param>
/// <returns>Color index.</returns>
public byte GetPixelIndex(int x, int y) {
return mData[x + y * Width];
}

View File

@ -187,6 +187,7 @@ namespace SourceGen {
/// </summary>
/// <returns></returns>
public AppSettings GetCopy() {
// TODO: make this a copy constructor?
AppSettings copy = new AppSettings();
//copy.mSettings.EnsureCapacity(mSettings.Count);
foreach (KeyValuePair<string, string> kvp in mSettings) {
@ -202,7 +203,7 @@ namespace SourceGen {
/// discarding the object itself, which is useful in case something has cached a
/// reference to the singleton.
/// </summary>
/// <param name="newSettings"></param>
/// <param name="newSettings">Object with new settings.</param>
public void ReplaceSettings(AppSettings newSettings) {
// Clone the new list, and stuff it into the old object. This way the
// objects aren't sharing lists.
@ -213,8 +214,7 @@ namespace SourceGen {
/// <summary>
/// Merges settings from another settings object into this one.
/// </summary>
/// <param name="settings"></param>
/// <param name="newSettings"></param>
/// <param name="newSettings">Object with new settings.</param>
public void MergeSettings(AppSettings newSettings) {
foreach (KeyValuePair<string, string> kvp in newSettings.mSettings) {
mSettings[kvp.Key] = kvp.Value;

View File

@ -35,8 +35,8 @@ limitations under the License.
<system:String x:Key="str_OmfFileLibraryStr">a Library file</system:String>
<system:String x:Key="str_OmfFileIndeterminateStr">a file of indeterminate type</system:String>
<system:String x:Key="str_OmfFileSummaryFmt">This is {0}, with {1} segment</system:String>
<system:String x:Key="str_OmfFileSummaryPlFmt">This is {0}, with {1} segments</system:String>
<system:String x:Key="str_OmfFileSummaryFmt">This is {0}, with {1} segment (double-click to examine):</system:String>
<system:String x:Key="str_OmfFileSummaryPlFmt">This is {0}, with {1} segments (double-click to examine):</system:String>
<system:String x:Key="str_OmfFileNot">This is not an Apple II OMF file</system:String>
<system:String x:Key="str_OmfLoaderFail">Unable to prepare data file for project.</system:String>

View File

@ -32,7 +32,6 @@ namespace SourceGen.Tools {
/// demand and retain the results indefinitely.
/// </remarks>
public class VirtualHexDump : IList, INotifyCollectionChanged, INotifyPropertyChanged {
/// <summary>
/// <summary>
/// Data to display. We currently require that the entire file fit in memory,
/// which is reasonable because we impose a 2^24 (16MB) limit.

View File

@ -42,7 +42,7 @@ limitations under the License.
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- DataGrid gives us Ctrl+A select-all and Ctrl+C text-copy built in. -->
<!-- DataGrid gives us Ctrl+A (select-all) and Ctrl+C (text-copy) built in. -->
<DataGrid Name="hexDumpData" Grid.Row="0"
IsReadOnly="True"
ItemsSource="{Binding HexDumpLines}"
@ -58,6 +58,8 @@ limitations under the License.
ScrollViewer.CanContentScroll="True"
VerticalScrollBarVisibility="Visible">
<DataGrid.Columns>
<!-- Unqualified {Binding} creates a Binding object with default values.
This is how we reference the strings we get from the virtualized IList. -->
<DataGridTextColumn Header="Offset 0 1 2 3 4 5 6 7 8 9 A B C D E F Text"
Width="491" Binding="{Binding}"/>
</DataGrid.Columns>

View File

@ -45,6 +45,7 @@ namespace SourceGen.WpfGui {
/// <summary>
/// Reference to main controller. Needed to push settings out when Apply/OK is clicked.
/// TODO: use an Event instead?
/// </summary>
private MainController mMainCtrl;