小编hak*_*kan的帖子

我可以使用哪些程序来可视化JSON文件?

我需要一个程序来显示来自URL或json文件的json响应,该文件组织数据以使其更具人性化.有什么建议?

json

28
推荐指数
5
解决办法
3万
查看次数

IIS Web Garden的优点/缺点

什么时候需要IIS Web Garden功能.什么是专业和骗局?

asp.net iis web-garden

9
推荐指数
1
解决办法
1万
查看次数

MouseEnter事件的奇怪行为

我正在开发一个Windows Phone 8 XAML应用程序.

我为XAML页面中的几个对象定义了MouseEnter事件.(例如两个矩形).触发这些对象的MouseEnter事件后,我按下同一页面上的按钮.按下按钮不仅会触发自己的点击事件.它还会触发输入的最后一个Rectangle的MouseEnter事件.

使用只有两个矩形和一个Button的新项目可以重现该问题.此行为不会始终显示,但可以在触发矩形的MouseEnter事件几次后观察到.

我的XAML对象如下.

<Rectangle Fill="#FFF4F4F5" HorizontalAlignment="Left" Height="100"
           Margin="102,306,0,0" Stroke="Black" 
           VerticalAlignment="Top" Width="100" 
           MouseEnter="Rectangle_MouseEnter"/>

<Rectangle Fill="#FFF4F4F5" HorizontalAlignment="Left" Height="100" 
           Margin="314,306,0,0" Stroke="Black" 
           VerticalAlignment="Top" Width="100"
           MouseEnter="Rectangle_MouseEnter"/>

<Button Content="Button" HorizontalAlignment="Left"
        Margin="256,481,0,0" VerticalAlignment="Top" Click="Button_Click"/>
Run Code Online (Sandbox Code Playgroud)

后面的代码看起来像这样.

private void Rectangle_MouseEnter(object sender, 
                                  System.Windows.Input.MouseEventArgs e)
{
    Debug.WriteLine("Rectangle_MouseEnter");
}

private void Button_Click(object sender, RoutedEventArgs e)
{
    Debug.WriteLine("Button_Click");
}
Run Code Online (Sandbox Code Playgroud)

c# xaml windows-phone windows-phone-8

5
推荐指数
1
解决办法
515
查看次数

C#和MongoDB使用ObjectId列表删除记录

我需要使用官方C#驱动程序从mongo db中的集合中删除一些记录.我的代码如下.

public static void Remove(List<ObjectId> objectIds)
{
        ObjectMongoCollection.Remove(Query.In("NotificationId", new BsonArray(objectIds)), SafeMode.True);
}

public class Notification
{
    public static MongoCollection<Notification> ObjectMongoCollection = MongoHelper.GetMongoServer("MongoKelimeYarisi").GetDatabase("KelimeYarisi").GetCollection<Notification>("Notification");

    [BsonId]
    public ObjectId NotificationId { get; set; }
    public int PlayerId { get; set; }
    public string OpponentName { get; set; }
    public string gameId { get; set; }
    public DateTime CreateDate { get; set; }
    public NotificationStatus Status = NotificationStatus.New;
    public NotificationType Type = NotificationType.RoundSubmit;
    public bool IsPushed { get; set; }
Run Code Online (Sandbox Code Playgroud)

它运行没有错误,但似乎不起作用.如何使用ObjectIds列表删除记录.

还尝试过:

ObjectMongoCollection.Remove(Query.In("_id", new …
Run Code Online (Sandbox Code Playgroud)

c# mongodb

4
推荐指数
1
解决办法
7775
查看次数

标签 统计

c# ×2

asp.net ×1

iis ×1

json ×1

mongodb ×1

web-garden ×1

windows-phone ×1

windows-phone-8 ×1

xaml ×1