WPF 4. Подробное руководство
INotifyPropertyChangedон выступает ключом для обновления UI
private void label_MouseEnter(object sender, EventArgs e)
{
(sender as Label).ForeColor = Color.FromArgb(35, 33, 61);
}
private void label_MouseLeave(object sender, EventArgs e)
{
(sender as Label).ForeColor = Color.White;
}
class Sockets
{
public static event MessageAppearsHandler OnMessageAppears;
***
public static void ServerSocetStart()
{
while (true)
{
...
message = builder.ToString(); //builder - переменная получаемая в ходе неких манипуляций в цикле while
OnMessageAppears?.Inkove(null, new MessageAppearsEventArgs(message));
}
}
}
delegate void MessageAppearsHandler(object sender, MessageAppearsEventArgs eventArgs);
class MessageAppearsEventArgs: EventArgs
{
public string Message { get; }
public MessageAppearsEventArgs(string message)
{
Message = message;
}
}
var socket = new Sockets();
socket.message - доступен из любого места программы, при наличии указателя на инстанс socket.
INSERT INTO new_table1 (id, in_num, in_date, correspondent, out_num, uot_date, content, type, id_pach)
SELECT id_letter, in_num, in_date, correspondent, out_num, uot_date, content, type, id_pach FROM old_table
GROUP BY in_num, in_date
INSERT INTO new_table2 (id_letter, contractor, isp_date, label_num, label_date, label_mess, date_1)
SELECT id as id_letter, contractor, isp_date, label_num, label_date, label_mess, date_1 FROM old_table
GROUP BY ...