-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathVisualStyle.cs
1594 lines (1396 loc) · 39.8 KB
/
VisualStyle.cs
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System;
using System.Xml;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Text;
using System.Text.RegularExpressions;
using System.Runtime.InteropServices;
using DigitalPlatform;
using DigitalPlatform.Xml;
using DigitalPlatform.Text;
using DigitalPlatform.IO;
using DigitalPlatform.Drawing;
namespace DigitalPlatform.Xml
{
// 样式配置类
public class VisualCfg
{
public string strXml = "";
public string m_debugInfo = "";
public Color transparenceColor = Color.FromArgb (127,128,129);
public string strBackPicUrl = "";
public BackPicStyle backPicStyle = BackPicStyle.Fill ;
// 定义四个list
public CaseList caseList = new CaseList ();
public VisualStyleList visualStyleList = new VisualStyleList ();
public FontList fontList = new FontList ();
public BorderList borderList = new BorderList ();
// 初始化list
public void Initial()
{
caseList.cfg = this;
visualStyleList.cfg = this;
XmlDocument dom = new XmlDocument ();
dom.LoadXml (strXml);
//清空旧值
caseList.Clear ();
visualStyleList.Clear ();
fontList.Clear ();
borderList.Clear ();
XmlNode root = dom.DocumentElement ;
XmlNode nodeGlobal = root.SelectSingleNode ("//global");
string strColor = DomUtil.GetAttrDiff (nodeGlobal,"transparenceColor");
if (strColor != null && strColor != "")
{
transparenceColor = ColorUtil.String2Color (strColor);
}
string myBackPicUrl = DomUtil.GetAttrDiff (nodeGlobal,"backPicture");
if (myBackPicUrl != null
&& strColor != "")
{
strBackPicUrl = myBackPicUrl;
}
string strBackPicStyle = DomUtil.GetAttrDiff (nodeGlobal,"backPicStyle");
if (strBackPicStyle != null
&& strBackPicStyle != "")
{
backPicStyle = (BackPicStyle)(Enum.Parse (typeof(BackPicStyle),strBackPicStyle));
}
borderList.Initial (root);
fontList.Initial (root);
visualStyleList.Initial (root);
caseList.Initial (root);
visualStyleList.InitailBelongList(); //初始化belongList
//初始化后parallelNodes成员已没有用了,节省空间
visualStyleList.parallelNodes = null;
fontList.parallelNodes = null;
borderList.parallelNodes = null;
}
public VisualStyle GetVisualStyle(string strElement,
string strLevel,
string strXpath,
string strRegion)
{
ItemRegion region = ItemRegion.No;
region = (ItemRegion)Enum.Parse(typeof(ItemRegion), strRegion,true);
return caseList.GetVisualStyle(strElement,
strLevel,
strXpath,
region);
}
public VisualStyle GetVisualStyle(Item item,
ItemRegion region)
{
return caseList.GetVisualStyle(item.Name,
Convert.ToString (item.GetLevel()),
"",
region);
}
// 直接从visualStyleList里面找
public VisualStyle GetVisualStyle(string strName)
{
return visualStyleList.GetVisualStyle(strName);
}
public string Xml
{
get
{
return "";
}
set
{
strXml = value;
Initial();
}
}
//供测试用
public string ShowList(string strListName)
{
string strResult = "";
if (strListName == "case")
strResult = caseList.Dump();
else if (strListName == "visualstyle")
strResult = visualStyleList.Dump();
else if (strListName == "font")
strResult = fontList.Dump();
else if (strListName == "border")
strResult = borderList.Dump();
return strResult;
}
}
#region Case组
// CaseList //////////////////////////////////////////
public class CaseList : CollectionBase
{
public VisualCfg cfg = null; //VisualCfg指针,用于从它的visualStyleList取值
public Case this[int index]
{
get
{
return (Case)InnerList[index];
}
set
{
InnerList[index] = value;
}
}
public void Add(Case item)
{
InnerList.Add(item);
}
public void Initial(XmlNode root)
{
XmlNodeList nodeList = root.SelectNodes("//case");
for(int i=0;i<nodeList.Count ;i++)
{
Case oneCase = new Case();
oneCase.container = this;
oneCase.CreateBy (nodeList[i]);
this.Add (oneCase );
}
}
// 检查是否该对象是否包含指定的区域
bool isInRegion(ItemRegion region,Case myCase)
{
if ((region & ItemRegion.Frame) == ItemRegion.Frame)
{
if ((ItemRegion.Frame & myCase.region ) == ItemRegion.Frame)
return true;
}
if ((region & ItemRegion.Label) == ItemRegion.Label)
{
if ((ItemRegion.Label & myCase.region) == ItemRegion.Label)
return true;
}
if ((region & ItemRegion.Text ) == ItemRegion.Text )
{
if ((ItemRegion.Text & myCase.region) == ItemRegion.Text )
return true;
}
if ((region & ItemRegion.Content) == ItemRegion .Content)
{
if ((ItemRegion.Content & myCase.region) == ItemRegion.Content)
return true;
}
if ((region & ItemRegion.Comment) == ItemRegion.Comment)
{
if ((ItemRegion.Comment & myCase.region) == ItemRegion.Comment)
return true;
}
if ((region & ItemRegion.Attributes ) == ItemRegion.Attributes )
{
if ((ItemRegion.Attributes & myCase.region) == ItemRegion.Attributes )
return true;
}
if ((region & ItemRegion.ExpandAttributes )== ItemRegion.ExpandAttributes)
{
if ((ItemRegion.ExpandAttributes & myCase.region) == ItemRegion.ExpandAttributes)
return true;
}
if ((region & ItemRegion.ExpandContent) == ItemRegion.ExpandContent )
{
if ((ItemRegion.ExpandContent & myCase.region) == ItemRegion.ExpandContent)
return true;
}
if ((region & ItemRegion.BoxTotal ) == ItemRegion.BoxTotal )
{
if ((ItemRegion.BoxTotal & myCase.region) == ItemRegion.BoxTotal )
return true;
}
if ((region & ItemRegion.BoxAttributes ) == ItemRegion.BoxAttributes )
{
if ((ItemRegion.BoxAttributes & myCase.region) == ItemRegion.BoxAttributes)
return true;
}
if ((region & ItemRegion.BoxContent ) == ItemRegion.BoxContent )
{
if ((ItemRegion.BoxContent & myCase.region) == ItemRegion.BoxContent )
return true;
}
return false;
}
// 检索给定的文本与式子是否区域
// parameters:
// strText 文本字符串
// strExpression 式子
bool IsMatch(string strText,
string strExpression)
{
if (strExpression == "" || strExpression == "*")
return true;
if (strText == strExpression)
return true;
if (StringUtil.IsInList (strText,strExpression) == true)
return true;
if (RegexCompare(strText,strExpression) == true)
return true;
return false;
}
// 比较一个字符串实例是否与正则表达式匹配
public bool RegexCompare(string strInstance,string strPattern)
{
Regex r = new Regex(strPattern, RegexOptions.IgnoreCase);
System.Text.RegularExpressions.Match m = r.Match(strInstance);
if (m.Success)
return true;
else
return false;
}
public VisualStyle GetVisualStyle(string strElement,
string strLevel,
string strXpath,
ItemRegion region)
{
for(int i=0;i<this.Count ;i++)
{
Case myCase = this[i];
if (IsMatch(strElement,myCase.strElement) == true &&
IsMatch(strLevel,myCase.strLevel) == true &&
strXpath == myCase.strXpath &&
isInRegion (region,myCase) == true)
{
return myCase.Style ;
}
}
return null;
}
public string Dump()
{
string strResult = "";
foreach(Case mycase in this)
{
strResult += mycase.Dump ();
}
return strResult;
}
}
public class Case
{
public CaseList container = null;
public string strName = null;
public string strElement = null;
public string strLevel = null;
public string strXpath = null;
//public string strRegion = null;
public ItemRegion region = ItemRegion.No ;
public VisualStyle refStyle = null; //引用的
public VisualStyle innerStyle = null; //内部定义的
public Case ()
{}
public VisualStyle Style
{
get
{
if (refStyle != null)
return refStyle ;
if (innerStyle != null)
return innerStyle;
return null;
}
}
public ItemRegion SplitStr2Enum(string strList)
{
ItemRegion regionResult = ItemRegion.No ;
string[] aList;
aList = strList.Split(new char[]{','});
for(int i=0;i<aList.Length;i++)
{
if (String.Compare("frame",aList[i],true) == 0)
{
regionResult |= ItemRegion.Frame ;
}
if (String.Compare("label",aList[i],true) == 0)
{
regionResult |= ItemRegion.Label ;
}
if (String.Compare("text",aList[i],true) == 0)
{
regionResult |= ItemRegion.Text ;
}
if (String.Compare("content",aList[i],true) == 0)
{
regionResult |= ItemRegion.Content ;
}
if (String.Compare("comment",aList[i],true) == 0)
{
regionResult |= ItemRegion.Comment ;
}
if (String.Compare("attributes",aList[i],true) == 0)
{
regionResult |= ItemRegion.Attributes ;
}
if (String.Compare("expandAttributes",aList[i],true) == 0)
{
regionResult |= ItemRegion.ExpandAttributes;
}
if (String.Compare("expandContent",aList[i],true) == 0)
{
regionResult |= ItemRegion.ExpandContent;
}
if (String.Compare("boxTotal",aList[i],true) == 0)
{
regionResult |= ItemRegion.BoxTotal ;
}
if (String.Compare("boxAttributes",aList[i],true) == 0)
{
regionResult |= ItemRegion.BoxAttributes ;
}
if (String.Compare("boxContent",aList[i],true) == 0)
{
regionResult |= ItemRegion.BoxContent;
}
}
return regionResult;
}
public void CreateBy(XmlNode node)
{
strName = DomUtil.GetAttrDiff (node,"name");
strElement = DomUtil.GetAttrDiff (node,"element");
strLevel = DomUtil.GetAttrDiff (node,"level");
strXpath = DomUtil.GetAttrDiff (node,"xpath");
string strRegion = DomUtil.GetAttrDiff (node,"region");
region = SplitStr2Enum(strRegion);
string strStyleName = DomUtil.GetAttrDiff (node,"style");
if (strStyleName != null)
{
refStyle = container.cfg.visualStyleList.GetVisualStyle(strStyleName);
}
XmlNode nodeStyle = node.SelectSingleNode ("style");
//对于包含在Case里面的Style注意要新new,并加到集合里
if (nodeStyle != null)
{
innerStyle = container.cfg.visualStyleList.GetVisualStyle(nodeStyle);
}
}
public string Dump()
{
string strInfo = "\r\n";
strInfo += "strName:"+strName + "\r\n";
strInfo += "strElement:"+strElement+ "\r\n";
strInfo += "strLevel:"+strLevel+ "\r\n";
strInfo += "strXpath:"+strXpath+ "\r\n";
//strInfo += "strRegion:"+strRegion+ "\r\n";
if (refStyle != null)
strInfo += "refStyle:" + refStyle.strName + "\r\n";
else
strInfo += "refStyle:null\r\n";
if (innerStyle != null)
strInfo += "innerStyle:" + innerStyle.strName + "\r\n";
else
strInfo += "innerStyle:null\r\n";
return strInfo;
}
}
#endregion
#region VisualStyle组
//VisualStyleList ///////////////////////////////////
public class VisualStyleList : CollectionBase
{
public VisualCfg cfg = null; //指针,用于找font对象,或border对象
//用于找对象
public ArrayList parallelNodes = new ArrayList ();
public VisualStyle this[int index]
{
get
{
return (VisualStyle)InnerList[index];
}
set
{
InnerList[index] = value;
}
}
public void Add(VisualStyle item)
{
InnerList.Add(item);
}
public void Initial(XmlNode root)
{
XmlNodeList nodeList = root.SelectNodes("//style");
for(int i=0;i<nodeList.Count ;i++)
{
VisualStyle style = new VisualStyle();
style.container = this;
style.CreateBy (nodeList[i]);
this.Add (style);
if (parallelNodes == null)
parallelNodes = new ArrayList ();
parallelNodes.Add (nodeList[i]);
}
}
public VisualStyle GetVisualStyle(string strMyName)
{
foreach(VisualStyle style in this)
{
if (style.strName == strMyName)
return style;
}
return null;
}
public VisualStyle GetVisualStyle(XmlNode nodeStyle)
{
for(int i=0;i<parallelNodes .Count ;i++)
{
XmlNode node = (XmlNode)parallelNodes[i];
if (node.Equals (nodeStyle) == true)
return this[i];
}
return null;
}
public void InitailBelongList()
{
foreach(VisualStyle style in this)
{
style.InitailBelongList();
}
}
public string Dump()
{
string strInfo = "";
foreach(VisualStyle visualStyle in this)
{
strInfo += visualStyle.Dump ();
}
return strInfo;
}
}
public class VisualStyle
{
//public string strDebugInfo = ""; //处理信息
public VisualStyleList container = null;
public string strName = null;
object nTopBlank = null; //int
object nBottomBlank = null; //int
object nLeftBlank = null; //int
object nRightBlank = null; //int
object cBackColor = null; //color
object cTextColor = null;
DpFont refFont = null;
XmlBorder refBorder = null;
DpFont innerFont = null;
XmlBorder innerBorder = null;
string strBelongName = null;
ArrayList belongList = null; // 继承的风格
public VisualStyle()
{
}
public int TopBlank
{
get
{
object topBlank = GetValue(ValueStyle.TopBlank);
if (topBlank != null)
return (int)topBlank;
else
return 0 ;
}
}
public int BottomBlank
{
get
{
object bottomBlank = GetValue(ValueStyle.BottomBlank );
if (bottomBlank != null)
return (int)bottomBlank;
else
return 0 ;
}
}
public int LeftBlank
{
get
{
object leftBlank = GetValue(ValueStyle.LeftBlank );
if (leftBlank != null)
return (int)leftBlank;
else
return 0;
}
}
public int RightBlank
{
get
{
object rightBlank = GetValue(ValueStyle.RightBlank );
if (rightBlank != null)
return (int)rightBlank;
else
return 0;
}
}
public Color BackColor
{
get
{
object backColor = GetValue(ValueStyle.BackColor);
if (backColor != null)
return (Color)backColor;
else
return container.cfg .transparenceColor;//Color.Gray ;
}
}
public Color TextColor
{
get
{
object textColor = GetValue(ValueStyle.TextColor );
if (textColor != null)
return (Color)textColor;
else
return Color.Red ;
}
}
public string FontFace
{
get
{
object strFontFace = GetValue(ValueStyle.FontFace);
if (strFontFace != null)
return (string)strFontFace;
else
return "Arial";
}
}
public int FontSize
{
get
{
object fontSize = GetValue(ValueStyle.FontSize);
if (fontSize != null)
return (int)fontSize;
else
return 10;
}
}
public FontStyle FontStyle
{
get
{
object fontStyle = GetValue(ValueStyle.FontStyle);
if (fontStyle != null)
return (FontStyle)fontStyle;
else
return FontStyle.Regular;
}
}
public Font Font
{
get
{
//先用两个属性找
return (new Font (FontFace,FontSize,FontStyle));
}
}
public int TopBorderHeight
{
get
{
object vertWidth = GetValue(ValueStyle.TopBorderHeight);
if (vertWidth != null)
return (int)vertWidth;
else
return 0;
}
}
public int BottomBorderHeight
{
get
{
object bottomHeight = GetValue(ValueStyle.BottomBorderHeight);
if (bottomHeight != null)
return (int)bottomHeight;
else
return 0;
}
}
public int LeftBorderWidth
{
get
{
object leftWidth = GetValue(ValueStyle.LeftBorderWidth);
if (leftWidth != null)
return (int)leftWidth;
else
return 0;
}
}
public int RightBorderWidth
{
get
{
object rightWidth = GetValue(ValueStyle.RightBorderWidth);
if (rightWidth != null)
return (int)rightWidth;
else
return 0;
}
}
public Color BorderColor
{
get
{
object color = GetValue(ValueStyle.BorderColor);
if (color != null)
return (Color)color;
else
return Color.LightGray; // Gray
}
}
public object GetValue(ValueStyle valueStyle)
{
//strDebugInfo = ""; //先清空一下,否则会越积越多
object oResult = null;
if (valueStyle == ValueStyle.TopBlank )
{
oResult = nTopBlank;
if (oResult != null)
{
//strDebugInfo += this.strName +"的nTopBlank有具体的值为"+Convert.ToString (nTopBlank)+"\r\n" ;
goto END1;
}
//strDebugInfo += this.strName +"的nTopBlank为null,从belongList里找\r\n";
}
else if (valueStyle == ValueStyle.BottomBlank )
{
oResult = nBottomBlank;
if (oResult != null)
{
//strDebugInfo += this.strName +"的nBottomBlank有具体的值为"+Convert.ToString (nBottomBlank)+"\r\n";
goto END1;
}
//strDebugInfo += this.strName +"的nBottomBlank为null,从belongList里找\r\n";
}
else if (valueStyle == ValueStyle.LeftBlank )
{
oResult = nLeftBlank;
if (oResult != null)
{
//strDebugInfo += this.strName +"的nLeftBlank有具体的值为"+Convert.ToString (nLeftBlank)+"\r\n";
goto END1;
}
//strDebugInfo += this.strName +"的nLeftBlank为null,从belongList里找\r\n";
}
else if (valueStyle == ValueStyle.RightBlank )
{
oResult = nRightBlank;
if (oResult != null)
{
//strDebugInfo += this.strName +"的nRightBlank有具体的值为"+Convert.ToString (nRightBlank)+"\r\n";
goto END1;
}
//strDebugInfo += this.strName +"的nRightBlank为null,从belongList里找\r\n";
}
else if (valueStyle == ValueStyle.BackColor )
{
oResult = this.cBackColor;
if (oResult != null)
{
//strDebugInfo += this.strName +"的cBackColor有具体的值为"+ColorUtil.Color2String((Color)oResult)+"\r\n";
goto END1;
}
//strDebugInfo += this.strName +"的cBackColor为null,从belongList里找\r\n";
}
else if (valueStyle == ValueStyle.TextColor )
{
oResult = this.cTextColor ;
if (oResult != null)
{
//strDebugInfo += this.strName +"的cTextColor有具体的值为"+ColorUtil.Color2String ((Color)oResult)+"\r\n";
goto END1;
}
//strDebugInfo += this.strName +"的cTextColor为null,从belongList里找\r\n";
}
else if (valueStyle == ValueStyle.FontFace)
{
if (refFont != null)
{
//strDebugInfo += this.strName +"的refFont有具体的值:"+ refFont.Dump () + "\r\n";
oResult = refFont.strFace ;
if (oResult != null)
{
//strDebugInfo += "而且其中的strFace有具体的值为"+refFont.strFace + "\r\n";
goto END1;
}
//strDebugInfo += "但其中的strFace为null,所以继续找\r\n";
}
if (innerFont != null)
{
//strDebugInfo += this.strName +"的innerFont有具体的值:"+innerFont.Dump () + "\r\n";
oResult = innerFont.strFace ;
if (oResult != null)
{
//strDebugInfo += "而且其中的strFace有具体的值为"+innerFont.strFace + "\r\n";
goto END1;
}
//strDebugInfo += "但其中的strFace为null,所以继续找\r\n";
}
//strDebugInfo += this.strName +"的refFont和innerFont都没找到strFace值,从belongList里找\r\n";
}
else if (valueStyle == ValueStyle.FontSize)
{
if (refFont != null)
{
//strDebugInfo += this.strName +"的refFont有具体的值:"+refFont.Dump () + "\r\n";
oResult = refFont.nSize ;
if (oResult != null)
{
//strDebugInfo += "而且其中的nSize有具体的值为"+refFont.nSize + "\r\n";
goto END1;
}
//strDebugInfo += "但其中的nSize为null,所以继续找\r\n";
}
if (innerFont != null)
{
//strDebugInfo += this.strName +"的innerFont有具体的值:"+innerFont.Dump () + "\r\n";
oResult = innerFont.nSize ;
if (oResult != null)
{
//strDebugInfo += "而且其中的nSize有具体的值为"+innerFont.nSize + "\r\n";
goto END1;
}
//strDebugInfo += "但其中的nSize为null,所以继续找\r\n";
}
//strDebugInfo += this.strName +"的refFont和innerFont都没找到nSize值,从belongList里找\r\n";
}
else if (valueStyle == ValueStyle.FontStyle )
{
if (refFont != null)
{
//strDebugInfo += this.strName +"的refFont有具体的值:"+refFont.Dump () + "\r\n";
oResult = refFont.style;
if (oResult != null)
{
//strDebugInfo += "而且其中的nSize有具体的值为"+refFont.nSize + "\r\n";
goto END1;
}
//strDebugInfo += "但其中的nSize为null,所以继续找\r\n";
}
if (innerFont != null)
{
//strDebugInfo += this.strName +"的innerFont有具体的值:"+innerFont.Dump () + "\r\n";
oResult = innerFont.style ;
if (oResult != null)
{
//strDebugInfo += "而且其中的nSize有具体的值为"+innerFont.nSize + "\r\n";
goto END1;
}
//strDebugInfo += "但其中的nSize为null,所以继续找\r\n";
}
//strDebugInfo += this.strName +"的refFont和innerFont都没找到nSize值,从belongList里找\r\n";
}
else if (valueStyle == ValueStyle.LeftBorderWidth)
{
if (refBorder != null)
{
//strDebugInfo += this.strName +"的refBorder有具体的值:"+refBorder.Dump () + "\r\n";
oResult = refBorder.nLeftWidth;
if (oResult != null)
{
//strDebugInfo += "而且其中的nVertWidth有具体的值为"+refBorder.nVertWidth + "\r\n";
goto END1;
}
//strDebugInfo += "但其中的nVertWidth为null,所以继续找\r\n";
}
if (innerBorder != null)
{
//strDebugInfo += this.strName +"的innerBorder有具体的值:"+innerBorder.Dump () + "\r\n";
oResult = innerBorder.nLeftWidth;
if (oResult != null)
{
//strDebugInfo += "而且其中的nVertWidth有具体的值为"+innerBorder.nVertWidth + "\r\n";
goto END1;
}
//strDebugInfo += "但其中的nVertWidth为null,所以继续找\r\n";
}
//strDebugInfo += this.strName +"的refBorder和innerBorder都没找到nVertWidth值,从belongList里找\r\n";
}
else if (valueStyle == ValueStyle.RightBorderWidth)
{
if (refBorder != null)
{
//strDebugInfo += this.strName +"的refBorder有具体的值:"+refBorder.Dump () + "\r\n";
oResult = refBorder.nRightWidth;
if (oResult != null)
{
//strDebugInfo += "而且其中的nHorzHeight有具体的值为"+refBorder.nHorzHeight + "\r\n";
goto END1;
}
//strDebugInfo += "但其中的nHorzHeight为null,所以继续找\r\n";
}
if (innerBorder != null)
{
//strDebugInfo += this.strName +"的innerBorder有具体的值:"+innerBorder.Dump () + "\r\n";
oResult = innerBorder.nRightWidth;
if (oResult != null)
{
//strDebugInfo += "而且其中的nHorzHeight有具体的值为"+innerBorder.nHorzHeight + "\r\n";
goto END1;
}
//strDebugInfo += "但其中的nHorzHeight为null,所以继续找\r\n";
}
//strDebugInfo += this.strName +"的refBorder和innerBorder都没找到nHorzHeight值,从belongList里找\r\n";
}
else if (valueStyle == ValueStyle.TopBorderHeight)
{
if (refBorder != null)
{
//strDebugInfo += this.strName +"的refBorder有具体的值:"+refBorder.Dump () + "\r\n";
oResult = refBorder.nTopHeight;
if (oResult != null)
{
//strDebugInfo += "而且其中的nHorzHeight有具体的值为"+refBorder.nHorzHeight + "\r\n";
goto END1;
}
//strDebugInfo += "但其中的nHorzHeight为null,所以继续找\r\n";
}
if (innerBorder != null)
{
//strDebugInfo += this.strName +"的innerBorder有具体的值:"+innerBorder.Dump () + "\r\n";
oResult = innerBorder.nTopHeight;
if (oResult != null)
{
//strDebugInfo += "而且其中的nHorzHeight有具体的值为"+innerBorder.nHorzHeight + "\r\n";
goto END1;
}
//strDebugInfo += "但其中的nHorzHeight为null,所以继续找\r\n";
}
//strDebugInfo += this.strName +"的refBorder和innerBorder都没找到nHorzHeight值,从belongList里找\r\n";
}
else if (valueStyle == ValueStyle.BottomBorderHeight)
{
if (refBorder != null)
{
//strDebugInfo += this.strName +"的refBorder有具体的值:"+refBorder.Dump () + "\r\n";
oResult = refBorder.nBottomHeight;
if (oResult != null)
{
//strDebugInfo += "而且其中的nHorzHeight有具体的值为"+refBorder.nHorzHeight + "\r\n";
goto END1;
}
//strDebugInfo += "但其中的nHorzHeight为null,所以继续找\r\n";
}
if (innerBorder != null)
{
//strDebugInfo += this.strName +"的innerBorder有具体的值:"+innerBorder.Dump () + "\r\n";
oResult = innerBorder.nBottomHeight;
if (oResult != null)
{
//strDebugInfo += "而且其中的nHorzHeight有具体的值为"+innerBorder.nHorzHeight + "\r\n";
goto END1;