diff --git a/SourceGenWPF/DisplayList.cs b/SourceGenWPF/DisplayList.cs index f3a4999..3a9f8c3 100644 --- a/SourceGenWPF/DisplayList.cs +++ b/SourceGenWPF/DisplayList.cs @@ -280,8 +280,12 @@ namespace SourceGenWPF { /// private FormattedParts GetEntry(int index) { Debug.WriteLine("GEN " + index); - return FormattedParts.Create("off" + index, "addr" + index, "12 34", - "vncidmx", "", "yup:", "LDA", "$1234", "a & b"); + if ((index % 10) != 0) { + return FormattedParts.Create("off" + index, "addr" + index, "12 34", + "vncidmx", "", "yup:", "LDA", "$1234", "a & b"); + } else { + return FormattedParts.Create("offN This is a long comment line"); + } } public class FormattedParts { @@ -294,6 +298,7 @@ namespace SourceGenWPF { public string Opcode { get; private set; } public string Operand { get; private set; } public string Comment { get; private set; } + public bool SingleLine { get; private set; } // Construct with factory methods. private FormattedParts() { } @@ -311,6 +316,15 @@ namespace SourceGenWPF { parts.Opcode = opcode; parts.Operand = operand; parts.Comment = comment; + parts.SingleLine = false; + + return parts; + } + + public static FormattedParts Create(string longComment) { + FormattedParts parts = new FormattedParts(); + parts.Comment = longComment; + parts.SingleLine = true; return parts; } diff --git a/SourceGenWPF/ProjWin/MainWindow.xaml b/SourceGenWPF/ProjWin/MainWindow.xaml index f192b4a..9fad321 100644 --- a/SourceGenWPF/ProjWin/MainWindow.xaml +++ b/SourceGenWPF/ProjWin/MainWindow.xaml @@ -215,9 +215,27 @@ limitations under the License. + + Visibility="{Binding Path=CodeListVisibility}" + VirtualizingStackPanel.VirtualizationMode="Recycling" > @@ -231,6 +249,49 @@ limitations under the License. + + + + + + diff --git a/SourceGenWPF/ProjWin/MainWindow.xaml.cs b/SourceGenWPF/ProjWin/MainWindow.xaml.cs index 81ec6df..81cd93e 100644 --- a/SourceGenWPF/ProjWin/MainWindow.xaml.cs +++ b/SourceGenWPF/ProjWin/MainWindow.xaml.cs @@ -47,6 +47,9 @@ namespace SourceGenWPF.ProjWin { mUI = new MainController(this); codeListView.ItemsSource = new DisplayList(500); + + GridView gv = (GridView)codeListView.View; + //gv.Columns[0].Width = 50; }