Main | Registration | Login Welcome Guest | RSS
Vote for RawrGunz!Please VOTE for RawrGunz at top 200 pserver list!
[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
Forum moderator: Splash, ManyBlackPpl  
[CODING][SNIPPET]C# - Pumping File Sizes
xVengeanceDate: Tuesday, 2009-07-21, 5:04 AM | Message # 1
RawrGunz Beginner
Group: Users
Messages: 79
Reputation: 6
Status: Offline
Code

private void button1_Click(object sender, EventArgs e)
         {
             openFileDialog1.Filter = "All Files|*";
             openFileDialog1.FilterIndex = 1;
             if (openFileDialog1.ShowDialog(this) == DialogResult.OK)
             {
                 textBox1.Text = string.Empty;
                 textBox1.Text = openFileDialog1.FileName;
             }
         }

         private void button2_Click(object sender, EventArgs e)
         {
             label2.Text = "Status: Pumping...";
             var selFile = File.OpenWrite(textBox1.Text);
             var endpoint = selFile.Seek(0, SeekOrigin.End);
             var sizeSel = int.Parse(textBox2.Text);
             decimal byte1 = sizeSel * 1048576;
             while (endpoint < byte1)
             {
                 endpoint++;
                 selFile.WriteByte(0);
             }
             selFile.Close();
             Process proc = new Process();
             proc.StartInfo.FileName = Convert.ToString(selFile);
             MessageBox.Show("Success!");
             label2.Text = "Status: Pumping Complete...";
         }

Button1 loads the file, Button2 'Pumps' it.


Check this out. :P
http://rawrgaming.ucoz.com/forum/16-745-1
 
GraphiDate: Tuesday, 2009-07-21, 5:08 PM | Message # 2
eSOBe
Group: Users
Messages: 1326
Reputation: 22
Status: Offline
I don't get it, but it sounds like you're proo happy


 
xVengeanceDate: Tuesday, 2009-07-21, 9:30 PM | Message # 3
RawrGunz Beginner
Group: Users
Messages: 79
Reputation: 6
Status: Offline
Quote (Graphi)
I don't get it, but it sounds like you're proo happy

Basically, you can change any file's size to whatever you want.


Check this out. :P
http://rawrgaming.ucoz.com/forum/16-745-1
 
jeffreyDate: Wednesday, 2009-07-22, 2:18 AM | Message # 4
RawrGunz Beginner
Group: Users
Messages: 50
Reputation: 4
Status: Offline
Spiro says: Well this is so that you add size by having random bytes added to your files files if they are small and you want them to be bigger, i dont see why this is here
 
xVengeanceDate: Wednesday, 2009-07-22, 2:24 AM | Message # 5
RawrGunz Beginner
Group: Users
Messages: 79
Reputation: 6
Status: Offline
Quote (jeffrey)
Spiro says: Well this is so that you add size by having random bytes added to your files files if they are small and you want them to be bigger, i dont see why this is here

Articulation is an important skill btw.

Because it can be used for server development? Programming/Coding is a very important tool.


Check this out. :P
http://rawrgaming.ucoz.com/forum/16-745-1
 
G_manDate: Wednesday, 2009-07-22, 12:29 PM | Message # 6
Spartan King
Group: Administrators
Messages: 1637
Reputation: 70
Status: Offline
yeah yeah that sht is the shat and sht sht......
Nah but really i have no clue what this is but seems pro


my sexy Girlfriend :P jus look below :P :P

 
GraphiDate: Wednesday, 2009-07-22, 9:04 PM | Message # 7
eSOBe
Group: Users
Messages: 1326
Reputation: 22
Status: Offline
Quote (G_man)
but seems pro

like every shit like this.



 
  • Page 1 of 1
  • 1
Search:

Copyright RawrGunz © 2024
Powered by uCoz