aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.DAL.Remote/DB/SEGMENT.cs
blob: 206092a13a9e0c747a7ad2b7435e08c60279e0a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated from a template.
//
//     Manual changes to this file may cause unexpected behavior in your application.
//     Manual changes to this file will be overwritten if the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Tango.DAL.Remote.DB
{
    using System;
    using System.Collections.Generic;
    
    public partial class SEGMENT
    {
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
        public SEGMENT()
        {
            this.BRUSH_STOPS = new HashSet<BRUSH_STOPS>();
        }
    
        public int ID { get; set; }
        public string GUID { get; set; }
        public System.DateTime LAST_UPDATED { get; set; }
        public string NAME { get; set; }
        public string JOB_GUID { get; set; }
        public double LENGTH { get; set; }
        public int SEGMENT_INDEX { get; set; }
    
        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
        public virtual ICollection<BRUSH_STOPS> BRUSH_STOPS { get; set; }
        public virtual JOB JOB { get; set; }
    }
}
nMouseDown(e); if (!e.Handled) { if (e.ChangedButton == MouseButton.Left) { IsExpanded = !IsExpanded; e.Handled = true; } } } const double MarginSizeFactor = 0.7; protected override Size MeasureCore(Size availableSize) { double size = MarginSizeFactor * FoldingMargin.SizeFactor * (double)GetValue(TextBlock.FontSizeProperty); size = PixelSnapHelpers.RoundToOdd(size, PixelSnapHelpers.GetPixelSize(this).Width); return new Size(size, size); } protected override void OnRender(DrawingContext drawingContext) { FoldingMargin margin = VisualParent as FoldingMargin; Pen activePen = new Pen(margin.SelectedFoldingMarkerBrush, 1); Pen inactivePen = new Pen(margin.FoldingMarkerBrush, 1); activePen.StartLineCap = inactivePen.StartLineCap = PenLineCap.Square; activePen.EndLineCap = inactivePen.EndLineCap = PenLineCap.Square; Size pixelSize = PixelSnapHelpers.GetPixelSize(this); Rect rect = new Rect(pixelSize.Width / 2, pixelSize.Height / 2, this.RenderSize.Width - pixelSize.Width, this.RenderSize.Height - pixelSize.Height); drawingContext.DrawRectangle( IsMouseDirectlyOver ? margin.SelectedFoldingMarkerBackgroundBrush : margin.FoldingMarkerBackgroundBrush, IsMouseDirectlyOver ? activePen : inactivePen, rect); double middleX = rect.Left + rect.Width / 2; double middleY = rect.Top + rect.Height / 2; double space = PixelSnapHelpers.Round(rect.Width / 8, pixelSize.Width) + pixelSize.Width; drawingContext.DrawLine(activePen, new Point(rect.Left + space, middleY), new Point(rect.Right - space, middleY)); if (!isExpanded) { drawingContext.DrawLine(activePen, new Point(middleX, rect.Top + space), new Point(middleX, rect.Bottom - space)); } } protected override void OnIsMouseDirectlyOverChanged(DependencyPropertyChangedEventArgs e) { base.OnIsMouseDirectlyOverChanged(e); InvalidateVisual(); } } }