프로젝트

일반

사용자정보

개정판 abee404a

IDabee404a127165b0786103cf4a912668dda12d1d
상위 ad19f574
하위 37f9662d

이지연이(가) 3년 이상 전에 추가함

issue #000: 변경

Change-Id: If73fe56bfa9fd8cc444f32123b504c715ed1b5e5

차이점 보기:

DTI_PID/ID2PSN/Program.cs
15 15
        [STAThread]
16 16
        static void Main(string[] args)
17 17
        {
18
            //string path = Application.StartupPath + @"\project.txt";
19
            //if (System.IO.File.Exists(path))
20
            //{
21
            //    ID2Info info = ID2Info.GetInstance();
22
            //    info.DefaultPath = File.ReadAllLines(path)[0];
23
            //}
24

  
25 18
            ID2Info info = ID2Info.GetInstance();
26
            if (args.Length > 0)
19
            try
27 20
            {
28
                info.DefaultPath = args[0];
29
                if (args[1].Length > 1)
30
                    info.ProgramName = args[1];
31
                else
32
                    info.ProgramName = "PSN";
33
            }
34
#if DEBUG
35
            //info.DefaultPath = @"E:\DOFTECH\10.PSN\REB";
36
            info.DefaultPath = @"E:\DOFTECH\10.PSN\SampleProject_규호";
21
                //string path = Application.StartupPath + @"\project.txt";
22
                //if (System.IO.File.Exists(path))
23
                //{
24
                //    ID2Info info = ID2Info.GetInstance();
25
                //    info.DefaultPath = File.ReadAllLines(path)[0];
26
                //}
27

  
28
                string[] result = args[0].Split(new string[] { "☆■☆" }, StringSplitOptions.None);
29

  
30
                if (result.Length > 0)
31
                {
32
                    info.DefaultPath = result[0];
33
                    if (result[1] != null)
34
                        info.ProgramName = result[1];
35
                    else
36
                        info.ProgramName = "PSN";
37
                }
38
    #if DEBUG
39
                info.DefaultPath = @"E:\DOFTECH\10.PSN\REB";
40
                //info.DefaultPath = @"E:\DOFTECH\10.PSN\SampleProject_규호";
37 41
            
38
            info.ProgramName = "PNET";
39
            //info.DefaultPath = @"D:\Projects\dd\21100497014_REB";
40
#endif
42
                info.ProgramName = "PNET";
43
                //info.DefaultPath = @"D:\Projects\dd\21100497014_REB";
44
    #endif
41 45

  
42
            if (DB.ConnTestAndCreateTable())
46
                if (DB.ConnTestAndCreateTable())
47
                {
48
                    Application.EnableVisualStyles();
49
                    Application.SetCompatibleTextRenderingDefault(false);
50
                    Application.Run(new MainForm()); 
51
                }
52
                else
53
                    MessageBox.Show("fail");
54
            }
55
            catch(Exception ex)
43 56
            {
44
                Application.EnableVisualStyles();
45
                Application.SetCompatibleTextRenderingDefault(false);
46
                Application.Run(new MainForm()); 
57
                MessageBox.Show(ex.Message , "ID2 " + info.ProgramName, MessageBoxButtons.OK, MessageBoxIcon.Information);
47 58
            }
48
            else
49
                MessageBox.Show("fail");
50 59
        }
51 60
    }
52 61
}

내보내기 Unified diff