- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
switch (button.Tag.ToString()) {
case "Ezp":
{
if (nowLayer.OpenedFiles.Count == 0)
{
nowLayer.OpenedFiles = new List<ExemplarFile> { new ExemplarFile("") };
}
if (nowLayer.OpenedFiles[0].EdinZemleps == null)
{
nowLayer.OpenedFiles[0].EdinZemleps = new List<EdinZemlep>();
}
var strName = ":ЕЗ" + (nowLayer.OpenedFiles[0].EdinZemleps.Count + 1);
nowLayer.OpenedFiles[0].EdinZemleps.Add(new EdinZemlep(strName) { Status = StatusEnum.Образуемый });
_ezpListTreeView.Add(new EzpTreeView { NameEzp = strName, ContourList = new List<ContourTreeView>(), ParcelList = new List<PartZuTreeView>(), IsEzpVisible = true, IsSelectedEzp = false } );
_dictionaryEzpTreeViewFile.Add(_ezpListTreeView[_ezpListTreeView.Count - 1], nowLayer.OpenedFiles[0]);
_dictionaryEzpTreeViewEdinZemlep.Add(_ezpListTreeView[_ezpListTreeView.Count - 1], nowLayer.OpenedFiles[0].EdinZemleps[nowLayer.OpenedFiles[0].EdinZemleps.Count - 1]);
break;
}
case "ContourEzp":
{
indexEz = TreeViewStackPanelMain.Children.IndexOf(((button.Parent as Grid).Parent as StackPanel).Parent as Grid) - _partZuListTreeView.Count;
var strName = (nowLayer.OpenedFiles[0].EdinZemleps[indexEz].CadNum != "" ? nowLayer.OpenedFiles[0].EdinZemleps[indexEz].CadNum : nowLayer.OpenedFiles[0].EdinZemleps[indexEz].LastName) + "(" + (nowLayer.OpenedFiles[0].EdinZemleps[indexEz].Contours.Count + 1) + ")";
nowLayer.OpenedFiles[0].EdinZemleps[indexEz].AddContour(new Contour(strName) { Status = StatusEnum.Образуемый });
if (_ezpListTreeView[indexEz].ContourList == null)
{
_ezpListTreeView[indexEz].ContourList = new List<ContourTreeView>();
}
strName = nowLayer.OpenedFiles[0].EdinZemleps[indexEz].Contours.Last().Name;
_ezpListTreeView[indexEz].ContourList.Add(new ContourTreeView { NameContour = strName, IsContourVisible = true, IsSelectedContour = false } );
for (var i = 0; i < _ezpListTreeView[indexEz].ContourList.Count; i++)
{
_ezpListTreeView[indexEz].ContourList[i].NameContour = nowLayer.OpenedFiles[0].EdinZemleps[indexEz].Contours[i].Name;
}
break;
}
case "ZuEzp":
{
indexEz = TreeViewStackPanelMain.Children.IndexOf(((button.Parent as Grid).Parent as StackPanel).Parent as Grid) - _partZuListTreeView.Count;
var strName = ":ЗУ" + (nowLayer.OpenedFiles[0].EdinZemleps[indexEz].Parcels.Count + 1);
if (_ezpListTreeView[indexEz].ParcelList == null)
{
_ezpListTreeView[indexEz].ParcelList = new List<PartZuTreeView>();
}
nowLayer.OpenedFiles[0].EdinZemleps[indexEz].Parcels.Add(new Parcel(strName) { Status = StatusEnum.Образуемый });
_ezpListTreeView[indexEz].ParcelList.Add(new PartZuTreeView { NamePartZu = strName, ContourList = new List<ContourTreeView>(), PartList = new List<PartTreeView>(), IsPartZuVisible = true, IsSelectedPartZu = false });
_dictionaryPartZuTreeViewFile.Add(_ezpListTreeView[indexEz].ParcelList[_ezpListTreeView[indexEz].ParcelList.Count - 1], nowLayer.OpenedFiles[0]);
_dictionaryPartZuTreeViewParcel.Add(_ezpListTreeView[indexEz].ParcelList[_ezpListTreeView[indexEz].ParcelList.Count - 1], nowLayer.OpenedFiles[0].EdinZemleps[indexEz].Parcels[nowLayer.OpenedFiles[0].EdinZemleps[indexEz].Parcels.Count - 1]);
break;
}
case "PartZuEzp":
{
indexEz = TreeViewStackPanelMain.Children.IndexOf(((((((button.Parent as Grid).Parent as StackPanel).Parent as Grid).Parent as StackPanel).Parent as Grid).Parent as StackPanel).Parent as Grid) - _partZuListTreeView.Count;
indexZu = ((((((button.Parent as Grid).Parent as StackPanel).Parent as Grid).Parent as StackPanel).Parent as Grid).Parent as StackPanel).Children.IndexOf((((((button.Parent as Grid).Parent as StackPanel).Parent as Grid).Parent as StackPanel).Parent as Grid));
var sbPrclName = nowLayer.OpenedFiles[0].EdinZemleps[indexEz].Parcels[indexZu].LastName + "/чзу" + (nowLayer.OpenedFiles[0].EdinZemleps[indexEz].Parcels[indexZu].Subparcels.Count + 1);
nowLayer.OpenedFiles[0].EdinZemleps[indexEz].Parcels[indexZu].Subparcels.Add(new Subparcel(sbPrclName) { Status = StatusEnum.Образуемый });
if (_ezpListTreeView[indexEz].ParcelList[indexZu].PartList == null)
{
_ezpListTreeView[indexEz].ParcelList[indexZu].PartList = new List<PartTreeView>();
}
_ezpListTreeView[indexEz].ParcelList[indexZu].PartList.Add(new PartTreeView { NamePart = sbPrclName, ContourList = new List<ContourTreeView>(), IsPartVisible = true, IsSelectedPart = _ezpListTreeView[indexEz].ParcelList[indexZu].IsSelectedPartZu });
_dictionaryPartTreeViewSubparcel.Add(_ezpListTreeView[indexEz].ParcelList[indexZu].PartList[_ezpListTreeView[indexEz].ParcelList[indexZu].PartList.Count - 1], nowLayer.OpenedFiles[0].EdinZemleps[indexEz].Parcels[indexZu].Subparcels[nowLayer.OpenedFiles[0].EdinZemleps[indexEz].Parcels[indexZu].Subparcels.Count - 1]);
break;
}
nihau 27.01.2016 16:07 # +1
gost 27.01.2016 16:32 # +1
yakov_255 29.01.2016 23:52 # 0