alroyso 2 лет назад
Родитель
Сommit
12534de5eb

+ 25 - 14
SProxy/CConnectMage.cpp

@@ -16,6 +16,17 @@ CConnectMage::~CConnectMage()
 	}
 }
 
+BOOL CConnectMage::setProxy()
+{
+	BOOL isok = FALSE;
+	if (m_clash_config)
+	{
+		isok = m_clash_config->SetProxy();
+	}
+
+	return isok;
+}
+
 void CConnectMage::Stop()
 {
 	m_connect_status = ConnectState::Stop;
@@ -123,12 +134,12 @@ void CConnectMage::ThreadFun_ChangeClash_Config(LPARAM lParam)
 					if (m_clash_Api->UpdateProxyGroup("Proxy", serverlist->node_name))
 					{
 						m_connect_status = ConnectState::SwitchNodeSuccEss;
-						m_error = L"连接成功";
-						m_clash_config->SetProxy();
+						m_error = L"切换成功";
+						//m_clash_config->SetProxy();
 					}
 					else {
 						m_connect_status = ConnectState::Stop;
-						m_error = L"连接失败,可以重新尝试";
+						m_error = L"切换失败,可以重新尝试";
 					}
 				}
 			}
@@ -138,18 +149,18 @@ void CConnectMage::ThreadFun_ChangeClash_Config(LPARAM lParam)
 			if (m_clash_Api->UpdateProxyGroup("Proxy", m_name))
 			{
 				m_connect_status = ConnectState::SwitchNodeSuccEss;
-				m_error = L"连接成功";
+				m_error = L"切换成功";
 				m_clash_config->SetProxy();
 			}
 			else {
 				m_connect_status = ConnectState::Stop;
-				m_error = L"连接失败,可以重新尝试";
+				m_error = L"切换失败,可以重新尝试";
 			}
 		}
 	}
 	else {
 		m_connect_status = ConnectState::Stop;
-		m_error = L"连接失败,可以重新尝试";
+		m_error = L"切换失败,可以重新尝试";
 	}
  
 	
@@ -181,7 +192,7 @@ void CConnectMage::ThreadFun_ChangeClash_Node(LPARAM lParam)
 	{
 		m_connect_status = ConnectState::SwitchNodeSuccEss;
 		m_error = L"切换成功..点击断开";
-		m_clash_config->SetProxy();
+		//m_clash_config->SetProxy();
 	}
 	else {
 		m_connect_status = ConnectState::Stop;
@@ -257,12 +268,12 @@ void CConnectMage::ThreadFun_ChangeClash_Stop(LPARAM lParam)
 					if (m_clash_Api->UpdateProxyGroup("Proxy", serverlist->node_name))
 					{
 						m_connect_status = ConnectState::SwitchNodeSuccEss;
-						m_error = L"连接成功";
-						m_clash_config->SetProxy();
+						m_error = L"切换成功";
+						//m_clash_config->SetProxy();
 					}
 					else {
 						m_connect_status = ConnectState::Stop;
-						m_error = L"连接失败,可以重新尝试";
+						m_error = L"切换失败,可以重新尝试";
 					}
 				}
 			}
@@ -272,18 +283,18 @@ void CConnectMage::ThreadFun_ChangeClash_Stop(LPARAM lParam)
 			if (m_clash_Api->UpdateProxyGroup("Proxy", m_name))
 			{
 				m_connect_status = ConnectState::SwitchNodeSuccEss;
-				m_error = L"连接成功";
-				m_clash_config->SetProxy();
+				m_error = L"切换成功";
+				//m_clash_config->SetProxy();
 			}
 			else {
 				m_connect_status = ConnectState::Stop;
-				m_error = L"连接失败,可以重新尝试";
+				m_error = L"切换失败,可以重新尝试";
 			}
 		}
 	}
 	else {
 		m_connect_status = ConnectState::Stop;
-		m_error = L"连接失败,可以重新尝试";
+		m_error = L"切换失败,可以重新尝试";
 	}
 
 }

+ 2 - 0
SProxy/CConnectMage.h

@@ -10,6 +10,8 @@ class CConnectMage
 public:
 	CConnectMage();
 	 ~CConnectMage();
+
+	 BOOL setProxy();
 	 void Stop();
 	 void ReqConfig();
 	 void ChangeClashNode();

+ 10 - 4
SProxy/CLashConfig.cpp

@@ -592,13 +592,19 @@ void CLashConfig::ThreadFun_ProcessMonitor_Config(LPARAM lParam)
 	 
 }
 
-void CLashConfig::SetProxy()
+BOOL CLashConfig::SetProxy()
 {
-	if (CApp::getSingletonPtr()->GetSysMode() == PROXY_MODE::sys_mode)
+	BOOL isok = FALSE;
+	/*if (CApp::getSingletonPtr()->GetSysMode() == PROXY_MODE::sys_mode)
 	{
 		auto proxy = "127.0.0.1:" + std::to_string(m_http_port);
-		SetSystemProxy(S_CA2W(proxy.c_str()), NULL, L"localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;172.32.*;192.168.*");
-	}
+		isok = SetSystemProxy(S_CA2W(proxy.c_str()), NULL, L"localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;172.32.*;192.168.*");
+	}*/
+
+	auto proxy = "127.0.0.1:" + std::to_string(m_http_port);
+	isok = SetSystemProxy(S_CA2W(proxy.c_str()), NULL, L"localhost;127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;172.32.*;192.168.*");
+
+	return isok;
 }
 
 //winrt::fire_and_forget CLashConfig::_StartClash()

+ 1 - 1
SProxy/CLashConfig.h

@@ -30,7 +30,7 @@ public:
 public:
  
 	std::filesystem::path GetRunConfig();
-	void SetProxy();
+	BOOL SetProxy();
 private:
 	YAML::Node buildShadowsocks(CServerListMode* node);
 	YAML::Node buildtrojan(CServerListMode* node);

BIN
SProxy/LoginDlg.cpp


BIN
SProxy/LoginDlg.h


BIN
SProxy/MainDlg.cpp


BIN
SProxy/MainDlg.h


+ 2 - 0
SProxy/SProxy.vcxproj

@@ -235,6 +235,7 @@
     <ClCompile Include="SRadioBox2.cpp" />
     <ClCompile Include="SShellNofityHwnd2.cpp" />
     <ClCompile Include="SShellNotifyIcon.cpp" />
+    <ClCompile Include="SSwitch2.cpp" />
     <ClCompile Include="StabtypeControl.cpp" />
     <ClCompile Include="stdafx.cpp">
       <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
@@ -282,6 +283,7 @@
     <ClInclude Include="SRadioBox2.h" />
     <ClInclude Include="SShellNofityHwnd2.h" />
     <ClInclude Include="SShellNotifyIcon.h" />
+    <ClInclude Include="SSwitch2.h" />
     <ClInclude Include="StabtypeControl.h" />
     <ClInclude Include="stdafx.h" />
     <ClInclude Include="SysProxy.h" />

+ 6 - 0
SProxy/SProxy.vcxproj.filters

@@ -134,6 +134,9 @@
     <ClCompile Include="CLoginInfo.cpp">
       <Filter>Model</Filter>
     </ClCompile>
+    <ClCompile Include="SSwitch2.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ResourceCompile Include="SProxy.rc">
@@ -255,6 +258,9 @@
     <ClInclude Include="CLoginInfo.h">
       <Filter>Model</Filter>
     </ClInclude>
+    <ClInclude Include="SSwitch2.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <None Include="res\soui_res.rc2">

+ 141 - 0
SProxy/SSwitch2.cpp

@@ -0,0 +1,141 @@
+#include "stdafx.h"
+#include "SSwitch2.h"
+
+namespace SOUI
+{
+
+	SSwitch2::SSwitch2() : m_BOpen(TRUE), m_BChangeing(FALSE), m_FrameNow(0), m_pSkin(NULL), m_pSkinOff(NULL), m_pSkinOn(NULL)
+	{
+		m_style.m_strCursor = _T("hand");
+		m_evtSet.addEvent(EVENTID(EventSwitchChanging));
+	}
+
+	SSwitch2::~SSwitch2()
+	{
+
+	}
+
+	void SSwitch2::GetTextRect(LPRECT pRect)
+	{
+		GetClientRect(pRect);
+		SASSERT(m_pSkin);
+		CSize szSwitch = m_pSkin->GetSkinSize();
+		pRect->left += szSwitch.cx + SwitchSpacing;
+	}
+
+	CRect SSwitch2::GetSwitchRect()
+	{
+		CRect rcClient;
+		GetClientRect(rcClient);
+		SASSERT(m_pSkin);
+		CSize szCheck = m_pSkin->GetSkinSize();
+		CRect rcCheckBox(rcClient.TopLeft(), szCheck);
+		rcCheckBox.OffsetRect(0, (rcClient.Height() - szCheck.cy) / 2);
+		return rcCheckBox;
+	}
+
+	void SSwitch2::OnPaint(IRenderTarget *pRT)
+	{
+		//背景、前景皮肤中间状态数必须一致。自己保证,不再代码检查
+		CRect rcSwitch =GetSwitchRect();
+		if (IsDisabled(TRUE))
+		{
+			if (m_disableSkin == NULL)
+			{
+				if(m_disableSkin=m_pSkin->Scale(GetScale()))
+					m_disableSkin->OnColorize(0XFF888888);
+			}
+			if (m_disableSkin)
+				m_disableSkin->Draw(pRT, rcSwitch, m_BOpen ? m_FrameNow : m_pSkin->GetStates() - m_FrameNow - 1);
+		}
+		else
+		{
+			if (m_pSkin)
+				m_pSkin->Draw(pRT, rcSwitch, m_BOpen ? m_FrameNow : m_pSkin->GetStates() - m_FrameNow - 1);
+		}
+		if (!m_pSkinOn || !m_pSkinOff)
+			return;
+		(m_BOpen ?m_pSkinOn:m_pSkinOff)->Draw(pRT, rcSwitch, m_FrameNow);
+		__super::OnPaint(pRT);
+	}
+	
+	CSize SSwitch2::GetDesiredSize(int wid, int hei)
+	{
+		CSize szSkinRet;
+		if (m_pSkin)
+			szSkinRet = m_pSkin->GetSkinSize();
+		CSize szRet = __super::GetDesiredSize(wid,hei);
+		szRet.cx += szSkinRet.cx + SwitchSpacing;
+		szRet.cy = (std::max)(szRet.cy, szSkinRet.cy);
+		return szRet;
+	}
+
+	HRESULT SSwitch2::OnAttrOpen(const SStringW& strValue, BOOL bLoading)
+	{
+		m_BOpen = (strValue != L"0");
+		m_FrameNow =  0;
+		if (!bLoading)
+			SetOpen(m_BOpen);
+		
+		return bLoading ? S_FALSE : S_OK;
+	}
+
+	void SSwitch2::OnLButtonUp(UINT nFlags, CPoint point)
+	{
+		__super::OnLButtonUp(nFlags, point);
+		if (!GetWindowRect().PtInRect(point)) return;
+		SetOpen(!m_BOpen);
+	}
+
+	void SSwitch2::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
+	{
+		if (nChar == VK_SPACE)
+		{
+			SetOpen(!m_BOpen);
+		}
+	}
+	
+	//属性处理
+
+	BOOL SSwitch2::IsOpen() { return m_BOpen; }
+
+	void SSwitch2::SetOpen(BOOL bOpen)
+	{
+		if ((m_BOpen != bOpen) && !m_BChangeing)
+		{
+			EventSwitchChanging evt(this);
+			evt.bTurnOn = bOpen;
+			FireEvent(evt);
+
+			if (evt.bCacnel)
+				return;
+			m_BOpen = bOpen;
+			m_BChangeing = TRUE;
+			m_FrameNow = m_pSkinOn->GetStates()-1;
+			GetContainer()->RegisterTimelineHandler(this);			
+		}
+	}
+
+	void SSwitch2::OnStateChanged(DWORD dwOldState, DWORD dwNewState)
+	{
+		InvalidateRect(NULL);
+		__super::OnStateChanged(dwOldState, dwNewState);
+	}
+
+	void SSwitch2::OnNextFrame()
+	{
+		if (m_BChangeing&&m_pSkinOn)
+		{
+			m_FrameNow--;
+			if (m_FrameNow <=0)
+			{
+				m_FrameNow = 0;
+				m_BChangeing = FALSE;
+				GetContainer()->UnregisterTimelineHandler(this);
+			}
+		}
+		else
+			GetContainer()->UnregisterTimelineHandler(this);
+		InvalidateRect(NULL);
+	}
+}

+ 61 - 0
SProxy/SSwitch2.h

@@ -0,0 +1,61 @@
+#pragma once
+#include <core/Swnd.h>
+#include <event/Events.h>
+
+namespace SOUI
+{
+	#define EVT_SWITCH_CHANGED EVT_EXTERNAL_BEGIN + 800
+
+	SEVENT_BEGIN_EX(EventSwitchChanging, EVT_SWITCH_CHANGED, on_init, )
+		BOOL bTurnOn=FALSE;
+		BOOL bCacnel = FALSE;
+	SEVENT_END()
+
+	class  SSwitch2 : public SWindow, public ITimelineHandler
+	{
+		SOUI_CLASS_NAME(SSwitch2, L"switch2")
+			enum { SwitchSpacing = 4 };
+	public:
+		SSwitch2();
+		~SSwitch2();
+	protected://SWindow的虚函数
+		virtual CSize GetDesiredSize(int wid, int hei);
+		virtual void OnStateChanged(DWORD dwOldState, DWORD dwNewState);
+		// 通过 ITimelineHandler 继承
+		virtual void OnNextFrame();
+
+	public://属性处理
+		BOOL IsOpen();
+		void SetOpen(BOOL bOpen);
+	protected:
+		virtual void GetTextRect(LPRECT pRect);		
+		CRect GetSwitchRect();
+		void OnPaint(IRenderTarget *pRT);
+		void OnLButtonUp(UINT nFlags, CPoint point);
+		void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
+		HRESULT OnAttrOpen(const SStringW& strValue, BOOL bLoading);
+		//SOUI控件消息映射表
+		SOUI_MSG_MAP_BEGIN()
+			MSG_WM_PAINT_EX(OnPaint)
+			MSG_WM_LBUTTONUP(OnLButtonUp)
+			MSG_WM_KEYDOWN(OnKeyDown)
+		SOUI_MSG_MAP_END()
+
+		ISkinObj *m_pSkin;
+		ISkinObj *m_pSkinOn;
+		ISkinObj *m_pSkinOff;
+
+		SOUI_ATTRS_BEGIN()
+			ATTR_SKIN(L"skin", m_pSkin, TRUE)
+			ATTR_SKIN(L"skinon", m_pSkinOn, TRUE)
+			ATTR_SKIN(L"skinoff", m_pSkinOff, TRUE)
+			ATTR_CUSTOM(L"open", OnAttrOpen)
+		SOUI_ATTRS_END()
+	private:
+		BOOL m_BOpen;
+		BOOL m_BChangeing;      //正在改变状态..		
+		int  m_FrameNow;		//当前帧
+		CAutoRefPtr<ISkinObj> m_disableSkin;
+	};
+
+}

+ 2 - 1
SProxy/SouiInit.cpp

@@ -2,7 +2,7 @@
 #include "SouiInit.h"
 #include "SRadioBox2.h"
 #include "StabtypeControl.h"
- 
+#include "SSwitch2.h"
  
 //从PE文件加载,注意从文件加载路径位置
 #define RES_TYPE 0
@@ -119,6 +119,7 @@ void InitUserRes(SApplication * theApp, SComMgr *pComMgr)
 void SUserObjectDefaultRegister::RegisterWindows(SObjectFactoryMgr * objFactory) const
 {	
 #define RegWnd(wndClass) objFactory->TplRegisterFactory<wndClass>();
+	RegWnd(SSwitch2)
 	RegWnd(SRadioBox2)
 		RegWnd(StabtypeControl)
 		RegWnd(SSkinVScrollbar)

+ 6 - 6
SProxy/comm.h

@@ -1,14 +1,14 @@
 #pragma once
 
-#define CLASHXW_APP_ID L"com.dsproxy.sproxy"
+#define CLASHXW_APP_ID L"com.dsproxy.wltSocks"
 
 
 
-constexpr auto DSPROXY_DATA_DIR = L"DSProxy";
+constexpr auto DSPROXY_DATA_DIR = L"WltSocks";
 constexpr auto DSPROXY_DATA_DIR_PORTABLE = L"Data";
-constexpr auto DSPROXY_CONFIG_NAME = L"DSProxy.json";
+constexpr auto DSPROXY_CONFIG_NAME = L"WltSocks.json";
 
-constexpr auto CLASH_ASSETS_DIR_NAME = L"Assets";
+constexpr auto CLASH_ASSETS_DIR_NAME = L"Wltconfig";
 
 constexpr auto DSPROXY_CONFIG_INIT_ClASH_NAME = L"config_info.yaml";
 constexpr auto DSPROXY_CONFIG_ClASH_NAME = L"config.yaml";
@@ -16,14 +16,14 @@ constexpr auto DSPROXY_CONFIG_TUN_ClASH_NAME = L"tun_config.yaml";
 constexpr auto CLASHCONFIGDIR = "wlt.yaml";
 
 constexpr auto DSPROXY_CONFIG_DIR_NAME = L"Config";
-constexpr auto DSPROXY_EXE_NAME = L"syscode.exe"; 
+constexpr auto DSPROXY_EXE_NAME = L"wltcode.exe"; 
 
 
 constexpr auto CONNECT_NODE_MSG = L"正在获取节点..不能操作"; 
 constexpr auto SUEECS_NODE_MSG = L"获取节点成功.."; 
 
 
-constexpr auto VERSION = L"1.2.2";
+constexpr auto VERSION = L"1.0.0";
 
 
 struct ServerListUrl {

BIN
SProxy/res/resource.h


BIN
SProxy/res/soui_res.rc2


BIN
SProxy/uires/image/bg-login.png


BIN
SProxy/uires/image/btn-selection.png


BIN
SProxy/uires/image/crad.png


BIN
SProxy/uires/image/loginButton.png


BIN
SProxy/uires/image/sopt_small_bk.png


BIN
SProxy/uires/image/sopt_small_off.png


BIN
SProxy/uires/image/sopt_small_on.png


+ 1 - 0
SProxy/uires/uidef/init.xml

@@ -13,5 +13,6 @@
   </style>
 
   <objattr>
+    <switch2 skin="skin_switchbk" skinon="skin_switchon"  skinoff="skin_switchoff"/>
   </objattr>
 </UIDEF>

+ 6 - 0
SProxy/uires/uires.idx

@@ -34,6 +34,12 @@
 	<file name="btn-selection" path="image\btn-selection.png"/>
 	<file name="btn-back" path="image\btn-back.png"/>
 	<file name="imgress" path="image\ress.png"/>
+	    <file name="png_switchbk" path="image\sopt_small_bk.png"/>
+    <file name="png_switchon" path="image\sopt_small_on.png"/>
+    <file name="png_switchoff" path="image\sopt_small_off.png"/>
+	<file name="png_button" path="image\loginButton.png"/>
+	<file name="png_crad" path="image\crad.png"/>
+	
   </IMG>
 	<ICON>
 		<file name="ICON_LOGO" path="image\soui.ico" />

+ 5 - 0
SProxy/uires/values/skin.xml

@@ -5,6 +5,8 @@
 	<imglist name="bg-home_png" src="img:bg-home_png"/>
 	<imglist name="bg-user_png" src="img:bg-user_png"/>
 	<imglist name="skin_btnborder" src="img:btn-border" states="4"/>
+	<imglist name="png_button" src="img:png_button" states="4"/>
+	<imglist name="skin_crad" src="img:png_crad" />
 	<imglist name="skin_bguser" src="img:bg-user" />
 	<imglist name="skin_line" src="img:line-2"/>
 	<imglist name="skin_user" src="img:user"/>
@@ -16,5 +18,8 @@
 	<imglist name="skin_btnselection" src="img:btn-selection" states="4"/>
 	<imglist name="skin_btnback" src="img:btn-back"  states="4"/>
 	<imglist name="skin_imgress" src="img:imgress"  states="4"/>
+	  <imglist name="skin_switchbk" src="img:png_switchbk" states="8"/>
+  <imglist name="skin_switchon" src="img:png_switchon" states="8"/>
+  <imglist name="skin_switchoff" src="img:png_switchoff" states="8"/>
 	<vscrollbar name="skin.common.vscroll" src="IMG:ID_DEF_VSCROLL" states="3" margin="3" hasgripper="0"/> 
 </skin>

+ 11 - 4
SProxy/uires/xml/dlg_login.xml

@@ -33,18 +33,25 @@ appWnd="1"
 
             <img skin="skin_line" extend="60,5,44,0"/>
 
-            <imgbtn name="onlogin" skin="skin_btnborder"  colorText="#ffffff" font="adding:12,bold:1"  extend="0,50,0,0">登录</imgbtn>
+            <window size="-2,-1" layout="hbox"   gravity="center"  extend="0,50,0,0">
+                <imgbtn name="onlogin" skin="skin_btnselection" size="100,31" colorText="#ffffff" font=""  extend="40,0,0,0">登录</imgbtn>
+                <imgbtn name="onReg" skin="skin_btnselection"  size="100,31" colorText="#ffffff" font=""  extend="140,0,0,0">注册</imgbtn>
+            </window>
+           
 
 
-            <window size="-2,35" layout="hbox"   gravity="center"  extend="0,10,44,0">
+            <window size="-2,35" layout="hbox"   gravity="center"  extend="0,10,0,0">
 
-                  <link name="reglink"   colorText="#A79BB8" font="adding:12,bold:0"  extend="50,0,0,0">注册新用户</link>
+                  <!-- <link name="reglink"   colorText="#A79BB8" font="adding:12,bold:0"  extend="50,0,0,0">注册新用户</link> -->
 
-                  <link href="https:/user.viptwo.xyz" name="resetlink"  colorText="#A79BB8" font="adding:12,bold:0"   extend="80,0,0,0">忘记密码</link>
+                  <link href="https:/user.viptwo.xyz" name="resetlink"  colorText="#A79BB8" font=""   extend="320,0,0,0">忘记密码</link>
 
             </window>
           
 
+          <window size="-2,35" layout="hbox"   gravity="left"  extend="10,100,0,0">
+            <text name="regstatus" colorText="#ffffff" font="adding:5,bold:1" extend="10,0,0,0" >登录状态</text>
+          </window>
             <!-- <text colorText="#ffffff88" font="adding:5,bold:1" extend="10,25,0,0" >登录服务器选择</text> -->
 
             <!-- <tabtypecontrol name="nodeclass" size="400,45" gravity="center" extend="47,25,44,0"/> -->

+ 2 - 2
SProxy/uires/xml/dlg_main.xml

@@ -1,7 +1,7 @@
-<SOUI name="loginwindow" title="@string/title" bigIcon="ICON_LOGO:32" smallIcon="ICON_LOGO:16"  width="800" height="500" margin="5,5,5,5"  resizable="0" wndType="appMain"
+<SOUI name="loginwindow" title="@string/title" bigIcon="ICON_LOGO:32" smallIcon="ICON_LOGO:16"  width="414" height="736" margin="5,5,5,5"  resizable="0" wndType="appMain"
 appWnd="1"
 >
-  <root skin="skin_bguser" cache="1">
+  <root skin="bg-login_png" cache="1">
 
     <tabctrl name="tabmain" size="-2,-2" extend="0,0,0,0" colorBkgnd="" interpolator="Decelerate" curSel="0" focusable="0" animateSteps="30" animateType="1" tabHeight="0" tabSkin="" text-y="" iconSkin="" icon-x="" colorTextHover="#ff0000" fontHover="italic:1">
       <page>

+ 1 - 1
SProxy/uires/xml/menu_tray.xml

@@ -1,4 +1,4 @@
 <menu itemHeight="26" iconMargin="4" textMargin="8">
-  <item id="2">显示控制台</item>
+  <!-- <item id="2">显示控制台</item> -->
   <item id="6">退出</item>
 </menu>

+ 4 - 47
SProxy/uires/xml/page_home.xml

@@ -8,54 +8,11 @@
         
             <window pos="5,[2,-5,-5">
                     <window size="-2,-2" layout="vbox" gravity="center">
-                        <window size="-2,-2" layout="hbox" gravity="center" >
-                            <window size="150,-2" layout="vbox"  colorBkgnd="#ffffff" extend="0,25,0,0" weight="0.3">
-                                    <text extend="15,20,0,0" colorText="#000000">用户名</text>
-                                    <text name="username" extend="15,10,0,0" colorText="#000000">admin333@qq.com</text>
-                                    <img skin="skin_line" size="150,1" extend="15,10,0,0"/>
-                                    <text extend="15,10,0,0" colorText="#000000">到期时间</text>
-                                    <text name="username_time" extend="15,10,0,0" colorText="#000000">2028-12-31 20:38:53</text>
-                                    <img skin="skin_line" size="150,1" extend="15,10,0,0"/>
-                                    <text extend="15,10,0,0" colorText="#000000">用户流量</text>
-                                    <text name="username_liulaing" extend="15,10,0,0" colorText="#000000">1.4k</text>
-                                    <img skin="skin_line" size="150,1" extend="15,10,0,0"/>
-                                    <text extend="15,10,0,0" colorText="#000000">http代理地址</text>
-                                    <text name="httpproxy" extend="15,10,0,0" colorText="#000000">127.0.0.1:1098</text>
-                                    <img skin="skin_line" size="150,1" extend="15,10,0,0"/>
-                                    <text extend="15,10,0,0" colorText="#000000">socksProxy</text>
-                                    <text name="socksproxy" extend="15,10,0,0" colorText="#000000">127.0.0.1:1098</text>
-                                    <img skin="skin_line" size="150,1" extend="15,10,0,0"/>
-
-                                    <link name="selectnode" extend="15,10,0,0" colorText="#000000">设置</link>
-
-                                    <link name="username_jiaocheng" extend="15,10,0,0" colorText="#000000">使用教程</link>
-                                    <link name="username_chongzhi" extend="15,10,0,0" colorText="#000000">充值续费</link>
-                                    <link name="username_tuiguang" extend="15,10,0,0" colorText="#000000">推广地址</link>
-                                    <link name="username_online_kf" extend="15,10,0,0" colorText="#000000">在线客服</link>
-
-                                    <link name="app_version" colorText="#707070"  extend="15,10,0,0" >版本号:正在检测...</link> 
-                            </window>
-                            <window size="-1,-2" layout="vbox"  layout_gravity="right" colorBkgnd="#cccccc" extend="0,25,0,0" weight="2.5">
-                                    <text name="refresh_status" colorText="#000000" font="" extend="15,10,0,0">更新状态</text>
-                                    <text name="text_touch" colorText="#000000" font="" extend="15,10,0,0" >链接消息</text>
-
-                                 
-
-                                    <window size="-2,0" weight="1.5" layout="hbox"  gravity="center" extend="15,10,0,0">
-                                            <listview name="nodeList" size="-2,-2" colorBkgnd="" wantTab="1" marginSize="0" sbSkin="skin.common.vscroll" >
-                                                 <template itemHeight="66" itemWidth="130" color="#D8D8D8" colorHover="#D8D8D844" colorSelected="#D8D8D844" trackMouseEvent="1">
-                                                    <window size="-2,-2" layout="vbox" colorBkgnd="" gravity="center" >
-                                                        <window size="-2,-2" layout="vbox" colorBkgnd="#ffffff" gravity="center" extend="10,10,10,10" >
-                                                            <text name="servername" pos="5,5" extend="0,10,0,0" colorText="#000000" > 0 ms</text>
-                                                            <text name="serverms" pos="5,5" extend="0,5,0,0" colorText="#000000" > 0 ms</text>
-                                                        </window>
-                                                    </window>
-                                                 </template>
-                                            </listview>
-                                    </window>
-
-                            </window>
+                        <!-- 头部信息模块 -->
+                        <window size="-2,150" layout="vbox" gravity="left"  skin="skin_crad"  colorBkgnd=""  extend="10,10,10,10" >
+                                <text name="username" extend="15,10,0,0" colorText="#00000">admin333@qq.com</text>
                         </window>
+
                     </window>
 
             </window>

+ 56 - 0
SProxy/uires/xml/page_node.xml

@@ -51,6 +51,62 @@
                 <!-- <window size="-2,0" weight="0.2" layout="vbox"  gravity="center" extend="0,0,0,0">
                     <imgbtn name="start_Acc" skin="skin_btnborder"  colorText="#A79BB8" font="adding:12,bold:1"  extend="0,0,0,0">开始加速</imgbtn>
                 </window> -->
+
+
+
+                 <window size="150,-2" layout="vbox"  colorBkgnd="" extend="0,25,0,0" weight="0.3">
+                                    <text extend="15,20,0,0" colorText="#ffffff">用户名</text>
+                                    <text name="username" extend="15,10,0,0" colorText="#ffffff">admin333@qq.com</text>
+                                    <img skin="skin_line" size="150,1" extend="15,10,0,0"/>
+                                    <text extend="15,10,0,0" colorText="#ffffff">到期时间</text>
+                                    <text name="username_time" extend="15,10,0,0" colorText="#ffffff">2028-12-31 20:38:53</text>
+                                    <img skin="skin_line" size="150,1" extend="15,10,0,0"/>
+                                    <text extend="15,10,0,0" colorText="#ffffff">用户流量</text>
+                                    <text name="username_liulaing" extend="15,10,0,0" colorText="#ffffff">1.4k</text>
+                                    <img skin="skin_line" size="150,1" extend="15,10,0,0"/>
+                                    <text extend="15,10,0,0" colorText="#ffffff">http代理地址</text>
+                                    <text name="httpproxy" extend="15,10,0,0" colorText="#ffffff">127.0.0.1:1098</text>
+                                    <img skin="skin_line" size="150,1" extend="15,10,0,0"/>
+                                    <text extend="15,10,0,0" colorText="#ffffff">socksProxy</text>
+                                    <text name="socksproxy" extend="15,10,0,0" colorText="#ffffff">127.0.0.1:1098</text>
+                                    <img skin="skin_line" size="150,1" extend="15,10,0,0"/>
+
+                                    <link name="selectnode" extend="15,10,0,0" colorText="#ffffff">设置</link>
+
+                                    <link name="username_jiaocheng" extend="15,10,0,0" colorText="#ffffff">使用教程</link>
+                                    <link name="username_chongzhi" extend="15,10,0,0" colorText="#ffffff">充值续费</link>
+                                    <link name="username_tuiguang" extend="15,10,0,0" colorText="#ffffff">推广地址</link>
+                                    <link name="username_online_kf" extend="15,10,0,0" colorText="#fffff">在线客服</link>
+
+                                    <link name="app_version" colorText="#707070"  extend="15,10,0,0" >版本号:正在检测...</link> 
+                            </window>
+
+
+
+
+
+                            <window size="-1,-2" layout="vbox"  layout_gravity="right" colorBkgnd="" extend="0,25,0,0" weight="2.5">
+                                    <text name="refresh_status" colorText="#ffffff" font="" extend="15,10,0,0">更新状态</text>
+                                    <text name="text_touch" colorText="#ffffff" font="" extend="15,10,0,0" >链接消息</text>
+
+                                    <switch2 name="switchSys" size="-1,-1" open="0"  extend="15,10,0,0" colorText="#ffffff" text="设置为系统代理"/>
+
+                                    <window size="-2,0" weight="1.5" layout="hbox"  gravity="center" extend="15,10,0,0">
+                                            <listview name="nodeList" size="-2,-2" colorBkgnd="" wantTab="1" marginSize="0" sbSkin="skin.common.vscroll" >
+                                                 <template itemHeight="66" itemWidth="130" color="#D8D8D8" colorHover="#D8D8D844" colorSelected="#D8D8D844" trackMouseEvent="1">
+                                                        <window size="-2,-2" layout="hbox" colorBkgnd="">
+								<window size="0,-2" weight="2.5" layout="hbox" gravity="center" extend="10,0,0,0">
+                                                                        <text name="servername" size="100,23" extend="10,0,0,0" colorText="#D8D8D8" dotted="1" >US 01</text>
+								</window>
+                                                                 <window size="0,-2" weight="2" layout="hbox" gravity="center" extend="10,0,0,0">
+									<text name="serverms" pos="5,5" colorText="#D8D8D8" > 0 ms</text>
+								</window>
+							</window>
+                                                 </template>
+                                            </listview>
+                                    </window>
+
+                            </window>
          </window>
        
     </window>