Esempio n. 1
0
        private void OpenButton_Click(object sender, EventArgs e)
        {
            _process = _patches.OpenProcess();

            if (_process == null)
            {
                StatusTextBox.Text              = "No process or multiple instances found.";
                ProcessNameTextBox.Text         = String.Empty;
                ProcessIDTextBox.Text           = String.Empty;
                AvailablePatchesListBox.Enabled = false;
                ApplyButton.Enabled             = false;
                return;
            }

            StatusTextBox.Text              = "Open.";
            ProcessNameTextBox.Text         = _process.ProcessName;
            ProcessIDTextBox.Text           = _process.Id.ToString();
            AvailablePatchesListBox.Enabled = true;
            ApplyButton.Enabled             = true;
        }