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

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

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