LogViewer.MainWindow.ShowSchema C# (CSharp) Method

ShowSchema() private method

private ShowSchema ( ) : void
return void
        private void ShowSchema()
        {
            UiDispatcher.RunOnUIThread(() =>
            {
                LogItemSchema schema = null;

                // todo: compute combined schema for selected logs, but for now just show the first one.
                if (this.currentFlightLog != null)
                {
                    schema = currentFlightLog.Schema;
                }
                else if (this.logs.Count > 0)
                {
                    schema = this.logs[0].Schema;
                }
                if (schema == null)
                { 
                    CategoryList.ItemsSource = null;
                }
                else
                {
                    // todo: compute combined schema for selected logs, but for now just show the first one.
                    List<LogItemSchema> list = new List<Model.LogItemSchema>(schema.ChildItems);
                    list.Sort((a, b) => { return string.Compare(a.Name, b.Name, StringComparison.OrdinalIgnoreCase); });
                    CategoryList.ItemsSource = list;
                }
            });
        }