Projektdatei korrupt, geändert, FormDesigner tastaturbefehle nach Merge rahman wieder integriert

This commit is contained in:
Developer01 2025-08-13 09:36:52 +02:00
parent 48d1e3e372
commit 330453abf1
3 changed files with 86 additions and 30 deletions

View File

@ -436,6 +436,7 @@ Partial Class frmFormDesigner
Me.Controls.Add(Me.RibbonControl1)
Me.IconOptions.Icon = CType(resources.GetObject("frmFormDesigner.IconOptions.Icon"), System.Drawing.Icon)
Me.IconOptions.SvgImage = Global.taskFLOW.My.Resources.Resources.chartdesigner1
Me.KeyPreview = True
Me.MinimizeBox = False
Me.Name = "frmFormDesigner"
Me.Ribbon = Me.RibbonControl1

View File

@ -125,6 +125,10 @@
<data name="SplitContainerDesigner.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 132</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="pnldesigner.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="pnldesigner.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
@ -134,7 +138,6 @@
<data name="pnldesigner.Size" type="System.Drawing.Size, System.Drawing">
<value>820, 455</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="pnldesigner.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
@ -142,7 +145,7 @@
<value>pnldesigner</value>
</data>
<data name="&gt;&gt;pnldesigner.Type" xml:space="preserve">
<value>DigitalData.Controls.SnapPanel.ClassSnapPanel, DigitalData.Controls.SnapPanel, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null</value>
<value>DigitalData.Controls.SnapPanel.ClassSnapPanel, DigitalData.Controls.SnapPanel, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;pnldesigner.Parent" xml:space="preserve">
<value>SplitContainerDesigner.Panel1</value>
@ -197,7 +200,7 @@
</value>
</data>
<data name="BarButtonItem1.Caption" xml:space="preserve">
<value>Control löschen</value>
<value>Control löschen (del)</value>
</data>
<data name="BarButtonItem1.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@ -221,7 +224,7 @@
</value>
</data>
<data name="BarButtonItem2.Caption" xml:space="preserve">
<value>Aktualisieren</value>
<value>Aktualisieren (F5)</value>
</data>
<data name="BarButtonItem2.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@ -333,7 +336,7 @@
<value>Linie</value>
</data>
<data name="bbtniwidth_plus.Caption" xml:space="preserve">
<value>Breiter</value>
<value>Breiter (+)</value>
</data>
<data name="bbtniwidth_plus.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@ -355,7 +358,7 @@
</value>
</data>
<data name="bbtniwidth_min.Caption" xml:space="preserve">
<value>Schmaler</value>
<value>Schmaler (-)</value>
</data>
<data name="bbtniwidth_min.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@ -377,7 +380,7 @@
</value>
</data>
<data name="bbtniheight_plus.Caption" xml:space="preserve">
<value>Größer</value>
<value>Größer (Strg und +)</value>
</data>
<data name="bbtniheight_plus.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@ -396,7 +399,7 @@
</value>
</data>
<data name="bbtniheight_min.Caption" xml:space="preserve">
<value>Kleiner</value>
<value>Kleiner (Strg und -)</value>
</data>
<data name="bbtniheight_min.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
@ -1314,10 +1317,4 @@
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>DevExpress.XtraBars.Ribbon.RibbonForm, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="RibbonPageGroup3.Text">
<value>Steuerelement</value>
</data>
<data name="rpggrp_controls.Text">
<value>Steuerelement hinzufügen</value>
</data>
</root>

View File

@ -403,25 +403,40 @@ Public Class frmFormDesigner
MsgBox("Error while loading Column Configuration: " & vbCrLf & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
Sub DeleteControl(controlName As String)
Try
Dim result As MsgBoxResult = MsgBox("Wollen Sie das Control: " & controlName & " wirklich löschen?", MsgBoxStyle.YesNo, "Bestätigung:")
Sub Control_Delete()
If CurrentControl Is Nothing = False Then
Dim result As MsgBoxResult = MsgBox("Wollen Sie das Control: " & CurrentControl.Name & " wirklich löschen?", MsgBoxStyle.YesNo, "Bestätigung:")
' wenn Speichern ja
If result = MsgBoxResult.Yes Then
Dim controlId As Integer = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetGUID(ProfileId, controlName)
If controlId > 0 Then
TBPM_CONTROL_TABLETableAdapter.DeleteColumnsByControlId(controlId)
TBPM_PROFILE_CONTROLSTableAdapter.Delete(controlId)
LoadControls()
End If
DeleteControl(CurrentControl.Name)
'pgControls.Enabled = False
pgControlsNew.Enabled = False
tslblAenderungen.Caption = $"Control {CurrentControl.Name} deleted - " + Now.ToString
CurrentControl = Nothing
RibPGCtrlheight.Enabled = False
RibPGCtrlWidth.Enabled = False
Reload_ControlNameList()
End If
End If
End Sub
Sub DeleteControl(controlName As String)
Try
Dim controlId As Integer = TBPM_PROFILE_CONTROLSTableAdapter.cmdGetGUID(ProfileId, controlName)
If controlId > 0 Then
TBPM_CONTROL_TABLETableAdapter.DeleteColumnsByControlId(controlId)
TBPM_PROFILE_CONTROLSTableAdapter.Delete(controlId)
LoadControls()
End If
Catch ex As Exception
_Logger.Error(ex)
MsgBox(ex.Message, MsgBoxStyle.Critical, "DeleteControl:")
End Try
End Sub
' +++ Public Helper Methods +++
Public Function GetCursorPosition() As Point
Return pnldesigner.PointToClient(Cursor.Position)
@ -1261,6 +1276,51 @@ Public Class frmFormDesigner
End Sub
Private Sub bbtniwidth_plus_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniwidth_plus.ItemClick
Width_Plus()
End Sub
Private Sub bbtniwidth_min_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniwidth_min.ItemClick
Width_Min()
End Sub
Private Sub bbtniheight_min_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniheight_min.ItemClick
Height_minus()
End Sub
Private Sub bbtniheight_plus_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniheight_plus.ItemClick
Height_plus()
End Sub
Private Sub frmFormDesigner_KeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown
If e.Control AndAlso (e.KeyCode = e.KeyCode.Add Or e.KeyCode = e.KeyCode.Oemplus) Then
Height_plus()
ElseIf e.Control AndAlso (e.KeyCode = e.KeyCode.Subtract Or e.KeyCode = e.KeyCode.Oemplus) Then
Height_minus()
Else
Console.WriteLine("e.keycode: " + e.KeyCode.ToString)
If e.KeyCode = e.KeyCode.Delete Then
Control_Delete()
ElseIf e.KeyCode = e.KeyCode.F5 Then
LoadControls()
tslblAenderungen.Caption = "Controls loaded - " + Now.ToString
ElseIf e.KeyCode = Keys.Escape Then
If Me.Cursor = Cursors.Cross Then
Mouse_IsPressed = False
Me.Cursor = Cursors.Default
End If
ElseIf (e.KeyCode = e.KeyCode.Add Or e.KeyCode = e.KeyCode.Oemplus) Then
Width_Plus()
ElseIf (e.KeyCode = e.KeyCode.Subtract Or e.KeyCode = e.KeyCode.Oemplus) Then
Width_Min()
End If
End If
End Sub
Sub Width_Plus()
If CurrentControl Is Nothing = False Then
CurrentControl.Size = New Size(CurrentControl.Width + 5, CurrentControl.Height)
DirectCast(pgControlsNew.SelectedObject, BaseProperties).Size = CurrentControl.Size
@ -1269,8 +1329,7 @@ Public Class frmFormDesigner
UpdateSingleValue("WIDTH", CurrentControl.Size.Width)
End If
End Sub
Private Sub bbtniwidth_min_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniwidth_min.ItemClick
Sub Width_Min()
If CurrentControl Is Nothing = False Then
Dim newWidth = CurrentControl.Width - 5
' Verhindert, dass das Control unsichtbar wird
@ -1285,7 +1344,7 @@ Public Class frmFormDesigner
End If
End Sub
Private Sub bbtniheight_min_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniheight_min.ItemClick
Sub Height_minus()
If CurrentControl Is Nothing = False Then
Dim newHeight As Integer = CurrentControl.Height - 5
@ -1307,7 +1366,7 @@ Public Class frmFormDesigner
End If
End Sub
Private Sub bbtniheight_plus_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtniheight_plus.ItemClick
Sub Height_plus()
If CurrentControl Is Nothing = False Then
Dim newHeight As Integer = CurrentControl.Height + 5
@ -1324,5 +1383,4 @@ Public Class frmFormDesigner
End If
End Sub
End Class