public string GetCommitMessage2(IntPtr hParentWnd, string parameters, string commonURL, string commonRoot, string[] pathList, string originalMessage, string bugID, out string bugIDOut, out string[] revPropNames, out string[] revPropValues) { try { List <TicketItem> tickets = new List <TicketItem>( ); tickets.Add(new TicketItem(12, "Service doesn't start on Windows Vista")); tickets.Add(new TicketItem(19, "About box doesn't render correctly in large fonts mode")); /* * tickets.Add(new TicketItem(88, commonRoot)); * foreach (string path in pathList) * tickets.Add(new TicketItem(99, path)); */ /* Please note: revPropNames and revPropValues are ignored by TortoiseGit! However, you must return at least empty arrays */ revPropNames = new string[2]; revPropValues = new string[2]; revPropNames[0] = "bugtraq:issueIDs"; revPropNames[1] = "myownproperty"; revPropValues[0] = "13, 16, 17"; revPropValues[1] = "myownvalue"; bugIDOut = bugID + "added"; MyIssuesForm form = new MyIssuesForm(tickets); if (form.ShowDialog( ) != DialogResult.OK) { return(originalMessage); } StringBuilder result = new StringBuilder(originalMessage); if (originalMessage.Length != 0 && !originalMessage.EndsWith("\n")) { result.AppendLine( ); } foreach (TicketItem ticket in form.TicketsFixed) { result.AppendFormat("Fixed #{0}: {1}", ticket.Number, ticket.Summary); result.AppendLine( ); selectedTickets.Add(ticket); } return(result.ToString( )); } catch (Exception ex) { MessageBox.Show(ex.ToString( )); throw; } }
public string GetCommitMessage2( IntPtr hParentWnd, string parameters, string commonURL, string commonRoot, string[] pathList, string originalMessage, string bugID, out string bugIDOut, out string[] revPropNames, out string[] revPropValues ) { try { List<TicketItem> tickets = new List<TicketItem>( ); tickets.Add( new TicketItem( 12, "Service doesn't start on Windows Vista" ) ); tickets.Add( new TicketItem( 19, "About box doesn't render correctly in large fonts mode" ) ); /* tickets.Add(new TicketItem(88, commonRoot)); foreach (string path in pathList) tickets.Add(new TicketItem(99, path)); */ revPropNames = new string[2]; revPropValues = new string[2]; revPropNames[0] = "bugtraq:issueIDs"; revPropNames[1] = "myownproperty"; revPropValues[0] = "13, 16, 17"; revPropValues[1] = "myownvalue"; bugIDOut = bugID + "added"; MyIssuesForm form = new MyIssuesForm( tickets ); if ( form.ShowDialog( ) != DialogResult.OK ) return originalMessage; StringBuilder result = new StringBuilder( originalMessage ); if ( originalMessage.Length != 0 && !originalMessage.EndsWith( "\n" ) ) result.AppendLine( ); foreach ( TicketItem ticket in form.TicketsFixed ) { result.AppendFormat( "Fixed #{0}: {1}", ticket.Number, ticket.Summary ); result.AppendLine( ); selectedTickets.Add( ticket ); } return result.ToString( ); } catch ( Exception ex ) { MessageBox.Show( ex.ToString( ) ); throw; } }
public string GetCommitMessage2(IntPtr hParentWnd, string parameters, string commonURL, string commonRoot, string[] pathList, string originalMessage) { try { List <TicketItem> tickets = new List <TicketItem>( ); tickets.Add(new TicketItem(12, "Service doesn't start on Windows Vista")); tickets.Add(new TicketItem(19, "About box doesn't render correctly in large fonts mode")); /* * tickets.Add(new TicketItem(88, commonRoot)); * foreach (string path in pathList) * tickets.Add(new TicketItem(99, path)); */ MyIssuesForm form = new MyIssuesForm(tickets); if (form.ShowDialog( ) != DialogResult.OK) { return(originalMessage); } StringBuilder result = new StringBuilder(originalMessage); if (originalMessage.Length != 0 && !originalMessage.EndsWith("\n")) { result.AppendLine( ); } foreach (TicketItem ticket in form.TicketsFixed) { result.AppendFormat("Fixed #{0}: {1}", ticket.Number, ticket.Summary); result.AppendLine( ); selectedTickets.Add(ticket); } return(result.ToString( )); } catch (Exception ex) { MessageBox.Show(ex.ToString( )); throw; } }