From 180e8828224821143dd476a1b9f2888a7e3b400c Mon Sep 17 00:00:00 2001 From: Behrend Cornelius Date: Wed, 12 Dec 2001 11:50:15 +0000 Subject: [PATCH] #95295# Coordinates of graphic now with Corrfactor --- wizards/source/schedule/CalendarMain.xba | 2 ++ wizards/source/schedule/DlgCalendar.xdl | 2 +- wizards/source/schedule/DlgControl.xba | 7 ++++--- wizards/source/schedule/GermanHolidays.xba | 16 ++++++++-------- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/wizards/source/schedule/CalendarMain.xba b/wizards/source/schedule/CalendarMain.xba index 764cc41721a7..80d57713e570 100644 --- a/wizards/source/schedule/CalendarMain.xba +++ b/wizards/source/schedule/CalendarMain.xba @@ -111,6 +111,8 @@ Dim iThisMonth as Integer DlgCalendar.GetControl("lstHolidays").SelectItemPos(0,True) DlgCalModel.cmdGoOn.DefaultButton = True ToggleWindow(True) + fHeightCorrFactor = DlgCalendar.GetControl("imgCountry").Size.Height/198 + fWidthCorrFactor = DlgCalendar.GetControl("imgCountry").Size.Width/166 DlgCalendar.Execute() DlgCalendar.Dispose() Exit Sub diff --git a/wizards/source/schedule/DlgCalendar.xdl b/wizards/source/schedule/DlgCalendar.xdl index 9817ad87e454..2c9d3156ddc8 100644 --- a/wizards/source/schedule/DlgCalendar.xdl +++ b/wizards/source/schedule/DlgCalendar.xdl @@ -2,7 +2,7 @@ - + diff --git a/wizards/source/schedule/DlgControl.xba b/wizards/source/schedule/DlgControl.xba index c8fea5450def..20c7c4964696 100644 --- a/wizards/source/schedule/DlgControl.xba +++ b/wizards/source/schedule/DlgControl.xba @@ -4,6 +4,9 @@ Dim CalBitmap As Object Public bSelectByMouseMove as Boolean +Public fHeightCorrFactor as Double +Public fWidthCorrFactor as Double + ' Todo: Adjustmentlistener an der Scrollbar anmelden @@ -56,7 +59,7 @@ Dim ListIndex as Integer Case cLANGUAGE_GERMAN If bSelectByMouseMove Then ' oStatusLine.SetText("Position: " & aEvent.X & " ; " & aEvent.Y) - ListIndex = CalGetGermanLandAtMousePos(aEvent.X, aEvent.Y, Land$) + ListIndex = CalGetGermanLandAtMousePos(CInt(aEvent.X/fWidthCorrFactor), CInt(aEvent.Y/fHeightCorrFactor), Land$) DlgCalendar.GetControl("lstHolidays").SelectItemPos(ListIndex, True) End If End Select @@ -88,8 +91,6 @@ Dim NullList() as String .txtEvent.Text = "" .txtOwnEventDay.SetPropertyToDefault("Value") .cmdInsert.Enabled = False -' Todo: Wie kriegt man den Focus auf dieses verdammte Control? -' .txtEvent.DefaultButton = True End With DlgCalendar.GetControl("lstOwnEventMonth").SelectItemPos(0,True) CurOwnMonth = 1 diff --git a/wizards/source/schedule/GermanHolidays.xba b/wizards/source/schedule/GermanHolidays.xba index eff2cf33da17..14003c19ffe8 100644 --- a/wizards/source/schedule/GermanHolidays.xba +++ b/wizards/source/schedule/GermanHolidays.xba @@ -29,22 +29,22 @@ Function CalGetGermanLandAtMousePos(byval X as single, byval Y as single) as Int ElseIf (X>=78)And(X<112)And(Y>=95)And(Y<117) Then CalChoosenLand = CalBLThueringen - ElseIf (X>=112)And(X<155)And(Y>=88)And(Y<114) Then + ElseIf (X>=112)And(X<158)And(Y>=88)And(Y<114) Then CalChoosenLand = CalBLSachsen - ElseIf (X>76)And(X<80)And(Y>35)And(Y<42) Then + ElseIf (X>77)And(X<84)And(Y>35)And(Y<42) Then CalChoosenLand = CalBLHamburg - ElseIf (X>55)And(X<59)And(Y>36)And(Y<41) Then + ElseIf (X>56)And(X<60)And(Y>36)And(Y<41) Then CalChoosenLand = CalBLBremen - ElseIf (X>57)And(X<62)And(Y>44)And(Y<52) Then + ElseIf (X>58)And(X<63)And(Y>44)And(Y<52) Then CalChoosenLand = CalBLBremen ElseIf (X>52)And(X<95)And(Y>8)And(Y<40) Then CalChoosenLand = CalBLSchlHolstein - ElseIf (X>90)And(X<146)And(Y>23)And(Y<48) Then + ElseIf (X>90)And(X<149)And(Y>23)And(Y<48) Then CalChoosenLand = CalBLMeckPomm ElseIf (X>28)And(X<90)And(Y>35)And(Y<69) Then @@ -53,13 +53,13 @@ Function CalGetGermanLandAtMousePos(byval X as single, byval Y as single) as Int ElseIf (X>60)And(X<90)And(Y>=69)And(Y<95) Then CalChoosenLand = CalBLNiedersachsen - ElseIf (X>=90)And(X<=112)And(Y>47)And(Y<95) Then + ElseIf (X>=90)And(X<=115)And(Y>47)And(Y<95) Then CalChoosenLand = CalBLSachsenAnhalt - ElseIf (X>127)And(X<135)And(Y>60)And(Y<66) Then + ElseIf (X>129)And(X<139)And(Y>60)And(Y<66) Then CalChoosenLand = CalBLBerlin - ElseIf (X>112)And(X<146)And(Y>=48)And(Y<88) Then + ElseIf (X>115)And(X<151)And(Y>=48)And(Y<88) Then CalChoosenLand = CalBLBrandenburg End If CalGetGermanLandAtMousePos = CalChoosenLand