|
Well, I am still working on the Windows 7 version of my Rich Text Editor project, and still have a lot more work to do.
I am completely redesigning the API, and adding a lot of new functionality, such as the ability for AddIns to add new toolbar themes.
The Windows 7 Task Dialogs and Open/Save file dialogs have been implemented with some difficultly, explained in my 'The Windows API Code Pack' message below.
As this is mostly a straight port from the original VB version into C#, I was using some online code converters to cut down on the amount of typing. All of the converters I have tried use NRefactory, and it seems that NRefactory cannot handle inline functions in VB. All I could get is an 'Invalid Expression' error.
EDIT: NRefactory cannot convert the following class (Where in bold):
Public Class DefaultOptionPanelDescriptor
Implements IOptionPanelDescriptor
Private _id As String = String.Empty
Private _optionPanelDescriptors As List(Of IOptionPanelDescriptor) = Nothing
Private _optionPanel As IOptionPanel = Nothing
Public ReadOnly Property ID As String Implements IOptionPanelDescriptor.ID
Get
Return _id
End Get
End Property
Public Property Label As String Implements IOptionPanelDescriptor.Label
Public ReadOnly Property ChildOptionPanelDescriptors As IEnumerable(Of IOptionPanelDescriptor) Implements IOptionPanelDescriptor.ChildOptionPanelDescriptors
Get
Return _optionPanelDescriptors
End Get
End Property
Private _addIn As AddIn
Private _owner As Object
Private _optionPanelPath As String
Public ReadOnly Property OptionPanel As IOptionPanel Implements IOptionPanelDescriptor.OptionPanel
Get
If _optionPanelPath <> Nothing Then
If _optionPanel Is Nothing Then
_optionPanel = CType(_addIn.CreateObject(_optionPanelPath), IOptionPanel)
If _optionPanel IsNot Nothing Then
_optionPanel.Owner = _owner
End If
End If
_optionPanelPath = Nothing
_addIn = Nothing
End If
Return _optionPanel
End Get
End Property
Public ReadOnly Property HasOptionPanel As Boolean Implements IOptionPanelDescriptor.HasOptionPanel
Get
Return _optionPanelPath <> Nothing
End Get
End Property
Public Sub New(ByVal id As String, ByVal label As String)
_id = id
Me.Label = label
End Sub
Public Sub New(ByVal id As String, ByVal label As String, ByVal dialogPanelDescriptors As List(Of IOptionPanelDescriptor))
Me.New(id, label)
Me._optionPanelDescriptors = dialogPanelDescriptors
End Sub
Public Sub New(ByVal id As String, ByVal label As String, ByVal addIn As AddIn, ByVal owner As Object, ByVal optionPanelPath As String)
Me.New(id, label)
_addIn = addIn
_owner = owner
_optionPanelPath = optionPanelPath
End Sub
End Class
NRefactory Said: CONVERSION ERROR: Code could not be converted. Details:
-- line 16 col 12: "Get" expected
Please check for any errors in the original code and try again.
So it wants Public Get ReadOnly.....
EDIT2: The error occurred because of the Auto-Implemented property above the error line.
Stupid error message.
I think it will be faster to rewrite it by hand!
On a side note, it seems Visual Studio 2012 tries to run code after importing it from another project. I found this out when I imported a control from one project that used a static property from another class to create a full path, and VS gave me a 'Path Cannot Be Null' error on that line, and crashed the designer. When I switched that line to use another property that gave the same path (the first property was initialized with the value of the second [the first property is in a port of the ICSharpCode.Core PropertyService class]), the designer worked fine. VS2010 did the same thing, so I think it is a goof in the Intellisense parser system.
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
modified 30-Dec-12 16:44pm.
|
|
|
|
|
Thanks for the update. What is the latest status? When can we expect the next update? Do you have an updated status for the next update? Do we need to get a call put together. Let me know
|
|
|
|
|
Not sure when it will be out, as I have run into a number of Visual Studio 'Features' that aren't all that helpful, such as the 'Code Running at Design Time' and some weird formatting errors (some syntax highlighting goofs, although there are less of those than there were in VS2010), as well as randomly changing indentation. It should (hopefully) be within the next few weeks, though.
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
Zac Greve wrote: As this is mostly a straight port from the original VB version into C#,
You were using VB.
|
|
|
|
|
I used to, but I am now moving fully into C#. I started out with VB, and always compiled with Option Strict On, and tried to never use the 'Shared Instance Methods' thing VB has. I always used either a singleton form or the My.Forms namespace.
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
Zac Greve wrote: Visual Studio 2012 tries to run code after importing it from another project This is a general problem with Visual Studio, especially with WPF projects. I have it regularly with Visual Studio 2008. The XAML designer routinely fails when supporting classes don't compile cleanly, as is typically the case when you're refactoring. They rely on the runtime to do the heavy lifting while you're editing.
It's almost like a return to the days of the Ada development environments, where you had to implement from the bottom up because the compiler failed otherwise.
Software Zen: delete this;
|
|
|
|