买手读单界面优化
This commit is contained in:
1 parent
42f010c925
commit
57441f853c
6 files changed
+169
-31
No files matched your search
@@ -42,6 +42,7 @@ using Work;
|
||||
using Work._29Tools.BLL;
|
||||
using Work._29Tools.CefTools;
|
||||
using Work.BaseForms;
|
||||
using Work.BuyUsers;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement.Tab;
|
||||
|
||||
namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
@@ -149,6 +150,8 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
|
||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.lbPddBuyer.ItemsSource = GlobalConfig.PDDBuyerLoginList;
|
||||
|
||||
buyerReadOrderConfig = NaiBa.Util.Helper.ConfigHelper.LoadConfig<BuyerReadOrderConfig>("pdd_buyer_read_order_config");
|
||||
if (buyerReadOrderConfig == null)
|
||||
buyerReadOrderConfig = new BuyerReadOrderConfig();
|
||||
@@ -249,24 +252,6 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
|
||||
public void InitCef()
|
||||
{
|
||||
//CefSharp.Wpf.ChromiumWebBrowser cefWebBrowser = new CefSharp.Wpf.ChromiumWebBrowser();
|
||||
//cefWebBrowser.Address = "https://www.baidu.com";
|
||||
//cefWebBrowser = WPFCEFBrowser.CreateChromiumWebBrowser("https://www.baidu.com", false);
|
||||
//Grid.SetRow(cefWebBrowser, 0);
|
||||
//this.GridCef.Children.Add(cefWebBrowser);
|
||||
|
||||
//LocalResourceRequestHandler resourceRequestHandler = new LocalResourceRequestHandler();
|
||||
//resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadComplete;
|
||||
//resourceRequestHandler.BeforeResourceLoadEvent += RequestHandler_BeforeResourceLoad;
|
||||
//cefWebBrowser.RequestHandler = new LocalRequestHandler(resourceRequestHandler);
|
||||
//var lifeSapnHandler = new LocalLifeSpanHandler(PopWindowType.SelfWindow);
|
||||
//cefWebBrowser.LifeSpanHandler = lifeSapnHandler;
|
||||
//cefWebBrowser.KeyboardHandler = new KeyboardHandler();
|
||||
//cefWebBrowser.FrameLoadEnd += CefWebBrowser_FrameLoadEnd;
|
||||
//cefWebBrowser.AddressChanged += CefWebBrowser_AddressChanged;
|
||||
//cefWebBrowser.LoadError += CefWebBrowser_LoadError;
|
||||
|
||||
|
||||
foreach (var buyer in GlobalConfig.PDDBuyerLoginList)
|
||||
{
|
||||
Thread.Sleep(1);
|
||||
@@ -1413,6 +1398,20 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
readBuyer = buyer.buyer_id;
|
||||
currentReadBuyer = buyer.buyer_id;
|
||||
buyer.wpf_browser.Load("https://mobile.yangkeduo.com/complaint_list.html?refer_page_name=personal&refer_page_sn=10001&tab=all");
|
||||
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
Panel.SetZIndex(buyer.wpf_browser, maxZIndex++);
|
||||
if (buyer.IsSelect != true)
|
||||
{
|
||||
foreach (var b in GlobalConfig.PDDBuyerLoginList)
|
||||
{
|
||||
b.IsSelect = false;
|
||||
}
|
||||
buyer.IsSelect = true;
|
||||
}
|
||||
}));
|
||||
|
||||
Thread.Sleep(Randomx.GetId(2000, 3000));
|
||||
|
||||
Dispatcher.Invoke(new Action(() => { MainWindow.Instance.Title = buyer.buyer_nick + " 售后读取中"; }));
|
||||
@@ -1441,8 +1440,6 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
break;
|
||||
}
|
||||
|
||||
Dispatcher.Invoke(new Action(() => { Panel.SetZIndex(buyer.wpf_browser, maxZIndex++); }));
|
||||
|
||||
top += Randomx.GetId(450, 600);
|
||||
Thread.Sleep(Randomx.GetId(100, 300));
|
||||
|
||||
@@ -1478,6 +1475,20 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
readBuyer = buyer.buyer_id;
|
||||
currentReadBuyer = buyer.buyer_id;
|
||||
buyer.wpf_browser.Load("https://mobile.yangkeduo.com/orders.html?type=2");
|
||||
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
Panel.SetZIndex(buyer.wpf_browser, maxZIndex++);
|
||||
if (buyer.IsSelect != true)
|
||||
{
|
||||
foreach (var b in GlobalConfig.PDDBuyerLoginList)
|
||||
{
|
||||
b.IsSelect = false;
|
||||
}
|
||||
buyer.IsSelect = true;
|
||||
}
|
||||
}));
|
||||
|
||||
Thread.Sleep(Randomx.GetId(2000, 3000));
|
||||
|
||||
Dispatcher.Invoke(new Action(() => { MainWindow.Instance.Title = buyer.buyer_nick + " 待发货读取中"; }));
|
||||
@@ -1513,8 +1524,6 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
break;
|
||||
times++;
|
||||
|
||||
Dispatcher.Invoke(new Action(() => { Panel.SetZIndex(buyer.wpf_browser, maxZIndex++); }));
|
||||
|
||||
top += Randomx.GetId(450, 600);
|
||||
Thread.Sleep(Randomx.GetId(100, 300));
|
||||
|
||||
@@ -1551,6 +1560,20 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
readBuyer = buyer.buyer_id;
|
||||
currentReadBuyer = buyer.buyer_id;
|
||||
buyer.wpf_browser.Load("https://mobile.yangkeduo.com/orders.html?type=3");
|
||||
|
||||
Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
Panel.SetZIndex(buyer.wpf_browser, maxZIndex++);
|
||||
if (buyer.IsSelect != true)
|
||||
{
|
||||
foreach (var b in GlobalConfig.PDDBuyerLoginList)
|
||||
{
|
||||
b.IsSelect = false;
|
||||
}
|
||||
buyer.IsSelect = true;
|
||||
}
|
||||
}));
|
||||
|
||||
Thread.Sleep(Randomx.GetId(2000, 3000));
|
||||
|
||||
top = 0;
|
||||
@@ -1575,8 +1598,6 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
break;
|
||||
}
|
||||
|
||||
Dispatcher.Invoke(new Action(() => { Panel.SetZIndex(buyer.wpf_browser, maxZIndex++); }));
|
||||
|
||||
top += Randomx.GetId(450, 600);
|
||||
Thread.Sleep(Randomx.GetId(100, 300));
|
||||
|
||||
@@ -2342,6 +2363,20 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
}
|
||||
}
|
||||
|
||||
private void btnHideBuyer_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (btnHideBuyer.Content.ParseToString() == "▶")
|
||||
{
|
||||
btnHideBuyer.Content = "◀";
|
||||
borderPddBuyer.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
btnHideBuyer.Content = "▶";
|
||||
borderPddBuyer.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
|
||||
private void chkAutoAfterSale_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (isLoad)
|
||||
@@ -2360,6 +2395,41 @@ namespace _29WxOrderWpf.Ctrls.BuyerCtrls
|
||||
else
|
||||
Panel.SetZIndex(MainWindow.Instance.gridPddBuyerOrderReadCtrl, -1);
|
||||
}
|
||||
|
||||
private void CheckBox_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is CheckBox chk)
|
||||
{
|
||||
if (chk.DataContext is BuyerLoginInfo pddBuyer)
|
||||
{
|
||||
foreach (var buyer in GlobalConfig.PDDBuyerLoginList)
|
||||
{
|
||||
buyer.IsSelect = false;
|
||||
}
|
||||
pddBuyer.IsSelect = true;
|
||||
if (pddBuyer.wpf_browser != null)
|
||||
Panel.SetZIndex(pddBuyer.wpf_browser, maxZIndex++);
|
||||
}
|
||||
}
|
||||
//if (e.Source)
|
||||
}
|
||||
|
||||
private void TextBox_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
if (sender is TextBox txt)
|
||||
{
|
||||
if (txt.DataContext is BuyerLoginInfo pddBuyer)
|
||||
{
|
||||
foreach (var buyer in GlobalConfig.PDDBuyerLoginList)
|
||||
{
|
||||
buyer.IsSelect = false;
|
||||
}
|
||||
pddBuyer.IsSelect = true;
|
||||
if (pddBuyer.wpf_browser != null)
|
||||
Panel.SetZIndex(pddBuyer.wpf_browser, maxZIndex++);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class YkdBuyerOrder
|
||||
|
||||
Reference in new issue
Block a user