예제 #1
0
        private void listView_searchresult_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                splashScreenManager1.ShowWaitForm();

                string dwgname  = listView_searchresult.SelectedItems[0].SubItems[1].Text;
                string marptype = listView_searchresult.SelectedItems[0].SubItems[4].Text;
                if (marptype == "0")
                {
                    return;
                }
                MarDrafting kcs_draft = new MarDrafting();
                MarUi       kcs_ui    = new MarUi();

                if (kcs_draft.DwgCurrent())
                {
                    kcs_draft.DwgClose();
                    kcs_draft.DwgOpen(dwgname, Convert.ToDouble(marptype), 0);
                }
                else
                {
                    kcs_draft.DwgOpen(dwgname, Convert.ToDouble(marptype), 0);
                }
                kcs_ui.AppWindowRefresh();
            }catch (Exception ee)
            {
            }
            finally
            {
                splashScreenManager1.CloseWaitForm();
            }
        }
예제 #2
0
        public void dwgopen()
        {
            try
            {
                Kcs_ui.MessageNoConfirm(CurrentElement.Element.GetAsString(DbAttributeInstance.NAME));

                if (Kcs_draft.DwgCurrent())
                {
                    string title = "도면저장";
                    string titleMsg = "현재 도면을 저장하시겠습니까?";
                    if (Kcs_ui.AnswerReq(title, titleMsg) == Kcs_util.Yes())
                    {
                        try
                        {
                            Kcs_util.CleanWorkspace();
                            Kcs_draft.DwgPurge();
                            Kcs_draft.DwgPack();
                            Kcs_draft.DwgSave();
                        }
                        catch (MarVitesseException e)
                        {
                            Kcs_ui.MessageNoConfirm(e.ToString());
                        }
                    }
                }


                Kcs_draft.DwgClose();
                //사실 DWGOPEN은 SHEE를 여는것이다.
                Kcs_draft.DwgOpen(CurrentElement.Element.GetAsString(DbAttributeInstance.NAME));
                System.GC.Collect();
                System.GC.WaitForFullGCComplete();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }