public void LoadPane(ITextPane pane, PaneEditor paneEditor) { loaded = false; parentEditor = paneEditor; activePane = pane; fontFileCB.Items.Clear(); var fonts = pane.GetFonts; if (fonts != null) { foreach (var font in fonts) { fontFileCB.Items.Add(font); } } if (fontFileCB.Items.Contains(pane.FontName)) { fontFileCB.SelectedItem = pane.FontName; } textBoxTB.Bind(pane, "TextBoxName"); scaleXUD.Value = pane.FontSize.X; scaleYUD.Value = pane.FontSize.Y; italicTiltUD.Value = pane.ItalicTilt; italicTiltUD.Value = sliderItalicTilt.Value; italicTiltUD.Maximum = sliderItalicTilt.Maximum; vertexColorTopBottomBox1.TopColor = activePane.FontTopColor.Color; vertexColorTopBottomBox1.BottomColor = activePane.FontBottomColor.Color; stTextBox1.Text = pane.Text; spacingXTB.Value = pane.CharacterSpace; spacingYTB.Value = pane.LineSpace; // pane.TextBoxName alighmentHCB.Bind(typeof(OriginX), pane, "HorizontalAlignment"); alighmentVCB.Bind(typeof(OriginY), pane, "VerticalAlignment"); alighmentLineCB.Bind(typeof(LineAlign), pane, "LineAlignment"); chkEnableShadows.Bind(pane, "ShadowEnabled"); chkSizeRestrict.Bind(pane, "RestrictedTextLengthEnabled"); if (pane.RestrictedTextLengthEnabled) { sizeRestrictUD.Value = (int)pane.RestrictedLength; } else { sizeRestrictUD.Value = 0; } //BRLYT has no shader parameters. Text cannot do those so hide them if (pane is Revolution.TXT1 || pane is CTR.TXT1) { stDropDownPanel4.Visible = false; } else { shadowColorBox.BottomColor = pane.ShadowBackColor.Color; shadowColorBox.TopColor = pane.ShadowForeColor.Color; shadowItalicTiltUD.Maximum = sliderShadowItalicTilt.Maximum; shadowItalicTiltUD.Value = pane.ShadowItalic; sliderShadowItalicTilt.Value = (int)shadowItalicTiltUD.Value; shadowOffseXUD.Value = pane.ShadowXY.X; shadowOffseYUD.Value = pane.ShadowXY.Y; shadowScaleXUD.Value = pane.ShadowXYSize.X; shadowScaleYUD.Value = pane.ShadowXYSize.Y; } loaded = true; }