Thema: Delphi StringGrid / Delphi 2010

Einzelnen Beitrag anzeigen

Alterauge

Registriert seit: 4. Mär 2011
306 Beiträge
 
Delphi 2010 Professional
 
#1

StringGrid / Delphi 2010

  Alt 3. Mai 2011, 13:07
Hallo habe zwei Fragen !

Delphi-Quellcode:
procedure TFormReporting.AddRIC(ric: string; func:string; text: string );
var i,j : integer;
    d,st2,mk : boolean;
    t,c,k : string;
    sl : TStringList;
begin
 d := true;
 mk := false;
 t := '';
 c := 'clBlack';
 k := '';
 with FormSettings.Settings do
    for i := 1 to RowCount-1 do
      begin
        if (Rows[i][1]=ric) and (Rows[i][2]='0') then text := 'IDEA * Verschlüsselt **';
        if (Rows[i][1]=ric) and (Rows[i][2]='1') then d := false;
        if (Rows[i][1]=ric) and (Rows[i][2]='2') then
          begin
            // Zeile in einer Exceltabelle speichern oder Log.txt
          end;
        if (Rows[i][1]=ric) and (Rows[i][2]='3') then
          begin
            // Zeile Ausdrucken (die aktuelle Zeile auf Nadeldrucker ausdrucken)
          end;
        if (Rows[i][1]=ric) and (Rows[i][5]='1') then c := 'clBlack';
        if (Rows[i][1]=ric) and (Rows[i][5]='2') then c := 'clRed';
        if (Rows[i][1]=ric) and (Rows[i][5]='3') then c := 'clGreen';
        if (Rows[i][1]=ric) and (Rows[i][5]='4') then c := 'clBlue';
        if (Rows[i][1]=ric) and (Rows[i][5]='5') then c := 'clPurple';
        if (Rows[i][1]=ric) and (Rows[i][5]='6') then c := 'clOlive';
        if (Rows[i][1]=ric) and (Rows[i][5]='7') then c := 'clFuchsia';
        if (Rows[i][1]=ric) and (Rows[i][5]='8') then c := 'clTeal ';
        if (Rows[i][1]=ric) and (Rows[i][5]='9') then c := 'clGray';
        if (Rows[i][1]=ric) and (Rows[i][3]='Warn') then
          begin
             sndPlaySound('C:\Windows\Media\edp1.wav',
            SND_NODEFAULT Or SND_ASYNC Or SND_LOOP);
            FormMain.AdvGlowButton8.Appearance.BorderColor:=clred;
            FormMain.AdvGlowButton8.Appearance.ColorTo:=clwhite;
            FormMain.AdvGlowButton8.Appearance.ColorMirrorTo:=clwhite;
            FormMain.AdvGlowButton8.Appearance.ColorMirror:=clwhite;
            FormMain.AdvGlowButton8.Appearance.Color:=clwhite;
             FormMain.AdvGlowButton8.Font.Color:=clred;
          end;
         if (Rows[i][1]=ric) and (Rows[i][3]='Warn') then k := '<p align="center"><img src="idx:0"></p>';
         if (Rows[i][1]=ric) and (Rows[i][3]='Info') then k := '<p align="center"><img src="idx:1"></p>';
         if (Rows[i][1]=ric) and (Rows[i][3]='Key') then k := '<p align="center"><img src="idx:2"></p>';
         if (Rows[i][1]=ric) and (Rows[i][3]='Feu') then k := '<p align="center"><img src="idx:3"></p>';
         if (Rows[i][1]=ric) and (Rows[i][3]='OE') then k := '<p align="center"><img src="idx:4"></p>';
         if (Rows[i][1]=ric) and (Rows[i][3]='SQL1') then k := '<p align="center"><img src="idx:5"></p>';
         if (Rows[i][1]=ric) and (Rows[i][3]='SQL2') then k := '<p align="center"><img src="idx:6"></p>';
         if (Rows[i][1]=ric) and (Rows[i][3]='DME') then k := '<p align="center"><img src="idx:7"></p>';

         if (Rows[i][1]=ric) then t := Rows[i][4];
      end;

Frage 1 : Zeile in einer Exceltabelle speichern oder Log.txt

Frage 2 : Zeile Ausdrucken (die aktuelle Zeile auf Nadeldrucker ausdrucken)

Bitte wenn Möglich, die Antworten mit Quelltext Anzeigen!

Danke
  Mit Zitat antworten Zitat