Changeset 7270 for branches/HeuristicLab.Hive.Azure/HeuristicLab.Operators.Views.GraphVisualization.Views
- Timestamp:
- 01/04/12 16:45:02 (13 years ago)
- Location:
- branches/HeuristicLab.Hive.Azure
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure
- Property svn:mergeinfo changed
/trunk/sources merged: 7195-7201,7209,7214,7216-7230,7233-7239,7241,7243-7252,7254,7256-7261,7265-7266
- Property svn:mergeinfo changed
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Operators.Views.GraphVisualization.Views/3.3/GraphVisualizationInfoView.Designer.cs
r6036 r7270 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 1Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Operators.Views.GraphVisualization.Views/3.3/GraphVisualizationInfoView.cs
r6036 r7270 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 1Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Operators.Views.GraphVisualization.Views/3.3/OperatorGraphView.Designer.cs
r6036 r7270 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 1Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Operators.Views.GraphVisualization.Views/3.3/OperatorGraphView.cs
r6036 r7270 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 1Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Operators.Views.GraphVisualization.Views/3.3/OperatorShape.cs
r6036 r7270 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 1Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 79 79 } 80 80 81 public string Subtitle { get; set; } 82 81 83 private IconMaterial iconMaterial; 82 84 public Bitmap Icon { … … 216 218 g.SmoothingMode = SmoothingMode.HighQuality; 217 219 218 Pen pen = new Pen(lineColor, lineWidth); 219 220 SizeF titleSize = g.MeasureString(this.Title, ArtPalette.DefaultBoldFont, Rectangle.Width - 45); 221 if (titleSize.Height + 10 > Rectangle.Height) { 222 headerHeight = (int)titleSize.Height + 10; 223 this.UpdateLabels(); 224 } 225 226 GraphicsPath path = new GraphicsPath(); 227 path.AddArc(Rectangle.X, Rectangle.Y, 20, 20, -180, 90); 228 path.AddLine(Rectangle.X + 10, Rectangle.Y, Rectangle.X + Rectangle.Width - 10, Rectangle.Y); 229 path.AddArc(Rectangle.X + Rectangle.Width - 20, Rectangle.Y, 20, 20, -90, 90); 230 path.AddLine(Rectangle.X + Rectangle.Width, Rectangle.Y + 10, Rectangle.X + Rectangle.Width, Rectangle.Y + Rectangle.Height - 10); 231 path.AddArc(Rectangle.X + Rectangle.Width - 20, Rectangle.Y + Rectangle.Height - 20, 20, 20, 0, 90); 232 path.AddLine(Rectangle.X + Rectangle.Width - 10, Rectangle.Y + Rectangle.Height, Rectangle.X + 10, Rectangle.Y + Rectangle.Height); 233 path.AddArc(Rectangle.X, Rectangle.Y + Rectangle.Height - 20, 20, 20, 90, 90); 234 path.AddLine(Rectangle.X, Rectangle.Y + Rectangle.Height - 10, Rectangle.X, Rectangle.Y + 10); 235 //shadow 236 if (ArtPalette.EnableShadows) { 237 Region darkRegion = new Region(path); 238 darkRegion.Translate(5, 5); 239 g.FillRegion(ArtPalette.ShadowBrush, darkRegion); 240 } 241 //background 242 g.FillPath(Brush, path); 243 244 using (LinearGradientBrush gradientBrush = new LinearGradientBrush(Rectangle.Location, new Point(Rectangle.X + Rectangle.Width, Rectangle.Y), this.Color, Color.White)) { 245 Region gradientRegion = new Region(path); 246 g.FillRegion(gradientBrush, gradientRegion); 247 } 248 249 if (!this.Collapsed) { 250 TextStyle textStyle = new TextStyle(Color.Black, new Font("Arial", 7), StringAlignment.Near, StringAlignment.Near); 251 StringFormat stringFormat = textStyle.StringFormat; 252 stringFormat.Trimming = StringTrimming.EllipsisWord; 253 stringFormat.FormatFlags = StringFormatFlags.LineLimit; 254 Rectangle rect; 255 256 for (int i = 0; i < this.labels.Count; i++) { 257 rect = new Rectangle(Rectangle.X + 25, Rectangle.Y + headerHeight + i * (LABEL_HEIGHT + LABEL_SPACING), LABEL_WIDTH, LABEL_HEIGHT); 258 g.DrawString(textStyle.GetFormattedText(this.labels[i]), textStyle.Font, textStyle.GetBrush(), rect, stringFormat); 259 } 260 } 261 262 //the border 263 g.DrawPath(pen, path); 264 265 //the title 266 g.DrawString(this.Title, ArtPalette.DefaultBoldFont, Brushes.Black, new Rectangle(Rectangle.X + 25, Rectangle.Y + 5, Rectangle.Width - 45, Rectangle.Height - 5)); 267 268 269 //the material 270 foreach (IPaintable material in Children) 271 material.Paint(g); 272 273 //the connectors 274 if (this.ShowConnectors) { 275 for (int k = 0; k < Connectors.Count; k++) 276 Connectors[k].Paint(g); 220 using (Pen pen = new Pen(lineColor, lineWidth)) { 221 222 SizeF titleSize = g.MeasureString(this.Title, ArtPalette.DefaultBoldFont, Rectangle.Width - 45); 223 titleSize.Height += 10; //add spacing 224 SizeF subtitleSize = g.MeasureString(this.Subtitle, ArtPalette.DefaultFont, Rectangle.Width - 45); 225 subtitleSize.Height += 5; //add spacing 226 if (this.Title == this.Subtitle || string.IsNullOrEmpty(this.Subtitle)) subtitleSize = new SizeF(0, 0); 227 228 if ((int)titleSize.Height + (int)subtitleSize.Height != Rectangle.Height) { 229 headerHeight = (int)titleSize.Height + (int)subtitleSize.Height; 230 this.UpdateLabels(); 231 } 232 233 GraphicsPath path = new GraphicsPath(); 234 path.AddArc(Rectangle.X, Rectangle.Y, 20, 20, -180, 90); 235 path.AddLine(Rectangle.X + 10, Rectangle.Y, Rectangle.X + Rectangle.Width - 10, Rectangle.Y); 236 path.AddArc(Rectangle.X + Rectangle.Width - 20, Rectangle.Y, 20, 20, -90, 90); 237 path.AddLine(Rectangle.X + Rectangle.Width, Rectangle.Y + 10, Rectangle.X + Rectangle.Width, Rectangle.Y + Rectangle.Height - 10); 238 path.AddArc(Rectangle.X + Rectangle.Width - 20, Rectangle.Y + Rectangle.Height - 20, 20, 20, 0, 90); 239 path.AddLine(Rectangle.X + Rectangle.Width - 10, Rectangle.Y + Rectangle.Height, Rectangle.X + 10, Rectangle.Y + Rectangle.Height); 240 path.AddArc(Rectangle.X, Rectangle.Y + Rectangle.Height - 20, 20, 20, 90, 90); 241 path.AddLine(Rectangle.X, Rectangle.Y + Rectangle.Height - 10, Rectangle.X, Rectangle.Y + 10); 242 //shadow 243 if (ArtPalette.EnableShadows) { 244 Region darkRegion = new Region(path); 245 darkRegion.Translate(5, 5); 246 g.FillRegion(ArtPalette.ShadowBrush, darkRegion); 247 } 248 //background 249 g.FillPath(Brush, path); 250 251 using (LinearGradientBrush gradientBrush = new LinearGradientBrush(Rectangle.Location, new Point(Rectangle.X + Rectangle.Width, Rectangle.Y), this.Color, Color.White)) { 252 Region gradientRegion = new Region(path); 253 g.FillRegion(gradientBrush, gradientRegion); 254 } 255 256 if (!this.Collapsed) { 257 TextStyle textStyle = new TextStyle(Color.Black, new Font("Arial", 7), StringAlignment.Near, StringAlignment.Near); 258 StringFormat stringFormat = textStyle.StringFormat; 259 stringFormat.Trimming = StringTrimming.EllipsisWord; 260 stringFormat.FormatFlags = StringFormatFlags.LineLimit; 261 Rectangle rect; 262 263 const int verticalHeaderSpacing = 5; 264 Point separationLineStart = new Point(Rectangle.X + 25, Rectangle.Y + headerHeight - verticalHeaderSpacing); 265 Point separationLineEnd = new Point(Rectangle.X + Rectangle.Width - 25, Rectangle.Y + headerHeight - verticalHeaderSpacing); 266 using (LinearGradientBrush brush = new LinearGradientBrush(separationLineStart, separationLineEnd, Color.Black, Color.White)) { 267 using (Pen separationLinePen = new Pen(brush)) { 268 g.DrawLine(separationLinePen, separationLineStart, separationLineEnd); 269 } 270 } 271 272 273 for (int i = 0; i < this.labels.Count; i++) { 274 rect = new Rectangle(Rectangle.X + 25, Rectangle.Y + headerHeight + i * (LABEL_HEIGHT + LABEL_SPACING), LABEL_WIDTH, LABEL_HEIGHT); 275 g.DrawString(textStyle.GetFormattedText(this.labels[i]), textStyle.Font, textStyle.GetBrush(), rect, stringFormat); 276 } 277 } 278 279 //the border 280 g.DrawPath(pen, path); 281 282 //the title 283 g.DrawString(this.Title, ArtPalette.DefaultBoldFont, Brushes.Black, 284 new Rectangle(Rectangle.X + 25, Rectangle.Y + 5, 285 Rectangle.Width - 45, Rectangle.Height - 5 - (int)subtitleSize.Height)); 286 287 //the subtitle 288 if (this.Title != this.Subtitle || string.IsNullOrEmpty(this.Subtitle)) { 289 g.DrawString(this.Subtitle, ArtPalette.DefaultFont, Brushes.Black, 290 new Rectangle(Rectangle.X + 25, Rectangle.Y + (int)titleSize.Height -5 , 291 Rectangle.Width - 45, Rectangle.Height - 5)); 292 } 293 294 295 //the material 296 foreach (IShapeMaterial material in Children) 297 material.Paint(g); 298 299 //the connectors 300 if (this.ShowConnectors) { 301 foreach (IConnector t in Connectors) 302 t.Paint(g); 303 } 277 304 } 278 305 } -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Operators.Views.GraphVisualization.Views/3.3/Plugin.cs.frame
r6548 r7270 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 1Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 23 23 24 24 namespace HeuristicLab.Operators.Views.GraphVisualization.Views { 25 [Plugin("HeuristicLab.Operators.Views.GraphVisualization.Views-3.3", "3.3. 5.$WCREV$")]25 [Plugin("HeuristicLab.Operators.Views.GraphVisualization.Views-3.3", "3.3.6.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Operators.Views.GraphVisualization.Views-3.3.dll", PluginFileType.Assembly)] 27 27 [PluginDependency("HeuristicLab.Collections", "3.3")] -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Operators.Views.GraphVisualization.Views/3.3/Properties/AssemblyInfo.cs.frame
r6866 r7270 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 1Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 32 32 [assembly: AssemblyCompany("HEAL")] 33 33 [assembly: AssemblyProduct("HeuristicLab")] 34 [assembly: AssemblyCopyright("(c) 2002-201 1HEAL")]34 [assembly: AssemblyCopyright("(c) 2002-2012 HEAL")] 35 35 [assembly: AssemblyTrademark("")] 36 36 [assembly: AssemblyCulture("")] … … 55 55 // [assembly: AssemblyVersion("1.0.*")] 56 56 [assembly: AssemblyVersion("3.3.0.0")] 57 [assembly: AssemblyFileVersion("3.3. 5.$WCREV$")]57 [assembly: AssemblyFileVersion("3.3.6.$WCREV$")] -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Operators.Views.GraphVisualization.Views/3.3/ShapeInfoExtensions.cs
r6036 r7270 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 1Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 50 50 shape.Location = shapeInfo.Location; 51 51 shape.Title = shapeInfo.Title; 52 shape.Subtitle = shapeInfo.TypeName; 52 53 shape.Color = shapeInfo.Color; 53 54 shape.LineColor = shapeInfo.LineColor; … … 65 66 public static void UpdateShape(IOperatorShapeInfo operatorShapeInfo, OperatorShape operatorShape) { 66 67 operatorShape.Title = operatorShapeInfo.Title; 68 operatorShape.Subtitle = operatorShapeInfo.TypeName; 67 69 operatorShape.Color = operatorShapeInfo.Color; 68 70 operatorShape.LineColor = operatorShapeInfo.LineColor; … … 105 107 public static void UpdateShapeInfo(IOperatorShapeInfo operatorShapeInfo, OperatorShape operatorShape) { 106 108 operatorShapeInfo.Title = operatorShape.Title; 109 operatorShapeInfo.TypeName = operatorShape.Subtitle; 107 110 operatorShapeInfo.Color = operatorShape.Color; 108 111 operatorShapeInfo.LineColor = operatorShape.LineColor;
Note: See TracChangeset
for help on using the changeset viewer.