Last change
on this file was 2, checked in by chronos, 12 years ago |
- Přidáno: Základní kostra projektu.
- Přidáno: Knihovna synapse.
|
File size:
616 bytes
|
Line | |
---|
1 | {$MODE DELPHI}
|
---|
2 |
|
---|
3 | Program testmime;
|
---|
4 |
|
---|
5 | uses
|
---|
6 | mimepart, classes;
|
---|
7 |
|
---|
8 | type
|
---|
9 | Tc = class(TObject)
|
---|
10 | public
|
---|
11 | class procedure ph(const Sender: TMimePart);
|
---|
12 | end;
|
---|
13 |
|
---|
14 | class procedure Tc.ph(const Sender: TMimePart);
|
---|
15 | begin
|
---|
16 | Sender.DecodePart;
|
---|
17 | Sender.EncodePart;
|
---|
18 | end;
|
---|
19 |
|
---|
20 | var
|
---|
21 | l: tstringlist;
|
---|
22 | m:tmimepart;
|
---|
23 | begin
|
---|
24 | l := TStringList.create;
|
---|
25 | m := tmimepart.create;
|
---|
26 | try
|
---|
27 | m.OnWalkPart:=tc.ph;
|
---|
28 | m.Lines.LoadFromFile(paramstr(1));
|
---|
29 | m.DecomposeParts;
|
---|
30 | m.WalkPart;
|
---|
31 | m.ComposeParts;
|
---|
32 | m.Lines.SaveToFile(paramstr(1) + '.repack');
|
---|
33 | finally
|
---|
34 | m.free;
|
---|
35 | l.free;
|
---|
36 | end;
|
---|
37 | end.
|
---|
38 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.