public void SelectedBackgroundColor_SetGet() { var options = new PaintOptions(); options.SelectedBackgroundColor = Color.Red; Assert.AreEqual(Color.Red, options.SelectedBackgroundColor); }
//private void initLstElements() //{ // lstElements.Items.Clear(); // lstTypes.Items.Clear(); // var allNodes = Schema.GetAllNodes(); // List<object> elements = new List<object>(); // List<object> types = new List<object>(); // foreach (IXsdNode node in allNodes) // { // if (node is XsdElement) // { // if (!elements.Contains(node)) // { // elements.Add(node); // } // } // } // foreach (IXsdNode node in allNodes) // { // if (node is IXsdIsType) // { // if (!types.Contains(node)) // { // types.Add(node); // } // } // } // elements.Sort((a, b) => a.ToString().CompareTo(b.ToString())); // types.Sort((a, b) => a.ToString().CompareTo(b.ToString())); // foreach (object element in elements) // { // lstElements.Items.Add(element); // } // foreach (object type in types) // { // lstTypes.Items.Add(type); // } //} public void Refresh() { XsdVisualizerData data = _editor.Data.XsdVisualizerData; PaintOptions po = new PaintOptions { ExpandReferences = data.ExpandRefs, HideTypes = data.HideTypes, HideImportIncludes = data.HideIncludes, ExpandTypes = data.ExpandTypes, ExpandIncludes = data.ExpandIncludes, Visualizer = this, DontPaint = _dontPaint, }; if (Root != null) { UIElement pnl = Root.GetPaintComponent(po, _fontSize); pnlPaintArea.Children.Clear(); pnlPaintArea.Children.Add(pnl); } else { MessageBox.Show(Application.Current.MainWindow, "No root or root not yet loaded", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } }
public void Constructor_SetsPropertiesToDefault() { var options = new PaintOptions(); Assert.AreEqual(SystemColors.Window, options.BackgroundColor); Assert.AreEqual(SystemColors.HighlightText, options.SelectedTextColor); Assert.AreEqual(SystemColors.Highlight, options.SelectedBackgroundColor); }
public static void PaintControl(Graphics graphics, Control control, PaintOptions paintOptions) { IntPtr hDC = graphics.GetHdc(); //paint control onto graphics using provided options try { SendMessage(control.Handle, WM_PRINT, hDC, (int)paintOptions); } finally { graphics.ReleaseHdc(hDC); } }
public void Paint(Graphics g, PaintOptions paintOptions, Rectangle bounds, bool rightToLeft) { if (embeddedObjectClient == null) { return; } try { embeddedObjectClient.Paint(g, paintOptions, bounds, rightToLeft); } catch (Exception ex) { HandleException(ex); } }
public void Paint(Graphics g, PaintOptions paintOptions, Rectangle bounds, bool rightToLeft) { if (embeddedObjectClient == null) return; try { embeddedObjectClient.Paint(g, paintOptions, bounds, rightToLeft); } catch (Exception ex) { HandleException(ex); } }