Ejemplo n.º 1
0
 private void MakeArchiveFromDataSet( DataSet dataSet )
 {
     if ( dataSet == null ) 
         return;
     
     if ( makeArchiveFileDialog.ShowDialog( ) == DialogResult.OK )
     {                                                            
         using ( WaitCursor wc = new WaitCursor( this ) )
         {
             Core.ArchiveBuilder archiveBuilder = new Core.ArchiveBuilder( CurrentScmSystem );
             archiveBuilder.Build( dataSet, makeArchiveFileDialog.FileName );
         }
     }
 }
Ejemplo n.º 2
0
 private void ViewCurrentItem( long version )
 {
     using( WaitCursor wc = new WaitCursor( this ) )
     {
         Trace.WriteLine( string.Format( "Showing file {0}, version {1}", SelectedRepositoryPath, version ) );
         CurrentScmSystem.ShowFile( SelectedItemId, version );
     }
 }
Ejemplo n.º 3
0
 private void showBlame_Click(object sender, System.EventArgs e)
 {
     using( WaitCursor wc = new WaitCursor( this ) )
     {
         CurrentScmSystem.ShowBlame( SelectedItemId, SelectedItemCurrentVersion - SelectedItemFirstVersion );
     }
 }
Ejemplo n.º 4
0
 private void DiffCurrentItem( long firstVersion, long lastVersion )
 {
     using( WaitCursor wc = new WaitCursor( this ) )
     {
         Trace.WriteLine( string.Format( "Diffing file {0} (id={1}), from {2} to {3}", SelectedRepositoryPath, SelectedItemId, firstVersion, lastVersion ) );
         CurrentScmSystem.ShowDiff( SelectedItemId, firstVersion, lastVersion );
     }
 }
Ejemplo n.º 5
0
        private void copyForExcelButton_Click(object sender, System.EventArgs e)
        {
            using( WaitCursor wc = new WaitCursor( this ) )
            {
                // assemble the string
                StringBuilder str = new StringBuilder();

                int namePos = currentDataSet.Table.Columns.IndexOf( ChangeHistoryDataSet.DisplayedPath );
                int startPos = currentDataSet.Table.Columns.IndexOf( ChangeHistoryDataSet.FirstVersion );
                int finishPos = currentDataSet.Table.Columns.IndexOf( ChangeHistoryDataSet.LastVersion );

                foreach( DataRowView row in currentDataSet )
                {
                    str.AppendFormat( "{0}\t{1}\t{2}\t{3}\t{1}\n", row[ namePos ], row[ finishPos ], row[ startPos ], GetDiffType( row[ startPos ] ) );
                }

                // paste it to the clipboard
                Clipboard.SetDataObject( str.ToString(), true );
            }
        }