本文介绍了在Windows 7 x64中使用.NET读取MPP文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在.NET中开发了一个测试应用程序,可以读取MPP文件.它只是遍历''可用节点并将其显示为列表,例如:
''打开文件.如您所见,此构造函数中有许多选项
Dim proj As Project = projectApp.ActiveProject
对于proj.GetType().GetProperties()中的每个p作为System.Reflection.PropertyInfo
如果p.CanRead然后
试试
Console.WriteLine("{0}:{1}",p.Name,p.GetValue(proj,Nothing))
昏暗的项目作为RadListBoxItem =新的RadListBoxItem
item.Name = p.Name
item.Text = p.Name
item.Value = p.GetValue(proj,Nothing)
lbNodes.SelectedIndex = 0
如果blnComboboxItemSelected = False,则
lbNodes.SelectedItem = p.Name
blnComboboxItemSelected = True
如果结束
lbNodes.Items.Add(item)
异常捕获
结束尝试
如果结束
下一个
这在XP Pro中有效.我可以看到任务"节点.但是,Windows 7 Pro x64中缺少它.

I have developed a test app in .NET that reads an MPP file. It just iterates thru'' the available nodes and shows them as a list, like such:
'' Open the file. There are a number of options in this constructor as you can see
Dim proj As Project = projectApp.ActiveProject
For Each p As System.Reflection.PropertyInfo In proj.GetType().GetProperties()
If p.CanRead Then
Try
Console.WriteLine("{0}: {1}", p.Name, p.GetValue(proj, Nothing))
Dim item As RadListBoxItem = New RadListBoxItem
item.Name = p.Name
item.Text = p.Name
item.Value = p.GetValue(proj, Nothing)
lbNodes.SelectedIndex = 0
If blnComboboxItemSelected = False Then
lbNodes.SelectedItem = p.Name
blnComboboxItemSelected = True
End If
lbNodes.Items.Add(item)
Catch ex As Exception
End Try
End If
Next
This works in XP Pro. I am able to see the "Task" node. However, it is missing in Windows 7 Pro x64.

推荐答案




这篇关于在Windows 7 x64中使用.NET读取MPP文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 20:07