提交 09a81f8f 编写于 作者: C cz_012273

修复另存文件不输入文件名退出后出错;去掉主界面缩放控件,以适应手机横屏布局。

上级 43b41846
此差异已折叠。
......@@ -11,21 +11,21 @@ uses
FMX.Objects;
type
TToolsForm = class(TForm)
ScaledLayout1: TScaledLayout;
Label2: TLabel;
Edit2: TEdit;
StyleBook1: TStyleBook;
ComboBox1: TComboBox;
Edit1: TEdit;
Edit2: TEdit;
Image1: TImage;
Rectangle1: TRectangle;
Label1: TLabel;
ComboBox1: TComboBox;
Label2: TLabel;
Label3: TLabel;
SpeedButton1: TSpeedButton;
StyleBook1: TStyleBook;
SpeedButton2: TSpeedButton;
SpeedButton3: TSpeedButton;
SpeedButton4: TSpeedButton;
SpeedButton5: TSpeedButton;
Image1: TImage;
Rectangle1: TRectangle;
Panel1: TPanel;
procedure FormCreate(Sender: TObject);
procedure TakePicturePermissionRequestResult(Sender: TObject;
......
......@@ -346,23 +346,23 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="Android64\Debug\colors.xml" Configuration="Debug" Class="Android_Colors">
<DeployFile LocalName="$(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png" Configuration="Debug" Class="Android_NotificationIcon24">
<Platform Name="Android64">
<RemoteName>ic_notification.png</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="Android64\Debug\styles.xml" Configuration="Debug" Class="AndroidSplashStyles">
<DeployFile LocalName="Android64\Debug\AndroidManifest.xml" Configuration="Debug" Class="ProjectAndroidManifest">
<Platform Name="Android64">
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\bin\Artwork\Android\FM_NotificationIcon_24x24.png" Configuration="Debug" Class="Android_NotificationIcon24">
<DeployFile LocalName="Android64\Debug\colors.xml" Configuration="Debug" Class="Android_Colors">
<Platform Name="Android64">
<RemoteName>ic_notification.png</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="Android64\Debug\AndroidManifest.xml" Configuration="Debug" Class="ProjectAndroidManifest">
<DeployFile LocalName="Android64\Debug\styles.xml" Configuration="Debug" Class="AndroidSplashStyles">
<Platform Name="Android64">
<Overwrite>true</Overwrite>
</Platform>
......
......@@ -137,6 +137,7 @@ type
protected
function GetFileName: string; override;
procedure DoConfirm; override;
procedure DoCancel; override;
procedure DoShow; override;
procedure SetFilter(const Value: string); override;
end;
......@@ -719,6 +720,7 @@ begin
FListType := Value;
end;
procedure TMyOpenDialog.VirtualKeyboardChangeHandler(const Sender: TObject;
const Msg: System.Messaging.TMessage);
var
......@@ -752,6 +754,12 @@ begin
ModalResult := mrOK;
end;
procedure TMySaveDialog.DoCancel;
begin
ModalResult := mrCancel;
close;
end;
procedure TMySaveDialog.DoShow;
begin
inherited;
......
......@@ -141,6 +141,7 @@ procedure TForm1.ResultProc1(AResult: Boolean; AFileName: string);
var
s: string;
begin
if AResult then
begin
Memo1.Lines.SaveToFile(AFileName);
......@@ -173,14 +174,16 @@ begin
end;
procedure TForm1.FileSaveClick(Sender: TObject); // 保存
var
s: string;
begin
showmessage('当前保存位置及文件名:' + FFileName);
if FFileName = sUntitled then
s := copy(FFileName, pos('Documents/', FFileName) + 10, 50);
if s = '.txt' then
FileSaveAsClick(Sender)
else
begin
showmessage('当前保存位置及文件名:' + FFileName);
Memo1.Lines.SaveToFile(FFileName);
// Memo1.text := '';
end;
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册