任何人都可以指向可用于Compact .Net Framework 1.0打印的库吗?
标准:
编辑
更多信息:
谢谢,
基肖尔
在完整的.Net Framework上,我使用以下代码:
socket.SetSocketOption(
SocketOptionLevel.Socket, SocketOptionName.ReceiveTimeout, readTimeout);
socket.SetSocketOption(
SocketOptionLevel.Socket, SocketOptionName.SendTimeout, writeTimeout);
Run Code Online (Sandbox Code Playgroud)
但是,Windows Mobile不支持此操作并抛出异常.
我目前正在测试此解决方案以实现超时.
有谁知道更好的方法?如果可能的话,我想避免产生多个线程,毕竟这是一个嵌入式设备.
假设我有一个名为Sample的业务对象,我有样本的BindingList.样本有4个属性.
我可以选择哪些属性绑定到DataGrid,或者没有选项来自定义这样的东西?
注意:我使用Compact Framework,其中没有DataGridView,以及Autogenerate属性和DataMember属性.
回复时请记住这一点.
在我的Windows Mobile .NET应用程序中,我有一个简单的对象数组,其中包含我想要在DataGrid中显示的数据.为此,我只需致电:
myDataGrid.DataSource = myArray;
这有效,但我遇到了问题:它使用所有属性作为列,并使用属性的名称作为列标题.我无法弄清楚如何自定义两件事:
选择应将哪个属性子集显示为列(例如,我有一个ID,名称和值属性,我只想显示名称和值);
重命名列标题以使其更有意义(例如,如果属性被称为ID,则显示列标题为"Number").
这有可能吗?
如上所述,这是在Windows Mobile .NET(版本2)应用程序中.
有没有办法从.NET CF代码检测我们是在仿真器还是真实设备上运行?
谢谢Dominik
我正在开发一个技术库类,可以在两种类型的框架上使用(紧凑型或非紧凑型).
开发此类库的最佳方法是什么?默认情况下使用.NET功能(对于XP Embedded)并在使用Windows CE(使用CF.NET)时进行限制?
谢谢.
我正在使用c#vs2005紧凑框架.
我需要将字典中的所有值更新为false.
foreach (string key in parameterDictionary.Keys.ToList())
parameterDictionary[key] = false;
Run Code Online (Sandbox Code Playgroud)
".ToList()在compactframework中不可用".我如何循环和更新.
任何人都可以建议更新字典中所有值的方法.
我有一个正在开发的程序集,用于创建围绕某些潜在敏感功能的外观,我希望允许第三方调用其中包含的某些方法,而不是其他方法.
如果他们可以访问整个DLL,我怎么能阻止第三方调用未经授权的方法(我不关心他们看到代码,只是执行它)?
这必须与.net紧凑框架兼容,所以不幸的是使用StrongNameIdentityPermission属性是不可能的.
当退出Motorola MC3100上的.NET CF 3.5应用程序(仅限CE 6.0版本)时,我收到错误消息"应用程序xxx遇到严重错误,需要关闭".然后我需要热启动设备以使应用程序再次工作.
此代码在应用程序关闭之前正常工作,并且只有在应用程序中的控件上设置了字体时才会失败.在.NET CF 2.0和我使用.NET CF 3.5尝试过的所有其他Motorola,Intermec,Psion,HHC设备上,一切都运行良好.
这是我目前的测试代码:
[MTAThread]
static void Main()
{
Control oCtrl = new Control();
oCtrl.Font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Bold);
// Setting the controls font to null works
// oCtrl.Font = null; Works
// Setting the Control to null does not work, still get error
// oCtrl = null; Doesn't work
// Setting a font, not on a control, also works fine.
// System.Drawing.Font font = new System.Drawing.Font("Tahoma", 10F, System.Drawing.FontStyle.Bold);
}
Run Code Online (Sandbox Code Playgroud)
我看到了一些似乎相关的链接:
我一直在尝试显示一个透明边框作为控件背景的图像.
不幸的是,透明区域在父窗体中创建了一个洞,如下所示:

在上面的图像中,表格有一个红色背景,我希望在透明区域中看到我的控制.
我使用的代码如下:
protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
{
if (this.Image != null)
{
Graphics g = Graphics.FromImage(this.Image);
ImageAttributes attr = new ImageAttributes();
//set the transparency based on the top left pixel
attr.SetColorKey((this.Image as Bitmap).GetPixel(0, 0), (this.Image as Bitmap).GetPixel(0, 0));
//draw the image using the image attributes.
Rectangle dstRect = new Rectangle(0, 0, this.Image.Width, this.Image.Height);
e.Graphics.DrawImage(this.Image, dstRect, 0, 0, this.Image.Width, this.Image.Height,
GraphicsUnit.Pixel, attr);
}
else
{
base.OnPaint(e);
}
}
protected override void OnPaintBackground(System.Windows.Forms.PaintEventArgs e)
{
//base.OnPaintBackground(e);
}
Run Code Online (Sandbox Code Playgroud)
这个类继承自PictureBox,因为我需要一个实现OnMouseMove和OnMouseUp Events的控件. …
c# ×9
.net ×4
.net-cf-3.5 ×1
bindinglist ×1
data-binding ×1
datagrid ×1
sockets ×1
timeout ×1
windows-ce ×1