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


C# Windows.SystemWindow类代码示例

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


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

示例1: IsSystemWindowMatch

        public bool IsSystemWindowMatch(SystemWindow Window)
        {
            string compareMatchString = MatchString ?? String.Empty;
            string windowMatchString = String.Empty;
            try
            {
                switch (MatchUsing)
                {
                    case MatchUsing.WindowClass:
                        windowMatchString = Window.ClassName;

                        break;
                    case MatchUsing.WindowTitle:
                        windowMatchString = Window.Title;

                        break;
                    case MatchUsing.ExecutableFilename:
                        windowMatchString = Window.Process.MainModule.ModuleName;

                        break;
                    case MatchUsing.All:
                        return true;
                }

                return IsRegEx ? Regex.IsMatch(windowMatchString, compareMatchString, RegexOptions.Singleline | RegexOptions.IgnoreCase) : String.Equals(windowMatchString.Trim(), compareMatchString.Trim(), StringComparison.CurrentCultureIgnoreCase);
            }
            catch
            {
                return false;
            }
        }
开发者ID:YashMaster,项目名称:GestureSign,代码行数:31,代码来源:ApplicationBase.cs

示例2: PointInfo

 public PointInfo(List<Point> touchLocation, List<List<Point>> points)
 {
     _touchLocation = touchLocation;
     _window = SystemWindow.FromPointEx(_touchLocation[0].X, _touchLocation[0].Y, true, false);
     _windowHandle = _window == null ? IntPtr.Zero : _window.HWnd;
     Points = points;
 }
开发者ID:YashMaster,项目名称:GestureSign,代码行数:7,代码来源:PointInfo.cs

示例3: IsSystemWindowMatch

        public bool IsSystemWindowMatch(SystemWindow Window)
        {
            string compareMatchString = MatchString ?? String.Empty;
            string windowMatchString = String.Empty;

            switch (MatchUsing)
            {
                case MatchUsing.WindowClass:
                    windowMatchString = Window.ClassName;

                    break;
                case MatchUsing.WindowTitle:
                    windowMatchString = Window.Title;

                    break;
                case MatchUsing.ExecutableFilename:
                    windowMatchString = Window.Process.MainModule.FileName;

                    break;
                case MatchUsing.All:
                    return true;
            }

            return IsRegEx ? Regex.IsMatch(windowMatchString, compareMatchString, RegexOptions.Singleline | RegexOptions.IgnoreCase) : windowMatchString.Trim().ToLower() == compareMatchString.Trim().ToLower();
        }
开发者ID:floatas,项目名称:highsign,代码行数:25,代码来源:ApplicationBase.cs

示例4: parseChildren

 private void parseChildren(List<string> toFill, SystemWindow window)
 {
     foreach (SystemWindow child in window.AllChildWindows)
     {
         string clazz = child.ClassName;
         if (!toFill.Contains(clazz)) toFill.Add(clazz);
         parseChildren(toFill, child);
     }
 }
开发者ID:hoangduit,项目名称:mwinapi,代码行数:9,代码来源:WindowClassGuesser.cs

示例5: timer_Tick

        void timer_Tick(object sender, EventArgs e)
        {
            if (IntPtr.Zero != windowToSnap)
            {
                SystemWindow win = new SystemWindow(windowToSnap);
                win.Location = zone.Location;
                win.Size = zone.Size;
                windowToSnap = IntPtr.Zero;
            }

            timer.Stop();
        }
开发者ID:toddmitchell,项目名称:RedSnapper,代码行数:12,代码来源:Snapper.cs

示例6: appendContent

 private void appendContent(StringBuilder sb, SystemWindow sw, WindowContent c)
 {
     if (c == null) {
         sb.AppendLine("<Unknown Type>");
         return;
     }
     sb.AppendLine(c.ShortDescription);
     sb.AppendLine("Class Name: " + sw.ClassName);
     String ldesc = c.LongDescription.Replace("\n", "\r\n").Replace("\r\r\n", "\r\n");
     if (ldesc != null && c.ShortDescription != ldesc) {
         sb.AppendLine("------------------------------------------------------------");
         sb.AppendLine(ldesc);
     }
 }
开发者ID:hoangduit,项目名称:mwinapi,代码行数:14,代码来源:MainForm.cs

示例7: guess

 public void guess(IGuesserListener listener, SystemWindow window)
 {
     string file;
     try
     {
         file = window.Process.MainModule.FileName;
     }
     catch (Win32Exception)
     {
         listener.guessInfo(2, "*** File access denied");
         return;
     }
     listener.guessInfo(2, "*** Detected File: " + file);
     ctrl.guessFile(listener, file);
 }
开发者ID:hoangduit,项目名称:mwinapi,代码行数:15,代码来源:WindowExecutableGuesser.cs

示例8: Highlight

 private void Highlight(SystemWindow sw, SystemAccessibleObject acc)
 {
     if (sw == null) return;
     if (acc != null && acc != highlightedObject)
     {
         if (highlightedWindow != null)
             highlightedWindow.Refresh();
         acc.Highlight();
     }
     else if (sw != highlightedWindow)
     {
         if (highlightedWindow != null)
             highlightedWindow.Refresh();
         sw.Highlight();
     }
     highlightedObject = acc;
     highlightedWindow = sw;
 }
开发者ID:hoangduit,项目名称:mwinapi,代码行数:18,代码来源:SelectorForm.cs

示例9: guess

 public void guess(IGuesserListener listener, SystemWindow window)
 {
     string mainclass = window.ClassName;
     List<string> childClasses = new List<string>();
     childClasses.Add(mainclass);
     parseChildren(childClasses, window);
     childClasses.Sort();
     listener.guessInfo(1, "** Main class: " + mainclass);
     foreach (string c in childClasses)
     {
         listener.guessInfo(2, "*** Child class:" + c);
     }
     IList<string> results = sp.parse(mainclass, childClasses.ToArray());
     foreach (string r in results)
     {
         listener.guessInfo(0, "Wndclass suggests: " + r);
         listener.guessAttribute("WNDCLASS", r);
     }
 }
开发者ID:hoangduit,项目名称:mwinapi,代码行数:19,代码来源:WindowClassGuesser.cs

示例10: getWindowProperties

 private string getWindowProperties(SystemWindow sw)
 {
     string content;
     if (includeContents.Checked)
     {
         try
         {
             WindowContent cc = sw.Content;
             if (cc == null)
             {
                 content = "Unknown";
             }
             else
             {
                 content = "\"" + cc.ShortDescription + "\"\r\n" +
                     cc.LongDescription.Replace("\n", "\r\n").Replace("\r\r\n", "\r\n");
             }
         }
         catch (Exception ex)
         {
             content = "\"Exception\"\r\n" + ex.ToString();
         }
     }
     else
     {
         content = "(Enable in Options tab if desired)";
     }
     return "  Handle:\t\t0x" + sw.HWnd.ToString("x8") + " (" + sw.HWnd + ")\r\n" +
         "  DialogID:\t0x" + sw.DialogID.ToString("x8") + " (" + sw.DialogID + ")\r\n" +
         "  Position:\t\t(" + sw.Position.Left + ", " + sw.Position.Top + "), " + sw.Position.Width + "x" + sw.Position.Height + "\r\n" +
         "  Parent:\t\t" + (sw.Parent == null ? "None" : (sw.ParentSymmetric == null ? "Asymmetric" : "Symmetric") + " 0x" + sw.Parent.HWnd.ToString("x8")) + "\r\n" +
         "  Appearance:\t" + (sw.Enabled ? "Enabled " : "Disabled ") + (sw.Visible ? "Visible" : "Invisible") + "\r\n" +
         "  Changable:\t" + (sw.Movable ? "Movable " : "NotMovable ") + (sw.Resizable ? "Resizable" : "FixedSize") + "\r\n" +
         "  WindowState:\t" +
         (sw.TopMost ? "TopMost " : "") + sw.WindowState.ToString() + "\r\n" +
         "  Process:\t\t" + sw.Process.ProcessName + " (0x" + sw.Process.Id.ToString("x8") + "), " +
         "\r\n" +
         "  ClassName:\t\"" + sw.ClassName + "\"\r\n" +
         "  Title:\t\t\"" + sw.Title + "\"\r\n\r\n" +
         "Content:\t" + content;
 }
开发者ID:hoangduit,项目名称:mwinapi,代码行数:41,代码来源:WindowInformation.cs

示例11: ClickButton

 private void ClickButton(SystemWindow systemWindow)
 {
     POINT pt = winMessenger.GetWindowCenter(systemWindow);
     winMessenger.MouseMove(pt.X, pt.Y);
     Thread.Sleep(100);
     winMessenger.Click();
 }
开发者ID:kingofcrabs,项目名称:LuminexDriver,代码行数:7,代码来源:WindowOp.cs

示例12: IsDescendantOf

 /// <summary>
 /// Check whether this window is a descendant of <c>ancestor</c>
 /// </summary>
 /// <param name="ancestor">The suspected ancestor</param>
 /// <returns>If this is really an ancestor</returns>
 public bool IsDescendantOf(SystemWindow ancestor)
 {
     return IsChild(ancestor._hwnd, _hwnd);
 }
开发者ID:toddmitchell,项目名称:RedSnapper,代码行数:9,代码来源:SystemWindow.cs

示例13: getArea

 private static int getArea(SystemWindow sw)
 {
     RECT rr = sw.Rectangle;
         return rr.Height * rr.Width;
 }
开发者ID:toddmitchell,项目名称:RedSnapper,代码行数:5,代码来源:SystemWindow.cs

示例14: WindowDeviceContext

 internal WindowDeviceContext(SystemWindow sw, IntPtr hDC)
 {
     this.sw = sw;
         this.hDC = hDC;
 }
开发者ID:toddmitchell,项目名称:RedSnapper,代码行数:5,代码来源:SystemWindow.cs

示例15: COMObjectFromWindow

 /// <summary>
 /// Gets the automation object for a given window. 
 /// This is a COM object implementing the IDispatch interface, commonly 
 /// available from Microsoft Office windows.
 /// </summary>
 /// <param name="window">The window</param>
 public static object COMObjectFromWindow(SystemWindow window)
 {
     return AccessibleObjectFromWindow(window == null ? IntPtr.Zero : window.HWnd, OBJID_NATIVEOM, new Guid("{00020400-0000-0000-C000-000000000046}"));
 }
开发者ID:hoangduit,项目名称:mwinapi,代码行数:10,代码来源:SystemAccessibleObject.cs


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