Click here to Skip to main content
15,893,508 members
Articles / Programming Languages / C#

Amazon S3 Sync

Rate me:
Please Sign up or sign in to vote.
4.92/5 (6 votes)
1 Dec 2010Apache5 min read 48K   1.6K   23  
Synchronize files from your computer to Amazon S3.
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class FormUploadEstimate
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.ButtonAbort = New System.Windows.Forms.Button
        Me.Label22 = New System.Windows.Forms.Label
        Me.CheckBoxUploadMakePublic = New System.Windows.Forms.CheckBox
        Me.ToolStripStatusLabelAction = New System.Windows.Forms.ToolStripStatusLabel
        Me.ToolStripProgressBar = New System.Windows.Forms.ToolStripProgressBar
        Me.Label21 = New System.Windows.Forms.Label
        Me.ToolStripStatusLabelBytes = New System.Windows.Forms.ToolStripStatusLabel
        Me.TextBoxUploadContentType = New System.Windows.Forms.TextBox
        Me.ToolStripStatusLabelElapsed = New System.Windows.Forms.ToolStripStatusLabel
        Me.ToolStripStatusLabelSpeed = New System.Windows.Forms.ToolStripStatusLabel
        Me.Label20 = New System.Windows.Forms.Label
        Me.ButtonUploadBrowse = New System.Windows.Forms.Button
        Me.TextBoxUploadKeyName = New System.Windows.Forms.TextBox
        Me.StatusStrip1 = New System.Windows.Forms.StatusStrip
        Me.ToolStripStatusLabelRemaining = New System.Windows.Forms.ToolStripStatusLabel
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.TextBoxUploadBucketName = New System.Windows.Forms.TextBox
        Me.TextBoxUploadFileName = New System.Windows.Forms.TextBox
        Me.Label9 = New System.Windows.Forms.Label
        Me.Label8 = New System.Windows.Forms.Label
        Me.Label7 = New System.Windows.Forms.Label
        Me.Label18 = New System.Windows.Forms.Label
        Me.ButtonUploadFile = New System.Windows.Forms.Button
        Me.StatusStrip1.SuspendLayout()
        Me.GroupBox1.SuspendLayout()
        Me.SuspendLayout()
        '
        'ButtonAbort
        '
        Me.ButtonAbort.Enabled = False
        Me.ButtonAbort.Location = New System.Drawing.Point(271, 218)
        Me.ButtonAbort.Name = "ButtonAbort"
        Me.ButtonAbort.Size = New System.Drawing.Size(96, 23)
        Me.ButtonAbort.TabIndex = 111
        Me.ButtonAbort.Text = "Abort"
        Me.ButtonAbort.UseVisualStyleBackColor = True
        '
        'Label22
        '
        Me.Label22.AutoSize = True
        Me.Label22.Location = New System.Drawing.Point(409, 105)
        Me.Label22.Name = "Label22"
        Me.Label22.Size = New System.Drawing.Size(52, 13)
        Me.Label22.TabIndex = 113
        Me.Label22.Text = "(Optional)"
        '
        'CheckBoxUploadMakePublic
        '
        Me.CheckBoxUploadMakePublic.AutoSize = True
        Me.CheckBoxUploadMakePublic.Location = New System.Drawing.Point(96, 133)
        Me.CheckBoxUploadMakePublic.Name = "CheckBoxUploadMakePublic"
        Me.CheckBoxUploadMakePublic.Size = New System.Drawing.Size(15, 14)
        Me.CheckBoxUploadMakePublic.TabIndex = 111
        Me.CheckBoxUploadMakePublic.UseVisualStyleBackColor = True
        '
        'ToolStripStatusLabelAction
        '
        Me.ToolStripStatusLabelAction.Name = "ToolStripStatusLabelAction"
        Me.ToolStripStatusLabelAction.Size = New System.Drawing.Size(135, 17)
        Me.ToolStripStatusLabelAction.Text = "Calculating MD5 hash...."
        Me.ToolStripStatusLabelAction.Visible = False
        '
        'ToolStripProgressBar
        '
        Me.ToolStripProgressBar.AutoSize = False
        Me.ToolStripProgressBar.Name = "ToolStripProgressBar"
        Me.ToolStripProgressBar.Size = New System.Drawing.Size(100, 16)
        Me.ToolStripProgressBar.Visible = False
        '
        'Label21
        '
        Me.Label21.AutoSize = True
        Me.Label21.Location = New System.Drawing.Point(7, 132)
        Me.Label21.Name = "Label21"
        Me.Label21.Size = New System.Drawing.Size(66, 13)
        Me.Label21.TabIndex = 112
        Me.Label21.Text = "Make Public"
        '
        'ToolStripStatusLabelBytes
        '
        Me.ToolStripStatusLabelBytes.AutoSize = False
        Me.ToolStripStatusLabelBytes.Name = "ToolStripStatusLabelBytes"
        Me.ToolStripStatusLabelBytes.Size = New System.Drawing.Size(100, 17)
        Me.ToolStripStatusLabelBytes.Text = "0 bytes / 0 bytes"
        Me.ToolStripStatusLabelBytes.Visible = False
        '
        'TextBoxUploadContentType
        '
        Me.TextBoxUploadContentType.Location = New System.Drawing.Point(96, 102)
        Me.TextBoxUploadContentType.Name = "TextBoxUploadContentType"
        Me.TextBoxUploadContentType.Size = New System.Drawing.Size(310, 20)
        Me.TextBoxUploadContentType.TabIndex = 110
        '
        'ToolStripStatusLabelElapsed
        '
        Me.ToolStripStatusLabelElapsed.AutoSize = False
        Me.ToolStripStatusLabelElapsed.Name = "ToolStripStatusLabelElapsed"
        Me.ToolStripStatusLabelElapsed.Size = New System.Drawing.Size(120, 17)
        Me.ToolStripStatusLabelElapsed.Text = "00:00:00 elapsed"
        Me.ToolStripStatusLabelElapsed.Visible = False
        '
        'ToolStripStatusLabelSpeed
        '
        Me.ToolStripStatusLabelSpeed.AutoSize = False
        Me.ToolStripStatusLabelSpeed.Name = "ToolStripStatusLabelSpeed"
        Me.ToolStripStatusLabelSpeed.Size = New System.Drawing.Size(80, 17)
        Me.ToolStripStatusLabelSpeed.Text = "0 KB/s"
        Me.ToolStripStatusLabelSpeed.Visible = False
        '
        'Label20
        '
        Me.Label20.AutoSize = True
        Me.Label20.Location = New System.Drawing.Point(7, 105)
        Me.Label20.Name = "Label20"
        Me.Label20.Size = New System.Drawing.Size(71, 13)
        Me.Label20.TabIndex = 109
        Me.Label20.Text = "Content-Type"
        '
        'ButtonUploadBrowse
        '
        Me.ButtonUploadBrowse.Location = New System.Drawing.Point(412, 22)
        Me.ButtonUploadBrowse.Name = "ButtonUploadBrowse"
        Me.ButtonUploadBrowse.Size = New System.Drawing.Size(75, 23)
        Me.ButtonUploadBrowse.TabIndex = 103
        Me.ButtonUploadBrowse.Text = "Browse"
        Me.ButtonUploadBrowse.UseVisualStyleBackColor = True
        '
        'TextBoxUploadKeyName
        '
        Me.TextBoxUploadKeyName.Location = New System.Drawing.Point(96, 76)
        Me.TextBoxUploadKeyName.Name = "TextBoxUploadKeyName"
        Me.TextBoxUploadKeyName.Size = New System.Drawing.Size(310, 20)
        Me.TextBoxUploadKeyName.TabIndex = 105
        '
        'StatusStrip1
        '
        Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripStatusLabelAction, Me.ToolStripProgressBar, Me.ToolStripStatusLabelBytes, Me.ToolStripStatusLabelSpeed, Me.ToolStripStatusLabelElapsed, Me.ToolStripStatusLabelRemaining})
        Me.StatusStrip1.Location = New System.Drawing.Point(0, 256)
        Me.StatusStrip1.Name = "StatusStrip1"
        Me.StatusStrip1.Size = New System.Drawing.Size(520, 22)
        Me.StatusStrip1.SizingGrip = False
        Me.StatusStrip1.TabIndex = 113
        Me.StatusStrip1.Text = "StatusStrip1"
        '
        'ToolStripStatusLabelRemaining
        '
        Me.ToolStripStatusLabelRemaining.AutoSize = False
        Me.ToolStripStatusLabelRemaining.Name = "ToolStripStatusLabelRemaining"
        Me.ToolStripStatusLabelRemaining.Size = New System.Drawing.Size(120, 17)
        Me.ToolStripStatusLabelRemaining.Text = "00:00:00 remaining"
        Me.ToolStripStatusLabelRemaining.Visible = False
        '
        'GroupBox1
        '
        Me.GroupBox1.Controls.Add(Me.Label22)
        Me.GroupBox1.Controls.Add(Me.Label21)
        Me.GroupBox1.Controls.Add(Me.CheckBoxUploadMakePublic)
        Me.GroupBox1.Controls.Add(Me.TextBoxUploadContentType)
        Me.GroupBox1.Controls.Add(Me.Label20)
        Me.GroupBox1.Controls.Add(Me.ButtonUploadBrowse)
        Me.GroupBox1.Controls.Add(Me.TextBoxUploadKeyName)
        Me.GroupBox1.Controls.Add(Me.TextBoxUploadBucketName)
        Me.GroupBox1.Controls.Add(Me.TextBoxUploadFileName)
        Me.GroupBox1.Controls.Add(Me.Label9)
        Me.GroupBox1.Controls.Add(Me.Label8)
        Me.GroupBox1.Controls.Add(Me.Label7)
        Me.GroupBox1.Location = New System.Drawing.Point(15, 44)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(493, 162)
        Me.GroupBox1.TabIndex = 112
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "Upload Options"
        '
        'TextBoxUploadBucketName
        '
        Me.TextBoxUploadBucketName.Location = New System.Drawing.Point(96, 50)
        Me.TextBoxUploadBucketName.Name = "TextBoxUploadBucketName"
        Me.TextBoxUploadBucketName.Size = New System.Drawing.Size(310, 20)
        Me.TextBoxUploadBucketName.TabIndex = 104
        '
        'TextBoxUploadFileName
        '
        Me.TextBoxUploadFileName.Location = New System.Drawing.Point(96, 24)
        Me.TextBoxUploadFileName.Name = "TextBoxUploadFileName"
        Me.TextBoxUploadFileName.Size = New System.Drawing.Size(310, 20)
        Me.TextBoxUploadFileName.TabIndex = 102
        '
        'Label9
        '
        Me.Label9.AutoSize = True
        Me.Label9.Location = New System.Drawing.Point(7, 79)
        Me.Label9.Name = "Label9"
        Me.Label9.Size = New System.Drawing.Size(56, 13)
        Me.Label9.TabIndex = 108
        Me.Label9.Text = "Key Name"
        '
        'Label8
        '
        Me.Label8.AutoSize = True
        Me.Label8.Location = New System.Drawing.Point(7, 53)
        Me.Label8.Name = "Label8"
        Me.Label8.Size = New System.Drawing.Size(72, 13)
        Me.Label8.TabIndex = 107
        Me.Label8.Text = "Bucket Name"
        '
        'Label7
        '
        Me.Label7.AutoSize = True
        Me.Label7.Location = New System.Drawing.Point(7, 27)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(83, 13)
        Me.Label7.TabIndex = 106
        Me.Label7.Text = "Local File Name"
        '
        'Label18
        '
        Me.Label18.Location = New System.Drawing.Point(12, 9)
        Me.Label18.Name = "Label18"
        Me.Label18.Size = New System.Drawing.Size(496, 48)
        Me.Label18.TabIndex = 109
        Me.Label18.Text = "The following example uses the UploadEstimate class to upload a file.  This class" & _
            " calculates the current speed of the upload and time remaining for the upload."
        '
        'ButtonUploadFile
        '
        Me.ButtonUploadFile.Location = New System.Drawing.Point(153, 218)
        Me.ButtonUploadFile.Name = "ButtonUploadFile"
        Me.ButtonUploadFile.Size = New System.Drawing.Size(96, 23)
        Me.ButtonUploadFile.TabIndex = 110
        Me.ButtonUploadFile.Text = "Start Upload"
        Me.ButtonUploadFile.UseVisualStyleBackColor = True
        '
        'FormUploadEstimate
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(520, 278)
        Me.Controls.Add(Me.ButtonAbort)
        Me.Controls.Add(Me.StatusStrip1)
        Me.Controls.Add(Me.GroupBox1)
        Me.Controls.Add(Me.Label18)
        Me.Controls.Add(Me.ButtonUploadFile)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "FormUploadEstimate"
        Me.ShowInTaskbar = False
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
        Me.Text = "Upload With Estimate"
        Me.StatusStrip1.ResumeLayout(False)
        Me.StatusStrip1.PerformLayout()
        Me.GroupBox1.ResumeLayout(False)
        Me.GroupBox1.PerformLayout()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
    Friend WithEvents ButtonAbort As System.Windows.Forms.Button
    Friend WithEvents Label22 As System.Windows.Forms.Label
    Friend WithEvents CheckBoxUploadMakePublic As System.Windows.Forms.CheckBox
    Friend WithEvents ToolStripStatusLabelAction As System.Windows.Forms.ToolStripStatusLabel
    Friend WithEvents ToolStripProgressBar As System.Windows.Forms.ToolStripProgressBar
    Friend WithEvents Label21 As System.Windows.Forms.Label
    Friend WithEvents ToolStripStatusLabelBytes As System.Windows.Forms.ToolStripStatusLabel
    Friend WithEvents TextBoxUploadContentType As System.Windows.Forms.TextBox
    Friend WithEvents ToolStripStatusLabelElapsed As System.Windows.Forms.ToolStripStatusLabel
    Friend WithEvents ToolStripStatusLabelSpeed As System.Windows.Forms.ToolStripStatusLabel
    Friend WithEvents Label20 As System.Windows.Forms.Label
    Friend WithEvents ButtonUploadBrowse As System.Windows.Forms.Button
    Friend WithEvents TextBoxUploadKeyName As System.Windows.Forms.TextBox
    Friend WithEvents StatusStrip1 As System.Windows.Forms.StatusStrip
    Friend WithEvents ToolStripStatusLabelRemaining As System.Windows.Forms.ToolStripStatusLabel
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents TextBoxUploadBucketName As System.Windows.Forms.TextBox
    Friend WithEvents TextBoxUploadFileName As System.Windows.Forms.TextBox
    Friend WithEvents Label9 As System.Windows.Forms.Label
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Friend WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents Label18 As System.Windows.Forms.Label
    Friend WithEvents ButtonUploadFile As System.Windows.Forms.Button

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0


Written By
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions