------ #### V1.0.2404.1201 - 新增支持手动运行规则。 - 规则播放时间间隔不再针对全局声效,而只针对当前规则声效。 - 修复规则中播放文件夹可能导致无法执行的BUG。 - 修复规则不勾选礼物和点赞,则无法执行的BUG。
61 lines
2.0 KiB
C#
61 lines
2.0 KiB
C#
using DotNet4.Utilities;
|
|
using HandyControl.Controls;
|
|
using LiveTools.Data;
|
|
using Microsoft.VisualBasic.ApplicationServices;
|
|
using Microsoft.Win32;
|
|
using Newtonsoft.Json.Linq;
|
|
using ryCommon;
|
|
using ryCommonDb;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace LiveTools
|
|
{
|
|
/// <summary>
|
|
/// FrmAddRule.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class FrmUseSN : HandyControl.Controls.Window
|
|
{
|
|
public FrmUseSN()
|
|
{
|
|
InitializeComponent();
|
|
TxtUserId.Text = Config.UserInfo.UserId;
|
|
}
|
|
private void BtnOK_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
HttpResult html = Config.ry_api.Post(Config.Api_Url + "user.aspx", "api=usesn&userid=" + RyWeb.WebDecode.Escape(Config.UserInfo.UserId) +
|
|
"&sn=" + RyWeb.WebDecode.Escape(TxtSN.Text));
|
|
string jsonText = API.GetJson(html.Html);
|
|
Json json = new Json(jsonText);
|
|
string result = json.GetJsonValue(ConstVar.json_Result);
|
|
if (result == ResultVar.json_Success.ToString())
|
|
{
|
|
Config.UserInfo.OutDateStr= json.GetJsonValue("out_date");
|
|
Config.UserInfo.OutTime=Config.UserInfo.OutDateStr.ToDateTime().ToInt64();
|
|
HandyControl.Controls.MessageBox.Show("激活成功。", "提示");
|
|
DialogResult = true;
|
|
}
|
|
else
|
|
{
|
|
HandyControl.Controls.MessageBox.Show(json.GetJsonValue(ConstVar.json_ResultText), "激活失败");
|
|
}
|
|
}
|
|
|
|
private void BtnCancel_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
DialogResult = false;
|
|
}
|
|
}
|
|
}
|