Exemplo n.º 1
0
        public WindowResize(WindowActionResize action)
        {
            InitializeComponent();

            this.action = action;

            textBoxWidth.Text  = action.Width.ToString();
            textBoxHeight.Text = action.Height.ToString();
        }
Exemplo 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();
        }