프로젝트

일반

사용자정보

개정판 d327a608

IDd327a6081c08f7db300ce67ba52cea2dc5f26be4
상위 465c8b6e
하위 c7db500b

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

dev issue #1223 : project info 정리 및 converter form 개발

Change-Id: I3e9d87f2f2218a1c1ace702e9f62b8d08beb2e2d

차이점 보기:

DTI_PID/APIDConverter/Form/APIDConverter.cs
7 7
using System.Text;
8 8
using System.Threading.Tasks;
9 9
using System.Windows.Forms;
10
using DevExpress.XtraEditors.Repository;
11
using DevExpress.XtraEditors.Controls;
12
using DevExpress.XtraEditors;
13
using System.Globalization;
14
using System.Threading;
15
using System.IO;
10 16
using AVEVA.PID.CustomizationUtility.DB;
11 17
using AVEVA.PID.CustomizationUtility.Model;
12 18
using AVEVA.PID.CustomizationUtility.Properties;
......
18 24
        public APIDConverter()
19 25
        {
20 26
            InitializeComponent();
27
            InitUsedDataTable();
28
            InitGridControl();
21 29
        }
22 30

  
23 31
        DataTable ID2SymbolTypeTable = null;
32
        private DataTable _ConverterDT = new DataTable();
33
        public List<Document> Documents = new List<Document>();
34

  
35
        private void InitUsedDataTable()
36
        {
37
            // Converter Table
38
            DataColumn col = _ConverterDT.Columns.Add("colDrawingFileName");
39
            col.Caption = "Drawing File Name";
40
            col = _ConverterDT.Columns.Add("colDrawingFilePath");
41
            col.Caption = "DrawingFilePath";
42
            col = _ConverterDT.Columns.Add("colUnit");
43
            col.Caption = "Unit";
44
            col = _ConverterDT.Columns.Add("colTemplate");
45
            col.Caption = "Template";
46
            col = _ConverterDT.Columns.Add("colDrawingNumber");
47
            col.Caption = "Drawing Number";
48
            col = _ConverterDT.Columns.Add("colDrawingName");
49
            col.Caption = "Drawing Name";
50
            col = _ConverterDT.Columns.Add("colStatus");
51
            col.Caption = "Status";
52
            col = _ConverterDT.Columns.Add("colUID");
53
        }
54

  
55
        private void InitGridControl()
56
        {
57
            #region Converter Page
58
            gridViewConverter.OptionsSelection.MultiSelect = true;
59
            gridViewConverter.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.CheckBoxRowSelect;
60

  
61
            gridControlConverter.DataSource = _ConverterDT;
62

  
63
            gridViewConverter.Columns["colUnit"].OptionsColumn.AllowEdit = false;
64
            gridViewConverter.Columns["colDrawingFileName"].OptionsColumn.AllowEdit = false;
65
            gridViewConverter.Columns["colUnit"].OptionsColumn.ReadOnly = true;
66
            gridViewConverter.Columns["colStatus"].OptionsColumn.AllowEdit = false;
67
            gridViewConverter.Columns["colDrawingFilePath"].Visible = false;
68
            gridViewConverter.Columns["colUID"].Visible = false;
69

  
70
            gridViewConverter.BestFitColumns();
71
            #endregion
72
        }
73

  
24 74

  
25 75
        private void btnLoadFile_Click(object sender, EventArgs e)
26 76
        {
......
36 86
                foreach (var fileName in dia.FileNames)
37 87
                {
38 88
                    Document document = new Document(fileName, ID2SymbolTypeTable);
39

  
89
                    if (document.Enable)
90
                    {
91
                        Documents.Add(document);
92
                    }
40 93
                }
41 94
            }
42 95
        }
......
47 100
            if (!project.Enable)
48 101
            {
49 102
                MessageBox.Show("Check Project Setting!", "APID Converter", MessageBoxButtons.OK, MessageBoxIcon.Warning);
103
                DialogResult = DialogResult.Cancel;
50 104
            }
51 105
            else
52 106
            {
53
                ID2SymbolTypeTable = Project_DB.SelectID2SymbolTable();
107
                ID2SymbolTypeTable = Project_DB.SelectSymbolType();
54 108
            }
55 109
        }
56 110
    }

내보내기 Unified diff

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