프로젝트

일반

사용자정보

개정판 0a111e7d

ID0a111e7d810dfe3747812924b4de4e326dc6d133
상위 a6830a94
하위 97cc1d1c, a47604c3, 2b8bbe9a

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

dev issue #000 : 편의성 개선

Change-Id: Ia9706fcb1fe9a31ff727575fe2b6ff733dc350e0

차이점 보기:

DTI_PID/SPPIDConverter/BaseModel/Document.cs
26 26
        private List<SpecBreak> _SpecBreaks = new List<SpecBreak>();
27 27
        private List<Equipment> _Equipments = new List<Equipment>();
28 28
        private bool _Enable;
29
        private bool _Validation;
30
        private string _ValidationMessage;
31
        bool validationResult = false;
29 32

  
30 33
        public bool Enable { get { return _Enable; } }
34
        public bool Validation { get { return _Validation; } }
35
        public string ValidationMessage { get { return _ValidationMessage; } }
31 36

  
32 37
        public List<Symbol> SYMBOLS { get => _SYMBOLS; set => _SYMBOLS = value; }
33 38
        public List<Text> TEXTINFOS { get => _TEXTINFOS; set => _TEXTINFOS = value; }
......
454 459
                    {
455 460
                        Symbol symbol = GetSymbolByUID(element.Element("UID").Value);
456 461
                        if (symbol == null)
457
                            throw new Exception("Missing Item!" + "\r\nUID : " + element.Element("UID").Value);
462
                        {
463
                            validationStringBuilder.AppendLine("Missing Item!" + "\r\nUID : " + element.Element("UID").Value);
464
                            validationStringBuilder.AppendLine();
465
                            validationResult = true;
466
                        }
458 467
                        run.RUNITEMS.Add(symbol);
459 468
                    }
460 469
                    else if (element.Name == "LINE")
461 470
                    {
462 471
                        Line line = GetLineByUID(element.Element("UID").Value);
463 472
                        if (line == null)
464
                            throw new Exception("Missing Item!" + "\r\nUID : " + element.Element("UID").Value);
473
                        {
474
                            validationStringBuilder.AppendLine("Missing Item!" + "\r\nUID : " + element.Element("UID").Value);
475
                            validationStringBuilder.AppendLine();
476
                            validationResult = true;
477
                        }
465 478
                        run.RUNITEMS.Add(line);
466 479
                    }
467 480
                }
......
542 555

  
543 556
        public void ValidationCheck()
544 557
        {
545
            bool validationResult = false;
558
           
546 559
            #region Connection Check / Symbol의 SceneConnectPoint Check
547 560
            foreach (var item in _SYMBOLS)
548 561
            {
......
786 799

  
787 800
            if (validationResult)
788 801
            {
802
                _Validation = false;
789 803
                _Enable = false;
790
                SPPID.Form.MessageForm message = new SPPID.Form.MessageForm(validationStringBuilder.ToString());
791
                message.ShowDialog();
804
                _ValidationMessage = validationStringBuilder.ToString();
805
            }
806
            else
807
            {
808
                _Validation = true;
809
                _Enable = true;
810
                _ValidationMessage = "";
792 811
            }
793 812
        }
794 813
    }
DTI_PID/SPPIDConverter/ConverterForm.cs
457 457

  
458 458
        private void btnLoadFile_Click(object sender, EventArgs e)
459 459
        {
460
            List< BaseModel.Document> validationFailDocs = new List<BaseModel.Document>();
460 461
            Project_Info _ProjectInfo = Project_Info.GetInstance();
461 462
            SPPID_DBInfo _SPPIDInfo = SPPID_DBInfo.GetInstance();
462 463
            if (!_ProjectInfo.Enable || !_SPPIDInfo.Enable)
......
510 511
                    if (!_DicDocuments.ContainsKey(fileName))
511 512
                        _DicDocuments.Add(fileName, null);
512 513

  
513
                    if (!document.Enable)
514
                        break;
514
                    if (!document.Validation)
515
                        validationFailDocs.Add(document);
515 516

  
516 517
                    _DicDocuments[fileName] = document;
517 518
                }
519
                if (validationFailDocs.Count > 0)
520
                {
521
                    MessageForm messageForm = new MessageForm(validationFailDocs);
522
                    messageForm.ShowDialog();
523
                }
518 524
            }
519 525
        }
520 526

  
DTI_PID/SPPIDConverter/Form/MessageForm.Designer.cs
28 28
        /// </summary>
29 29
        private void InitializeComponent()
30 30
        {
31
            this.memoEdit = new DevExpress.XtraEditors.MemoEdit();
32 31
            this.ribbonControl = new DevExpress.XtraBars.Ribbon.RibbonControl();
33 32
            this.ribbonPage2 = new DevExpress.XtraBars.Ribbon.RibbonPage();
34
            ((System.ComponentModel.ISupportInitialize)(this.memoEdit.Properties)).BeginInit();
33
            this.tabPane = new DevExpress.XtraBars.Navigation.TabPane();
35 34
            ((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).BeginInit();
35
            ((System.ComponentModel.ISupportInitialize)(this.tabPane)).BeginInit();
36 36
            this.SuspendLayout();
37 37
            // 
38
            // memoEdit
39
            // 
40
            this.memoEdit.Dock = System.Windows.Forms.DockStyle.Fill;
41
            this.memoEdit.Location = new System.Drawing.Point(0, 27);
42
            this.memoEdit.Name = "memoEdit";
43
            this.memoEdit.Size = new System.Drawing.Size(744, 426);
44
            this.memoEdit.TabIndex = 0;
45
            // 
46 38
            // ribbonControl
47 39
            // 
48 40
            this.ribbonControl.ExpandCollapseItem.Id = 0;
......
55 47
            this.ribbonControl.ShowDisplayOptionsMenuButton = DevExpress.Utils.DefaultBoolean.False;
56 48
            this.ribbonControl.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.ShowOnMultiplePages;
57 49
            this.ribbonControl.ShowToolbarCustomizeItem = false;
58
            this.ribbonControl.Size = new System.Drawing.Size(744, 27);
50
            this.ribbonControl.Size = new System.Drawing.Size(762, 32);
59 51
            this.ribbonControl.Toolbar.ShowCustomizeItem = false;
60 52
            // 
61 53
            // ribbonPage2
......
63 55
            this.ribbonPage2.Name = "ribbonPage2";
64 56
            this.ribbonPage2.Text = "ribbonPage2";
65 57
            // 
58
            // tabPane
59
            // 
60
            this.tabPane.Dock = System.Windows.Forms.DockStyle.Fill;
61
            this.tabPane.Location = new System.Drawing.Point(0, 32);
62
            this.tabPane.Name = "tabPane";
63
            this.tabPane.RegularSize = new System.Drawing.Size(762, 488);
64
            this.tabPane.SelectedPage = null;
65
            this.tabPane.Size = new System.Drawing.Size(762, 488);
66
            this.tabPane.TabIndex = 2;
67
            this.tabPane.Text = "tabPane1";
68
            // 
66 69
            // MessageForm
67 70
            // 
68 71
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
69 72
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
70
            this.ClientSize = new System.Drawing.Size(744, 453);
71
            this.Controls.Add(this.memoEdit);
73
            this.ClientSize = new System.Drawing.Size(762, 520);
74
            this.Controls.Add(this.tabPane);
72 75
            this.Controls.Add(this.ribbonControl);
73 76
            this.Name = "MessageForm";
74 77
            this.Ribbon = this.ribbonControl;
75 78
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
76 79
            this.Text = "Message";
77
            ((System.ComponentModel.ISupportInitialize)(this.memoEdit.Properties)).EndInit();
78 80
            ((System.ComponentModel.ISupportInitialize)(this.ribbonControl)).EndInit();
81
            ((System.ComponentModel.ISupportInitialize)(this.tabPane)).EndInit();
79 82
            this.ResumeLayout(false);
80 83
            this.PerformLayout();
81 84

  
82 85
        }
83 86

  
84 87
        #endregion
85

  
86
        private DevExpress.XtraEditors.MemoEdit memoEdit;
87 88
        private DevExpress.XtraBars.Ribbon.RibbonControl ribbonControl;
88 89
        private DevExpress.XtraBars.Ribbon.RibbonPage ribbonPage2;
90
        private DevExpress.XtraBars.Navigation.TabPane tabPane;
89 91
    }
90 92
}
DTI_PID/SPPIDConverter/Form/MessageForm.cs
7 7
using System.Text;
8 8
using System.Threading.Tasks;
9 9
using System.Windows.Forms;
10
using DevExpress.XtraBars.Navigation;
10 11

  
11 12
namespace Converter.SPPID.Form
12 13
{
13 14
    public partial class MessageForm : DevExpress.XtraBars.Ribbon.RibbonForm
14 15
    {
15
        public MessageForm(string text)
16
        public MessageForm(List<BaseModel.Document> documents)
16 17
        {
17 18
            InitializeComponent();
18
            memoEdit.Text = text;
19
            memoEdit.Select(0, 0);
19
            foreach (var item in documents)
20
            {
21
                if (!item.Validation)
22
                {
23
                    var page = tabPane.AddPage(item.DWGNAME, Guid.NewGuid().ToString());
24

  
25
                    DevExpress.XtraEditors.MemoEdit memoEdit = new DevExpress.XtraEditors.MemoEdit();
26
                    memoEdit.Text = item.ValidationMessage;
27
                    memoEdit.Select(0, 0);
28
                    memoEdit.Dock = DockStyle.Fill;
29
                    page.Controls.Add(memoEdit);
30
                }
31
            }
32
            
20 33
        }
21 34
    }
22 35
}

내보내기 Unified diff

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