yanweiyuan3
2023-08-09 588bc7829387dfc761cc25f06f77d4c81818bd10
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Quintiq file version 2.0
#parent: #root
StaticMethod ValidateInput (
  output String feedback_o,
  String fontname,
  Number fontsize,
  Number gridpointdistance,
  Real relativespsize,
  Real relativeunitheight,
  Real relativeunitwidth,
  Real relativeproductheight,
  Real relativeproductwidth,
  Number offsetx,
  Number offsety
) declarative remote as Boolean
{
  Description: 'Validate input of the edit drawing properties dialog'
  TextBody:
  [*
    feedback_o := '';
    // FontName
    if( fontname = '' )
    {
      feedback_o := Translations::MP_SupplyChainView_ValidateInput_FontNameEmpty();
    }
    // FontSize
    else if( fontsize < 0 )
    {
      feedback_o := Translations::MP_SupplyChainView_ValidateInput_IsNegativeFontSize();
    }
    // GridPointDistamce
    else if( gridpointdistance < 0 )
    {
      feedback_o := Translations::MP_SupplyChainView_ValidateInput_IsNegativeGridPointDistance();
    }
    // RelativeStockingPintSize
    else if( relativespsize < 0 )
    {
      feedback_o := Translations::MP_SupplyChainView_ValidateInput_IsNegativeRelativeStockingPointSize();
    }
    // RelativeUnitHeight
    else if( relativeunitheight < 0 )
    {
      feedback_o := Translations::MP_SupplyChainView_ValidateInput_IsNegativeRelativeUnitHeight();
    }
    // RelativeUnitWidth
    else if( relativeunitwidth < 0 )
    {
      feedback_o := Translations::MP_SupplyChainView_ValidateInput_IsNegativeRelativeUnitWidth();
    }
    // RelativeProductHeight
    else if( relativeproductheight < 0 )
    {
      feedback_o := Translations::MP_SupplyChainView_ValidateInput_IsNegativeRelativeProductHeight();
    }
    // RelativeProductWidth
    else if( relativeproductwidth < 0 )
    {
      feedback_o := Translations::MP_SupplyChainView_ValidateInput_IsNegativeRelativeProductWidth();
    }
    // OffsetX
    else if( offsetx < 0 )
    {
      feedback_o := Translations::MP_SupplyChainView_ValidateInput_IsNegativeOffsetX();
    }
    // OffsetY
    else if( offsety < 0 )
    {
      feedback_o := Translations::MP_SupplyChainView_ValidateInput_IsNegativeOffsetY();
    }
    return feedback_o = '';
  *]
}