680 lines
28 KiB
C#
680 lines
28 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Text;
|
|
using System.Linq;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
using DevExpress.XtraEditors;
|
|
using UI.Framework.Forms;
|
|
using EncourageUser.Properties;
|
|
using EncourageUser.Entitys;
|
|
using Api.Framework;
|
|
using Api.Framework.Tools;
|
|
using Api.Framework.Model;
|
|
using CsharpHttpHelper;
|
|
using Chat.Framework;
|
|
using Chat.Framework.WXSdk;
|
|
using System.Threading;
|
|
|
|
namespace EncourageUser
|
|
{
|
|
public partial class MainForm : BaseForm
|
|
{
|
|
public MainForm()
|
|
{
|
|
InitializeComponent();
|
|
this.Text = Resources.MainFormTitle;
|
|
}
|
|
|
|
public void CloseForm()
|
|
{
|
|
try
|
|
{
|
|
if (!this.IsDisposed)
|
|
{
|
|
this.Invoke(new Action(delegate
|
|
{
|
|
this.Close();
|
|
this.Dispose();
|
|
}));
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ShowError(ex);
|
|
}
|
|
}
|
|
|
|
private void listView1_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
|
|
{
|
|
try
|
|
{
|
|
if (listView1.SelectedItems.Count == 0)
|
|
{
|
|
_ButtonEnabled(false);
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
var session = ApiClient.GetSession();
|
|
var id = long.Parse(listView1.SelectedItems[0].SubItems[0].Text);
|
|
|
|
List<fl_plugin_encourage_user_messs> messs = null;
|
|
|
|
if (listView1.Tag != null)
|
|
messs = listView1.Tag as List<fl_plugin_encourage_user_messs>;
|
|
else
|
|
messs = session.Find<fl_plugin_encourage_user_messs>("select * from fl_plugin_encourage_user_messs");
|
|
if (messs != null && messs.Count != 0)
|
|
{
|
|
var mess = messs.FirstOrDefault(f => f.id == id);
|
|
if (mess == null) return;
|
|
textEdit4.Text = mess.note;
|
|
memoEdit1.Text = mess.mess;
|
|
|
|
groupControl4.Tag = mess;
|
|
_ButtonEnabled(true);
|
|
}
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ShowError(ex);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 按钮状态
|
|
/// </summary>
|
|
/// <param name="flag"></param>
|
|
private void _ButtonEnabled(bool flag)
|
|
{
|
|
simpleButton2.Enabled = simpleButton3.Enabled = flag;
|
|
}
|
|
|
|
private void simpleButton4_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
var session = ApiClient.GetSession();
|
|
var mess = new fl_plugin_encourage_user_messs();
|
|
|
|
mess.id = 0;
|
|
mess.note = textEdit4.Text.Trim();
|
|
mess.mess = memoEdit1.Text.Trim();
|
|
|
|
var messs = session.Find<fl_plugin_encourage_user_messs>("select * from fl_plugin_encourage_user_messs");
|
|
if (messs != null && messs.Count != 0)
|
|
{
|
|
var _signInfo = messs.FirstOrDefault(f => f.note == mess.note);
|
|
if (_signInfo != null) throw new Exception("该消息别名已经存在,无法增加");
|
|
}
|
|
session.Insertable(mess).ExecuteCommand();
|
|
_RefreshData();
|
|
simpleButton2.Enabled = simpleButton3.Enabled = false;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
if (ex.Message.Contains("not unique"))
|
|
ShowError("数据重复");
|
|
else
|
|
ShowError(ex);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 数显数据
|
|
/// </summary>
|
|
private void _RefreshData(int index = 0)
|
|
{
|
|
try
|
|
{
|
|
var session = ApiClient.GetSession();
|
|
listView1.Tag = null;
|
|
if (groupControl4.Tag == null)
|
|
_ButtonEnabled(false);
|
|
var messs = session.Find<fl_plugin_encourage_user_messs>("select * from fl_plugin_encourage_user_messs", new { signtype = index });
|
|
listView1.Items.Clear();
|
|
foreach (var mess in messs)
|
|
{
|
|
var item = new ListViewItem();
|
|
item.Text = mess.id.ToString();
|
|
item.SubItems.Add(mess.note);
|
|
item.SubItems.Add(mess.mess);
|
|
listView1.Items.Add(item);
|
|
}
|
|
listView1.Tag = messs;
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ShowError(ex);
|
|
}
|
|
}
|
|
|
|
private void simpleButton2_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
if (groupControl4.Tag != null)
|
|
{
|
|
var session = ApiClient.GetSession();
|
|
var mess = groupControl4.Tag as fl_plugin_encourage_user_messs;
|
|
mess.note = textEdit4.Text.Trim();
|
|
mess.mess = memoEdit1.Text.Trim();
|
|
|
|
//List<fl_plugin_encourage_user_messs> messs = null;
|
|
//if (listView1.Tag != null)
|
|
// messs = listView1.Tag as List<fl_plugin_encourage_user_messs>;
|
|
//else
|
|
// messs = session.Find<fl_plugin_encourage_user_messs>("select * from fl_plugin_encourage_user_messs");
|
|
//if (messs != null && messs.Count != 0)
|
|
//{
|
|
//var _mess = messs.FirstOrDefault(f => f.note == mess.note);
|
|
//if (_mess != null) throw new Exception("该消息别名已经存在,无法增加");
|
|
//}
|
|
|
|
session.Updateable(mess).ExecuteCommand();
|
|
_RefreshData();
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ShowError(ex);
|
|
}
|
|
}
|
|
|
|
private void simpleButton3_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
if (groupControl4.Tag != null)
|
|
{
|
|
var session = ApiClient.GetSession();
|
|
var messs = session.Find<fl_plugin_encourage_user_messs>("select * from fl_plugin_encourage_user_messs");
|
|
if (messs.Count > 1)
|
|
{
|
|
var mess = groupControl4.Tag as fl_plugin_encourage_user_messs;
|
|
|
|
var task = session.FindSingle<fl_qunfa_task>("select * from fl_qunfa_task where messid = @messid", new { messid = mess.id });
|
|
if (task == null)
|
|
{
|
|
session.Deleteable(mess).ExecuteCommand();
|
|
_RefreshData();
|
|
}
|
|
else
|
|
ShowError("当前提示语已被任务使用,无法删除");
|
|
}
|
|
else
|
|
ShowSuccess("至少留一个提示语");
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ShowError(ex);
|
|
}
|
|
}
|
|
|
|
private void simpleButton1_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
//var wxs = ChatClient.WXClient.Values;
|
|
//foreach (var item in wxs)
|
|
//{
|
|
// try
|
|
// {
|
|
|
|
// if (item.WeixinType == Chat.Framework.WXSdk.Implement.WeixinType.Hook微信)
|
|
// {
|
|
// var friends = item.FindFriends<FriendInfo>();
|
|
// Console.WriteLine();
|
|
// }
|
|
// else if (item.WeixinType == Chat.Framework.WXSdk.Implement.WeixinType.QYHook微信)
|
|
// {
|
|
// var friends = item.FindFriends<WorkFriendInfo>();
|
|
// Console.WriteLine();
|
|
// }
|
|
// else if (item.WeixinType == Chat.Framework.WXSdk.Implement.WeixinType.Grpc微信)
|
|
// {
|
|
// //var friends = item.FindFriends<FriendInfo>();
|
|
// Console.WriteLine();
|
|
// }
|
|
// }
|
|
// catch (Exception ex)
|
|
// {
|
|
// }
|
|
//}
|
|
|
|
//return;
|
|
|
|
try
|
|
{
|
|
if (!simpleButton5.Enabled)
|
|
throw new Exception("数据在校验中,等校验完毕后再试!");
|
|
simpleButton1.Text = "查询中...";
|
|
simpleButton1.Enabled = false;
|
|
var t = Task.Run(() =>
|
|
{
|
|
try
|
|
{
|
|
gridControl1.DataSource = null;
|
|
|
|
var uType = (UserType)comboBoxEdit1.SelectedIndex;
|
|
var results = checkedComboBoxEdit1.Properties.GetCheckedItems().ToString().Replace(", ", ",").Replace(" ,", ",").Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
|
var session = ApiClient.GetSession();
|
|
var robots = new List<fl_robot_info>();
|
|
for (int i = 0; i < results.Length; i++)
|
|
{
|
|
var split = results[i].Split('(');
|
|
var name = split[split.Length - 1].Replace(")", "");
|
|
var nick = results[i].Replace($"({name})", "");
|
|
var robot = session.FindRobots().FirstOrDefault(f => f.name.Trim() == name && f.nick == nick);
|
|
if (robot != null)
|
|
robots.Add(robot);
|
|
}
|
|
|
|
var db = ApiClient.GetSession();
|
|
|
|
var members = new List<fl_member_info>();
|
|
|
|
var check = checkBox1.Checked;
|
|
var beginTime = dateTimePicker1.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
|
var endTime = dateTimePicker2.Value.ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
|
var sql = $"select * from fl_member_info where 1 = 1 and status != 1";
|
|
if (robots != null && robots.Count != 0)
|
|
{
|
|
sql += $" and robot_name in ('";
|
|
var robotNameTmp = new List<string>();
|
|
for (int i = 0; i < robots.Count; i++)
|
|
{
|
|
robotNameTmp.Add(robots[i].name);
|
|
}
|
|
sql += string.Join("','", robotNameTmp) + "') ";
|
|
}
|
|
switch (uType)
|
|
{
|
|
case UserType.新用户未查询过:
|
|
case UserType.新用户查询后未下单:
|
|
{
|
|
//var sql = $"select * from fl_member_info where robot_name = {robot.name} and ";
|
|
if (check)
|
|
sql += " and '" + beginTime + "' <= crt_time and crt_time <= '" + endTime + "'";
|
|
sql += " and bind_order = 0";
|
|
var notQueryMember = db.Find<fl_member_info>(sql);
|
|
if (notQueryMember != null && notQueryMember.Count != 0)
|
|
{
|
|
var sRecord = db.Find<fl_statistics_record>("select * from fl_statistics_record");
|
|
|
|
if (UserType.新用户未查询过 == uType)
|
|
members = notQueryMember.Where(m => sRecord.FirstOrDefault(r => r.uid == m.id) == null).ToList();
|
|
else if (UserType.新用户查询后未下单 == uType)
|
|
members = notQueryMember.Where(m => sRecord.FirstOrDefault(r => r.querynum != 0 && r.uid == m.id) != null).ToList();
|
|
}
|
|
}
|
|
break;
|
|
case UserType.已下单用户:
|
|
{
|
|
if (check)
|
|
sql += " and '" + beginTime + "' <= crt_time and crt_time <= '" + endTime + "'";
|
|
sql += " and bind_order != 0";
|
|
members = db.Find<fl_member_info>(sql);
|
|
}
|
|
break;
|
|
case UserType.长时间未购买的老客户:
|
|
{
|
|
var _members = db.Find<fl_member_info>(sql);
|
|
var sql2 = "select * from fl_statistics_record ";
|
|
sql2 += " where ex5 <= " + HttpExtend.GetTimeStamp(DateTime.Now.AddDays(-(int)numericUpDown1.Value));
|
|
var records = db.Find<fl_statistics_record>(sql2);
|
|
if (records != null)
|
|
{
|
|
foreach (var item in records)
|
|
{
|
|
var temp = _members.FirstOrDefault(f => f.id == item.uid);
|
|
if (temp != null)
|
|
members.Add(temp);
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
case UserType.用户分组:
|
|
{
|
|
var mGroup = (fl_member_group)comboBoxEdit2.SelectedItem;
|
|
sql += $" and group_id = {mGroup.id}";
|
|
members = db.Find<fl_member_info>(sql);
|
|
}
|
|
break;
|
|
case UserType.所有用户:
|
|
members = db.Find<fl_member_info>(sql);
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
this.Invoke(new Action(() =>
|
|
{
|
|
|
|
if (members != null && members.Count != 0)
|
|
gridControl1.DataSource = members;
|
|
label5.Visible = (members == null || members.Count == 0);
|
|
}));
|
|
}
|
|
catch (Exception)
|
|
{ }
|
|
finally
|
|
{
|
|
this.Invoke(new Action(() =>
|
|
{
|
|
simpleButton1.Text = " 查 询 ";
|
|
simpleButton1.Enabled = true;
|
|
}));
|
|
}
|
|
});
|
|
}
|
|
catch (Exception)
|
|
{ }
|
|
|
|
|
|
//t.ContinueWith(o =>
|
|
//{
|
|
|
|
//});
|
|
//Task.WaitAll(t);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ShowError(ex);
|
|
}
|
|
}
|
|
|
|
private void GetTasks()
|
|
{
|
|
try
|
|
{
|
|
gridControl3.DataSource = null;
|
|
var db = ApiClient.GetSession();
|
|
var tasks = db.Find<fl_qunfa_task>("select * from fl_qunfa_task order by execType asc");
|
|
|
|
if (tasks != null && tasks.Count != 0)
|
|
{
|
|
gridControl3.DataSource = tasks;
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{ }
|
|
}
|
|
|
|
|
|
private void comboBoxEdit1_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
numericUpDown1.Visible = labelControl7.Visible = simpleButton5.Visible = comboBoxEdit1.SelectedIndex == 2;
|
|
checkBox1.Visible = dateTimePicker1.Visible = dateTimePicker2.Visible = (comboBoxEdit1.SelectedIndex == 0 || comboBoxEdit1.SelectedIndex == 1 || comboBoxEdit1.SelectedIndex == 5);
|
|
labelControl8.Visible = comboBoxEdit2.Visible = comboBoxEdit1.SelectedIndex == 3;
|
|
|
|
if (comboBoxEdit1.SelectedIndex == 3)
|
|
{
|
|
var groups = ApiClient.GetSession().Find<fl_member_group>("select * from fl_member_group");
|
|
if (groups == null || groups.Count == 0)
|
|
throw new Exception("数据异常");
|
|
this.comboBoxEdit2.Properties.Items.AddRange(groups);
|
|
this.comboBoxEdit2.SelectedIndex = 0;
|
|
}
|
|
else if (comboBoxEdit1.SelectedIndex == 4)
|
|
{
|
|
|
|
|
|
}
|
|
|
|
}
|
|
catch (Exception ex)
|
|
{ }
|
|
}
|
|
|
|
//private void Visible(bool v)
|
|
//{
|
|
// numericUpDown1.Visible = labelControl6.Visible = v;
|
|
//}
|
|
|
|
private void xtraTabControl1_SelectedPageChanging(object sender, DevExpress.XtraTab.TabPageChangingEventArgs e)
|
|
{
|
|
try
|
|
{
|
|
if (e.Page.TabIndex == 1)
|
|
_RefreshData();
|
|
else if (e.Page.TabIndex == 2)
|
|
GetTasks();
|
|
}
|
|
catch (Exception ex)
|
|
{ }
|
|
}
|
|
|
|
private void 添加任务ToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
var result = gridControl1.DataSource;
|
|
if (result == null) throw new Exception("发送用户列表为空");
|
|
var members = result as List<fl_member_info>;
|
|
|
|
var rownumber = gridView3.GetSelectedRows().ToList();//获取选中行号;
|
|
if (rownumber == null || rownumber.Count == 0) throw new Exception("请选要发送的用户");
|
|
if (rownumber != null & rownumber.Count != 0)
|
|
{
|
|
List<fl_member_info> mList = new List<fl_member_info>();
|
|
foreach (var item in rownumber)
|
|
{
|
|
try
|
|
{
|
|
var id = int.Parse(gridView3.GetRowCellValue(item, "id").ToString());
|
|
var m = members.FirstOrDefault(f => f.id == id);
|
|
if (m != null)
|
|
mList.Add(m);
|
|
}
|
|
catch (Exception)
|
|
{ }
|
|
}
|
|
|
|
if (mList == null) throw new Exception("发送用户存在未知情况,终止操作");
|
|
if (mList != null && mList.Count != 0)
|
|
{
|
|
////var stateDic = new Dictionary<string, SendState>();
|
|
//var dic = new Dictionary<string, List<long>>();
|
|
//var robotNames = mList.Select(f => f.robot_name).ToList().GroupBy(f => f).Select(f => f.Key).ToList();
|
|
//if (robotNames != null && robotNames.Count != 0)
|
|
//{
|
|
// foreach (var robot in robotNames)
|
|
// {
|
|
// dic.Add(robot, mList.Where(f => f.robot_name == robot).Select(f => f.id).ToList());
|
|
// //stateDic.Add(robot, new SendState() { IsFinish = false, Num = 0, Time = CsharpHttpHelper.HttpExtend.GetTimeStamp(DateTime.Now.Date) });
|
|
// }
|
|
//}
|
|
var tForm = new TaskForm(mList);
|
|
tForm.ShowDialog();
|
|
}
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ShowError(ex);
|
|
}
|
|
}
|
|
|
|
private void 修改ToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
var rows = this.gridView2.GetSelectedRows();
|
|
if (rows != null && rows.Length > 0)
|
|
{
|
|
var row = this.gridView2.GetRow(rows[0]) as fl_qunfa_task;
|
|
if (row == null) return;
|
|
var tForm = new TaskForm(row);
|
|
tForm.ShowDialog();
|
|
TaskJob.Abort(row.id);
|
|
GetTasks();
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ShowError(ex);
|
|
}
|
|
}
|
|
|
|
private void 删除ToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
var rows = this.gridView2.GetSelectedRows();
|
|
if (rows != null && rows.Length > 0)
|
|
{
|
|
var row = this.gridView2.GetRow(rows[0]) as fl_qunfa_task;
|
|
if (row == null) return;
|
|
|
|
var session = ApiClient.GetSession();
|
|
session.Deleteable(row).ExecuteCommand();
|
|
TaskJob.Abort(row.id);
|
|
GetTasks();
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ShowError(ex);
|
|
}
|
|
}
|
|
|
|
private void dateTimePicker2_ValueChanged(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// 是否在运行
|
|
/// </summary>
|
|
public static bool isRun { get; set; }
|
|
|
|
private void simpleButton5_Click(object sender, EventArgs e)
|
|
{
|
|
Task.Run(() =>
|
|
{
|
|
try
|
|
{
|
|
this.Invoke(new Action(() =>
|
|
{
|
|
simpleButton5.Enabled = false;
|
|
simpleButton5.Text = "正在校验数据中...";
|
|
}));
|
|
|
|
var session = ApiClient.GetSession();
|
|
//var sql = "select * from fl_member_info ";
|
|
//if (check)
|
|
// sql += " where '" + begionTime + "' <= crt_time and crt_time <= '" + endTime + "'";
|
|
|
|
var members = session.Find<fl_member_info>("select * from fl_member_info");
|
|
|
|
//var members = session.Find<fl_member_info>("select * from fl_member_info");
|
|
var records = session.Find<fl_statistics_record>("select * from fl_statistics_record", new { });
|
|
|
|
foreach (var member in members)
|
|
{
|
|
try
|
|
{
|
|
var paytime = DateTime.MinValue;
|
|
var mrecord = records.FirstOrDefault(f => f.uid == member.id);
|
|
if (mrecord != null && mrecord.ex5 != 0)
|
|
paytime = HttpExtend.GetDateTime(mrecord.ex5.ToString());
|
|
|
|
var alimama = session.FindSingle<fl_order_alimama>("select * from fl_order_alimama where db_userid = @uid order by id desc", new { uid = member.id });
|
|
if (alimama != null && alimama.paid_time > paytime)
|
|
paytime = alimama.paid_time;
|
|
var jingdong = session.FindSingle<fl_order_jingdong>("select * from fl_order_jingdong where db_userid = @uid order by id desc", new { uid = member.id });
|
|
if (jingdong != null && jingdong.orderTime > paytime)
|
|
paytime = jingdong.orderTime;
|
|
var pinduoduo = session.FindSingle<fl_order_pinduoduo>("select * from fl_order_pinduoduo where db_userid = @uid order by id desc", new { uid = member.id });
|
|
if (pinduoduo != null && pinduoduo.order_pay_time > paytime)
|
|
paytime = pinduoduo.order_pay_time;
|
|
|
|
var weipinhui = session.FindSingle<fl_order_weipinhui>("select * from fl_order_weipinhui where db_userid = @uid order by id desc", new { uid = member.id });
|
|
var wphorderTime = Util.GetDateTime(weipinhui.orderTime);
|
|
if (weipinhui != null && wphorderTime > paytime)
|
|
paytime = wphorderTime;
|
|
|
|
if (mrecord == null)
|
|
{
|
|
mrecord = new fl_statistics_record() { uid = member.id, ex5 = HttpExtend.GetTimeStamp(paytime) };
|
|
session.Saveable<fl_statistics_record>(mrecord).ExecuteCommand();
|
|
}
|
|
else if (mrecord.ex5 != HttpExtend.GetTimeStamp(paytime))
|
|
{
|
|
mrecord.ex5 = HttpExtend.GetTimeStamp(paytime);
|
|
session.Saveable<fl_statistics_record>(mrecord).ExecuteCommand();
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{ }
|
|
}
|
|
ShowSuccessAutoClose("校验数据完成,点击查询", 3000);
|
|
}
|
|
catch (Exception ex)
|
|
{ }
|
|
finally
|
|
{
|
|
this.Invoke(new Action(() =>
|
|
{
|
|
simpleButton5.Enabled = true;
|
|
simpleButton5.Text = "点击校验数据";
|
|
simpleButton1_Click(null, null);
|
|
}));
|
|
}
|
|
});
|
|
}
|
|
|
|
private void 全部删除ToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
var session = ApiClient.GetSession();
|
|
session.Deleteable<fl_qunfa_task>().ExecuteCommand();
|
|
TaskJob.AbortAll();
|
|
GetTasks();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ShowError(ex);
|
|
}
|
|
}
|
|
|
|
private void MainForm_Load(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
checkedComboBoxEdit1.Properties.SelectAllItemCaption = "全选";
|
|
var robots = ApiClient.GetSession().Find<fl_robot_info>("select * from fl_robot_info");
|
|
if (robots == null || robots.Count == 0)
|
|
throw new Exception("当前不存在任何机器人账号信息,请登录机器人后在来操作该插件");
|
|
for (int i = 0; i < robots.Count; i++)
|
|
{
|
|
this.checkedComboBoxEdit1.Properties.Items.Add(robots[i]);
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
ShowErrorAutoClose(ex, 6000);
|
|
this.Close();
|
|
}
|
|
}
|
|
|
|
private void gridView3_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
|
|
{
|
|
if (e.Info.IsRowIndicator && e.RowHandle >= 0)
|
|
{
|
|
e.Info.DisplayText = (e.RowHandle + 1).ToString();
|
|
}
|
|
}
|
|
}
|
|
|
|
} |