zoukankan      html  css  js  c++  java
  • FireMonkey 导出目前 Style 另存文件

    FireMonkey 能将目前使用的 Style 导出成文件,它提供二种文件格式,请看下列代码:

    *.style

    procedure TForm1.Button1Click(Sender: TObject);
    var Stream1: TFileStream;
    begin
         if TStyleManager.ActiveStyle(Self) <> nil then
         begin
              Stream1 := TFileStream.Create('d:	est.style', fmCreate); // 假设文件要储存在 d:	est.style
              TStyleStreaming.SaveToStream(TStyleManager.ActiveStyle(Self), Stream1, TStyleFormat.Text);
              FreeAndNil(Stream1);
         end;
    end;

    *.fsf

    procedure TForm1.Button1Click(Sender: TObject);
    var Stream1: TFileStream;
    begin
         if TStyleManager.ActiveStyle(Self) <> nil then
         begin
              Stream1 := TFileStream.Create('d:	est.fsf', fmCreate); // 假设文件要储存在 d:	est.fsf
              TStyleStreaming.SaveToStream(TStyleManager.ActiveStyle(Self), Stream1, TStyleFormat.Indexed);
              FreeAndNil(Stream1);
         end;
    end;

    XE8 格式支持:

    TStyleFormat = (Indexed, Binary, Text);

  • 相关阅读:
    node 搭建代理服务器
    jquery常见的方法
    静态布局字体标签
    ajax简单了解
    GET方式缓存清除
    Ajax使用概述
    SESSION技术
    COOKIE技术
    PHP操作数据库(二)-增删改查操作
    PHP操作数据库(一)-步骤介绍
  • 原文地址:https://www.cnblogs.com/onechen/p/4646752.html
Copyright © 2011-2022 走看看