개정판 72676337
Fix: ID2.Manager - 심볼의 원점과 연결점을 표시
Change-Id: I4fe2fc091ebf8115d3b741e6582b2621f6b9ad7d
ID2.Manager/ID2.Manager.Compare/Properties/AssemblyInfo.cs | ||
---|---|---|
16 | 16 |
[assembly: Guid("226ce2a3-dd88-4c99-a8e6-fac5a4d78c71")] |
17 | 17 | |
18 | 18 |
// [assembly: AssemblyVersion("1.0.*")] |
19 |
[assembly: AssemblyVersion("20.23.10.11")]
|
|
20 |
[assembly: AssemblyFileVersion("20.23.10.11")]
|
|
19 |
[assembly: AssemblyVersion("20.23.11.27")]
|
|
20 |
[assembly: AssemblyFileVersion("20.23.11.27")]
|
|
21 | 21 |
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "Log.config", Watch = true)] |
ID2.Manager/ID2.Manager.Dapper/Repository/DocumentRepository.cs | ||
---|---|---|
818 | 818 |
/// <returns></returns> |
819 | 819 |
public IEnumerable<ID2Symbol> FindID2Symbols(string Name) |
820 | 820 |
{ |
821 |
string query = $@"select Name, T.[Type], OriginalPoint, ConnectionPoint |
|
821 |
string query = $@"select Name, T.[Type], OriginalPoint, ConnectionPoint, Width, Height
|
|
822 | 822 |
from Symbol A join SymbolType T on A.SymbolType_UID=T.UID where A.Name like @Name"; |
823 | 823 |
return Query<ID2Symbol>(query, new { Name = $"%{Name}%" }); |
824 | 824 |
} |
ID2.Manager/ID2.Manager.Data/Models/Documents.cs | ||
---|---|---|
492 | 492 |
[Browsable(false)] |
493 | 493 |
[ReadOnly(true)] |
494 | 494 |
public string ConnectionPoint { get; set; } |
495 | ||
496 |
[ReadOnly(true)] |
|
497 |
public int Width{ get; set; } |
|
498 | ||
499 |
[ReadOnly(true)] |
|
500 |
public int Height{ get; set; } |
|
495 | 501 |
} |
496 | 502 | |
497 | 503 |
public class DocumentsResult |
ID2.Manager/ID2.Manager/Classes/ID2SymbolWorker.cs | ||
---|---|---|
73 | 73 |
{ |
74 | 74 |
foreach(var prj in _Projects) |
75 | 75 |
{ |
76 |
#region 찾을 심볼이 없는 프로젝트는 건너뛴다. |
|
76 | 77 |
var registered = _Registered.Where(x => x.PrjName.Equals(prj.Name)).ToList(); |
77 | 78 |
if (!registered.Any()) continue; |
79 |
#endregion |
|
78 | 80 | |
79 | 81 |
string Folder = System.IO.Path.Combine(prj.Path, "Temp"); |
80 | 82 |
var files = System.IO.Directory.GetFiles(Folder, "*.xml"); |
... | ... | |
108 | 110 | |
109 | 111 |
Used.Add(registered[idx]); |
110 | 112 |
registered.RemoveAt(idx); |
111 | ||
112 | ||
113 | 113 |
} |
114 | 114 |
} |
115 | 115 |
} |
116 | 116 | |
117 |
///찾을 심볼이 없으면 루프를 중단한다. |
|
117 | 118 |
if (!registered.Any()) break; |
118 | 119 |
} |
119 | 120 |
} |
ID2.Manager/ID2.Manager/Main.cs | ||
---|---|---|
191 | 191 |
/// </summary> |
192 | 192 |
private void Classify_UpdateDocumentsEvent() |
193 | 193 |
{ |
194 |
var rows = this.radGridViewDocuments.TableElement.VisualRows.Where(x => x is GridDataRowElement).ToList(); |
|
195 |
var docs = rows.ConvertAll(x => x.RowInfo.DataBoundItem as Documents); |
|
194 |
var docs = ((GridDataView)radGridViewDocuments.MasterTemplate.DataView).Indexer.Items.Select(x => x.DataBoundItem as Documents).ToList(); |
|
196 | 195 |
var classify = this.LayoutValidation.Controls[0] as Classify; |
197 | 196 |
classify.DocumentListBinding(docs); |
198 | 197 |
} |
... | ... | |
676 | 675 |
private void SearchSymbols(string SymbolName) |
677 | 676 |
{ |
678 | 677 |
var AllSymbols = new List<ID2Symbol>(); |
679 |
var id2prjs = informations.FindID2ProjectList(informations.ActiveProject.ProjectID); |
|
678 |
var id2prjs = informations.FindID2ProjectList(informations.ActiveProject.ProjectID).Where(x => |
|
679 |
!string.IsNullOrEmpty(x.Host) && !string.IsNullOrEmpty(x.User) && !string.IsNullOrEmpty(x.Password)).ToList(); |
|
680 | 680 |
foreach (var id2prj in id2prjs) |
681 | 681 |
{ |
682 |
var symbols = new DocumentController(id2prj).FindID2Symbols(SymbolName); |
|
683 |
symbols.ForAll(x => |
|
682 |
try |
|
684 | 683 |
{ |
685 |
x.PrjName = id2prj.Name; |
|
686 |
x.PrjPath = id2prj.Path; |
|
687 |
}); |
|
688 |
AllSymbols.AddRange(symbols); |
|
684 |
var symbols = new DocumentController(id2prj).FindID2Symbols(SymbolName); |
|
685 |
symbols.ForAll(x => |
|
686 |
{ |
|
687 |
x.PrjName = id2prj.Name; |
|
688 |
x.PrjPath = id2prj.Path; |
|
689 |
}); |
|
690 |
AllSymbols.AddRange(symbols); |
|
691 |
} |
|
692 |
catch (Exception ex) |
|
693 |
{ |
|
694 |
RadMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, RadMessageIcon.Error); |
|
695 |
} |
|
689 | 696 |
} |
690 | 697 | |
691 | 698 |
var worker = new ID2SymbolWorker(id2prjs, AllSymbols, this.radGridViewID2Symbols); |
... | ... | |
709 | 716 |
/// <param name="e"></param> |
710 | 717 |
private void RadGridViewID2Symbols_SelectionChanged(object sender, EventArgs e) |
711 | 718 |
{ |
712 |
if (this.radGridViewID2Symbols.SelectedRows.Any()) |
|
719 |
if (this.radGridViewID2Symbols.SelectedRows.Any() && !this.designSymbol.IsBusy)
|
|
713 | 720 |
{ |
714 | 721 |
var symbol = this.radGridViewID2Symbols.SelectedRows.First().DataBoundItem as ID2Symbol; |
715 | 722 |
string DxfFilePath = Path.Combine(symbol.PrjPath, "image", symbol.Type, symbol.Name + ".dxf"); |
... | ... | |
721 | 728 |
{ |
722 | 729 |
this.designSymbol.Clear(); |
723 | 730 |
dxf.AddToScene(this.designSymbol); |
731 | ||
732 |
#region 원점과 연결점들을 표시한다. |
|
733 |
var tokens = symbol.OriginalPoint.Split(','); |
|
734 |
if (tokens.Length == 2) |
|
735 |
{ |
|
736 |
double x = Convert.ToDouble(tokens[0]); |
|
737 |
double y = symbol.Height - Convert.ToDouble(tokens[1]); |
|
738 |
var pt = new devDept.Eyeshot.Entities.Point(new devDept.Geometry.Point2D(x, y), 6) |
|
739 |
{ |
|
740 |
Color = Color.Red, |
|
741 |
ColorMethod = devDept.Eyeshot.Entities.colorMethodType.byEntity |
|
742 |
}; |
|
743 |
this.designSymbol.Entities.Add(pt); |
|
744 |
} |
|
745 | ||
746 |
tokens = symbol.ConnectionPoint.Split('/'); |
|
747 |
foreach(var token in tokens) |
|
748 |
{ |
|
749 |
var _tokens = token.Split(','); |
|
750 |
double x = Convert.ToDouble(_tokens[1]); |
|
751 |
double y = symbol.Height - Convert.ToDouble(_tokens[2]); |
|
752 |
var pt = new devDept.Eyeshot.Entities.Point(new devDept.Geometry.Point2D(x, y), 6) |
|
753 |
{ |
|
754 |
Color = Color.Blue, |
|
755 |
ColorMethod = devDept.Eyeshot.Entities.colorMethodType.byEntity |
|
756 |
}; |
|
757 |
this.designSymbol.Entities.Add(pt); |
|
758 |
} |
|
759 |
#endregion |
|
760 | ||
724 | 761 |
this.designSymbol.ZoomFit(); |
725 | 762 |
} |
726 | 763 |
}; |
내보내기 Unified diff