chr
2024-10-09 1f645778ae80a3a8801b8bb4d0fcf8feb244ad43
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
using PdmSwPlugin.Common.Entity;
using SolidWorks.Interop.sldworks;
using System;
 
namespace PdmSwPlugin.PriceCheck.Model
{
    public class ModelProperty : NotifyBase
    {
        public ModelDoc2 Doc { get; set; }
        public event Action Changed;
 
        private string _name;
        public string name
        {
            get => _name;
            set => RaiseAndSetIfChanged(ref _name, value);
        }
 
        private string _type;
        public string type
        {
            get => _type;
            set => RaiseAndSetIfChanged(ref _type, value);
        }
 
        private string _stuffType;
        public string stuffType
        {
            get => _stuffType;
            set => RaiseAndSetIfChanged(ref _stuffType, value);
        }
 
        private string _surfaceType;
        public string surfaceType
        {
            get => _surfaceType;
            set => RaiseAndSetIfChanged(ref _surfaceType, value);
        }
 
        private string _heatType;
        public string heatType
        {
            get => _heatType;
            set => RaiseAndSetIfChanged(ref _heatType, value);
        }
 
        private double _length;
        public double length
        {
            get => _length;
            set
            {
                RaiseAndSetIfChanged(ref _length, value);
                RaiseAndSetIfChanged(ref _lengthStr, value.ToString());
            }
        }
        private string _lengthStr;
        public string lengthStr
        {
            get => _lengthStr;
            set
            {
                double.TryParse(value, out double temp);
                RaiseAndSetIfChanged(ref _length, temp);
                RaiseAndSetIfChanged(ref _lengthStr, temp.ToString());
                Changed?.Invoke();
            }
        }
 
        private double _width;
        public double width
        {
            get => _width;
            set
            {
                RaiseAndSetIfChanged(ref _width, value);
                RaiseAndSetIfChanged(ref _widthStr, value.ToString());
            }
        }
        private string _widthStr;
        public string widthStr
        {
            get => _widthStr;
            set
            {
                double.TryParse(value, out double temp);
                RaiseAndSetIfChanged(ref _width, temp);
                RaiseAndSetIfChanged(ref _widthStr, temp.ToString());
                Changed?.Invoke();
            }
        }
 
 
        private double _height;
        public double height
        {
            get => _height;
            set
            {
                RaiseAndSetIfChanged(ref _height, value);
                RaiseAndSetIfChanged(ref _heightStr, value.ToString());
            }
        }
        private string _heightStr;
        public string heightStr
        {
            get => _heightStr;
            set
            {
                double.TryParse(value, out double temp);
                RaiseAndSetIfChanged(ref _height, temp);
                RaiseAndSetIfChanged(ref _heightStr, temp.ToString());
                Changed?.Invoke();
            }
        }
 
        private double _thickness;
        public double thickness
        {
            get => _thickness;
            set => RaiseAndSetIfChanged(ref _thickness, value);
        }
 
        /// <summary>
        /// solidwork给出的面积
        /// </summary>
        private double _area;
        public double area
        {
            get => _area;
            set => RaiseAndSetIfChanged(ref _area, value);
        }
 
        /// <summary>
        /// 核价时实际计算的面积
        /// </summary>
        private double _currentArea;
        public double currentArea
        {
            get => _currentArea;
            set => RaiseAndSetIfChanged(ref _currentArea, value);
        }
 
        /// <summary>
        /// solidwork给出的体积
        /// </summary>
        private double _volume;
        public double volume
        {
            get => _volume;
            set => RaiseAndSetIfChanged(ref _volume, value);
        }
 
        /// <summary>
        /// 实际核价时计算的体积
        /// </summary>
        private double _currentVolume;
        public double currentVolume
        {
            get => _currentVolume;
            set => RaiseAndSetIfChanged(ref _currentVolume, value);
        }
 
        private double _density;
        public double density
        {
            get => _density;
            set => RaiseAndSetIfChanged(ref _density, value);
        }
 
        private double _weight;
        public double weight
        {
            get => _weight;
            set => RaiseAndSetIfChanged(ref _weight, value);
        }
 
        /// <summary>
        /// 材料单价
        /// </summary>
        private double _stuffUnitPrice;
        public double stuffUnitPrice
        {
            get => _stuffUnitPrice;
            set => RaiseAndSetIfChanged(ref _stuffUnitPrice, value);
        }
 
        /// <summary>
        /// 材料费
        /// </summary>
        private double _stuffPrice;
        public double stuffPrice
        {
            get => _stuffPrice;
            set => RaiseAndSetIfChanged(ref _stuffPrice, value);
        }
 
        /// <summary>
        /// 表处理单价
        /// </summary>
        private double _surfaceUnitPrice;
        public double surfaceUnitPrice
        {
            get => _surfaceUnitPrice;
            set => RaiseAndSetIfChanged(ref _surfaceUnitPrice, value);
        }
 
        /// <summary>
        /// 表处理费
        /// </summary>
        private double _surfacePrice;
        public double surfacePrice
        {
            get => _surfacePrice;
            set => RaiseAndSetIfChanged(ref _surfacePrice, value);
        }
 
        /// <summary>
        /// 材料单价
        /// </summary>
        private double _heatUnitPrice;
        public double heatUnitPrice
        {
            get => _heatUnitPrice;
            set => RaiseAndSetIfChanged(ref _heatUnitPrice, value);
        }
 
        /// <summary>
        /// 材料费
        /// </summary>
        private double _heatPrice;
        public double heatPrice
        {
            get => _heatPrice;
            set => RaiseAndSetIfChanged(ref _heatPrice, value);
        }
 
        private double _price;
        public double price
        {
            get => _price;
            set => RaiseAndSetIfChanged(ref _price, value);
        }
 
        private bool _round;
        public bool round
        {
            get => _round;
            set => RaiseAndSetIfChanged(ref _round, value);
        }
 
        public bool bj => "钣金" == type;
        public bool tb => "台板" == type;
    }
}