Ejemplo n.º 1
0
        public ejpStudy CreateNewStudy()
        {
            //SiliconStudio.DebugManagers.DebugReporter.Report(
            //			 SiliconStudio.DebugManagers.MessageType.Information,
            //			 "EjpLib - ejpAssignment",
            //			 "Adding new (Empty) Study");

            //Add a number to the new study title if there are already
            //unnamed studies in the assignment.
            int nameCounter = 0;

            foreach (ejpStudy existingStudy in this._studies)
            {
                if (existingStudy.Title.Contains("名称未設定 (") ||
                    existingStudy.Title == "名称未設定")
                {
                    nameCounter += 1;
                }
            }
            string newStudyTitle = "名称未設定";

            if (nameCounter != 0)
            {
                newStudyTitle += " (" + nameCounter.ToString() + ")";
            }

            ejpStudy s = new ejpStudy(this._metaData.Id, Helpers.IdManipulation.GetNewGuid(), newStudyTitle, -1);

            s.AddKnowledgeMap();
            s.AddReport();
            this._studies.Add(s);
            return(s);
        }
Ejemplo n.º 2
0
        public ejpStudy CreateNewStudy()
        {
            //Add a number to the new study title if there are already
            //unnamed studies in the assignment.
            string unnamed     = Application.Current.Resources["Str_UnnamedStudyTitle"] as string;
            int    nameCounter = 0;

            foreach (ejpStudy existingStudy in this._studies)
            {
                if (existingStudy.Title.Contains(unnamed + " (") ||
                    existingStudy.Title == unnamed)
                {
                    nameCounter += 1;
                }
            }
            string newStudyTitle = unnamed;

            if (nameCounter != 0)
            {
                newStudyTitle += " (" + nameCounter.ToString() + ")";
            }

            ejpStudy s = new ejpStudy(this._metaData.Id, Helpers.IdManipulation.GetNewGuid(), newStudyTitle, -1);

            s.AddKnowledgeMap();
            s.AddReport();
            this._studies.Add(s);
            return(s);
        }
Ejemplo n.º 3
0
        internal ejpStudy CreateNewStudy(string firstXpsDocumentPath, string xpsDocumentTitle, Guid xpsDocumentId)
        {
            string   unnamed = Application.Current.Resources["Str_UnnamedStudyTitle"] as string;
            ejpStudy s       = new ejpStudy(this._metaData.Id, Helpers.IdManipulation.GetNewGuid(),
                                            unnamed, -1, firstXpsDocumentPath, true, xpsDocumentId, xpsDocumentTitle);

            s.AddReport();
            s.AddKnowledgeMap();
            this._studies.Add(s);
            return(s);
        }
Ejemplo n.º 4
0
        internal ejpStudy CreateNewStudy(string firstXpsDocumentPath, string xpsDocumentTitle, Guid xpsDocumentId)
        {
            //SiliconStudio.DebugManagers.DebugReporter.Report(
            //			 SiliconStudio.DebugManagers.MessageType.Information,
            //			 "EjpLib - ejpAssignment",
            //			 "Adding new Study" +
            //			 "\nFirst XPS Document Path :" + firstXpsDocumentPath +
            //			 "\nFirst XPS Document Title :" + xpsDocumentTitle);

            ejpStudy s = new ejpStudy(this._metaData.Id, Helpers.IdManipulation.GetNewGuid(),
                                      "名称未設定", -1, firstXpsDocumentPath, true, xpsDocumentId, xpsDocumentTitle);

            s.AddReport();
            s.AddKnowledgeMap();
            this._studies.Add(s);
            return(s);
        }