Example #1
0
 private void FillTree(string filename)
 {
     _scannedTree = new MappedWindow();
     _scannedTree = _scannedTree.LoadMap(filename);
     LoadControlSpecs();
     TsCompare.Enabled  = true;
     CtxCompare.Enabled = true;
 }
Example #2
0
 /// <summary>
 /// Checks if this is a completely new top level form.
 /// </summary>
 private void CheckNewWindow()
 {
     /* If this is a completely new top level form, reload the control tree */
     if (_previousFocusedApplicationHandle == _focusedApplicationHandle)
     {
         return;
     }
     _thisWindow = new MappedWindow(_focusedApplicationHandle);
     PropApplication.SelectedObject = _thisWindow;
 }
Example #3
0
        private static void SetResults(ArrayList results, MappedWindow loadedWin)
        {
            ResultsForm frm = new ResultsForm
            {
                Results      = results,
                LoadedWindow = loadedWin
            };

            frm.ShowDialog();
        }
Example #4
0
        private void TsCrawl_Click(object sender, EventArgs e)
        {
            IntPtr newHand = (IntPtr)TvWindowList.SelectedNode.Tag;

            TsLoadedForm.Text = TvWindowList.SelectedNode.Text;
            _scannedTree      = new MappedWindow(newHand);

            LoadControlSpecs();
            TsCompare.Enabled    = true;
            TsSaveWindow.Enabled = true;
        }
Example #5
0
        private void GetWindowScore(string fileName)
        {
            int          x              = 0;
            ArrayList    scores         = new ArrayList();
            MappedWindow windowFromFile = new MappedWindow();

            windowFromFile = windowFromFile.LoadMap(fileName);

            foreach (MappedControl item in _scannedTree.AllFormsControls)
            {
                if (x >= windowFromFile.AllFormsControls.Count)
                {
                    break;
                }

                List <CompareResult> score = item.CompareTo(windowFromFile.AllFormsControls[x]);
                scores.Add(score);
                x++;
            }
            SetResults(scores, windowFromFile);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="ResultsForm"/> class.
 /// </summary>
 public ResultsForm()
 {
     InitializeComponent();
     LoadedWindow = new MappedWindow();
     Results      = new ArrayList();
 }