Ejemplo n.º 1
0
        /*
         * Creates the editor window.
         */
        public EditorWindow(BaseWindow editorWindow)
        {
            this.Window = editorWindow;

            // Create the patterns.
            this.FocusPattern = (WindowPattern)this.Window.Window.GetCurrentPattern(WindowPattern.Pattern);
            this.SizePattern  = (TransformPattern)this.Window.Window.GetCurrentPattern(TransformPattern.Pattern);
        }
Ejemplo n.º 2
0
        /*
         * Creates a Roblox Studio Window object.
         */
        private RobloxStudioWindow(BaseWindow window, ProjectStructure structure)
        {
            this.Window    = window;
            this.Structure = structure;

            // Create the pattern.
            this.FocusPattern = (WindowPattern)this.Window.Window.GetCurrentPattern(WindowPattern.Pattern);

            // Create the conditions.
            this.PaneCondition = new AndCondition(new List <Condition>
            {
                new PropertyCondition(AutomationElement.ClassNameProperty, "Qt5QWindowIcon"),
                new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Pane)
            }.ToArray());
            this.EditorCondition = new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Edit);
            this.TabCondition    = new AndCondition(new List <Condition>
            {
                new PropertyCondition(AutomationElement.ClassNameProperty, "Qt5QWindowIcon"),
                new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Tab)
            }.ToArray());

            // Get the parents.
            this.EditorParent = this.Window.Window.FindFirst(TreeScope.Children, this.PaneCondition).FindFirst(TreeScope.Children, this.PaneCondition).FindAll(TreeScope.Children, this.PaneCondition)[1];
        }
Ejemplo n.º 3
0
 /*
  * Fetches a Roblox Studio window.
  */
 public static RobloxStudioWindow GetWindow(string name, ProjectStructure structure)
 {
     return(new RobloxStudioWindow(BaseWindow.GetWindow(name), structure));
 }