Exemplo n.º 1
0
 public CModel(ref Repository Repo)
 {
     Repozytorium     = Repo;
     projektInterfejs = Repo.GetProjectInterface();
     RootPckg         = EAUtils.dajModelPR(ref Repozytorium);
     odczytajNaprawModel(ref RootPckg);
 }
Exemplo n.º 2
0
        private String dajUseCaseRek(ref int nrRozdz, ref int i, Package pack)
        {
            String wynik = "";

            foreach (Diagram diag in /*nowy generator uc.Diagrams*/ pack.Diagrams)
            {
                if (diag.Stereotype == CmodelKonfigurator.ukryjDiagramStr)
                {
                    continue;
                }
                wynik += "<div class=\"img\">";
                wynik += "<h3>3.3.1." + i + " " + diag.Name + "</h3>";

                Diagram d    = diag;
                String  plik = EAUtils.zapiszDiagramJakoObraz(modelProjektu, ref d, dajSciezkeDocelowa());
                wynik += "<img src='" + plik + "'>";
                word.wstawParagraf(NrRozdzialu + ".3.1." + i + ". " + diag.Name, 4);
                word.wstawObrazek(dajSciezkeDocelowa() + plik);
                word.wstawParagraf(NrRozdzialu + ".3.1." + i + ". " + diag.Name, word.stylPodpis);


                wynik += "<div class=\"desc\"> " + i + ". " + diag.Notes + "</div>";


                i++;
                wynik += "</div>";
                modelProjektu.Repozytorium.CloseDiagram(diag.DiagramID);
            }
            foreach (Package p in pack.Packages)
            {
                wynik += dajUseCaseRek(ref nrRozdz, ref i, p);
            }
            return(wynik);
        }
Exemplo n.º 3
0
        public void Save(PackageConnectionSettingsModel PackageConnectionSettings)
        {
            string QueryValue;

            switch (PackageConnectionSettings.Type)
            {
            case PackageConnectionSettingsType.Jql:
                QueryValue = PackageConnectionSettings.Jql;
                break;

            case PackageConnectionSettingsType.EpicsAndStories:
                QueryValue = PackageConnectionSettings.EpicsAndStoriesJql;
                break;

            case PackageConnectionSettingsType.UserSearch:
                QueryValue = PackageConnectionSettings.UserSavedSearch;
                break;

            default:
                throw new NotImplementedException();
            }

            package.Element.Stereotype = EAGoatJira.PackageStereotypeName;
            package.Element.Update();
            package.Update();
            package.Element.TaggedValues.Refresh();
            EAUtils.WriteTaggedValue(package.Element.TaggedValues, EAGoatJira.TagValueNamePackageJql, QueryValue);
            EAUtils.WriteTaggedValue(package.Element.TaggedValues, EAGoatJira.TagValueNamePackageType, PackageConnectionSettings.Type.ToString());
            package.Update();
        }
Exemplo n.º 4
0
        private void guiLoad(String nazwaModelu = "")
        {
            Package model = null;

            if (nazwaModelu == "")
            {
                model = EAUtils.dajModelPR(ref repo);
            }
            else
            {
                model = EAUtils.dajModelPRoNazwie(ref repo, nazwaModelu);
            }

            if (model == null)
            {
                MessageBox.Show("Model o nazwie '" + nazwaModelu + "' nie istnieje");
                return;
            }

            sdITTb.Text   = EAUtils.dajAutoraProjektu(ref model, "SD IT");
            sdNTTB.Text   = EAUtils.dajAutoraProjektu(ref model, "SD NT");
            symbolTB.Text = model.Name;
            String[] s    = { "HLD", "Definicje" };
            Package  pckg = EAUtils.dajPakietSciezki(ref model, s);
            Element  el   = EAUtils.dajElementLubGoZrob(ref pckg, "Projekt-Nazwa");

            nazwaProjektuTB.Text = el.Notes;

            modelCB.Items.Clear();
            foreach (Package p in repo.Models)
            {
                modelCB.Items.Add(p.Name);
            }
            modelCB.SelectedItem = model.Name;
        }
Exemplo n.º 5
0
        private void ZatwierdzBtn_Click(object sender, EventArgs e)
        {
            try
            {
                ///odczyt
                ///
                EAUtils.zapiszNazweModelu(modelCB.SelectedItem.ToString());
                Package model = EAUtils.dajModelPR(ref repo);// repo.Models.GetAt(0);
                model.Name = symbolTB.Text.Trim();
                // model.Name = symbolTB.Text;
                model.Update();
                EAUtils.zapiszNazweModelu(model.Name);
                repo.RefreshModelView(model.PackageID);
                String[] s    = { "HLD", "Definicje", "Słownik" };
                Package  pckg = EAUtils.dajPakietSciezki(ref model, s);
                Element  el   = EAUtils.dajElementLubGoZrob(ref pckg, "SD IT");
                EAUtils.dodajTaggedValues(ref el, "Imię i Nazwisko", sdITTb.Text);

                el = EAUtils.dajElementLubGoZrob(ref pckg, "SD NT");
                EAUtils.dodajTaggedValues(ref el, "Imię i Nazwisko", sdNTTB.Text);

                String[] s2 = { "HLD", "Definicje" };
                pckg     = EAUtils.dajPakietSciezki(ref model, s2);
                el       = EAUtils.dajElementLubGoZrob(ref pckg, "Projekt-Nazwa");
                el.Notes = nazwaProjektuTB.Text;
                el.Update();
                el.Refresh();
            }
            catch (Exception exc)
            {
                MessageBox.Show("Detale.ZatwierdzBtnKlik \n {" + modelCB.SelectedItem.ToString() + "," + symbolTB.Text.Trim() + "} \n, wyjątek " + exc.Message.ToString());
            }
        }
Exemplo n.º 6
0
        private void Detale_Load(object sender, EventArgs e)
        {
            modelCB.Text = EAUtils.dajNazweModelu();


            guiLoad(modelCB.Text);
            // modelCB.Text = modelCB.SelectedValue.ToString();
        }
Exemplo n.º 7
0
 public Crozdz6(EA.Repository r, EA.Package p, Package dzialPckg, String sciezkaZrodlo, String sciezkaDocelowa, String nrRozdzialu, Word W, Statystyki o, bool jezykPl)
     : base(sciezkaZrodlo, sciezkaDocelowa)
 {
     jezykPolski   = jezykPl;
     word          = W;
     rep           = r;
     okno          = o;
     koncepcjaPckg = EAUtils.dajPakietSciezkiP(ref dzialPckg, "Koncepcja");
     NrRozdzialu   = nrRozdzialu;
 }
Exemplo n.º 8
0
 private void InicjujGUI()
 {
     EA.Project projektInterfejs = Repo.GetProjectInterface();
     model = EAUtils.dajModelPR(ref Repo);// Repo.Models.GetAt(0);
     comboBox1.Items.Clear();
     foreach (Package p in model.Packages)
     {
         comboBox1.Items.Add(p.Name);
     }
     comboBox1.SelectedIndex = 0;
 }
Exemplo n.º 9
0
        public EA.Package CreateEAPackage(EA.Repository Repository, string packageName, EA.Package parentPackage)
        {
            /// <summary>
            /// Create EA package from root or as sub-package
            /// <paramref name="Repository"/> Active repository
            /// <paramref name="packageName"/> Name of the new package
            /// <paramref name="parentPackage"/> Name of the parent package (root if empty)
            /// </summary>
            EA.Collection collection       = Repository.Models; // Get model collection
            EA.Package    rootPackage      = collection.GetAt(0);
            EA.Package    package          = null;
            EAUtils       activeRepository = new EAUtils(Repository);

            if (rootPackage != null)
            {
                EA.Package startPackage = rootPackage;
                if (parentPackage != null)
                {
                    // Check from the parent package
                    startPackage = parentPackage;
                }
                // Check if a package with packageName already exists
                package = activeRepository.GetPackageByName(startPackage, packageName);
                if (package != null)
                {
                    // Package exists and we start collect all elements in a dictionary for performance reasons
                    SetEAElementInPackage(package);
                }
            }

            if (rootPackage != null && package == null && parentPackage == null)
            {
                // Package does not exist and no parent package, create a new package in the root package
                package = rootPackage.Packages.AddNew(packageName, "");
                package.Update();
                package.Element.Stereotype = "model";
            }
            else if (rootPackage != null && package == null && parentPackage != null)
            {
                // Package does not exist, create a new package from the parent package
                package = parentPackage.Packages.AddNew(packageName, "");
                package.Update();
                package.Element.Stereotype = "model";
            }
            else if (package == null)
            {
                // Create a new root package
                package = collection.AddNew(packageName, "Package");
                package.Update();
            }

            return(package);
        }
Exemplo n.º 10
0
 ///
 /// returns true if a project is currently opened
 ///
 /// <param name="Repository" />the repository
 /// true if a project is opened in EA
 bool IsProjectOpen(EA.Repository Repository)
 {
     try
     {
         EA.Collection c = Repository.Models;
         EAUtils.zapiszNazweModelu(EAUtils.dajModelPR(ref Repository).Name);
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Exemplo n.º 11
0
 public Crozdz1(EA.Repository r, EA.Package p, String sciezkaZrodlo, String sciezkaDocelowa, Word W, Statystyki o, bool jezykPl) : base(sciezkaZrodlo, sciezkaDocelowa)
 {
     word    = W;
     rep     = r;
     projekt = p;
     okno    = o;
     okno.Log(Statystyki.LogMsgType.Info, "Lokalizacja pakietów");
     definicjePckg = EAUtils.dajPakietSciezkiP(ref projekt, "Definicje");
     ITPckg        = EAUtils.dajPakietSciezkiP(ref projekt, "IT", "Wkłady Systemowe");
     NTPckg        = EAUtils.dajPakietSciezkiP(ref projekt, "NT", "Wkłady Systemowe");
     okno.Log(Statystyki.LogMsgType.WynikOK, " [ok]\n");
     jezykPolski = jezykPl;
 }
Exemplo n.º 12
0
        private void button3_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            if (System.IO.File.Exists(sciezkaBtn.Text))
            {
                try{
                    //create the repository object
                    Repository m_Repository = new Repository();
                    //open an EAP file
                    m_Repository.OpenFile(sciezkaBtn.Text);
                    //use the Repository in any way required
                    Package asisPckg = m_Repository.Models.GetAt(0);
                    asisPckg = asisPckg.Packages.GetByName("AS-IS Architecture");

                    Package mojModel = repo.Models.GetAt(0);
                    Package klon     = EAUtils.utworzPakietGdyBrak(ref mojModel, "AS-IS Architecture", "");
                    klon       = asisPckg.Clone();
                    klon.Notes = "Kopia repozytorium " + sciezkaBtn.Text + DateTime.Now.ToLongDateString() + " " + DateTime.Now.ToLongTimeString();


                    klon.Update();

                    //    EA.Collection queryResults ;
                    // Element theElement;
                    //    var sql = "<insert sql query here>";

                    var targetPackageID = m_Repository.GetTreeSelectedPackage().Packages; //Repository.GetTreeSelectedPackage().PackageID;

                    //       queryResults = Repository.GetElementSet( sql, 2 );

                    //   for ( var i = 0; i < queryResults.Count; i++ )
                    {
                        //          theElement = queryResults.GetAt(i);
                        //          theElement.PackageID = targetPackageID;
                        //          theElement.Update();
                    }
                    //close the repository and tidy up
                    m_Repository.Exit();
                    m_Repository = null;
                }
                catch (Exception ee)
                {
                    MessageBox.Show("Wyjątek kopiowania As Is-" + ee.Message);
                }
            }
            else
            {
                MessageBox.Show("Brak pliku: " + sciezkaBtn.Text);
            }
            Cursor.Current = Cursors.Default;
        }
Exemplo n.º 13
0
        private static void FillIssue(EA.Element EAIssue, JiraIssueViewModel jiraIssue, IssueOperation Operation)
        {
            EAIssue.Notes = jiraIssue.JiraIssue.Description;
            EAIssue.Name  = GetEAJiraIssueName(jiraIssue.JiraIssue.Key, jiraIssue.JiraIssue.Summary);
            EAIssue.Update();

            EAUtils.WriteTaggedValue(EAIssue, EAGoatJira.TagValueNameJiraKey, jiraIssue.JiraIssue.Key, WriteValueToNotes: false);
            EAUtils.WriteTaggedValue(EAIssue, EAGoatJira.TagValueNameData, JsonConvert.SerializeObject(jiraIssue.JiraIssue, Formatting.Indented), WriteValueToNotes: true);
            EAUtils.WriteTaggedValue(EAIssue, EAGoatJira.TagValueNameLastUpdateAt, DateTime.Now.ToString(), WriteValueToNotes: false);
            EAUtils.WriteTaggedValue(EAIssue, EAGoatJira.TagValueNameOperation, "Issue was " + Operation.ToString().ToLower() + ".", WriteValueToNotes: false);
            EAUtils.WriteTaggedValue(EAIssue, EAGoatJira.TagValueNamePriority, jiraIssue.JiraIssue.Priority, WriteValueToNotes: false);
            EAUtils.WriteTaggedValue(EAIssue, EAGoatJira.TagValueNameStatus, jiraIssue.JiraIssue.Status, WriteValueToNotes: false);
            EAUtils.WriteTaggedValue(EAIssue, EAGoatJira.TagValueNameType, jiraIssue.JiraIssue.Type, WriteValueToNotes: false);
        }
Exemplo n.º 14
0
        public static void SynchronizePackageWithJIRA(EA.Repository Repository, EA.Package Package, PackageConnectionSettingsViewModel PackageConnectionSettings, JiraConnection JiraConnection)
        {
            //Steps:
            //      1. User must be able to login to JIRA -- must ensure caller
            //      2. Creating Repository.Output -- well... am thinking about event, JTS so far
            //      3. Get the proper JQL -- i will get from parameter
            //      4. Do to job

            Repository.CreateOutputTab(EAGoatJira.JiraOutputWindowName);
            Repository.EnsureOutputVisible(EAGoatJira.JiraOutputWindowName);
            Repository.ClearOutput(EAGoatJira.JiraOutputWindowName);
            Repository.WriteOutput(EAGoatJira.JiraOutputWindowName, "Reading data...", 0);

            PackageConnectionSettings.Refresh();

            Dictionary <string, EA.Element> IssuesInEA = ReadIssuesFromEA(Repository, Package.Elements);

            var issues = JiraConnection.GetJiraIssues(PackageConnectionSettings.Jql);

            foreach (var issue in issues)
            {
                EA.Element EAElementForIssue = SynchronizeItem(issue, Repository, Package, null, IssuesInEA);

                if (PackageConnectionSettings.PackageConnectionSettings.Type == PackageConnectionSettingsType.EpicsAndStories)
                {
                    var epicissues = JiraConnection.GetJiraIssues($"\"Epic Link\" = {issue.Key}");
                    foreach (var epicissue in epicissues)
                    {
                        SynchronizeItem(epicissue, Repository, Package, EAElementForIssue, IssuesInEA);
                    }
                }
                EAElementForIssue.Update();
            }

            if (IssuesInEA.Count > 0)
            { //some issues that are in the Package are not in the issues (they were deleted or moved or the Jql has chaned)
                EA.Package PackageForRemovedIssues = EAUtils.CreatePackage(Package, "Removed Issues", ForceCreation: false);
                foreach (var removedItem in IssuesInEA)
                {
                    Repository.WriteOutput(EAGoatJira.JiraOutputWindowName, $"Removing issue {removedItem.Key}", removedItem.Value.ElementID);
                    removedItem.Value.PackageID = PackageForRemovedIssues.PackageID;
                    removedItem.Value.Update();
                    EAUtils.WriteTaggedValue(removedItem.Value, EAGoatJira.TagValueNameOperation, "Issue was " + IssueOperation.Removed.ToString() + ".", WriteValueToNotes: false);
                }
                PackageForRemovedIssues.Update();
            }

            Package.Update();
            Repository.WriteOutput(EAGoatJira.JiraOutputWindowName, $"Done.", 0);
        }
Exemplo n.º 15
0
        private void Koncepcja_Load(object sender, EventArgs e)
        {
            Package model = EAUtils.dajModelPR(ref repo); //repo.Models.GetAt(0);

            koncepcjaPckg = EAUtils.utworzSciezke(ref model, Folder);

            objElem = EAUtils.dodajElement(ref koncepcjaPckg, obiekt, "");


            if (objElem.Notes != "")
            {
                richTextBox1.Text = objElem.Notes;
            }
        }
Exemplo n.º 16
0
        private String dajUseCase(/*Package uc,*/ ref int nrRozdz)
        {
            okno.Log(Statystyki.LogMsgType.Info, "Eksport diagramów UC");
            String wynik = "";

            if (modelProjektu.PrzypadkiPckg[Obszar].Diagrams.Count > 0)
            {
                wynik += "<div class=\"img\">";
                wynik += dajTytulRozdz("2", ref nrRozdz);
                wynik += dajTytulRozdz("3", ref nrRozdz);
                int i = 1;
                // nowy generator if (uc.Diagrams.Count > 0)


                foreach (Diagram diag in /*nowy generator uc.Diagrams*/ modelProjektu.PrzypadkiPckg[Obszar].Diagrams)
                {
                    if (diag.Stereotype == CmodelKonfigurator.ukryjDiagramStr)
                    {
                        continue;
                    }
                    wynik += "<div class=\"img\">";
                    wynik += "<h3>3.3.1." + i + " " + diag.Name + "</h3>";

                    Diagram d    = diag;
                    String  plik = EAUtils.zapiszDiagramJakoObraz(modelProjektu, ref d, dajSciezkeDocelowa());
                    wynik += "<img src='" + plik + "'>";
                    word.wstawParagraf(NrRozdzialu + ".3.1." + i + ". " + diag.Name, 4);
                    word.wstawObrazek(dajSciezkeDocelowa() + plik);
                    word.wstawParagraf(NrRozdzialu + ".3.1." + i + ". " + diag.Name, word.stylPodpis);


                    wynik += "<div class=\"desc\"> " + i + ". " + diag.Notes + "</div>";


                    i++;
                    wynik += "</div>";
                    modelProjektu.Repozytorium.CloseDiagram(diag.DiagramID);
                }
                okno.Log(Statystyki.LogMsgType.WynikOK, " diagramów eksportowanych: " + (i - 1).ToString() + "/" + /* uc.Diagrams.Count*/ modelProjektu.PrzypadkiPckg[Obszar].Diagrams.Count + " [ok]\n");
            }
            else
            {
                nrRozdz++;    //przeskakujemy o rozdzial
                nrRozdz++;    //przeskakujemy o podrozdzial
            }
            wynik += "</div>";
            okno.Log(Statystyki.LogMsgType.WynikOK, " diagramów eksportowanych: 0/" + /* uc.Diagrams.Count*/ modelProjektu.PrzypadkiPckg[Obszar].Diagrams.Count + " [ok]\n");
            return(wynik);
        }
Exemplo n.º 17
0
 public Crozdz2(EA.Repository r, EA.Package p, Package wymPckg, Package konPckg, String sciezkaZrodlo, String sciezkaDocelowa, Word W, Statystyki o, bool jezykPl, bool czyTresc)
     : base(sciezkaZrodlo, sciezkaDocelowa)
 {
     jezykPolski   = jezykPl;
     word          = W;
     rep           = r;
     projekt       = p;
     wymaganiaPckg = wymPckg;
     okno          = o;
     okno.Log(Statystyki.LogMsgType.Info, "Lokalizacja pakietów");
     koncepcjaITPckg = EAUtils.dajPakietSciezkiP(ref projekt, "IT", "Koncepcja");
     koncepcjaNTPckg = EAUtils.dajPakietSciezkiP(ref projekt, "NT", "Koncepcja");
     okno.Log(Statystyki.LogMsgType.WynikOK, " [ok]\n");
     CzyPokazywacTrescWymagan = czyTresc;
 }
Exemplo n.º 18
0
        private int ZmielElement(Element jaElem)
        {
            int wynik = 0;

            //ZmielElement(rodzicPckg,jaElem
            foreach (Element e in jaElem.Elements)
            {
                wynik += ZmielElement(e);
            }
            //mielenie
            //daj wszystkie konektory
            foreach (Connector c in jaElem.Connectors)
            {
                ////dla kazdego konektora typu information flow daj source
                if (c.Type != "InformationFlow")
                {
                    continue;
                }
                ////dla kazdego konektora daj destination
                Element elSource      = Repo.GetElementByID(c.ClientID);
                Element elDestination = Repo.GetElementByID(c.SupplierID);
                //patrz tylko na te ktorych realizatorem jest jaElem
                if (jaElem.ElementID == elDestination.ElementID)
                {
                    //wez interfejs lub go dodaj
                    Element interf = EAUtils.dodajElement(ref jaElem, "Interfejs " + jaElem.Name, "", "Interface");

                    ////do interfejsu dodaj operację (nazwa to fid, notatka to notatka, parametr to nazwa systemu target)
                    EA.Method m = EAUtils.dodajOperacje(ref interf, c.Name, c.Notes);
                    try{
                        m.Parameters.AddNew(elSource.Name, "");
                        m.Update();
                        m.Parameters.Refresh();
                    }
                    catch (Exception exc)
                    {
                        MessageBox.Show(System.Reflection.MethodBase.GetCurrentMethod().Name + "( " + System.Reflection.MethodBase.GetCurrentMethod().Attributes.ToString() + ") #" + exc.Message);
                    }
                    ////utworz relacje use z source do interfejs
                    Connector conUse = EAUtils.dodajRelacje(elSource, interf, "Usage", "", "");
                    ////utworz relacje realize z destination do interfejs
                    Connector conReal = EAUtils.dodajRelacje(elSource, interf, "Realisation", "", "");

                    wynik++;
                }
            }
            return(wynik);
        }
Exemplo n.º 19
0
        public void LoadDatamodel(EA.Repository Repository)
        {
            /// <summary>
            /// Load data model from PLM and create elements in EA
            /// </summary>

            // if (System.Diagnostics.Debugger.Launch()) System.Diagnostics.Debugger.Break();
            EA.Collection collection       = Repository.Models; // Get model collection
            EAUtils       activeRepository = new EAUtils(Repository);

            EA.Package package         = CreateEAPackage(Repository, "Innovator", null);
            EA.Package typePackage     = CreateEAPackage(Repository, "ItemTypes", package);
            EA.Package relationPackage = CreateEAPackage(Repository, "RelationshipTypes", package);

            // Load ItemTypes
            Item innovatorItemTypes = InnovatorService._.GetItemTypes();
            // Load RelationshipTypes
            Item innovatorRelationshipTypes = InnovatorService._.GetRelationshipTypes();

            // Create EA Elements (<<Table>>) in Innovator/ItemTypes Package
            int count = innovatorItemTypes.getItemCount();

            for (int i = 0; i < count; i++)
            {
                Item   innovatorItemType = innovatorItemTypes.getItemByIndex(i);
                string typeName          = innovatorItemType.getType();
                CreateEAElement(innovatorItemType, typePackage);
            }

            // Create EA Elements (<<Table>>) in Innovator/RelationshipTypes Package
            count = innovatorRelationshipTypes.getItemCount();
            for (int j = 0; j < count; j++)
            {
                Item   innovatorRelationshipType = innovatorRelationshipTypes.getItemByIndex(j);
                string typeName = innovatorRelationshipType.getType();
                CreateEAElement(innovatorRelationshipType, relationPackage);
            }

            // Create EA Connectors between tables (Relationships)
            for (int k = 0; k < count; k++)
            {
                Item   innovatorRelationshipType = innovatorRelationshipTypes.getItemByIndex(k);
                string typeName = innovatorRelationshipType.getType();
                CreateEAConnector(innovatorRelationshipType);
            }

            collection.Refresh();
        }
Exemplo n.º 20
0
        private String dajZespolzPakietu(ref int i /* nowy generator,Package aPckg*/, int obszar, ref Wordy.Table tab)
        {
            String w = "";

            foreach (Package sysPak in /* nowy generator aPckg.Packages*/ modelProjektu.WkladyPckg[obszar].Packages)
            {
                Package pTmp     = sysPak;
                String  nazwisko = EAUtils.dajNazwiskoTA(modelProjektu.Repozytorium /*rep*/, sysPak);


                word.wstawWierszDoTabeli("Rozdzial1b", tab, i + 1, new string[] { i.ToString(), sysPak.Name, nazwisko });
                i++;
            }

            return(w);
        }
Exemplo n.º 21
0
        public void EA_GetMenuState(EA.Repository Repository, string Location, string MenuName, string ItemName, ref bool IsEnabled, ref bool IsChecked)
        {
            bool vIsProjectOpen = EAUtils.IsProjectOpen(Repository);

            EA.ObjectType vOT = vIsProjectOpen ? EAUtils.emergencyGetContextItemType(Repository) : EA.ObjectType.otNone;


            switch (ItemName)
            {
            case MDGConnectExternalProject:
            case MDGDisconnectExternalProject:
                //not needed to be sofisticated, Sparx is showing the right menu items in his own logic due to its poor design
                IsEnabled = vIsProjectOpen && (vOT == EA.ObjectType.otPackage);
                break;

            case menuItemAbout:
                IsEnabled = mainViewModel.AboutCommand.CanExecute(null);
                break;

            case menuItemSetPackageConnectionSettings:
                IsEnabled = vIsProjectOpen && vOT == EA.ObjectType.otPackage && mainViewModel.SetPackageSettingsCommand.CanExecute(Repository.GetContextObject());
                break;

            case menuItemSetLoginInformation:
                IsEnabled = vIsProjectOpen;
                break;

            case menuItemReadRefreshIssues:
                IsEnabled = vIsProjectOpen && (vOT == EA.ObjectType.otPackage) && mainViewModel.RefreshIssuesCommand.CanExecute(Repository.GetContextObject());
                break;


            case menuItemShowWebsite:
                /////////                    IsEnabled = AddinViewModel.LoginCommand.CanExecute(null); // vIsProjectOpen
                IsEnabled = false;
                break;

            case menuItemNavigateIssueToWeb:
                /////////                    IsEnabled = vIsProjectOpen && (vOT == EA.ObjectType.otElement);
                IsEnabled = false;
                break;

            default:
                IsEnabled = false;
                break;
            }
        }
Exemplo n.º 22
0
        private String dajArchitekture(/*Package arch,*/ ref int nrRozdz)
        {
            okno.Log(Statystyki.LogMsgType.Info, "Eksport architektury statycznej");
            String wynik = "";

            if (modelProjektu.ArchStatPckg[Obszar].Diagrams.Count > 0)
            {
                wynik += "<div class=\"img\">";
                wynik += dajTytulRozdz("2", ref nrRozdz);
                int i = 1;
                // nowy generator if (arch.Diagrams.Count > 0)


                foreach (Diagram diag in /* nowy generator arch.Diagrams*/ modelProjektu.ArchStatPckg[Obszar].Diagrams)
                {
                    if (diag.Stereotype == CmodelKonfigurator.ukryjDiagramStr)
                    {
                        continue;
                    }
                    wynik += "<div class=\"img\">";
                    wynik += "<h3>3.2." + i + " " + diag.Name + "</h3>";

                    Diagram d    = diag;
                    String  plik = EAUtils.zapiszDiagramJakoObraz(modelProjektu, ref d, dajSciezkeDocelowa());

                    wynik += "<img src='" + plik + "'>";
                    word.wstawParagraf(NrRozdzialu + ".2." + i + ". " + diag.Name, 3);
                    word.wstawObrazek(dajSciezkeDocelowa() + plik, i + ". " + diag.Name);
                    word.wstawParagraf(nrRozdz + ".2." + i + ". " + diag.Name, word.stylPodpis);

                    wynik += "<div class=\"desc\"> " + i + ". " + diag.Name + "</div>";


                    i++;
                    wynik += "</div>";
                    modelProjektu.Repozytorium.CloseDiagram(diag.DiagramID);
                    okno.Log(Statystyki.LogMsgType.WynikOK, " diagramów eksportowanych: " + (i - 1).ToString() + "/" + /* nowy generator arch.Diagrams.Count*/ modelProjektu.ArchStatPckg[Obszar].Diagrams.Count + " [ok]\n");
                }
            }
            else
            {
                nrRozdz++;      //po to by tytuł przeskoczył dalej
                okno.Log(Statystyki.LogMsgType.WynikOK, " diagramów eksportowanych: 0/" + /* nowy generator arch.Diagrams.Count*/ modelProjektu.ArchStatPckg[Obszar].Diagrams.Count + " [ok]\n");
            }
            wynik += "</div>";
            return(wynik);
        }
Exemplo n.º 23
0
 public Crozdz3(EA.Repository r, EA.Package p, Package dzialPckg, String sciezkaZrodlo, String sciezkaDocelowa, String nrRozdzialu, Word W, Statystyki o, bool jezykPl)
     : base(sciezkaZrodlo, sciezkaDocelowa)
 {
     jezykPolski = jezykPl;
     word        = W;
     rep         = r;
     projekt     = p;
     okno        = o;
     okno.Log(Statystyki.LogMsgType.Info, "Lokalizacja pakietów");
     systemsPckg   = EAUtils.dajPakietSciezkiP(ref dzialPckg, "Architektura Statyczna");
     koncepcjaPckg = EAUtils.dajPakietSciezkiP(ref dzialPckg, "Koncepcja");
     usecasePckg   = EAUtils.dajPakietSciezkiP(ref dzialPckg, "Przypadki Użycia");
     sekwencjePckg = EAUtils.dajPakietSciezkiP(ref dzialPckg, "Diagramy Sekwencji");
     wkladyPckg    = EAUtils.dajPakietSciezkiP(ref dzialPckg, "Wkłady Systemowe");
     NrRozdzialu   = nrRozdzialu;
     okno.Log(Statystyki.LogMsgType.WynikOK, " [ok]\n");
 }
Exemplo n.º 24
0
        private string dajArchitektureRek(ref int nrRozdz, Package pack)
        {
            string wynik = "";

            if (pack.Diagrams.Count > 0 || pack.Packages.Count > 0)
            {
                //  wynik += "<div class=\"img\">";
                // wynik += dajTytulRozdz("2", ref nrRozdz);
                int i = 1;
                // nowy generator if (arch.Diagrams.Count > 0)


                foreach (Diagram diag in /* nowy generator arch.Diagrams*/ pack.Diagrams)
                {
                    if (diag.Stereotype == CmodelKonfigurator.ukryjDiagramStr)
                    {
                        continue;
                    }
                    wynik += "<div class=\"img\">";
                    wynik += "<h3>3.2." + i + " " + diag.Name + "</h3>";

                    Diagram d    = diag;
                    String  plik = EAUtils.zapiszDiagramJakoObraz(modelProjektu, ref d, dajSciezkeDocelowa());

                    wynik += "<img src='" + plik + "'>";
                    word.wstawParagraf(NrRozdzialu + ".2." + i + ". " + diag.Name, 3);
                    word.wstawObrazek(dajSciezkeDocelowa() + plik, i + ". " + diag.Name);
                    word.wstawParagraf(nrRozdz + ".2." + i + ". " + diag.Name, word.stylPodpis);

                    wynik += "<div class=\"desc\"> " + i + ". " + diag.Name + "</div>";


                    i++;
                    wynik += "</div>";
                    modelProjektu.Repozytorium.CloseDiagram(diag.DiagramID);
                    okno.Log(Statystyki.LogMsgType.WynikOK, " diagramów eksportowanych: " + (i - 1).ToString() + "/" + /* nowy generator arch.Diagrams.Count*/ pack.Diagrams.Count + " [ok]\n");
                }
            }

            foreach (Package p in pack.Packages)
            {
                wynik += dajArchitektureRek(ref nrRozdz, p);
            }
            return(wynik);
        }
Exemplo n.º 25
0
        /// <summary>
        /// Zrzut feature
        /// </summary>
        /// <param name="pakiet">Pakiet wkładu systemowego</param>
        /// <param name="nrRozdz">numer rozdziału</param>
        /// <param name="lp">LP</param>
        /// <param name="stereotypy">Lista stereotypów do filtrowania</param>
        /// <param name="kolejnosc">Numer podrozdziału</param>
        /// <param name="opis">Opis podrozdziału</param>
        /// <returns></returns>
        private String dajWymaganiaXXX_nowyModel(Package pakiet, ref int nrRozdz, int lp, String [] stereotypy, String kolejnosc, String opis)
        {
            String  w       = "";
            Package wymPckg = EAUtils.utworzPakietGdyBrak(ref pakiet, "Wymagania Systemowe", "");

            w += "<h3>" + numer + "." + lp + ".3." + kolejnosc + opis + " </h3>\n";
            // if (jezykPolski)
            // {
            word.wstawParagraf(numer + "." + lp + ".3." + kolejnosc + opis, 4);

            /* }
             * else
             * {
             *   word.wstawParagraf(numer + "." + lp + ".3." + kolejnosc + " Requirements " + jakie, 4);
             * }*/
            int licznik = 0;

            foreach (Element e in wymPckg.Elements)
            {
                // if (e.Stereotype == warunekIF || e.Stereotype == warunekIF2) licznik++;
                if (CmodelKonfigurator.czyZawiera(e.Stereotype, stereotypy))
                {
                    licznik++;
                }
            }
            if (licznik == 0)
            {
                w += "Brak";
                if (jezykPolski)
                {
                    word.wstawParagraf("Brak", word.stylNorm);
                }
                else
                {
                    word.wstawParagraf("None", word.stylNorm);
                }
                return(w);
            }
            //   w+=dajWymaganiaXXXStaraPrezentacja(wymPckg,warunekIF,warunekIF2);
            //w += dajWymaganiaXXXNowaPrezentacja(wymPckg, warunekIF, warunekIF2);
            w += dajWymaganiaXXXNowaPrezentacja3(wymPckg, stereotypy);

            return(w + "</table>\n");
        }
Exemplo n.º 26
0
        private String dajOpisRoliSystemu(Package systemsPckg, ref int nrRozdz)
        {
            okno.Log(Statystyki.LogMsgType.Info, "Eksport listy systemów");
            String wynik = "";

            if (modelProjektu.WkladyPckg[Obszar].Packages.Count > 0)
            {
                wynik += "<div class=\"img\">";
                wynik += dajTytulRozdz("3", ref nrRozdz);
                Wordy.Table tab;
                if (jezykPolski)
                {
                    tab = word.wstawTabele("", new string[] { "Lp", "Nazwa systemu", "Opis roli systemu w projekcie", "Dostawca" });
                }
                else
                {
                    tab = word.wstawTabele("", new string[] { "No", "System name", "System changes - abstract", "Vendor" });
                }
                tab.Columns[1].SetWidth(25f, Wordy.WdRulerStyle.wdAdjustNone);
                tab.Columns[2].SetWidth(80f, Wordy.WdRulerStyle.wdAdjustNone);
                tab.Columns[3].SetWidth(330f, Wordy.WdRulerStyle.wdAdjustNone);
                tab.Columns[4].SetWidth(65f, Wordy.WdRulerStyle.wdAdjustNone);
                wynik += "<table><tr><th>Lp</th><th>Nazwa systemu</th><th>Opis roli systemu w projekcie</th></tr>";
                int j = 1;
                foreach (Package p in systemsPckg.Packages)
                {
                    EA.Element systEl   = EAUtils.dajComponentSystemZpakietu(modelProjektu.Repozytorium, p);
                    String     dostawca = EAUtils.dajDostawceSystemu(modelProjektu.Repozytorium, systEl);

                    word.wstawWierszDoTabeli("", tab, j + 1, new string[] { j.ToString(), p.Name, p.Notes, dostawca });
                    wynik += "<tr><td>" + j + "</td><td>" + p.Name + "</td><td>" + p.Notes + " </td></tr>";
                    j++;
                }
                wynik += "</table>";
                wynik += "</div>";
            }
            else
            {
                nrRozdz++;     //by przeskoczyc do nast rodzialu
            }
            okno.Log(Statystyki.LogMsgType.WynikOK, " systemów: " + systemsPckg.Packages.Count + " [ok]\n");
            return(wynik);
        }
Exemplo n.º 27
0
        /*     private String __dajWymaganiaXXXNowaPrezentacja2(Package wymPckg, String warunekIF, String warunekIF2)
         *   {
         *       String w = "";
         *
         *       w += "<table><tr><th>Nazwa</th><th>Opis realizacji</th><th>Nadrzędne wygmaganie biznesowe</th></tr>\n";
         *
         *       foreach (Element elem in wymPckg.Elements)
         *       {
         *           //  String typ = "konfiguracja/development";
         *           String nadrzedne = "";
         *           String stat = "";
         *           bool analiza = false;
         *           Element e2 = null;
         *           if (elem.Stereotype != warunekIF && elem.Stereotype != warunekIF2) continue;
         *           foreach (Connector con in elem.Connectors)
         *           {
         *
         *               if (con.Type == "Realisation")
         *               {
         *                   e2 = Repo.GetElementByID(con.SupplierID);
         *                   if (e2.Type == "Requirement")
         *                   {
         *                       nadrzedne += e2.Name + "\n";
         *                       stat += e2.Status + "\n";
         *                       if (e2.Status != "Uzgodnione" && e2.Status != "Anulowane przez IT" && e2.Status != "Anulowane przez BO")
         *                       {
         *                           analiza = true;
         *                       }
         *                   }
         *               }
         *           }
         *          Wordy.Paragraph paragr= word.wstawParagraf(elem.Name,0);
         *          paragr = paragr.Previous();
         *          paragr.Range.Bold = 1;
         *          paragr.Range.Underline = Wordy.WdUnderline.wdUnderlineThick;
         *          paragr = word.wstawParagraf("Status: " + elem.Status,0);
         *          paragr = paragr.Previous();
         *          Wordy.Range r = paragr.Range;
         *          r.End = r.Start + 7;
         *          r.Bold = 1;
         *
         *
         *
         *           if (elem.Status != "Uzgodnione" && elem.Status != "Anulowane przez IT" && elem.Status != "Anulowane przez BO")
         *           {
         *              paragr.Range.Comments.Add(paragr.Range, "Wymaganie w trakcie analizy");
         *           }
         *           if (jezykPolski)
         *           {
         *               paragr = word.wstawParagraf("Nadrzędne wymaganie biznesowe:", 0);
         *           }
         *           else
         *           { paragr = word.wstawParagraf("Parent business requirement:", 0); }
         *           paragr = paragr.Previous();
         *           paragr.Range.Bold = 1;
         *
         *
         *           if (e2 == null)
         *           {
         *               if (jezykPolski)
         *               {
         *                   paragr = word.wstawParagraf("Brak", 0);
         *               }
         *               else
         *               { paragr = word.wstawParagraf("None", 0); }
         *           }
         *           else
         *           {
         *                word.wstawParagraf( nadrzedne,0);
         *                if (jezykPolski)
         *                {
         *                    paragr = word.wstawParagraf("Status nadrzędnego wymagania: " + stat, 0);
         *                }
         *                else
         *                {
         *                    paragr = word.wstawParagraf("Status of parent business requirement: " + stat, 0);
         *                }
         *               paragr = paragr.Previous();
         *               paragr = paragr.Previous();
         *               r = paragr.Range;
         *               r.End = r.Start + 29;
         *               r.Select();
         *               r.Bold = 1;
         *               if (analiza)
         *               {
         *                   paragr.Range.Comments.Add(paragr.Range, "Wymaganie w trakcie analizy");
         *               }
         *           }
         *           if (jezykPolski)
         *           {
         *               paragr = word.wstawParagraf("Sposób realizacji:", 0);
         *           }
         *           else
         *           {
         *               paragr = word.wstawParagraf("Realization description:", 0);
         *           }
         *           paragr = paragr.Previous();
         *           paragr.Range.Bold = 1;
         *
         *           word.wstawParagraf(elem.Notes, 0);
         *           // word.wstawWierszDoTabeli("", tab, i, new string[] { elem.Notes});
         *           //tab.Cell(i, 1).Merge(tab.Cell(i, 2));
         *           word.wstawZalacznikRTF(elem);
         *           if (elem.Notes == "" && elem.GetLinkedDocument() == "")
         *           {
         *               word.wstawParagraf("Wymaganie w trakcie analizy...", 0, "Brak opisu realizacji wymagania");
         *           }
         *           word.wstawParagraf("", 0);
         *
         *
         *       }
         *       return w;
         *   }
         * */
        /*    private String dajWymaganiaXXXNowaPrezentacja(Package wymPckg, String warunekIF, String warunekIF2)
         *  {
         *      String w = "";
         * //     Wordy.Table tab = word.wstawTabele("Rozdzial1b", new string[] { "Nazwa", "Opis realizacji", "Nadrzędne wygmaganie biznesowe" });
         * //     tab.Columns[1].SetWidth(150f, Wordy.WdRulerStyle.wdAdjustNone);
         *  //    tab.Columns[2].SetWidth(200f, Wordy.WdRulerStyle.wdAdjustNone);
         *  //    tab.Columns[3].SetWidth(150f, Wordy.WdRulerStyle.wdAdjustNone);
         *      w += "<table><tr><th>Nazwa</th><th>Opis realizacji</th><th>Nadrzędne wygmaganie biznesowe</th></tr>\n";
         *
         *      foreach (Element elem in wymPckg.Elements)
         *      {
         *        //  String typ = "konfiguracja/development";
         *          String nadrzedne = "";
         *          String stat = "";
         *          bool analiza = false;
         *          Element e2 = null;
         *          if (elem.Stereotype != warunekIF && elem.Stereotype != warunekIF2) continue;
         *          foreach (Connector con in elem.Connectors)
         *          {
         *
         *              if (con.Type == "Realisation")
         *              {
         *                  e2 = Repo.GetElementByID(con.SupplierID);
         *                  if (e2.Type == "Requirement")
         *                  {
         *                      nadrzedne += e2.Name + "\n";
         *                      stat += e2.Status + "\n";
         *                      if (e2.Status != "Uzgodnione" && e2.Status != "Anulowane przez IT" && e2.Status != "Anulowane przez BO")
         *                      {
         *                          analiza = true;
         *                      }
         *                  }
         *              }
         *          }
         *          Wordy.WdColor kolor1 = Wordy.WdColor.wdColorBlack;
         *          Wordy.WdColor kolor2 = Wordy.WdColor.wdColorGray25;
         *          int i = 1;
         *      //    w += "<tr><td>" + elem.Name + "</td><td>" + elem.Notes + "</td><td>" + nadrzedne + "</td></tr>\n";
         *               Wordy.Table tab = word.wstawTabele("", new string[] {elem.Name, elem.Status });
         *               tab.Columns[1].SetWidth(350f, Wordy.WdRulerStyle.wdAdjustNone);
         *               tab.Rows[i].Cells[1].Shading.BackgroundPatternColor = kolor1;
         *               tab.Rows[i].Cells[2].Shading.BackgroundPatternColor = kolor1;
         *              tab.Columns[2].SetWidth(150f, Wordy.WdRulerStyle.wdAdjustNone);
         *
         *
         *
         *          if (elem.Status != "Uzgodnione" && elem.Status != "Anulowane przez IT" && elem.Status != "Anulowane przez BO")
         *          {
         *              tab.Cell(i, 2).Range.Comments.Add(tab.Cell(i, 2).Range, "Wymaganie w trakcie analizy");
         *          }
         *          i++;
         *          word.wstawWierszDoTabeli("", tab, i, new string[] { "Nadrzędne wymaganie biznesowe", "Status nadrzędnego wymagania" });
         *          tab.Rows[i].Cells[1].Shading.BackgroundPatternColor = kolor2;
         *          tab.Rows[i].Cells[2].Shading.BackgroundPatternColor = kolor2;
         *          i++;
         *          if (e2 == null)
         *          {
         *              word.wstawWierszDoTabeli("", tab, i, new string[] { "Brak", "Brak" });
         *          }
         *          else
         *          {
         *              word.wstawWierszDoTabeli("", tab, i, new string[] { nadrzedne, stat });
         *              if (analiza)
         *              {
         *                  tab.Cell(i, 2).Range.Comments.Add(tab.Cell(i, 2).Range, "Wymaganie w trakcie analizy");
         *              }
         *          }
         *          tab.Rows[i].Cells[1].Shading.BackgroundPatternColor = Wordy.WdColor.wdColorWhite;
         *          tab.Rows[i].Cells[2].Shading.BackgroundPatternColor = Wordy.WdColor.wdColorWhite;
         *          i++;
         *          word.wstawWierszDoTabeli("", tab, i, new string[] { "Sposób realizacji","" },false);
         *          tab.Cell(i, 1).Merge(tab.Cell(i, 2));
         *          tab.Rows[i].Cells[1].Shading.BackgroundPatternColor = kolor2;
         *          i++;
         *          word.wstawParagraf(elem.Notes, 0);
         *         // word.wstawWierszDoTabeli("", tab, i, new string[] { elem.Notes});
         *          //tab.Cell(i, 1).Merge(tab.Cell(i, 2));
         *          word.wstawZalacznikRTF(elem);
         *          if (elem.Notes == "" && elem.GetLinkedDocument() == "")
         *          {
         *                word.wstawParagraf("Wymaganie w trakcie analizy...", 0,"Brak opisu realizacji wymagania");
         *          }
         *          word.wstawParagraf("", 0);
         *          i++;
         *
         *      }
         *      return w;
         *  }*/
        /// <summary>
        /// Zrzut feature systemowych, ktore nie maja statusów obsługiwanych w innych przypadkach
        /// </summary>
        /// <param name="pakiet">Pakiet wkładu systemowego</param>
        /// <param name="nrRozdz">numer rozdziału</param>
        /// <param name="lp">LP</param>
        /// <param name="stereotypy">Lista stereotypów do filtrowania</param>
        /// <param name="kolejnosc">Numer podrozdziału</param>
        /// <param name="opis">Opis podrozdziału</param>
        /// <returns></returns>
        private String dajWymaganiaSyst_nowyModel(Package pakiet, ref int nrRozdz, int lp, String kolejnosc, String opis)
        {
            String  w       = "";
            Package wymPckg = EAUtils.utworzPakietGdyBrak(ref pakiet, "Wymagania Systemowe", "");

            w += "<h3>" + numer + "." + lp + ".3." + kolejnosc + opis + " </h3>\n";

            word.wstawParagraf(numer + "." + lp + ".3." + kolejnosc + opis, 4);

            String[] stereotypy = CmodelKonfigurator.stereotypyFeatureSystemowychBezpieczeństwa;
            stereotypy = stereotypy.Concat(CmodelKonfigurator.stereotypyFeatureSystemowychDostepnosc).ToArray();

            stereotypy = stereotypy.Concat(CmodelKonfigurator.stereotypyFeatureSystemowychInfrastrukturalne).ToArray();
            stereotypy = stereotypy.Concat(CmodelKonfigurator.stereotypyFeatureSystemowychPojemnosc).ToArray();

            int licznik = 0;

            foreach (Element e in wymPckg.Elements)
            {
                if (!CmodelKonfigurator.czyZawiera(e.Stereotype, stereotypy))
                {
                    licznik++;
                }
            }
            if (licznik == 0)
            {
                w += "Brak";
                if (jezykPolski)
                {
                    word.wstawParagraf("Brak", word.stylNorm);
                }
                else
                {
                    word.wstawParagraf("None", word.stylNorm);
                }
                return(w);
            }

            w += dajWymaganiaXXXNowaPrezentacja3(wymPckg, stereotypy, true);

            return(w + "</table>\n");
        }
Exemplo n.º 28
0
        public Crozdz4(EA.Repository r, String sciezkaZrodlo, String sciezkaDocelowa, String nrRozdzialu, Word W, Statystyki o, bool jezykPl)
            : base(sciezkaZrodlo, sciezkaDocelowa)
        {
            jezykPolski = jezykPl;
            okno        = o;
            word        = W;
            NrRozdzialu = nrRozdzialu;
            Repo        = r;
            Package model = EAUtils.dajModelPR(ref Repo);//.Models.GetAt(0);

            pakietPckg = EAUtils.utworzPakietGdyBrak(ref model, NrRozdzialu, "");
            wkladyPckg = EAUtils.utworzPakietGdyBrak(ref pakietPckg, "Wkłady Systemowe", "");
            numer      = "";
            if (NrRozdzialu == "IT")
            {
                numer += "5";
            }
            else
            {
                numer += "6";
            }
        }
Exemplo n.º 29
0
        public PackageConnectionSettingsModel Read()
        {
            PackageConnectionSettingsModel result = new PackageConnectionSettingsModel();
            PackageConnectionSettingsType  type;

            if (Enum.TryParse(EAUtils.ReadTaggedValue(package.Element.TaggedValues, EAGoatJira.TagValueNamePackageType, ""), out type))
            {
                result.Type = type;
            }
            else
            {
                result.Type = PackageConnectionSettingsType.Jql;
            }

            string QueryValue = EAUtils.ReadTaggedValue(package.Element.TaggedValues, EAGoatJira.TagValueNamePackageJql, "");

            result.Jql = result.EpicsAndStoriesJql = result.UserSavedSearch = "";
            switch (result.Type)
            {
            case PackageConnectionSettingsType.Jql:
                result.Jql = QueryValue;
                break;

            case PackageConnectionSettingsType.EpicsAndStories:
                result.EpicsAndStoriesJql = QueryValue;
                break;

            case PackageConnectionSettingsType.UserSearch:
                result.UserSavedSearch = QueryValue;
                break;

            default:
                throw new NotImplementedException();
            }
            return(result);
        }
Exemplo n.º 30
0
        /* do usuniecia
         * private String __dajWymaganiaXXX(Package pakiet, ref int nrRozdz, int lp,String warunekIF, String warunekIF2,String kolejnosc,String jakie)
         * {
         *  String w = "";
         *  Package wymPckg = EAUtils.utworzPakietGdyBrak(ref pakiet, "Wymagania Systemowe", "");
         *
         *  w += "<h3>"+numer+"."+lp+".3."+kolejnosc+" Wymagania "+jakie+" </h3>\n";
         *  if (jezykPolski)
         *  {
         *      word.wstawParagraf(numer + "." + lp + ".3." + kolejnosc + " Wymagania " + jakie, 4);
         *  }
         *  else
         *  {
         *      word.wstawParagraf(numer + "." + lp + ".3." + kolejnosc + " Requirements " + jakie, 4);
         *  }
         *  int licznik = 0;
         *  foreach (Element e in wymPckg.Elements)
         *  {
         *      if (e.Stereotype == warunekIF || e.Stereotype == warunekIF2) licznik++;
         *  }
         *  if (licznik==0)
         *  {
         *      w += "Brak";
         *      if (jezykPolski)
         *      {
         *          word.wstawParagraf("Brak", word.stylNorm);
         *      }
         *      else
         *      {
         *          word.wstawParagraf("None", word.stylNorm);
         *      }
         *      return w;
         *  }
         * //   w+=dajWymaganiaXXXStaraPrezentacja(wymPckg,warunekIF,warunekIF2);
         *  //w += dajWymaganiaXXXNowaPrezentacja(wymPckg, warunekIF, warunekIF2);
         *  w += dajWymaganiaXXXNowaPrezentacja2(wymPckg, warunekIF, warunekIF2);
         *
         *  return w+"</table>\n";
         * }*/
        private String dajDiagramSystemocentryczny(Package pakiet, ref int nrRozdz, int lp)
        {
            String w = "";

            w += "<div class=\"img\">";
            w += dajTytulRozdz("3", ref nrRozdz, "", "r" + numer + "-" + lp + "-3", "." + lp);
            foreach (Diagram diag in pakiet.Diagrams)
            {
                if (diag.Stereotype == CmodelKonfigurator.ukryjDiagramStr)
                {
                    continue;
                }
                w += "<div class=\"img\">";
                Diagram d = diag;

                /* kzg nowe poczatek
                 * //   String plik = EAUtils.zapiszDiagramJakoObrazStare(ref Repo, ref d, dajSciezkeDocelowa());
                 *
                 * */
                String plik = EAUtils.zapiszDiagramJakoObraz(modelProjektu, ref d, dajSciezkeDocelowa());
                //kzg nowe koniec
                w += "<img src='" + plik + "'>\n";
                word.wstawObrazek(dajSciezkeDocelowa() + plik);
                if (jezykPolski)
                {
                    word.wstawParagraf("Diagram systemo-centryczny " + diag.Notes, word.stylPodpis);
                }
                else
                {
                    word.wstawParagraf("System-centric diagram " + diag.Notes, word.stylPodpis);
                }
                modelProjektu.Repozytorium.CloseDiagram(diag.DiagramID);
                w += "<div class=\"desc\">Diagram systemo-centryczny " + diag.Notes + "</div>";
            }
            return(w + "</div>\n");
        }