我正在开发一个小型的C#(WPF + SQLite)应用程序,我正在RadGridView从Telerik 实现.我想合并列表中相同ID的所有列.现在我的数据看起来像这样(这是我的观点).
????????????????????????????????
? id ? ime ? surname ? year ?
????????????????????????????????
? 1 ? Name1 ? Surname1 ? 1994 ?
????????????????????????????????
? 1 ? Name1 ? Surname1 ? 1995 ?
????????????????????????????????
? 2 ? Name2 ? Surname2 ? 1996 ?
????????????????????????????????
? 3 ? Name3 ? Surname3 ? 1996 ?
????????????????????????????????
Run Code Online (Sandbox Code Playgroud)
这就是我想在RadGridView中实现的目标.
?????????????????????????????????
? id ? ime ? surname ? year ?
?????????????????????????????????
? 1 ? Name1 ? Surname1 ? 1994 ?
? ? …Run Code Online (Sandbox Code Playgroud) 我使用Visual Studio 2015创建了一个C#WPF应用程序.在我的计算机上,一切正常.但没有其他人可以启动该应用程序.即使只有.exe,Debug文件夹中的.exe,或者我发布软件并安装它.
我试了几件事:
该软件需要桌面上的特殊文件夹才能工作; 我尝试了这个,它建立了路径,Environment.GetFolderPath(Environment.SpecialFolder.Desktop)
所以这不会导致问题.
另外我在我的程序中使用了一个数据库,但是我在代码中声明了数据库并通过切断网络连接在我自己的电脑上尝试了.它工作,所以缺少连接不是问题.该程序有一个三页的导航窗口,所以我做了这个
public MainWindow()
{
try
{
InitializeComponent();
}
catch (Exception ex) {
MessageBox.Show(ex.InnerException.ToString());
}
}
Run Code Online (Sandbox Code Playgroud)
但没有MessageBox显示.甚至在任务管理器中也找不到该线程.它似乎没有开始.所有PC上的操作系统都是Win 10.
有谁知道这里的问题是什么?
编辑:
我在Windows事件查看器中发现以下错误消息.
System.IO.FileNotFoundException
bei MMS.CustomAcrobatCtrl.InitializeComponent()
bei MMS.CustomAcrobatCtrl..ctor()
bei MMS.WpfAcrobatCtrl..ctor()
Run Code Online (Sandbox Code Playgroud)
我制作了一个自定义PDF查看器,似乎由于某些原因无法加载,或者我错了?
我已经在我的项目中实现了SearchableSpinner。在里面Fragment。
我正在Realm用作数据库。用我的onCreateView方法我有这个...
@Override
public View onCreateView(LayoutInflater inflater, final ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.ncrdocument, container, false);
realm = Realm.getDefaultInstance();
documents = new ArrayList<>();
documents = realm.where(MaterialDoc.class).findAll();
ArrayAdapter<MaterialDoc> adapter = new ArrayAdapter<>(this.getContext(), android.R.layout.simple_list_item_1, documents);
matList.setAdapter(adapter);
.
.
.
return view;
Run Code Online (Sandbox Code Playgroud)
数据加载正常,可以正确显示它们,但是当我尝试搜索微调器时,我的应用程序崩溃了,并且出现了此错误。
An exception occured during performFiltering()
java.lang.IllegalStateException: Realm access from incorrect thread. Realm objects can only be accessed on the thread they were created
at io.realm.BaseRealm.checkIfValid(BaseRealm.java:383)
at io.realm.MaterialDocRealmProxy.realmGet$document_number(MaterialDocRealmProxy.java:126)
at com.my.application.test.Model.MaterialDoc.getDocumentNumber(MaterialDoc.java:29) …Run Code Online (Sandbox Code Playgroud)