Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
DataEditorX
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dark_Zane
DataEditorX
Commits
b0656d5a
Commit
b0656d5a
authored
Jul 22, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Plain Diff
version
parents
f8becb87
43f833b1
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
164 additions
and
90 deletions
+164
-90
DataEditorX/CodeEditForm.Designer.cs
DataEditorX/CodeEditForm.Designer.cs
+34
-24
DataEditorX/CodeEditForm.cs
DataEditorX/CodeEditForm.cs
+20
-2
DataEditorX/Config/MyConfig.cs
DataEditorX/Config/MyConfig.cs
+4
-0
DataEditorX/Controls/FastColoredTextBoxEx.cs
DataEditorX/Controls/FastColoredTextBoxEx.cs
+44
-18
DataEditorX/Core/CardEdit.cs
DataEditorX/Core/CardEdit.cs
+4
-4
DataEditorX/Core/CommandManager.cs
DataEditorX/Core/CommandManager.cs
+3
-3
DataEditorX/DataEditForm.cs
DataEditorX/DataEditForm.cs
+4
-0
DataEditorX/DataEditorX.csproj
DataEditorX/DataEditorX.csproj
+4
-3
DataEditorX/Language/LMsg.cs
DataEditorX/Language/LMsg.cs
+1
-0
DataEditorX/MainForm.Designer.cs
DataEditorX/MainForm.Designer.cs
+28
-28
DataEditorX/Properties/AssemblyInfo.cs
DataEditorX/Properties/AssemblyInfo.cs
+1
-1
DataEditorX/app.config
DataEditorX/app.config
+2
-0
DataEditorX/changed.txt
DataEditorX/changed.txt
+6
-0
DataEditorX/data/language_chinese.txt
DataEditorX/data/language_chinese.txt
+2
-1
DataEditorX/data/language_english.txt
DataEditorX/data/language_english.txt
+2
-2
DataEditorX/packages.config
DataEditorX/packages.config
+3
-2
DataEditorX/readme.txt
DataEditorX/readme.txt
+2
-2
No files found.
DataEditorX/CodeEditForm.Designer.cs
View file @
b0656d5a
This diff is collapsed.
Click to expand it.
DataEditorX/CodeEditForm.cs
View file @
b0656d5a
...
...
@@ -17,6 +17,7 @@
using
System.IO
;
using
System.Text
;
using
System.Text.RegularExpressions
;
using
System.Web.Script.Serialization
;
using
System.Windows.Forms
;
using
WeifenLuo.WinFormsUI.Docking
;
...
...
@@ -420,8 +421,7 @@ void HideMenu()
void
CodeEditFormLoad
(
object
sender
,
EventArgs
e
)
{
this
.
HideMenu
();
this
.
fctb
.
OnTextChangedDelayed
(
this
.
fctb
.
Range
);
}
void
Menuitem_findClick
(
object
sender
,
EventArgs
e
)
{
...
...
@@ -680,5 +680,23 @@ private void OnDragDtop(object sender, DragEventArgs e)
(
this
.
DockPanel
.
Parent
as
MainForm
).
Open
(
file
);
}
}
private
void
menuitem_tooltipFont_Click
(
object
sender
,
EventArgs
e
)
{
FontDialog
fd
=
new
FontDialog
();
string
fontJson
=
MyConfig
.
ReadString
(
MyConfig
.
TOOLTIP_FONT
);
Font
f
=
new
Font
(
"微软雅黑"
,
10
);
JavaScriptSerializer
jss
=
new
JavaScriptSerializer
();
try
{
f
=
jss
.
Deserialize
<
Font
>(
fontJson
);
}
catch
{
}
fd
.
Font
=
f
;
if
(
fd
.
ShowDialog
()
==
DialogResult
.
OK
)
{
Common
.
XMLReader
.
Save
(
MyConfig
.
TOOLTIP_FONT
,
jss
.
Serialize
(
fd
.
Font
));
this
.
fctb
.
lbTooltip
.
Font
=
fd
.
Font
;
}
}
}
}
DataEditorX/Config/MyConfig.cs
View file @
b0656d5a
...
...
@@ -172,6 +172,10 @@ public class MyConfig : XMLReader
/// 连接标志
/// </summary>
public
const
string
TAG_MARKER
=
"link marker"
;
/// <summary>
/// 临时文件
/// </summary>
public
const
string
TOOLTIP_FONT
=
"tooltip_font"
;
#
endregion
#
region
读取内容
...
...
DataEditorX/Controls/FastColoredTextBoxEx.cs
View file @
b0656d5a
...
...
@@ -7,6 +7,7 @@
*/
using
System
;
using
System.Drawing
;
using
System.Web.Script.Serialization
;
using
System.Windows.Forms
;
namespace
FastColoredTextBoxNS
...
...
@@ -14,6 +15,7 @@ namespace FastColoredTextBoxNS
public
class
FastColoredTextBoxEx
:
FastColoredTextBox
{
public
Label
lbTooltip
;
private
Label
lbSizeController
;
Point
lastMouseCoord
;
public
FastColoredTextBoxEx
()
:
base
()
{
...
...
@@ -25,12 +27,6 @@ public FastColoredTextBoxEx() : base()
this
.
Selection
.
ColumnSelectionMode
=
true
;
this
.
InitializeComponent
();
}
public
override
void
OnTextChanged
()
{
}
public
new
event
EventHandler
<
ToolTipNeededEventArgs
>
ToolTipNeeded
;
protected
override
void
OnMouseMove
(
MouseEventArgs
e
)
{
...
...
@@ -124,31 +120,46 @@ void FctbTextChanged(object sender, TextChangedEventArgs e)
private
void
InitializeComponent
()
{
this
.
lbTooltip
=
new
Label
();
this
.
lbTooltip
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lbSizeController
=
new
System
.
Windows
.
Forms
.
Label
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
)).
BeginInit
();
this
.
SuspendLayout
();
//
// lbTooltip
//
this
.
lbTooltip
.
AutoSize
=
true
;
this
.
lbTooltip
.
BackColor
=
SystemColors
.
Desktop
;
this
.
lbTooltip
.
Font
=
new
Font
(
"微软雅黑"
,
15.75F
,
FontStyle
.
Regular
,
GraphicsUnit
.
Point
,
0
);
this
.
lbTooltip
.
ForeColor
=
SystemColors
.
Control
;
this
.
lbTooltip
.
Location
=
new
Point
(
221
,
117
);
this
.
lbTooltip
.
MaximumSize
=
new
Size
(
480
,
0
);
this
.
lbTooltip
.
BackColor
=
System
.
Drawing
.
System
Colors
.
Desktop
;
this
.
lbTooltip
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
15.75F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
0
))
);
this
.
lbTooltip
.
ForeColor
=
System
.
Drawing
.
System
Colors
.
Control
;
this
.
lbTooltip
.
Location
=
new
System
.
Drawing
.
Point
(
221
,
117
);
this
.
lbTooltip
.
MaximumSize
=
new
S
ystem
.
Drawing
.
S
ize
(
480
,
0
);
this
.
lbTooltip
.
Name
=
"lbTooltip"
;
this
.
lbTooltip
.
Size
=
new
Size
(
0
,
28
);
this
.
lbTooltip
.
Size
=
new
S
ystem
.
Drawing
.
S
ize
(
0
,
28
);
this
.
lbTooltip
.
TabIndex
=
1
;
this
.
lbTooltip
.
MouseMove
+=
new
MouseEventHandler
(
this
.
lbTooltip_MouseMove
);
this
.
lbTooltip
.
MouseMove
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
lbTooltip_MouseMove
);
//
// lbSizeController
//
this
.
lbSizeController
.
AutoSize
=
true
;
this
.
lbSizeController
.
BackColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
lbSizeController
.
ForeColor
=
System
.
Drawing
.
Color
.
Transparent
;
this
.
lbSizeController
.
Location
=
new
System
.
Drawing
.
Point
(
179
,
293
);
this
.
lbSizeController
.
Name
=
"lbSizeController"
;
this
.
lbSizeController
.
Size
=
new
System
.
Drawing
.
Size
(
136
,
16
);
this
.
lbSizeController
.
TabIndex
=
2
;
this
.
lbSizeController
.
Text
=
"lbSizeController"
;
//
// FastColoredTextBoxEx
//
this
.
AutoScrollMinSize
=
new
Size
(
27
,
14
);
this
.
BackColor
=
SystemColors
.
Control
;
this
.
AutoScrollMinSize
=
new
System
.
Drawing
.
Size
(
27
,
14
);
this
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Control
;
this
.
Controls
.
Add
(
this
.
lbSizeController
);
this
.
Controls
.
Add
(
this
.
lbTooltip
);
this
.
Name
=
"FastColoredTextBoxEx"
;
this
.
Size
=
new
Size
(
584
,
327
);
this
.
Load
+=
new
EventHandler
(
this
.
FastColoredTextBoxEx_Load
);
this
.
Size
=
new
System
.
Drawing
.
Size
(
584
,
327
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FastColoredTextBoxEx_Load
);
this
.
Scroll
+=
new
System
.
Windows
.
Forms
.
ScrollEventHandler
(
this
.
FastColoredTextBoxEx_Scroll
);
this
.
SizeChanged
+=
new
System
.
EventHandler
(
this
.
FastColoredTextBoxEx_SizeChanged
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
)).
EndInit
();
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
...
...
@@ -164,5 +175,20 @@ private void lbTooltip_MouseMove(object sender, MouseEventArgs e)
{
this
.
lbTooltip
.
Visible
=
false
;
}
private
void
ResizeWindow
()
{
lbSizeController
.
Location
=
new
Point
(
0
,
this
.
Height
);
lbSizeController
.
Text
=
"\r\n\r\n"
;
}
private
void
FastColoredTextBoxEx_SizeChanged
(
object
sender
,
EventArgs
e
)
{
lbTooltip
.
Visible
=
false
;
this
.
ResizeWindow
();
}
private
void
FastColoredTextBoxEx_Scroll
(
object
sender
,
ScrollEventArgs
e
)
{
this
.
ResizeWindow
();
}
}
}
DataEditorX/Core/CardEdit.cs
View file @
b0656d5a
...
...
@@ -34,7 +34,7 @@ public AddCommand(CardEdit cardedit)
this
.
dataform
=
cardedit
.
dataform
;
}
public
bool
Excute
(
params
object
[]
args
)
public
bool
Ex
e
cute
(
params
object
[]
args
)
{
if
(!
this
.
dataform
.
CheckOpen
())
{
...
...
@@ -95,7 +95,7 @@ public ModCommand(CardEdit cardedit)
this
.
dataform
=
cardedit
.
dataform
;
}
public
bool
Excute
(
params
object
[]
args
)
public
bool
Ex
e
cute
(
params
object
[]
args
)
{
if
(!
this
.
dataform
.
CheckOpen
())
{
...
...
@@ -211,7 +211,7 @@ public DelCommand(CardEdit cardedit)
this
.
dataform
=
cardedit
.
dataform
;
}
public
bool
Excute
(
params
object
[]
args
)
public
bool
Ex
e
cute
(
params
object
[]
args
)
{
if
(!
this
.
dataform
.
CheckOpen
())
{
...
...
@@ -362,7 +362,7 @@ public CopyCommand(CardEdit cardedit)
this
.
dataform
=
cardedit
.
dataform
;
}
public
bool
Excute
(
params
object
[]
args
)
public
bool
Ex
e
cute
(
params
object
[]
args
)
{
if
(!
this
.
dataform
.
CheckOpen
())
{
...
...
DataEditorX/Core/CommandManager.cs
View file @
b0656d5a
...
...
@@ -6,7 +6,7 @@ namespace DataEditorX.Core
public
delegate
void
StatusBool
(
bool
val
);
public
interface
ICommand
:
ICloneable
{
bool
Excute
(
params
object
[]
args
);
bool
Ex
e
cute
(
params
object
[]
args
);
}
public
interface
IBackableCommand
:
ICommand
{
...
...
@@ -46,7 +46,7 @@ private void CommandManager_ReverseUndoStateChanged(bool val)
#
region
ICommandManager
成员
public
void
ExcuteCommand
(
ICommand
command
,
params
object
[]
args
)
{
if
(!
command
.
Excute
(
args
))
if
(!
command
.
Ex
e
cute
(
args
))
{
return
;
}
...
...
@@ -88,7 +88,7 @@ public void ReverseUndo()
return
;
}
command
.
Excute
();
command
.
Ex
e
cute
();
this
.
undoStack
.
Push
((
ICommand
)
command
.
Clone
());
UndoStateChanged
(
this
.
undoStack
.
Count
>
0
);
...
...
DataEditorX/DataEditForm.cs
View file @
b0656d5a
...
...
@@ -964,6 +964,10 @@ void Btn_delClick(object sender, EventArgs e)
//撤销
void
Btn_undoClick
(
object
sender
,
EventArgs
e
)
{
if
(!
MyMsg
.
Question
(
LMSG
.
UndoConfirm
))
{
return
;
}
if
(
this
.
cardedit
!=
null
)
{
this
.
cmdManager
.
Undo
();
...
...
DataEditorX/DataEditorX.csproj
View file @
b0656d5a
...
...
@@ -75,7 +75,7 @@
<Reference
Include=
"System.configuration"
/>
<Reference
Include=
"System.Data"
/>
<Reference
Include=
"System.Data.SQLite, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"
>
<HintPath>
..\packages\S
ystem.Data.SQLite.Core
.1.0.113.1\lib\net46\System.Data.SQLite.dll
</HintPath>
<HintPath>
..\packages\S
tub.System.Data.SQLite.Core.NetFramework
.1.0.113.1\lib\net46\System.Data.SQLite.dll
</HintPath>
</Reference>
<Reference
Include=
"System.Data.SQLite.EF6, Version=1.0.113.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL"
>
<HintPath>
..\packages\System.Data.SQLite.EF6.1.0.113.0\lib\net46\System.Data.SQLite.EF6.dll
</HintPath>
...
...
@@ -84,6 +84,7 @@
<HintPath>
..\packages\System.Data.SQLite.Linq.1.0.113.0\lib\net46\System.Data.SQLite.Linq.dll
</HintPath>
</Reference>
<Reference
Include=
"System.Drawing"
/>
<Reference
Include=
"System.Web.Extensions"
/>
<Reference
Include=
"System.Windows.Forms"
/>
<Reference
Include=
"System.Xaml"
/>
<Reference
Include=
"System.Xml"
/>
...
...
@@ -313,10 +314,10 @@
<PropertyGroup>
<ErrorText>
这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。
</ErrorText>
</PropertyGroup>
<Error
Condition=
"!Exists('..\packages\System.Data.SQLite.Core.1.0.113.1\build\net46\System.Data.SQLite.Core.targets')"
Text=
"$([System.String]::Format('$(ErrorText)', '..\packages\System.Data.SQLite.Core.1.0.113.1\build\net46\System.Data.SQLite.Core.targets'))"
/>
<Error
Condition=
"!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')"
Text=
"$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))"
/>
<Error
Condition=
"!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')"
Text=
"$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))"
/>
<Error
Condition=
"!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.1\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')"
Text=
"$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.1\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))"
/>
</Target>
<Import
Project=
"..\packages\System.Data.SQLite.Core.1.0.113.1\build\net46\System.Data.SQLite.Core.targets"
Condition=
"Exists('..\packages\System.Data.SQLite.Core.1.0.113.1\build\net46\System.Data.SQLite.Core.targets')"
/>
<Import
Project=
"..\packages\EntityFramework.6.4.4\build\EntityFramework.targets"
Condition=
"Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')"
/>
<Import
Project=
"..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.1\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets"
Condition=
"Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.113.1\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')"
/>
</Project>
\ No newline at end of file
DataEditorX/Language/LMsg.cs
View file @
b0656d5a
...
...
@@ -95,6 +95,7 @@ public enum LMSG : uint
exportMseImagesErr
=
0x4b
,
syntaxCheckPassed
=
0x4c
,
IfOpenLotsOfFile
=
0x4d
,
UndoConfirm
=
0x4e
,
COUNT
,
}
}
DataEditorX/MainForm.Designer.cs
View file @
b0656d5a
This diff is collapsed.
Click to expand it.
DataEditorX/Properties/AssemblyInfo.cs
View file @
b0656d5a
...
...
@@ -27,4 +27,4 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[
assembly
:
AssemblyVersion
(
"3.0.0.
6
"
)]
[
assembly
:
AssemblyVersion
(
"3.0.0.
7
"
)]
DataEditorX/app.config
View file @
b0656d5a
...
...
@@ -32,6 +32,8 @@
<
add
key
=
"opera_with_cards_file"
value
=
"true"
/>
<!--
open
file
in
this
.
such
as
lua
-->
<
add
key
=
"open_file_in_this"
value
=
"true"
/>
<!--
open
file
in
this
.
such
as
lua
-->
<
add
key
=
"tooltip_font"
value
=
""
/>
<!--
check
update
when
opening
application
automatically
-->
<
add
key
=
"auto_check_update"
value
=
"true"
/>
<!--
add
require
automatically
-->
...
...
DataEditorX/changed.txt
View file @
b0656d5a
★更新历史
3.0.0.7
对于 YGOPro 的更新,增加了「简体中文」卡片允许类型。
3.0.0.6
你现在可以在选项菜单中调整函数提示的字体及其大小了。
现在当滚动到文本末尾时,仍然可以继续向下滚动。
【撤销】按钮现在需要确认后才进行。
3.0.0.5
修正连接标记无法修改的bug
3.0.0.4
修正不显示连接标记的bug
...
...
DataEditorX/data/language_chinese.txt
View file @
b0656d5a
...
...
@@ -5,6 +5,7 @@ CodeEditForm.mainMenu.menuitem_save 保存
CodeEditForm.mainMenu.menuitem_saveas 另存为
CodeEditForm.mainMenu.menuitem_quit 退出
CodeEditForm.mainMenu.menuitem_setting 选项(&S)
CodeEditForm.mainMenu.menuitem_tooltipFont 设置函数提示字体
CodeEditForm.mainMenu.menuitem_showmap 显示/隐藏结构图
CodeEditForm.mainMenu.menuitem_showinput 显示/隐藏输入框
CodeEditForm.mainMenu.menuitem_find 查找
...
...
@@ -173,4 +174,4 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
0x4b 从MSE存档导出图片失败。
0x4c 测试完成,没有发现语法错误。
0x4d 一次性打开大量文件将导致卡顿,是否继续?
0x4e 下载完成,即将重新启动程序以完成更新。
\ No newline at end of file
0x4e 确定要进行撤销吗?所有未保存的内容都将丢失。
\ No newline at end of file
DataEditorX/data/language_english.txt
View file @
b0656d5a
#
#
CodeEditForm.mainMenu.menuitem_file File(&F)
CodeEditForm.mainMenu.menuitem_open Open
CodeEditForm.mainMenu.menuitem_save Save
...
...
@@ -169,4 +169,4 @@ MainForm.mainMenu.menuitem_closeall Close All
0x4b Failed to export MSE-set to images fail.
0x4c No syntax error found.
0x4d It is not recommended to open lots of file at a time. Continue?
0x4e Download completed; the application will be restarted.
\ No newline at end of file
0x4e Are you sure to undo? All unsaved contents will be lost.
\ No newline at end of file
DataEditorX/packages.config
View file @
b0656d5a
...
...
@@ -7,8 +7,9 @@
<
package
id
=
"Microsoft.CSharp"
version
=
"4.7.0"
targetFramework
=
"net46"
/>
<
package
id
=
"NeoLua"
version
=
"1.3.11"
targetFramework
=
"net46"
/>
<
package
id
=
"Newtonsoft.Json"
version
=
"12.0.3"
targetFramework
=
"net46"
/>
<
package
id
=
"System.Data.SQLite"
version
=
"1.0.113.1"
targetFramework
=
"net46"
/>
<
package
id
=
"System.Data.SQLite.Core"
version
=
"1.0.113.1"
targetFramework
=
"net46"
/>
<
package
id
=
"Stub.System.Data.SQLite.Core.NetFramework"
version
=
"1.0.113.1"
targetFramework
=
"net46"
/>
<
package
id
=
"System.Data.SQLite"
version
=
"1.0.113.3"
targetFramework
=
"net46"
/>
<
package
id
=
"System.Data.SQLite.Core"
version
=
"1.0.113.3"
targetFramework
=
"net46"
/>
<
package
id
=
"System.Data.SQLite.EF6"
version
=
"1.0.113.0"
targetFramework
=
"net46"
/>
<
package
id
=
"System.Data.SQLite.Linq"
version
=
"1.0.113.0"
targetFramework
=
"net46"
/>
</
packages
>
\ No newline at end of file
DataEditorX/readme.txt
View file @
b0656d5a
[DataEditorX]3.0.0.
6
[DataEditorX]
[URL]https://cdn01.moecube.com/DataEditorX/releases/DataEditorX-3.0.0.
4
.zip[URL]
[DataEditorX]3.0.0.
7
[DataEditorX]
[URL]https://cdn01.moecube.com/DataEditorX/releases/DataEditorX-3.0.0.
7
.zip[URL]
★运行环境(Environment)
本程序基于.Net framework 4.6开发
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment