private async void GitCommand_Click(object sender, EventArgs eventArgs) { GitContextMenuCommand gitCommand = sender.GetTagValue <GitContextMenuCommand>(); if (gitCommand == null) { return; } BeginExecutingGitCommand(); (bool Success, string[] ErrorOutput)result; try { string command = gitCommand.Command.Replace(Settings.BRANCH_IDENTIFIER, Branch); if (Settings.Default.ShowGitCommandOutput) { using (OutputForm errorForm = new OutputForm(outputHandler => Root.SafeGitExecuteAsync(Path, command, outputHandler.AddLine), showInTaskbar: true)) { errorForm.ShowDialog(this); result = errorForm.OperationResult; } } else { result = await Root.SafeGitExecuteAsync(Path, command); } } finally { DoneExecutingGitCommand(); } if (result.Success) { await RefreshInfo(resetRemoteStatus : false); } else if (!Settings.Default.ShowGitCommandOutput) { using (OutputForm errorForm = new OutputForm(result.ErrorOutput, showInTaskbar: true)) { errorForm.ShowDialog(this); } } }
private void btnEditRegisterOutput_Click(object sender, EventArgs e) { if (typeUserOutput == 1) { if (dataGridView.SelectedRows.Count > 0) { edit = true; string Marca = dataGridView.CurrentRow.Cells["Marca"].Value.ToString(); string Modelo = dataGridView.CurrentRow.Cells["Modelo"].Value.ToString(); string Nserie = dataGridView.CurrentRow.Cells["Nserie"].Value.ToString(); string BDI = dataGridView.CurrentRow.Cells["BDI"].Value.ToString(); string ULab = dataGridView.CurrentRow.Cells["Ulab"].Value.ToString(); string Destino = dataGridView.CurrentRow.Cells["Destino"].Value.ToString(); string TableroDestino = dataGridView.CurrentRow.Cells["TableroDestino"].Value.ToString(); string FechaSalida = dataGridView.CurrentRow.Cells["FechaSalida"].Value.ToString(); string Observacion = dataGridView.CurrentRow.Cells["Observación"].Value.ToString(); string IdOutput = dataGridView.CurrentRow.Cells["Id"].Value.ToString(); this.Hide(); OutputForm formETR = new OutputForm(Convert.ToInt32(IdUserOutput)); formETR.getEditRegisterOutput(Marca, Modelo, Nserie, BDI, ULab, Destino, TableroDestino, FechaSalida, Observacion, IdOutput, edit); formETR.ShowDialog(); this.Show(); show(); } else { MessageBox.Show("Seleccione una fila por favor"); } } if (typeUserOutput == 2) { edit = true; } }