本文整理汇总了C#中WS类的典型用法代码示例。如果您正苦于以下问题:C# WS类的具体用法?C# WS怎么用?C# WS使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WS类属于命名空间,在下文中一共展示了WS类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: bst_GetAllBooksCompleted
static void bst_GetAllBooksCompleted(object sender, WS.GetAllBooksCompletedEventArgs e)
{
foreach (var book in e.Result)
{
Console.WriteLine("{0}\t{1}",book.BookName,book.BookPrice);
};
}
开发者ID:hszeng,项目名称:GeneralSolution,代码行数:7,代码来源:Program.cs
示例2: Logout
public bool Logout(string pSession)
{
try
{
WS ws = new WS();
return ws.Logout(pSession);
}
catch (Exception ex)
{
hzyMessage.ErrorMessage = ex.Message;
HZY.COM.Common.Log.WirteLogWS(ex, "");
return false;
}
}
开发者ID:huaminglee,项目名称:Code,代码行数:15,代码来源:Control.cs
示例3: Login
public string Login(string pAppName, string pCompany, string pEnv, string pLoginEnv, string pUserName, string pPassword)
{
hzyMessage = new HZYmessage();
try
{
WS ws = new WS();
return ws.Login(pEnv, pLoginEnv, pUserName, pPassword);
}
catch (Exception ex)
{
hzyMessage.ErrorMessage = ex.Message;
HZY.COM.Common.Log.WirteLogWS(ex,"");
return "";
}
}
开发者ID:huaminglee,项目名称:Code,代码行数:16,代码来源:Control.cs
示例4: MessageWindow
public MessageWindow(CS classStyle, WS style, WS_EX exStyle, Rect location, string name, WndProc callback)
{
// A null callback means just use DefWindowProc.
_wndProcCallback = callback;
_className = "MessageWindowClass+" + Guid.NewGuid().ToString();
var wc = new WNDCLASSEX
{
cbSize = Marshal.SizeOf(typeof(WNDCLASSEX)),
style = classStyle,
lpfnWndProc = s_WndProc,
hInstance = NativeMethods.GetModuleHandle(null),
hbrBackground = NativeMethods.GetStockObject(StockObject.NULL_BRUSH),
lpszMenuName = "",
lpszClassName = _className,
};
NativeMethods.RegisterClassEx(ref wc);
GCHandle gcHandle = default(GCHandle);
try
{
gcHandle = GCHandle.Alloc(this);
IntPtr pinnedThisPtr = (IntPtr)gcHandle;
Handle = NativeMethods.CreateWindowEx(
exStyle,
_className,
name,
style,
(int)location.X,
(int)location.Y,
(int)location.Width,
(int)location.Height,
IntPtr.Zero,
IntPtr.Zero,
IntPtr.Zero,
pinnedThisPtr);
}
finally
{
gcHandle.Free();
}
_dispatcher = Dispatcher.CurrentDispatcher;
}
开发者ID:JianwenSun,项目名称:cc,代码行数:46,代码来源:MessageWindow.cs
示例5: LookupAllExplicit
public void LookupAllExplicit()
{
var x = new WS();
var y = new DbW();
var z = new DbR();
var w = new UI();
var needs = new Needs();
needs.Set<IWebService>(x);
needs.Set<IDatabaseCommand>(y);
needs.Set<IDatabaseQuery>(z);
needs.Set<IUserInterface>(w);
Expect.Some(z, needs.Get<IDatabaseQuery>());
Expect.Some(y, needs.Get<IDatabaseCommand>());
Expect.Some(w, needs.Get<IUserInterface>());
Expect.Some(x, needs.Get<IWebService>());
}
开发者ID:rkoeninger,项目名称:ZedSharp,代码行数:18,代码来源:NeedsTests.cs
示例6: Check
private void Check()
{
string strSession_ID, strMenuID;
string strReturn = "";
strSession_ID = Request["SessionID"];
strMenuID = Request["MenuID"];
if (strSession_ID == null || strSession_ID == "")
{
strReturn = "缺少参数:SessionID";
}
else if (strMenuID == null || strMenuID == "")
{
strReturn = "缺少参数:MenuID";
}
else
{
System.Threading.Thread.Sleep(5000);
WS ws = new WS();
strReturn = ws.CheckUser_Authorization(strSession_ID, strMenuID, "", "");
}
if (Request["jsoncallback"] != null)
{
Response.Write(Request["jsoncallback"]);
}
//Response.Write("({\"msg\":\""+strReturn+"\"})");
Response.Write("var msg={msg:\"" + strReturn + "\"};");
//Response.Write(strReturn);
//Response.Write("var ojb = {msg:'js跨域请求成功'};");
Response.End();
}
开发者ID:huaminglee,项目名称:Code,代码行数:37,代码来源:CheckUserAuthorization.aspx.cs
示例7: _ModifyStyle
/// <summary>Add and remove a native WindowStyle from the HWND.</summary>
/// <param name="removeStyle">The styles to be removed. These can be bitwise combined.</param>
/// <param name="addStyle">The styles to be added. These can be bitwise combined.</param>
/// <returns>Whether the styles of the HWND were modified as a result of this call.</returns>
private bool _ModifyStyle(WS removeStyle, WS addStyle)
{
Assert.IsNotDefault(_hwnd);
var dwStyle = (WS)NativeMethods.GetWindowLongPtr(_hwnd, GWL.STYLE).ToInt32();
var dwNewStyle = (dwStyle & ~removeStyle) | addStyle;
if (dwStyle == dwNewStyle)
{
return false;
}
NativeMethods.SetWindowLongPtr(_hwnd, GWL.STYLE, new IntPtr((int)dwNewStyle));
return true;
}
开发者ID:JeremyDurnell,项目名称:ChromeTabs,代码行数:17,代码来源:WindowChromeWorker.cs
示例8: _ModifyStyle
public static bool _ModifyStyle(this IntPtr _hwnd, WS removeStyle, WS addStyle)
{
var dwStyle = GetWindowLong(_hwnd, GWL.STYLE);
var dwNewStyle = (dwStyle & ~removeStyle) | addStyle;
if (dwStyle == dwNewStyle)
{
return false;
}
SetWindowLong(_hwnd, GWL.STYLE, dwNewStyle);
return true;
}
开发者ID:baSSiLL,项目名称:Fluent.Ribbon,代码行数:13,代码来源:NativeMethods.cs
示例9: SetWindowLong
internal static extern int SetWindowLong(IntPtr hWnd, GWL nIndex, WS dwNewLong);
开发者ID:baSSiLL,项目名称:Fluent.Ribbon,代码行数:1,代码来源:NativeMethods.cs
示例10: SetWindowLong
public static WS SetWindowLong(this IntPtr hWnd, WS dwNewLong)
{
return (WS) SetWindowLong(hWnd, (int) GWL.STYLE, (int) dwNewLong);
}
开发者ID:LionFree,项目名称:Cush,代码行数:4,代码来源:NativeMethods.cs
示例11: _AdjustWindowRectEx
private static extern bool _AdjustWindowRectEx(ref RECT lpRect, WS dwStyle, [MarshalAs(UnmanagedType.Bool)] bool bMenu, WS_EX dwExStyle);
开发者ID:AlertProject,项目名称:Text-processing-bundle,代码行数:1,代码来源:NativeMethods.cs
示例12: AdjustWindowRectEx
public static RECT AdjustWindowRectEx(RECT lpRect, WS dwStyle, bool bMenu, WS_EX dwExStyle)
{
// Native version modifies the parameter in place.
if (!_AdjustWindowRectEx(ref lpRect, dwStyle, bMenu, dwExStyle))
{
HRESULT.ThrowLastError();
}
return lpRect;
}
开发者ID:AlertProject,项目名称:Text-processing-bundle,代码行数:10,代码来源:NativeMethods.cs
示例13: CreateWindowEx
public static extern HWND CreateWindowEx(WS_EX dwExStyle, string lpClassName, string lpWindowName, WS dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, IntPtr hMenu, IntPtr hInstance, IntPtr lpParam);
开发者ID:GoldRenard,项目名称:DMOAdvancedLauncher,代码行数:1,代码来源:NativeMethods.cs
示例14: AdjustWindowRectEx
public static extern bool AdjustWindowRectEx(ref RECT lpRect, WS style, bool bMenu, WS_EX exStyle);
开发者ID:GoldRenard,项目名称:DMOAdvancedLauncher,代码行数:1,代码来源:NativeMethods.cs
示例15: SetWindowStyle
/// <summary>
///
/// </summary>
/// <param name="hwnd"></param>
/// <param name="value"></param>
public static void SetWindowStyle(IntPtr hwnd, WS value)
{
NativeMethods.SetWindowLong(hwnd, GWL.STYLE, (int)value);
}
开发者ID:usausa,项目名称:Smart-Net-CE,代码行数:9,代码来源:Win32Window.cs
示例16: CreateWindowEx
public static StrongHWND CreateWindowEx(WS_EX dwExStyle, string lpClassName, string lpWindowName, WS dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, IntPtr hMenu, IntPtr hInstance, IntPtr lpParam)
{
HWND hwnd = NativeMethods.CreateWindowEx(dwExStyle, lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
return new StrongHWND(hwnd.DangerousGetHandle());
}
开发者ID:GoldRenard,项目名称:DMOAdvancedLauncher,代码行数:6,代码来源:StrongHWND.cs
示例17: xModifyHwndStyle
internal static bool xModifyHwndStyle(IntPtr hwnd, WS removeStyle, WS addStyle)
{
WS ws = (WS)GetWindowLongPtr(hwnd, GWL.STYLE).ToInt32();
WS ws2 = (ws & ~removeStyle) | addStyle;
if (ws == ws2)
{
return false;
}
SetWindowLongPtr(hwnd, GWL.STYLE, new IntPtr((int)ws2));
return true;
}
开发者ID:Kayomani,项目名称:FAP,代码行数:11,代码来源:NativeMethods.cs
示例18: _ModifyStyle
private bool _ModifyStyle(WS removeStyle, WS addStyle)
{
Assert.IsNotDefault(_hwnd);
var intPtr = NativeMethods.GetWindowLongPtr(_hwnd, GWL.STYLE);
var dwStyle = (WS)(Environment.Is64BitProcess ? intPtr.ToInt64() : intPtr.ToInt32());
var dwNewStyle = (dwStyle & ~removeStyle) | addStyle;
if (dwStyle == dwNewStyle)
{
return false;
}
NativeMethods.SetWindowLongPtr(_hwnd, GWL.STYLE, new IntPtr((int)dwNewStyle));
return true;
}
开发者ID:NovusTheory,项目名称:MahApps.Metro,代码行数:14,代码来源:WindowChromeWorker.cs
示例19: CreateWindowEx
public static IntPtr CreateWindowEx(
WS_EX dwExStyle,
string lpClassName,
string lpWindowName,
WS dwStyle,
int x,
int y,
int nWidth,
int nHeight,
IntPtr hWndParent,
IntPtr hMenu,
IntPtr hInstance,
IntPtr lpParam)
{
IntPtr ret = _CreateWindowEx(dwExStyle, lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam);
if (IntPtr.Zero == ret)
{
HRESULT.ThrowLastError();
}
return ret;
}
开发者ID:AlertProject,项目名称:Text-processing-bundle,代码行数:22,代码来源:NativeMethods.cs
示例20: CreateWindowEx
public static extern IntPtr CreateWindowEx(int dwExStyle, string lpClassName, string lpWindowName, WS style,
int x, int y, int width, int height, IntPtr hwndParent,
IntPtr hmenu, IntPtr hInstance, IntPtr lpParam);
开发者ID:xorkrus,项目名称:vk_wm,代码行数:3,代码来源:Win32.cs
注:本文中的WS类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论