Files
DanMuRead/BarrageGrab/Forms/RoomDetail.cs
T

42 lines
1.0 KiB
C#
Raw Normal View History

using System;
2023-11-23 16:43:21 +08:00
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using BarrageGrab.Modles;
2023-11-23 16:43:21 +08:00
using Newtonsoft.Json;
namespace BarrageGrab.Forms
{
public partial class RoomDetail : Form
{
public RoomDetail(RoomInfo info)
{
InitializeComponent();
//小驼峰
var json = JsonConvert.SerializeObject(info, Formatting.Indented, new JsonSerializerSettings()
2023-11-23 16:43:21 +08:00
{
ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver()
});
this.textBox1.Text = json;
}
private void RoomDetail_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
//复制到剪切板
Clipboard.SetText(this.textBox1.Text);
MessageBox.Show("复制成功");
}
}
}