这些扩展之间有什么区别吗?如果是这样,哪些人以及在什么情况下他们使用一个或另一个扩展名?
主页
/
user-467311
Георгий's questions
是否可以这样做,而不是分别为两个元素编写相同的属性,而是组合这些属性?像这样尝试过,但它不起作用:
Panel panZZZ, panYYY = new Panel
{
AutoSize = true
};
flowLayoutPanelN我在 中创建了许多元素Panel,并flowLayoutPanelN添加了Label. 它们的数量取决于数据库中的记录数。一切正常,但并不完全如我们所愿......它会冻结或向上滚动,直到所有元素出现。我怎样才能摆脱这个。
这是代码
flowLayout = new FlowLayoutPanel[data.Count];
name_oneOils = new Label[data.Count];
check = new CheckBox[data.Count];
for (int i = data.Count - 1; i >= 0; i--)
{
flowLayout[i] = new FlowLayoutPanel
{
AutoSize = true,
BorderStyle = BorderStyle.FixedSingle,
Dock = DockStyle.Top,
FlowDirection = FlowDirection.LeftToRight
};
panel.Controls.Add(flowLayout[i]);
name_oneOils[i] = new Label
{
Anchor = AnchorStyles.None,
AutoSize = true,
Font = new Font("Malgun Gothic", 10.8F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0))),
Name = $"name_oneOils{i}",
Text = data[i][0],
TextAlign = ContentAlignment.MiddleCenter
};
name_oneOils[i].Click += new EventHandler(name_oneOils_Click);
flowLayout[i].Controls.Add(name_oneOils[i]);
check[i] = new CheckBox
{
Name = $"check{i}",
Checked = Convert.ToBoolean(data[i][2])
};
flowLayout[i].Controls.Add(check[i]);
}
https://disk.yandex.ru/i/f9x7xvtF18Y-ng记录了应用程序是如何工作的
PostgreSql数据库中users_table表中,userId字段为BIGINT数据类型,唯一,不为空。我正在使用 Npgsql 6.0.2
控制台错误: invalid input syntax for type double precision: "userId"或недопустимый синтаксис ввода для типа двойной точности
编码:
conn.Open();
NpgsqlCommand command = conn.CreateCommand();
command.CommandText = "SELECT @'userId' FROM users_table";
NpgsqlDataReader reader = command.ExecuteReader();
List<string[]> data = new List<string[]>();
while (reader.Read())
{
data.Add(new string[1]);
data[data.Count - 1][0] = reader[0].ToString();
}
reader.Close();
conn.Close();
PostgreSql 中没有 NVARCHAR 如何正确写俄语单词?
如何在电报机器人消息中显示数据库中的数据?我正在使用 SQLite。按照代码死胡同,没有思路……我开始这样做了:
try
{
conn.Open();
SQLiteCommand command = conn.CreateCommand();
command.CommandText = "SELECT * FROM [Users]";
SQLiteDataReader reader = command.ExecuteReader();
List<string[]> data = new List<string[]>();
while (reader.Read())
{
data.Add(new string[5]);
data[data.Count - 1][0] = reader[0].ToString();
data[data.Count - 1][1] = reader[1].ToString();
data[data.Count - 1][2] = reader[2].ToString();
data[data.Count - 1][3] = reader[3].ToString();
data[data.Count - 1][4] = reader[4].ToString();
}
reader.Close();
conn.Close();
foreach (string[] s in data) {
Message message1 = await botClient.SendTextMessageAsync(
chatId: chatId,
text: ,
cancellationToken: cancellationToken);
}
}
catch (Exception ex)
{
Console.WriteLine("Error: " + ex);
}
例如,让我们拿一个带有统计信息的按钮(哪些用户登录以及何时登录),这个按钮不应该对普通用户可见。

