Пример #1
0
 private string GetToothProductString(string str)
 {
     try
     {
         return(TranslationSource.Instance[str]);
     }
     catch (Exception ex)
     {
         LogRecorder Log = new LogRecorder();
         Log.RecordLog(new StackTrace(true).GetFrame(0).GetFileLineNumber().ToString(), "Detail_cad.xaml.cs GetToothProductString()_exception", ex.Message);
         return("UnKnow");
     }
 }
Пример #2
0
        /// <summary>
        /// 讀取SmallCase資訊
        /// </summary>
        private void LoadSmallCase()
        {
            orthoInfo.List_smallcase = new List <Local_UserControls.Order_orthoSmallcase>();
            int itemIndex = 0;

            try
            {
                //蒐集OrthoSmallcase然後存進OuterCase
                DirectoryInfo dInfo2 = new DirectoryInfo(orthoInfo.CaseDirectoryPath);
                foreach (DirectoryInfo folder2 in dInfo2.GetDirectories())
                {
                    // 這層是C:\IntewareData\OrthoAnalysisV3\OrthoData\Test_1216\folder2\
                    string SmallXmlPath = folder2.FullName + @"\" + (orthoInfo.PatientID + "_" + orthoInfo.PatientName) + ".xml";
                    if (File.Exists(SmallXmlPath) == false)
                    {
                        continue;
                    }
                    else
                    {
                        XDocument xmlDoc;
                        FileInfo  fInfo = new FileInfo(SmallXmlPath);//要取得檔案創建日期和修改日期

                        try
                        {
                            xmlDoc = XDocument.Load(SmallXmlPath);
                        }
                        catch (Exception ex)
                        {
                            log.RecordLog(new StackTrace(true).GetFrame(0).GetFileLineNumber().ToString(), "ProjectHandle.cs LoadXml(Ortho smallcase) Exception", ex.Message);
                            continue;
                        }

                        try
                        {
                            var orthodata  = EZOrthoDataStructure.ProjectDataWrapper.ProjectDataWrapperDeserialize(SmallXmlPath);
                            int patientAge = DateTime.Today.Year - DateTime.Parse(orthodata.patientInformation.m_PatientBday).Year;

                            Order_orthoSmallcase.OrthoSmallCaseInformation tmpOrthosmallInfo = new Order_orthoSmallcase.OrthoSmallCaseInformation
                            {
                                //tmpOrthosmallInfo.SoftwareVer = new Version(orthodata.File_Version);
                                WorkflowStep     = Convert.ToInt16(orthodata.workflowstep),
                                CreateDate       = orthodata.patientInformation.m_CreateTime,
                                Describe         = orthodata.patientInformation.m_Discribe,
                                ModifyTime       = fInfo.LastWriteTime,
                                SmallCaseXmlPath = SmallXmlPath,

                                ProductTypeString = TranslationSource.Instance["ClearAligner"],
                                Name    = orthodata.patientInformation.m_PatientName,
                                OrderID = orthodata.patientInformation.m_PatientID,
                                Gender  = orthodata.patientInformation.m_PatientSex ? TranslationSource.Instance["Male"] : TranslationSource.Instance["Female"],
                                Age     = patientAge.ToString(),
                                Clinic  = orthodata.patientInformation.m_ClinicName,
                                Dentist = orthodata.patientInformation.m_DentistName
                            };

                            Order_orthoSmallcase tmporthoSmallcase = new Order_orthoSmallcase();
                            tmporthoSmallcase.SetsmallCaseShow += SmallCaseHandler;
                            tmporthoSmallcase.SetOrthoSmallCaseInfo(tmpOrthosmallInfo, itemIndex);
                            orthoInfo.List_smallcase.Add(tmporthoSmallcase);
                            itemIndex++;
                        }
                        catch (Exception ex)
                        {
                            log.RecordLog(new StackTrace(true).GetFrame(0).GetFileLineNumber().ToString(), "ProjectHandle.cs LoadXml(Ortho smallcase) Exception2", ex.Message);
                            continue;
                        }
                    }
                }
            }
            catch
            {
            }
        }