小编Ant*_*ony的帖子

Windows 10上的SoapUI - 高DPI/4K扩展问题

SoapUI似乎不是DPI-Aware,并且在我的高DPI屏幕上显示太小(微小的文本和按钮).其他应用程序运行正常(屏幕分辨率3840 x 2160).

太小

版本:SoapUI 5.1.2
操作系统:Windows 10

我试过了:

  • 配置SoapUI以"在高DPI设置下禁用显示缩放"运行 - SoapUI的某些部分看起来更大并且无法正常显示(图像)
  • 改变分辨率
  • 更改字体大小(首选项>编辑器设置>选择字体...)


因此我假设,SoapUI假装是DPI-Aware,但并没有真正扩大规模.有没有人有同样的问题?

soapui

26
推荐指数
3
解决办法
2万
查看次数

如何将未映射到Linq中的表的字段添加到Sql中

在Entity Framework中,我可以将NotMapped属性应用于我不想在数据库表中创建列的属性.如何在DBML文件中为自动生成的类获得相同的效果?我有一个StoredProcedure返回一些额外的字段.我打电话给SP:

[global::System.Data.Linq.Mapping.FunctionAttribute(Name = "dbo.sp_GetSupplierArticles")]
public ISingleResult<SupplierArticle> GetSupplierArticles([global::System.Data.Linq.Mapping.ParameterAttribute(DbType = "BigInt")] long mainArticleId, [global::System.Data.Linq.Mapping.ParameterAttribute(DbType = "BigInt")] long? userId)
{
    IExecuteResult result = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())), mainArticleId, userId);
    return ((ISingleResult<SupplierArticle>)(result.ReturnValue));
}
Run Code Online (Sandbox Code Playgroud)

必要的字段我添加到分离的部分类中.如果没有任何其他属性,它将返回my的默认值并应用于[Column(IsDbGenerated = false)]已分隔的partial类:

public partial class SupplierArticle
{
    [Column(IsDbGenerated = false)]
    public double Extra { get; set; }
}
Run Code Online (Sandbox Code Playgroud)

所以它一直有效,直到我尝试SupplierArticle使用另一个查询(而不是我的存储过程):

db.LoadOptions = db.GenerateDataLoadOptions(entitiesToInclude);
var query =
    from shoppingCartItem in db.ShoppingCartItems
    where shoppingCartItem.UserId == userId
    select shoppingCartItem;
return query.ToList();
Run Code Online (Sandbox Code Playgroud)

由于LoadOptions(传入entitiesToInclude …

.net c# linq sql-server

15
推荐指数
1
解决办法
1855
查看次数

如何计算任务中的列表?

private async Task<List<T>> Ex_Event(string telNo)
{
    SearchConditionData scd = new SearchConditionData { tel=telNo };            
    List<T> list = await RequestAsync<SearchConditionData, List<T>>(scd, Service.GetIncident);

    historyList = ( ... ).Take(30).ToList();          

    return historyList;
}
Run Code Online (Sandbox Code Playgroud)

我做了一个返回 List<> 的方法。

但是我异步修改了它,然后我不能使用List.Count。

这是我的代码的一部分。

public delegate Task<List<IncidentListData>> HistoryEvent(string telNo);
public event HistoryEvent myHistoryEvent;
Run Code Online (Sandbox Code Playgroud)

返回类型是任务<>。我想检查任务中的计数列表。

if (myHistoryEvent(Tel).Count > 0)
Run Code Online (Sandbox Code Playgroud)

但它不起作用。而且我不能使用异步,因为我在接口中调用了 myHistoryEvent() public string this[string name](IDataErrorInfo)

如何检查任务中列表的数量??

c# list count task

6
推荐指数
1
解决办法
2229
查看次数

NetSuite订单项在循环内删除问题

我的Restlet似乎在删除循环中的订单项时遇到问题。如果似乎有一条记录总是被跳过。因此,如果三个订单项的ID为111,则只会删除两个。此代码可能是什么问题:

var itemcount = update_record.getLineItemCount('item');

for (var j = 1; j <= itemcount; j++)
{
    var lineid = update_record.getLineItemValue('item', 'custcol_line_id', j);

    if (lineid == 111)
    {
        update_record.removeLineItem('item', j);
    }
}
Run Code Online (Sandbox Code Playgroud)

javascript restlet netsuite

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

在Unity中创建鼠标拖动预制件

当用户单击并按住鼠标按钮(拖动鼠标)时,我想使用鼠标位置创建一个预制件 - (类似于绘画中的画笔绘图 - 除了使用预制件更改画笔标记).

当鼠标移动缓慢时,这可以正常工作.我遇到的问题是如果用户移动鼠标太快,"更新"功能不会记录所有鼠标位置,并且每个预制件都放置在远离前一个预制件的位置.

在此输入图像描述

初始代码:

public class Draw : MonoBehaviour
{
    public GameObject Brush;

    private bool _isDraging = false;
    private Vector3 _mousePos;

    void Update()
    {
        if (Input.GetMouseButtonDown(0))
        {
            _isDraging = true;
        }

        if (Input.GetMouseButtonUp(0))
        {
            _isDraging = false;
            return;
        }

        if (_isDraging)
        {
            _mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
            _mousePos.z = 0;
            //I have added 'Physics.OverlapBox' so that the prefab doesn't overlap with the previous prefab
            var collide = Physics.OverlapBox(_mousePos, new Vector3(0, 0, 0));

            if (!collide.Any())
            {
                Debug.Log("Draw: " + _mousePos); …
Run Code Online (Sandbox Code Playgroud)

c# mouse unity-game-engine

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

标签 统计

c# ×3

.net ×1

count ×1

javascript ×1

linq ×1

list ×1

mouse ×1

netsuite ×1

restlet ×1

soapui ×1

sql-server ×1

task ×1

unity-game-engine ×1