Ejemplo n.º 1
0
        public WindowWait(WindowActionWait action)
        {
            InitializeComponent();

            this.action = action;

            textPauseMs.Text = action.Milliseconds.ToString();
        }
Ejemplo n.º 2
0
        private void ButtonAdd_Click(object sender, RoutedEventArgs e)
        {
            IWindowAction action;
            string        name = ((ComboBoxItem)comboBoxActions.SelectedItem).Content as string;

            switch (name)
            {
            case "Bring to front":
                action = new WindowActionBringToFront();
                break;

            case "Close":
                action = new WindowActionClose();
                break;

            case "Maximize":
                action = new WindowActionMaximize();
                break;

            case "Minimize":
                action = new WindowActionMinimize();
                break;

            case "Move":
                action = new WindowActionMove();
                break;

            case "Restore":
                action = new WindowActionRestore();
                break;

            case "Resize":
                action = new WindowActionResize();
                break;

            case "Send keys":
                action = new WindowActionSendKeys();
                break;

            case "Wait":
                action = new WindowActionWait();
                break;

            default:
                return;
            }

            Add(action);
            CheckCanSave();
        }