zhao
2021-07-02 23ee356c6f260ecc1a48bbb8bd60932b979e4698
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/* ====================================================================
   Licensed to the Apache Software Foundation (ASF) under one or more
   contributor license agreements.  See the NOTICE file distributed with
   this work for Additional information regarding copyright ownership.
   The ASF licenses this file to You under the Apache License, Version 2.0
   (the "License"); you may not use this file except in compliance with
   the License.  You may obtain a copy of the License at
 
       http://www.apache.org/licenses/LICENSE-2.0
 
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
==================================================================== */
namespace HH.WMS.Utils.NPOI.SS.UserModel
{
    using System;
 
    using HH.WMS.Utils.NPOI.SS.Util;
    /**
         * Error style constants for error box
         */
    public static class ERRORSTYLE
    {
        /** STOP style */
        public const int STOP = 0x00;
        /** WARNING style */
        public const int WARNING = 0x01;
        /** INFO style */
        public const int INFO = 0x02;
    }
 
    public interface IDataValidation
    {
        IDataValidationConstraint ValidationConstraint { get; }
 
        /// <summary>
        /// get or set the error style for error box
        /// </summary>
        int ErrorStyle { get; set; }
        /// <summary>
        /// Setting this allows an empty object as a valid value. Retrieve the settings for empty cells allowed.
        /// @return True if this object should treats empty as valid value , false otherwise
        /// </summary>
        /// <value><c>true</c> if this object should treats empty as valid value, <c>false</c>  otherwise</value>
        bool EmptyCellAllowed { get; set; }
        /// <summary>
        /// Useful for list validation objects .
        /// Useful only list validation objects . This method always returns false if the object isn't a list validation object
        /// </summary>
        bool SuppressDropDownArrow { get; set; }
        /*
         * Useful for list validation objects .
         * 
         * @param suppress
         *            True if a list should display the values into a drop down list ,
         *            false otherwise . In other words , if a list should display
         *            the arrow sign on its right side
         */
        //void SetSuppressDropDownArrow(bool suppress);
 
        /*
         * Useful only list validation objects . This method always returns false if
         * the object isn't a list validation object
         * 
         * @return <c>true</c> if a list should display the values into a drop down list ,
         *         <c>false</c> otherwise .
         */
        //bool GetSuppressDropDownArrow();
 
        /**
         * Sets the behaviour when a cell which belongs to this object is selected
         * 
         * <value><c>true</c> if an prompt box should be displayed , <c>false</c> otherwise</value>
         */
        bool ShowPromptBox { get; set; }
        //void SetShowPromptBox(bool Show);
 
        /*
         * @return <c>true</c> if an prompt box should be displayed , <c>false</c> otherwise
         */
        //bool GetShowPromptBox();
 
        /**
         * Sets the behaviour when an invalid value is entered
         * 
         * <value><c>true</c> if an error box should be displayed , <c>false</c> otherwise</value>
         */
        bool ShowErrorBox { get; set; }
        //void SetShowErrorBox(bool Show);
 
        /*
         * @return <c>true</c> if an error box should be displayed , <c>false</c> otherwise
         */
        //bool GetShowErrorBox();
 
        /**
         * Sets the title and text for the prompt box . Prompt box is displayed when
         * the user selects a cell which belongs to this validation object . In
         * order for a prompt box to be displayed you should also use method
         * SetShowPromptBox( bool show )
         * 
         * @param title The prompt box's title
         * @param text The prompt box's text
         */
        void CreatePromptBox(String title, String text);
        /**
         * @return Prompt box's title or <code>null</code>
         */
        String PromptBoxTitle { get; }
        
        /**
         * @return Prompt box's text or <code>null</code>
         */
        String PromptBoxText { get; }
 
        /**
         * Sets the title and text for the error box . Error box is displayed when
         * the user enters an invalid value int o a cell which belongs to this
         * validation object . In order for an error box to be displayed you should
         * also use method SetShowErrorBox( bool show )
         * 
         * @param title The error box's title
         * @param text The error box's text
         */
        void CreateErrorBox(String title, String text);
 
        /**
         * @return Error box's title or <code>null</code>
         */
 
        String ErrorBoxTitle { get; }
 
        /**
         * @return Error box's text or <code>null</code>
         */
        String ErrorBoxText { get; }
 
        CellRangeAddressList Regions { get; }
 
    }
 
}