Click here to Skip to main content
15,917,060 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralAbout using DLL files in projects! Pin
maryam.saboor14-Apr-08 23:40
professionalmaryam.saboor14-Apr-08 23:40 
GeneralRe: About using DLL files in projects! Pin
AndrewVos14-Apr-08 23:57
AndrewVos14-Apr-08 23:57 
GeneralRe: About using DLL files in projects! Pin
Christian Graus15-Apr-08 0:06
protectorChristian Graus15-Apr-08 0:06 
GeneralRe: About using DLL files in projects! Pin
maryam.saboor15-Apr-08 0:26
professionalmaryam.saboor15-Apr-08 0:26 
GeneralRe: About using DLL files in projects! Pin
Christian Graus15-Apr-08 0:36
protectorChristian Graus15-Apr-08 0:36 
QuestionDrawing pie with parts excluded. Pin
AndrewVos14-Apr-08 19:56
AndrewVos14-Apr-08 19:56 
GeneralRe: Drawing pie with parts excluded. Pin
AndrewVos14-Apr-08 20:17
AndrewVos14-Apr-08 20:17 
GeneralRe: Drawing pie with parts excluded. Pin
AndrewVos14-Apr-08 23:44
AndrewVos14-Apr-08 23:44 
Hmmm. This is a tad messy, but it works:

<br />
  public class PieWithExclusionEllipse : IDisposable {<br />
    private GraphicsPath path;<br />
    public GraphicsPath Path { get { return this.path; } }<br />
    public PieWithExclusionEllipse(Rectangle pie, float startAngle, float sweepAngle, Rectangle exclusionEllipse) {<br />
      GraphicsPath outerLine = new GraphicsPath();<br />
      GraphicsPath innerLine = new GraphicsPath();<br />
<br />
      outerLine = new GraphicsPath();<br />
      outerLine.AddPie(pie, startAngle, sweepAngle);<br />
<br />
      if ((exclusionEllipse.Width != 0) && (exclusionEllipse.Height != 0)) {<br />
        outerLine = this.removePointFromPath(outerLine, 0);<br />
        outerLine = this.changePathPointType(outerLine, outerLine.PointCount - 1, PathPointType.Bezier);<br />
        innerLine.AddPie(exclusionEllipse, startAngle, sweepAngle);<br />
        innerLine = this.removePointFromPath(innerLine, 0);<br />
        innerLine = this.changePathPointType(innerLine, innerLine.PointCount - 1, PathPointType.Bezier);<br />
        innerLine.Reverse();<br />
        outerLine.AddPath(innerLine, true);<br />
        outerLine.CloseFigure();<br />
      }<br />
<br />
      this.path = outerLine;<br />
    }<br />
    private GraphicsPath changePathPointType(GraphicsPath path, int pointIndex, PathPointType pointType) {<br />
      List<pointf> points = new List<pointf>();<br />
      List<byte> pointTypes = new List<byte>();<br />
<br />
      for (int index = 0; index < path.PointCount; index++) {<br />
        points.Add(path.PathPoints[index]);<br />
<br />
        if (index == pointIndex) {<br />
          pointTypes.Add((byte)pointType);<br />
        }<br />
        else {<br />
          pointTypes.Add(path.PathTypes[index]);<br />
        }<br />
      }<br />
      return new GraphicsPath(points.ToArray(), pointTypes.ToArray());<br />
    }<br />
<br />
    private GraphicsPath removePointFromPath(GraphicsPath path, int removeIndex) {<br />
      List<pointf> points = new List<pointf>();<br />
      List<byte> pointTypes = new List<byte>();<br />
<br />
      for (int index = 0; index < path.PointCount; index++) {<br />
        if (index != removeIndex) {<br />
          points.Add(path.PathPoints[index]);<br />
          pointTypes.Add(path.PathTypes[index]);<br />
        }<br />
      }<br />
      return new GraphicsPath(points.ToArray(), pointTypes.ToArray());<br />
    }<br />
<br />
    #region IDisposable Members<br />
<br />
    public void Dispose() {<br />
      if (this.path != null) {<br />
        this.path.Dispose();<br />
      }<br />
    }<br />
<br />
    #endregion<br />
  }<br />
</byte></byte></pointf></pointf></byte></byte></pointf></pointf>




www.wickedorange.com
www.andrewvos.com

GeneralRe: Drawing pie with parts excluded. Pin
#realJSOP27-Apr-08 3:34
professional#realJSOP27-Apr-08 3:34 
QuestionGridView or DetailsView results e-mailed Pin
Learning14-Apr-08 14:05
Learning14-Apr-08 14:05 
GeneralRe: GridView or DetailsView results e-mailed Pin
Christian Graus14-Apr-08 19:59
protectorChristian Graus14-Apr-08 19:59 
GeneralRe: GridView or DetailsView results e-mailed Pin
N a v a n e e t h14-Apr-08 20:30
N a v a n e e t h14-Apr-08 20:30 
GeneralRe: GridView or DetailsView results e-mailed Pin
Learning15-Apr-08 4:29
Learning15-Apr-08 4:29 
QuestionNetworkstream receiving same data twice [modified] Pin
evdsande14-Apr-08 10:05
evdsande14-Apr-08 10:05 
Questionis Microsoft.ApplicationBlocks.Data.dll compatible to VS2005? Pin
Mustanseer M S13-Apr-08 21:26
Mustanseer M S13-Apr-08 21:26 
GeneralRe: is Microsoft.ApplicationBlocks.Data.dll compatible to VS2005? Pin
Dave Kreskowiak14-Apr-08 3:30
mveDave Kreskowiak14-Apr-08 3:30 
GeneralRe: is Microsoft.ApplicationBlocks.Data.dll compatible to VS2005? Pin
Christian Graus14-Apr-08 4:27
protectorChristian Graus14-Apr-08 4:27 
GeneralRe: is Microsoft.ApplicationBlocks.Data.dll compatible to VS2005? Pin
Pete O'Hanlon14-Apr-08 4:36
mvePete O'Hanlon14-Apr-08 4:36 
GeneralRe: is Microsoft.ApplicationBlocks.Data.dll compatible to VS2005? Pin
Dave Kreskowiak14-Apr-08 5:34
mveDave Kreskowiak14-Apr-08 5:34 
Questionhow can I set TextBox.ScrollBars to None or Both at call Pin
Shimmy Weitzhandler12-Apr-08 16:03
Shimmy Weitzhandler12-Apr-08 16:03 
GeneralRe: how can I set TextBox.ScrollBars to None or Both at call Pin
Shimmy Weitzhandler12-Apr-08 18:45
Shimmy Weitzhandler12-Apr-08 18:45 
QuestionIs DoDirectPayment method of PayPal applicable in Australia Pin
samrat.net10-Apr-08 23:30
samrat.net10-Apr-08 23:30 
GeneralRe: Is DoDirectPayment method of PayPal applicable in Australia Pin
Christian Graus11-Apr-08 2:13
protectorChristian Graus11-Apr-08 2:13 
Generalwhat's new in dotnet framework 2.0 architecture compared to dotnet framework 1.1 architecture Pin
padma p10-Apr-08 23:24
padma p10-Apr-08 23:24 
GeneralRe: what's new in dotnet framework 2.0 architecture compared to dotnet framework 1.1 architecture Pin
Thomas Stockwell11-Apr-08 1:21
professionalThomas Stockwell11-Apr-08 1:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.