Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
cz_012273
MyDelphi
提交
19ced367
MyDelphi
项目概览
cz_012273
/
MyDelphi
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MyDelphi
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
19ced367
编写于
10月 22, 2021
作者:
C
cz_012273
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
记事本加入选择当前行工具
上级
a0b77871
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
45 addition
and
10 deletion
+45
-10
MyDelphi.dproj
MyDelphi.dproj
+9
-9
Unit1.LgXhdpiPh.fmx
Unit1.LgXhdpiPh.fmx
+5
-0
Unit1.fmx
Unit1.fmx
+9
-0
Unit1.pas
Unit1.pas
+22
-1
未找到文件。
MyDelphi.dproj
浏览文件 @
19ced367
...
...
@@ -300,15 +300,15 @@
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\bin\Artwork\Android\FM_
SplashImage_640x480.png" Configuration="Debug" Class="Android_SplashImage640
">
<DeployFile LocalName="$(BDS)\bin\Artwork\Android\FM_
NotificationIcon_72x72.png" Configuration="Debug" Class="Android_NotificationIcon72
">
<Platform Name="Android64">
<RemoteName>
splash_image
.png</RemoteName>
<RemoteName>
ic_notification
.png</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="$(BDS)\bin\Artwork\Android\FM_
NotificationIcon_72x72.png" Configuration="Debug" Class="Android_NotificationIcon72
">
<DeployFile LocalName="$(BDS)\bin\Artwork\Android\FM_
SplashImage_640x480.png" Configuration="Debug" Class="Android_SplashImage640
">
<Platform Name="Android64">
<RemoteName>
ic_notification
.png</RemoteName>
<RemoteName>
splash_image
.png</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
...
...
@@ -348,23 +348,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>
...
...
Unit1.LgXhdpiPh.fmx
浏览文件 @
19ced367
...
...
@@ -20,6 +20,7 @@ inherited Form1_LgXhdpiPh: TForm1_LgXhdpiPh
Size.Height = 695.000000000000000000
inherited Memo1: TMemo
Size.Width = 433.000000000000000000
OnExit = Memo1Exit
Viewport.Width = 433.000000000000000000
Viewport.Height = 473.000000000000000000
end
...
...
@@ -56,5 +57,9 @@ inherited Form1_LgXhdpiPh: TForm1_LgXhdpiPh
TextSettings.VertAlign = Leading
Text = ''
end
inherited Button1: TButton
Position.X = 344.000000000000000000
Text = #36873#25321#24403#21069#34892
end
end
end
Unit1.fmx
浏览文件 @
19ced367
...
...
@@ -93,5 +93,14 @@ object Form1: TForm1
Text = 'Label1'
TabOrder = 13
end
object Button1: TButton
Position.X = 312.000000000000000000
Size.Width = 105.000000000000000000
Size.Height = 25.000000000000000000
Size.PlatformDefault = False
TabOrder = 14
Text = 'Button1'
OnClick = Button1Click
end
end
end
Unit1.pas
浏览文件 @
19ced367
...
...
@@ -18,6 +18,7 @@ type
FileSaveAs
:
TButton
;
FileExit
:
TButton
;
Label1
:
TLabel
;
Button1
:
TButton
;
procedure
FileNewClick
(
Sender
:
TObject
);
procedure
FileOpenClick
(
Sender
:
TObject
);
...
...
@@ -27,6 +28,8 @@ type
procedure
Formshow
(
Sender
:
TObject
);
procedure
FormClose
(
Sender
:
TObject
;
var
Action
:
TCloseAction
);
procedure
Memo1MouseLeave
(
Sender
:
TObject
);
procedure
Button1Click
(
Sender
:
TObject
);
procedure
Memo1Exit
(
Sender
:
TObject
);
...
...
@@ -64,6 +67,8 @@ uses
MyDialogs
;
type
TTextFormat
=(
tfAnsi
,
tfUnicode
,
tfUnicodeBigEndian
,
tfUtf8
);
var
MemoLastPos
:
integer
;
//光标最后位置
const
//TextFormatFlag: array[tfAnsi..tfUtf8] of word=($0000,$FFFE,$FEFF,$EFBB);
TextFormatFlag
:
array
[
tfAnsi
..
tfUtf8
]
of
word
=($
0000
,$
FEFF
,$
FFFE
,$
BBEF
);
//编码标志高低字节互换
...
...
@@ -184,6 +189,19 @@ begin
GetFileSaveDialog
(
ResultProc1
);
//调用通用对话框
end
;
procedure
TForm1
.
Button1Click
(
Sender
:
TObject
);
//选择当前行文本内容
var
Line
:
integer
;
begin
Memo1
.
setfocus
;
with
Memo1
do
begin
Line
:=
CaretPosition
.
line
;
SelStart
:=
MemoLastPos
-
CaretPosition
.
pos
;
SelLength
:=
Length
(
Lines
[
Line
])
;
end
;
end
;
procedure
TForm1
.
FileExitClick
(
Sender
:
TObject
);
//退出
begin
Close
;
...
...
@@ -216,7 +234,10 @@ begin
end
;
procedure
TForm1
.
Memo1Exit
(
Sender
:
TObject
);
begin
MemoLastPos
:=
memo1
.
SelStart
;
//memo1失去焦点前记住当前光标位置
end
;
procedure
TForm1
.
Memo1MouseLeave
(
Sender
:
TObject
);
//改变memo1高度以适应虚拟键盘
var
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录