private void SetUpColumnHeaders()
        {
            TableTitle = string.Format("Name{0}", SortByTitle ? SortDescending ? DownArrowLeftAligned : UpArrowLeftAligned : "");

            ColumnHeaders.Clear();
            HeaderHints.Clear();

            switch (MaterialType)
            {
            case MaterialType.Metal:
                ColumnHeaders.Add(GetSortedLabel(0, Phi));
                HeaderHints.Add("Work Function (eV)");
                break;

            case MaterialType.Dielectric:
                ColumnHeaders.Add(GetSortedLabel(0, Kappa));
                HeaderHints.Add("Dielectric Constant");
                ColumnHeaders.Add(GetSortedLabel(1, "Eg"));
                HeaderHints.Add("Band Gap (eV)");
                ColumnHeaders.Add(GetSortedLabel(2, Phi));
                HeaderHints.Add("Electron Affinity (eV)");
                break;

            case MaterialType.Semiconductor:
                ColumnHeaders.Add(GetSortedLabel(0, Kappa));
                HeaderHints.Add("Dielectric Constant");
                ColumnHeaders.Add(GetSortedLabel(1, "Eg"));
                HeaderHints.Add("Band Gap (eV)");
                ColumnHeaders.Add(GetSortedLabel(2, Phi));
                HeaderHints.Add("Electron Affinity (eV)");
                ColumnHeaders.Add(GetSortedLabel(3, "ni"));
                HeaderHints.Add("Intrinsic Carrier Concentration (cm\u207a\u00b2)");
                break;
            }
        }
Ejemplo n.º 2
0
        public void RecreateContent()
        {
            LogicalChildren.Clear();
            VisualChildren.Clear();

            GridBorderLines.Clear();
            for (int i = 0; i < 4; i++)
            {
                var line = new Line()
                {
                    Stroke = GridControl.BorderBrush, StrokeThickness = GridControl.BorderThickness
                };
                GridBorderLines.Add(line);
                LogicalChildren.Add(line);
                VisualChildren.Add(line);
            }

            ColumnHeaders.Clear();
            ColumnHeaderLines.Clear();
            for (int i = 0; i < GridControl.Columns.Count; i++)
            {
                GridControl.Columns[i].Index = i;
                var columnHeader = GridControl.Columns[i].CreateColumnHeader();
                ColumnHeaders.Add(columnHeader);
                LogicalChildren.Add(columnHeader);
                VisualChildren.Add(columnHeader);
                var line = new Line()
                {
                    Stroke = GridControl.VerticalLinesBrush, StrokeThickness = GridControl.VerticalLinesThickness
                };
                ColumnHeaderLines.Add(line);
                LogicalChildren.Add(line);
                VisualChildren.Add(line);
            }

            HorizontalHeaderLine = new Line()
            {
                Stroke = GridControl.HorizontalLinesBrush, StrokeThickness = GridControl.HorizontalLinesThickness
            };
            LogicalChildren.Add(HorizontalHeaderLine);
            VisualChildren.Add(HorizontalHeaderLine);

            CellsPanel.RecreateCells();
            LogicalChildren.Add(CellsPanel);
            VisualChildren.Add(CellsPanel);
        }
Ejemplo n.º 3
0
        public void Reset()
        {
            cells = null;
            if (RowHeaders == null)
            {
                RowHeaders = new List <double>();
            }
            else
            {
                RowHeaders.Clear();
            }

            if (ColumnHeaders == null)
            {
                ColumnHeaders = new List <double>();
            }
            else
            {
                ColumnHeaders.Clear();
            }
        }