public static void addToZip(ZipOutputStream s, Crc32 crc, string file, bool putInFolder) { FileStream fs = File.OpenRead(file); byte[] buffer = new byte[fs.Length]; fs.Read(buffer, 0, buffer.Length); string filename = Path.GetFileName(file); if (putInFolder) { filename = DreamTools.ReplaceSpecialChars(DreamTools.Reverse(DreamTools.Reverse(Path.GetDirectoryName(file)).Substring(0, DreamTools.Reverse(Path.GetDirectoryName(file)).IndexOf("\\"))) + "\\" + filename); } // MessageBox.Show(filename); ZipEntry entry = new ZipEntry(filename); entry.DateTime = DateTime.Now; entry.Size = fs.Length; fs.Close(); crc.Reset(); crc.Update(buffer); entry.Crc = crc.Value; s.PutNextEntry(entry); s.Write(buffer, 0, buffer.Length); }
public Splash() { // // Erforderlich für die Unterstützung des Windows Forms-Designer // InitializeComponent(); //this.label1.Text = "Dreambeam "+ this.version +"\n"; //this.label1.Text += " hallo"; this.version = Application.ProductVersion.Substring(0, Application.ProductVersion.Length - DreamTools.Reverse(Application.ProductVersion).IndexOf(".") - 1); // this.Opacity = .00; timer1.Interval = TIMER_INTERVAL; timer1.Start(); // // TODO: Fügen Sie nach dem Aufruf von InitializeComponent() Konstruktorcode hinzu. // }