프로젝트

일반

사용자정보

개정판 a19bd6e2

IDa19bd6e27806d641476604c0daa9a973622b127a
상위 ad3d070a
하위 22ea043d, 4aba6868

gaqhf 이(가) 5년 이상 전에 추가함

dev issue #1231 : OPC Modeling

Change-Id: I0283118489c2f522d66495ce75a3058ad2c8ccdf

차이점 보기:

DTI_PID/APIDConverter/AutoModeling.cs
38 38

  
39 39
        System.Data.DataTable AvevaSymbolTable = null;
40 40

  
41
        private void SetConvertRule()
42
        {
43
            #region OPC Setting
44
            document.OPCs.Sort(SortOPC);
45
            int SortOPC(OPC a, OPC b)
46
            {
47
                if (a.FlowType == FlowType.In)
48
                    return 1;
49
                else
50
                    return 0;
51
            }
52
            #endregion
53
        }
54

  
41 55
        public AutoModeling(Model.Document document, System.Data.DataTable AvevaSymbolTable)
42 56
        {
43 57
            this.document = document;
......
88 102
                SplashScreenManager.ShowForm(typeof(APIDSplashScreen), true, true);
89 103
                SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.SetAllStepCount, 2);
90 104
                SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.SetDocumentName, document.AvevaDrawingNumber + document.AvevaSheetNumber);
105
                SetConvertRule();
91 106

  
92 107
                RunLineModeling();
108
                RunOPCModeling();
93 109
                RunSymbolModeling();
94 110
            }
95 111
            catch (System.Exception ex)
......
115 131
                SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.UpProgress, null);
116 132
            }
117 133
        }
134
        private void RunOPCModeling()
135
        {
136
            SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.SetAllProgress, document.OPCs.Count);
137
            SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.SetStep, "OPC Modeling");
138
            foreach (var item in document.OPCs)
139
            {
140
                if (item.Aveva.Handle == 0)
141
                    SymbolModeling(item);
142
                SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.UpProgress, null);
143
            }
144
        }
118 145
        private void RunSymbolModeling()
119 146
        {
120 147
            SplashScreenManager.Default.SendCommand(APIDSplashScreen.SplashScreenCommand.SetAllProgress, document.SYMBOLS.Count);

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)