当前位置: 首页>>代码示例>>C#>>正文


C# WS类代码示例

本文整理汇总了C#中WS的典型用法代码示例。如果您正苦于以下问题:C# WS类的具体用法?C# WS怎么用?C# WS使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


WS类属于命名空间,在下文中一共展示了WS类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的WS类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。