在带有组合框和文本框的模板列中向上/向下滚动时应用程序崩溃

2024-01-10

正如标题所示,应用程序在滚动时崩溃。我添加了MouseWheel and PreviewMouseWheel事件来处理列中的滚动,但有些仍然可以完成。

无法追溯到特定行,但我相信这可能与以下代码有关:

TextBox ValueCell = (TextBox)sender;
if (GRID.SelectedItem == null || ValueCell == null || GRID.SelectedIndex <= 0) return;
//Obtain the new value
string Value = ValueCell.Text;   

//Obtain the item ID
DataGridRow Row = (DataGridRow)GRID.ItemContainerGenerator.ContainerFromIndex(GRID.SelectedIndex);
if (Row == null) return;
DataGridCell RowColumn = GRID.Columns[0].GetCellContent(Row).Parent as DataGridCell;

除了以下信息外,没有提供太多信息:

PresentationFramework.dll!System.Windows.Controls.DataGridRow.RestoreAttachedItemValue(System.Windows.DependencyObject objectWithProperty, System.Windows.DependencyProperty property) 加载未知符号。

调用堆栈是:

PresentationFramework.dll!System.Windows.Controls.DataGridRow.RestoreAttachedItemValue(System.Windows.DependencyObject objectWithProperty, System.Windows.DependencyProperty property)  Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.Controls.DataGridRow.SyncProperties(bool forcePrepareCells)    Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.Controls.DataGridRow.PrepareRow(object item, System.Windows.Controls.DataGrid owningDataGrid)  Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.Controls.DataGrid.PrepareContainerForItemOverride(System.Windows.DependencyObject element, object item)    Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.Controls.ItemsControl.MS.Internal.Controls.IGeneratorHost.PrepareItemContainer(System.Windows.DependencyObject container, object item) Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.Controls.ItemContainerGenerator.System.Windows.Controls.Primitives.IItemContainerGenerator.PrepareItemContainer(System.Windows.DependencyObject container) Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.Controls.VirtualizingStackPanel.InsertContainer(int childIndex, System.Windows.UIElement container, bool isRecycled)   Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.Controls.VirtualizingStackPanel.AddContainerFromGenerator(int childIndex, System.Windows.UIElement child, bool newlyRealized, bool isBeforeViewport)   Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.Controls.VirtualizingStackPanel.MeasureChild(ref System.Windows.Controls.Primitives.IItemContainerGenerator generator, ref System.Windows.Controls.Primitives.IContainItemStorage itemStorageProvider, ref System.Windows.Controls.Primitives.IContainItemStorage parentItemStorageProvider, ref object parentItem, ref bool hasUniformOrAverageContainerSizeBeenSet, ref double computedUniformOrAverageContainerSize, ref double computedUniformOrAverageContainerPixelSize, ref bool computedAreContainersUniformlySized, ref bool hasAnyContainerSpanChanged, ref System.Collections.IList items, ref object item, ref System.Collections.IList children, ref int childIndex, ref bool visualOrderChanged, ref bool isHorizontal, ref System.Windows.Size childConstraint, ref System.Windows.Rect viewport, ref System.Windows.Controls.VirtualizationCacheLength cacheSize, ref System.Windows.Controls.VirtualizationCacheLengthUnit cacheUnit, ref bool foundFirstItemInViewport, ref double firstItemInViewportOffset, ref System.Windows.Size stackPixelSize, ref System.Windows.Size stackPixelSizeInViewport, ref System.Windows.Size stackPixelSizeInCacheBeforeViewport, ref System.Windows.Size stackPixelSizeInCacheAfterViewport, ref System.Windows.Size stackLogicalSize, ref System.Windows.Size stackLogicalSizeInViewport, ref System.Windows.Size stackLogicalSizeInCacheBeforeViewport, ref System.Windows.Size stackLogicalSizeInCacheAfterViewport, ref bool mustDisableVirtualization, bool isBeforeFirstItem, bool isAfterFirstItem, bool isAfterLastItem, bool skipActualMeasure, bool skipGeneration, ref bool hasBringIntoViewContainerBeenMeasured, ref bool hasVirtualizingChildren)  Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.Controls.VirtualizingStackPanel.MeasureOverrideImpl(System.Windows.Size constraint, ref double? lastPageSafeOffset, ref System.Collections.Generic.List<double> previouslyMeasuredOffsets, ref double? lastPagePixelSize, bool remeasure)  Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.Controls.VirtualizingStackPanel.MeasureOverride(System.Windows.Size constraint)    Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.Controls.Primitives.DataGridRowsPresenter.MeasureOverride(System.Windows.Size constraint)  Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize)    Unknown Symbols loaded.
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize)    Unknown Symbols loaded.
    PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout() Unknown Symbols loaded.
    PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayoutCallback(object arg)   Unknown Symbols loaded.
    PresentationCore.dll!System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()  Unknown Symbols loaded.
    PresentationCore.dll!System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()    Unknown Symbols loaded.
    PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandlerCore(object resizedCompositionTarget)    Unknown Symbols loaded.
    PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandler(object resizedCompositionTarget)    Unknown Symbols loaded.
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)  Unknown Symbols loaded.
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) Unknown Symbols loaded.
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl()   Unknown Symbols loaded.
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state)  Unknown Symbols loaded.
    WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(object obj)   Unknown Symbols loaded.
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 954  C#  Symbols loaded.
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Line 902  C#  Symbols loaded.
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 891    C#  Symbols loaded.
    WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext executionContext, System.Threading.ContextCallback callback, object state)  Unknown Symbols loaded.
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke()   Unknown Symbols loaded.
    WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue()  Unknown Symbols loaded.
    WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)  Unknown Symbols loaded.
    WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Unknown Symbols loaded.
    WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) Unknown Symbols loaded.
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)  Unknown Symbols loaded.
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) Unknown Symbols loaded.
    WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs)   Unknown Symbols loaded.
    WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam)  Unknown Symbols loaded.
    [Native to Managed Transition]      Annotated Frame
    [Managed to Native Transition]      Annotated Frame
    WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame)   Unknown Symbols loaded.
    WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame)   Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore)   Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window)  Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window)  Unknown Symbols loaded.
    PresentationFramework.dll!System.Windows.Application.Run()  Unknown Symbols loaded.
    App.Main()  Unknown Symbols loaded.

EDIT:这是抛出异常的消息:Exception thrown: 'System.NullReferenceException' in PresentationFramework.dll An unhandled exception of type 'System.NullReferenceException' occurred in PresentationFramework.dll Object reference not set to an instance of an object.

EDIT2:上面的代码嵌套在一个TextBox中LostFocus event

EDIT3:这是我的网格 XAML 代码:

 <DataGrid x:Name="GRID" SelectionMode="Single" CanUserAddRows="False" CanUserDeleteRows="False"
                  AutoGenerateColumns="False" Grid.Row="1" Grid.Column="1" Margin="5" AllowDrop="True" 
                  Drop="GRID_Drop" Grid.ColumnSpan="3" CellEditEnding="GRID_CellEditEnding" >
            <DataGrid.ItemContainerStyle>
                <Style TargetType="DataGridRow">
                    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>


                </Style>
            </DataGrid.ItemContainerStyle>
            <DataGrid.Columns>
                <DataGridTextColumn x:Name="IdCol" Header="ID"  IsReadOnly="True"
                                    Binding="{Binding ItemId}" />
                <DataGridTextColumn x:Name="HexIdCol" Header="Hex ID"   IsReadOnly="True"
                                    Binding="{Binding HexId}" />
                <DataGridTextColumn x:Name="ItemCol" Header="Item" IsReadOnly="True"
                                    Binding="{Binding ItemNameFormatted}" />
                <DataGridComboBoxColumn x:Name="VCol" Header="V"
                                        SelectedItemBinding="{Binding Path=V, NotifyOnTargetUpdated=True}"
                                        DisplayMemberPath="{Binding Path=V}"/>


                <DataGridTemplateColumn x:Name="Va" Header="Va">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate>
                            <Grid MouseWheel="Grid_MouseWheel" PreviewMouseWheel="Grid_PreviewMouseWheel">
                                <TextBox    x:Name="VaTextBox" 
                                            Text="{Binding Data, Mode=TwoWay, NotifyOnSourceUpdated=True}"
                                            LostFocus="VaTextBox_LostFocus">
                                    <TextBox.Style>
                                        <Style TargetType="TextBox">
                                            <Setter Property="Visibility" Value="Collapsed"/>
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding Options}" Value="{x:Null}">
                                                    <Setter Property="Visibility" Value="Visible"/>
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </TextBox.Style>
                                </TextBox>
                                <ComboBox   x:Name="VaComboBox" ItemsSource="{Binding Options}" 
                                            SelectedItem="{Binding Data, Mode=TwoWay, NotifyOnSourceUpdated=True}" 
                                            SelectionChanged="VaComboBox_SelectionChanged">
                                    <ComboBox.Style>
                                        <Style TargetType="ComboBox">
                                            <Setter Property="Visibility" Value="Visible"/>
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding Options}" Value="{x:Null}">
                                                    <Setter Property="Visibility" Value="Collapsed"/>
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </ComboBox.Style>
                                </ComboBox>
                            </Grid>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>

                <DataGridTextColumn x:Name="RaCol" Header="Ra"
                                    Binding="{Binding Ra, NotifyOnTargetUpdated=True}" />
            </DataGrid.Columns>
        </DataGrid>

通过添加解决了问题VirtualizingPanel.IsVirtualizing="False" in the <DataGrid>XAML标签

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在带有组合框和文本框的模板列中向上/向下滚动时应用程序崩溃 的相关文章

  • 在 C++ 中使用 matlab 结构(matlab 函数调用的返回值)(由 matlab 编译器生成的库)

    你好 我有一个相当简单的 matlab 函数 例如 function MYSTRUCT myfunc MYSTRUCT prop1 test MYSTRUCT prop2 foo MYSTRUCT prop3 42 end 我用 matla
  • 如何让 Swagger 插件在自托管服务堆栈中工作

    我已经用 github 上提供的示例重新提出了这个问题 并为任何想要自己运行代码的人提供了一个下拉框下载链接 Swagger 无法在自托管 ServiceStack 服务上工作 https stackoverflow com questio
  • 如何将非静态类成员“std::bind”绑定到 Win32 回调函数“WNDPROC”?

    我正在尝试将非静态类成员绑定到标准WNDPROC http msdn microsoft com en us library ms633573 aspx功能 我知道我可以通过将类成员设为静态来简单地做到这一点 但是 作为一名 C 11 ST
  • 在 DataView 的 RowFilter 中选择 DISTINCT

    我试图根据与另一个表的关系缩小 DataView 中的行范围 我使用的 RowFilter 如下 dv new DataView myDS myTable id IN SELECT DISTINCT parentID FROM myOthe
  • 在 LINQ 中按 Id 连接多表和分组

    我想按categoryId显示列表产品的名称组 这是我的代码 我想要我的视图显示结果 Desktop PC HP Red PC Dell Yellow PC Asus Red SmartPhone Lumia 720 Blue 我的组模型
  • 获取两个工作日之间的天数差异

    这听起来很简单 但我不明白其中的意义 那么获取两次之间的天数的最简单方法是什么DayOfWeeks当第一个是起点时 如果下一个工作日较早 则应考虑在下周 The DayOfWeek 枚举 http 20 20 5B1 5D 3a 20htt
  • java.io.Serialized 在 C/C++ 中的等价物是什么?

    C C 的等价物是什么java io Serialized https docs oracle com javase 7 docs api java io Serializable html 有对序列化库的引用 用 C 序列化数据结构 ht
  • 为什么 Google 测试会出现段错误?

    我是 Google Test 的新手 正在尝试提供的示例 我的问题是 当我引入失败并设置GTEST BREAK ON FAILURE 1 或使用命令行选项 GTest 将出现段错误 我正在考虑这个例子 https code google c
  • 使用接口有什么好处?

    使用接口有什么用 我听说它用来代替多重继承 并且还可以用它来完成数据隐藏 还有其他优点吗 哪些地方使用了接口 程序员如何识别需要该接口 有什么区别explicit interface implementation and implicit
  • 我可以使用 moq Mock 来模拟类而不是接口吗?

    正在经历https github com Moq moq4 wiki Quickstart https github com Moq moq4 wiki Quickstart 我看到它 Mock 一个接口 我的遗留代码中有一个没有接口的类
  • DbContext 和 ObjectContext 有什么区别

    From MSDN 表示工作单元和存储库模式的组合 使您能够查询数据库并将更改分组在一起 然后将这些更改作为一个单元写回存储 DbContext在概念上类似于ObjectContext 我虽然DbContext只处理与数据库的连接以及针对数
  • 如何检测表单的任何控件的变化?

    如何检测 C 中表单的任何控件的更改 由于我在一个表单上有许多控件 并且如果表单中的任何控件值发生更改 我需要禁用按钮 我正在寻找一些内置函数 事件处理程序 属性 并且不想为此创建自定义函数 不 我不知道任何时候都会触发任何事件any控制表
  • 为什么 std::strstream 被弃用?

    我最近发现std strstream已被弃用 取而代之的是std stringstream 我已经有一段时间没有使用它了 但它做了我当时需要做的事情 所以很惊讶听到它的弃用 我的问题是为什么做出这个决定 有什么好处std stringstr
  • Cmake 链接共享库:包含库中的头文件时“没有这样的文件或目录”

    我正在学习使用 CMake 构建库 构建库的代码结构如下 include Test hpp ITest hpp interface src Test cpp ITest cpp 在 CMakeLists txt 中 我用来构建库的句子是 f
  • 使用 %d 打印 unsigned long long

    为什么我打印以下内容时得到 1 unsigned long long int largestIntegerInC 18446744073709551615LL printf largestIntegerInC d n largestInte
  • 如果没有抽象成员,基类是否应该标记为抽象?

    如果一个类没有抽象成员 可以将其标记为抽象吗 即使没有实际理由直接实例化它 除了单元测试 是的 将不应该实例化的基类显式标记为抽象是合理且有益的 即使在没有抽象方法的情况下也是如此 它强制执行通用准则来使非叶类抽象 它阻止其他程序员创建该类
  • 如何部署“SQL Server Express + EF”应用程序

    这是我第一次部署使用 SQL Server Express 数据库的应用程序 我首先使用实体 框架模型来联系数据库 我使用 Install Shield 创建了一个安装向导来安装应用程序 这些是我在目标计算机中安装应用程序所执行的步骤 安装
  • C++ 条件编译

    我有以下代码片段 ifdef DO LOG define log p record p else define log p endif void record char data 现在如果我打电话log hello world 在我的代码中
  • 无法接收 UDP Windows RT

    我正在为 Windows 8 RT 编写一个 Windows Store Metro Modern RT 应用程序 需要在端口 49030 上接收 UDP 数据包 但我似乎无法接收任何数据包 我已按照使用教程进行操作DatagramSock
  • Oracle Data Provider for .NET 不支持 Oracle 19.0.48.0.0

    我们刚刚升级到 Oracle 19c 19 3 0 所有应用程序都停止工作并出现以下错误消息 Oracle Data Provider for NET 不支持 Oracle 19 0 48 0 0 我将 Oracle ManagedData

随机推荐

  • 为什么在这个简单的基准测试中 SQLite 比 Redis 更快?

    我在本地机器上做了简单的性能测试 这是python脚本 import redis import sqlite3 import time data N 100000 for i in xrange N key key str i value
  • 如何将 Font Awesome 图标水平居中?

    我有一张桌子 上面有字体真棒 http fortawesome github io Font Awesome 图标 我想将文本左对齐和居中对齐 我尝试过居中 i 但不起作用 HTML td i class icon ok i td CSS
  • Android:意图标志销毁活动并开始新活动

    所以我有一个登录活动 此活动会膨胀一个具有 USER NAME 和 PASSWORD EditText 视图的 login xml 布局 当我输入用户名和密码并单击登录按钮时 我会启动一个新活动 新的活动有一个注销按钮 它基本上只是启动前一
  • FoldList 类似于 J 中的原语

    Mathematica 有一个内置函数 称为FoldList FoldList函数说明 http reference wolfram com mathematica ref FoldList html J中有类似的原语动词吗 我知道 J 有
  • 如何保存 Eclipse 设置(字体、格式等)?

    如何在 Eclipse 3 6 中导出我的设置 字体 语法着色 格式等 以便我可以在另一个安装中再次使用它们 您可以将文件夹 metadata 保存在工作区中 该文件夹包含您的首选项 只需在重新安装并完成后恢复它即可 请注意 metadat
  • Azure DevOps 管道触发器问题消息不会消失

    我们的团队正在实施 Azure DevOps 测试管道 在我们最初提交创建管道 yml 文件后 显示了此错误消息 经过研究后 我意识到我忘记将触发器包含在 yml 中 但是添加后 这个错误消息并没有消失 不过 管道正在按预期工作 我们只是使
  • Asp .Net Core单元测试模拟UserManager.CreateAsync并返回Identity结果

    致力于 Net Core 项目并创建了以下服务来跨页面共享通用方法 namespace MyApp Tests Services public class UserServiceTest Fact public async Task Cre
  • C++ 使用大括号而不是赋值运算符声明和实例化作用域变量

    我正在观看 Bjarne Stroustrup 关于 C 11 风格的主题演讲 link http channel9 msdn com Events GoingNative GoingNative 2012 Keynote Bjarne S
  • 删除超过 2 小时的 Firebase 数据

    我想删除超过两个小时的数据 目前 在客户端 我循环遍历所有数据并对过时的数据运行删除 当我这样做时 db on value 每次删除某些内容时都会调用该函数 另外 只有当客户端连接时才会删除内容 如果两个客户端同时连接会发生什么 我在哪里可
  • 我应该使用“==”进行 .NET 本地化字符串比较吗?

    NET 中不使用 比较本地化字符串的原因是什么 如果我使用 CultureInfo 将如何执行比较 如果将文化感知字符串与 进行比较 例如 Strasse 与 Stra e 则返回 false 如果您需要对 UI 内容进行文化感知比较 Li
  • Map>

    Java 为我提供了
  • Android Maps API 版本 1 到版本 2 的迁移

    背景 我继承了别人的问题 并正在尝试启动并运行一个应用程序 多名开发人员放弃了该项目 现在轮到我了 我是一名 iOS 开发人员 但我已经完成了一些简单的 Android 项目 问题应用程序是一个原生 Android 最初使用 API 级别
  • IISExpress 是单线程的吗?

    我正在编写一个利用声明来确保安全的自定义 Net 应用程序 因为我们正在跨越许多边界 Web API 批处理等 在开发过程中 有时我会在通过 Chrome 登录时在系统中创建一些内容 然后我会通过 Edge 中的另一个帐户来测试新创建的项目
  • 如何在 git 中显示作者贡献的统计信息?

    我正在与一个团队合作开发一个 git 项目 我希望看到每个作者在编写的行数或编辑的行数等方面的贡献 我如何显示作者的统计数据 很简单 git shortlog s n
  • 使用robotframework api从python执行robot关键字

    用机器人语言编写复杂的机器人关键字有时非常耗时 因为机器人语言不是真正的编程语言 我想用 python 编写我的关键字 并且只用 robotsframework 语言公开简单的 html 表 问题是我们已经有很多用机器人语言编写的低级机器人
  • 如何验证电话号码格式

    我即将创建电话号码格式验证 格式为 10 位数字 包括加号 例如 0133999504 尽管我已经声明了模式 但我尝试禁止使用 符号或任何其他字符 但验证不起作用 还有其他想法或解决方案吗 1st I declared the string
  • 编译Python代码并将其链接到C++程序?

    我很清楚存在许多允许 C 代码运行 python 代码的可能性 反之亦然 Cython Boost Python 然而 除非我弄错了 所有这些方法都只是 调用 相关的 python 脚本并管理 C 程序和 python 脚本之间的交互 因此
  • 120 MB CSV 文件的 String.Split() 上的 .NET System.OutOfMemoryException

    我正在使用 C 读取约 120 MB 的纯文本 CSV 文件 最初 我通过逐行读取来进行解析 但最近确定首先将整个文件内容读入内存会快很多倍 解析已经相当慢了 因为 CSV 的引号内嵌入了逗号 这意味着我必须使用正则表达式拆分 这是我发现的
  • 使用 Windows Live/OneDrive REST API 获取联系人的电话号码和电子邮件

    是否有人成功使用 Live SDK 也称为 OneDrive SDK 来检索用户联系人的电子邮件地址和 或电话号码 我能做的最好的事情是获取用户联系人的个人资料 但它只包括散列电子邮件地址 没有电话号码 例如 id contact 1e68
  • 在带有组合框和文本框的模板列中向上/向下滚动时应用程序崩溃

    正如标题所示 应用程序在滚动时崩溃 我添加了MouseWheel and PreviewMouseWheel事件来处理列中的滚动 但有些仍然可以完成 无法追溯到特定行 但我相信这可能与以下代码有关 TextBox ValueCell Tex