mirror of https://gitlab.com/basile.b/dexed.git
menu file, added action 'save file copy as...'
This commit is contained in:
parent
806758e5f1
commit
ae990b03ef
|
@ -1790,6 +1790,9 @@ object CEMainForm: TCEMainForm
|
|||
CEFFD8D1D2FFB37A06FFB78116FFB9851CC5BB871F00BB871F00
|
||||
}
|
||||
end
|
||||
object MenuItem71: TMenuItem
|
||||
Action = actFileSaveCopyAs
|
||||
end
|
||||
object MenuItem62: TMenuItem
|
||||
Action = actFileHtmlExport
|
||||
Bitmap.Data = {
|
||||
|
@ -1914,7 +1917,7 @@ object CEMainForm: TCEMainForm
|
|||
}
|
||||
end
|
||||
object MenuItem38: TMenuItem
|
||||
Action = ActFileCompAndRunWithArgs
|
||||
Action = actFileCompAndRunWithArgs
|
||||
Bitmap.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000000000000000
|
||||
|
@ -3278,7 +3281,7 @@ object CEMainForm: TCEMainForm
|
|||
}
|
||||
end
|
||||
object MenuItem13: TMenuItem
|
||||
Action = ActFileCompAndRunWithArgs
|
||||
Action = actFileCompAndRunWithArgs
|
||||
Bitmap.Data = {
|
||||
36040000424D3604000000000000360000002800000010000000100000000100
|
||||
2000000000000004000064000000640000000000000000000000000000000000
|
||||
|
@ -3929,11 +3932,11 @@ object CEMainForm: TCEMainForm
|
|||
OnExecute = actFileCompileAndRunOutExecute
|
||||
OnUpdate = updateDocumentBasedAction
|
||||
end
|
||||
object ActFileCompAndRunWithArgs: TAction
|
||||
object actFileCompAndRunWithArgs: TAction
|
||||
Category = 'File'
|
||||
Caption = 'Compile file and run...'
|
||||
ImageIndex = 22
|
||||
OnExecute = ActFileCompAndRunWithArgsExecute
|
||||
OnExecute = actFileCompAndRunWithArgsExecute
|
||||
OnUpdate = updateDocumentBasedAction
|
||||
ShortCut = 24695
|
||||
end
|
||||
|
@ -3991,6 +3994,13 @@ object CEMainForm: TCEMainForm
|
|||
ImageIndex = 8
|
||||
OnExecute = actProjNewNativeExecute
|
||||
end
|
||||
object actFileSaveCopyAs: TAction
|
||||
Category = 'File'
|
||||
Caption = 'Save file copy as...'
|
||||
ImageIndex = 2
|
||||
OnExecute = actFileSaveCopyAsExecute
|
||||
OnUpdate = updateDocumentBasedAction
|
||||
end
|
||||
end
|
||||
object imgList: TImageList
|
||||
left = 64
|
||||
|
|
|
@ -36,6 +36,7 @@ type
|
|||
actFileHtmlExport: TAction;
|
||||
actFileUnittest: TAction;
|
||||
actFileCompileAndRunOut: TAction;
|
||||
actFileSaveCopyAs: TAction;
|
||||
actProjNewDubJson: TAction;
|
||||
actProjNewNative: TAction;
|
||||
actSetRunnableSw: TAction;
|
||||
|
@ -130,6 +131,7 @@ type
|
|||
MenuItem68: TMenuItem;
|
||||
MenuItem69: TMenuItem;
|
||||
MenuItem70: TMenuItem;
|
||||
MenuItem71: TMenuItem;
|
||||
mnuLayout: TMenuItem;
|
||||
mnuItemMruFile: TMenuItem;
|
||||
mnuItemMruProj: TMenuItem;
|
||||
|
@ -140,6 +142,7 @@ type
|
|||
MenuItem7: TMenuItem;
|
||||
MenuItem8: TMenuItem;
|
||||
MenuItem9: TMenuItem;
|
||||
procedure actFileSaveCopyAsExecute(Sender: TObject);
|
||||
procedure actProjNewDubJsonExecute(Sender: TObject);
|
||||
procedure actProjNewNativeExecute(Sender: TObject);
|
||||
procedure actSetRunnableSwExecute(Sender: TObject);
|
||||
|
@ -1563,6 +1566,31 @@ begin
|
|||
else openFile(fname);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TCEMainForm.actFileSaveCopyAsExecute(Sender: TObject);
|
||||
var
|
||||
str: TStringList;
|
||||
begin
|
||||
if fDoc = nil then
|
||||
exit;
|
||||
with TSaveDialog.create(nil) do
|
||||
try
|
||||
if fDoc.isDSource then
|
||||
Filter:= DdiagFilter;
|
||||
if execute then
|
||||
begin
|
||||
str := TStringList.create;
|
||||
try
|
||||
str.assign(fDoc.Lines);
|
||||
str.saveToFile(FileName);
|
||||
finally
|
||||
str.free;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
free;
|
||||
end;
|
||||
end;
|
||||
{$ENDREGION}
|
||||
|
||||
{$REGION edit ------------------------------------------------------------------}
|
||||
|
|
Loading…
Reference in New Issue