Tuesday, October 23, 2007

Windows Live Writer

I've finished download and installed Windows Live Writer. I use version 1.0. Actually I want to download the newest live writer, but it seems Microsoft didn't provide direct link with it. Sucks.

My first impression using this tool is good. It has spell check, Nice layout. But actually, that's not important to me. All I want is a style that can post source code without messing them.

Well, let's try it:

Code

Public Shared Sub DrawNonRectangleBorder(ByVal g As Graphics, ByVal borderColor As Color, _
                                         ByVal angle As Integer, ByVal rect As Rectangle)

    Using pth As New Drawing2D.GraphicsPath
        pth.AddLine(angle, 0, rect.Width - angle - 1, 0)
        pth.AddLine(rect.Width - 1, angle, rect.Width - 1, rect.Height - angle - 1)
        pth.AddLine(rect.Width - angle - 1, rect.Height - 1, angle, rect.Height - 1)
        pth.AddLine(0, rect.Height - angle - 1, 0, angle)

        pth.CloseAllFigures()
        g.SmoothingMode = Drawing2D.SmoothingMode.AntiAlias

        g.DrawPath(New Pen(borderColor), pth)
    End Using
End Sub

 

Ok. First testing, it has one big disadvantage than Office 2007. When I copy source code directly from VS IDE, the font color didn't change. That's a big drawback to me. In Office 2007, it copies all styles, including font color. Unfortunately, the table messed up after I post. For now, let's see the final result first...

No comments: