프로젝트

일반

사용자정보

개정판 1cad80c1

ID1cad80c10db1497a063d7cd799cf3955458a55f0
상위 f9d4b6aa
하위 e647dda7

gaqhf 이(가) 약 6년 전에 추가함

dev issue #728: edit logic

차이점 보기:

DTI_PID/SPPIDConverter_CustomCommand/ConverterForm.cs
54 54
        #region Default CustomCommand
55 55
        readonly string menuControlName = "ID2 to SPPID Converter";
56 56
        readonly string toolTipText = "ID2 to SPPID Converter";
57
        readonly Image image = (Image)Properties.Resources.ResourceManager.GetObject("ToolbarImage"); //Image.FromFile(@".\Close.png");
57
        readonly Image image = (Image)Properties.Resources.ResourceManager.GetObject("ToolbarImage");
58 58
        /// <summary>
59 59
        /// Constructs and initializes the form.
60 60
        /// </summary>
......
255 255

  
256 256
        private void convertToolStripMenuItem_Click(object sender, EventArgs e)
257 257
        {
258
            Ingr.RAD2D.Application application = commandControl.Application.RADApplication;
259

  
258 260
            SPPIDUtill.LoadMapping(mapping);
259 261

  
260 262
            List<SPPID.Model.Document> documents = new List<SPPID.Model.Document>();
......
268 270
                }
269 271
            }
270 272

  
273
            //Ingr.RAD2D.Document SPPID_Doc = application.Documents.Add();
274
            //SPPID_Doc.SaveOnClose = false;
275
            //SPPID_Doc.SaveAs(@"C:\dasd.pid");
276
            //SPPID_Doc.Close(false);
277

  
278

  
279
            // Save ??? ????
280
            string folderPath = "";
281
            if (documents.Count > 0)
282
            {
283
                FolderBrowserDialog dia = new FolderBrowserDialog();
284
                dia.ShowNewFolderButton = true;
285
                if (dia.ShowDialog() == DialogResult.OK)
286
                    folderPath = dia.SelectedPath + @"\";
287
                else
288
                    return;
289
            }
290

  
271 291
            autoModelingThread = new Thread(Func =>
272 292
            {
273 293
                try
274 294
                {
275 295
                    foreach (SPPID.Model.Document document in documents)
276 296
                    {
297
                        Ingr.RAD2D.Document SPPID_Doc = application.Documents.Add();
298
                        SPPID_Doc.SaveOnClose = false;
299

  
277 300
                        AutoModeling auto = new AutoModeling(document);
278 301
                        auto.SetListBoxLog(listBoxLog);
279 302
                        auto.SetProgressBar(toolStripProgressBar);
280 303
                        auto.Run();
281
                        break;
304

  
305
                        SPPID_Doc.SaveAs(@"C:\" + document.DWGNAME);
306
                        SPPID_Doc.Close(false);
282 307
                    }
283 308
                }
284 309
                catch (Exception ex)
......
364 389
        private void SetDrawingTreeNode(string fileName)
365 390
        {
366 391
            SPPID.Model.Document document = SPPID.Model.Document.Load(fileName, mapping);
392

  
367 393
            TreeNode drawingNode = new TreeNode();
368 394
            if (document == null)
369 395
            {
......
374 400
            }
375 401
            else
376 402
            {
403
                foreach (TreeNode treeNode in treeViewDrawing.Nodes[0].Nodes)
404
                {
405
                    if (treeNode.Text == document.DWGNAME)
406
                    {
407
                        treeViewDrawing.Nodes[0].Nodes.Remove(treeNode);
408
                        break;
409
                    }
410
                }
411

  
377 412
                drawingNode.Text = document.DWGNAME;
378 413
                drawingNode.Name = document.DWGNAME;
379 414
                drawingNode.Tag = document;

내보내기 Unified diff

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