public frmActorChooser(String [] actors, Localizer localizer)
        {
            //
            // Necessario per il supporto di Progettazione Windows Form
            //
            InitializeComponent();

            //
            // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent
            //
            localizer.LocalizeControls(this);
            lbActors.Items.Clear();
            foreach(String actor in actors)
            {
                lbActors.Items.Add(actor);
            }

            if(lbActors.Items.Count == 0)
            {
                btnOK.Enabled = false;
            }
            else
            {
                btnOK.Enabled = true;
                lbActors.SelectedIndex = 0;
            }
        }
        public frmRequirementEditor(Requirement requirement, Model model, Localizer localizer)
        {
            InitializeComponent();

            this.requirement = requirement;
            this.model = model;
            this.localizer = localizer;

            this.localizer.LocalizeControls(this);

            this.lockModified = true;

            // Details page
            foreach(ReferencedObject refobj in this.requirement.Proponents)
            {
                Stakeholder stakeholder = this.model.GetStakeholder(refobj.UniqueID);
                if(stakeholder != null)
                {
                    ListViewItem lvi = new ListViewItem();
                    lvi.Text = stakeholder.Name;
                    this.lvPBStakeholders.Items.Add(lvi);
                }
            }

            foreach(ReferencedObject refobj in this.requirement.Beneficiaries)
            {
                Stakeholder stakeholder = this.model.GetStakeholder(refobj.UniqueID);
                if(stakeholder != null)
                {
                    ListViewItem lvi = new ListViewItem();
                    lvi.Text = stakeholder.Name;
                    this.lvBTStakeholders.Items.Add(lvi);
                }
            }

            foreach(ReferencedObject refobj in this.requirement.MappedUseCases)
            {
                UseCase useCase = (UseCase)this.model.FindElementByUniqueID(refobj.UniqueID);
                if(useCase != null)
                {
                    ListViewItem lvi = new ListViewItem();
                    lvi.Text = useCase.Name;
                    this.lvMappedOntoUCs.Items.Add(lvi);
                }
            }

            cmbCategory.SelectedIndex = (Int32)this.requirement.Category;
            cmbImportance.SelectedIndex = (Int32)this.requirement.Importance;
            cmbStatus.SelectedIndex = (Int32)this.requirement.Status;
            cmbAcceptanceStatus.SelectedIndex = (Int32)this.requirement.AcceptanceStatus;

            this.UpdateHistoryView();

            this.SetButtons();

            this.lockModified = false;

            this.ImeMode = ImeMode.On;
        }
예제 #3
0
        /**
         * @brief Costruttore di default per XMIConverter
         */
        public PDFConverter(
			string stylesheetFilesPath,
			string pdfFilesPath,
			Localizer localizer)
        {
            this.stylesheetFilesPath = stylesheetFilesPath;
            this.pdfFilesPath = pdfFilesPath;
            this.localizer = localizer;
        }
예제 #4
0
        /**
         * @brief Costruttore di default per XMIConverter
         */
        public RTFConverter(
			string stylesheetFilesPath,
			string rtfFilesPath,
			Localizer localizer)
        {
            this.stylesheetFilesPath = stylesheetFilesPath;
            this.rtfFilesPath = rtfFilesPath;
            this.localizer = localizer;
        }
예제 #5
0
        public HTMLConverter(
			string stylesheetFilesPath,
			string htmlFilesPath,
			Localizer localizer)
        {
            this.stylesheetFilesPath = stylesheetFilesPath;
            this.htmlFilesPath = htmlFilesPath;
            this.localizer = localizer;
        }
        public frmHistoryNotes(Localizer localizer)
        {
            //
            // Necessario per il supporto di Progettazione Windows Form
            //
            InitializeComponent();

            //
            // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent
            //
            localizer.LocalizeControls(this);
        }
예제 #7
0
        public frmNameChanger(Localizer localizer, string elementType)
        {
            //
            // Necessario per il supporto di Progettazione Windows Form
            //
            InitializeComponent();

            //
            // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent
            //
            localizer.LocalizeControls(this);
            this.Text += ": " + elementType;
        }
        public frmSearchReplace(frmMain parent, Localizer localizer)
        {
            this.parent = parent;

            InitializeComponent();

            this.Reset();

            this.localizer = localizer;

            this.localizer.LocalizeControls(this);

            this.ImeMode = ImeMode.On;
        }
예제 #9
0
		public frmReorder(Localizer localizer, string prefix)
		{
			//
			// Necessario per il supporto di Progettazione Windows Form
			//
			InitializeComponent();

			//
			// TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent
			//
			this.prefix = prefix;
			localizer.LocalizeControls(this);

			btnMoveDown.Enabled = false;
			btnMoveUp.Enabled = false;
		}
예제 #10
0
        public frmChooser(
            Model model,
            Localizer localizer,
            String elementType)
        {
            InitializeComponent();

            this.model = model;
            this.localizer = localizer;
            this.localizer.LocalizeControls(this);
            this.Text += ": " + elementType;

            this.selected = null;
            this.btnOK.Enabled = false;
            this.tvModelBrowser.SelectedNode = null;
        }
예제 #11
0
        public frmTabView(frmMain parent,
            object element,
            SepararatorCollection separators,
            HighLightDescriptorCollection hdc,
            Localizer localizer)
        {
            this.parent = parent;
            this.currentElement = element;
            this.localizer = localizer;
            this.hdc = hdc;
            this.separators = separators;

            InitializeComponent();

            localizer.LocalizeControls(this);

            this.ImeMode = ImeMode.On;
        }
예제 #12
0
        public frmRefSelector(UseCase caller, Model model, Localizer localizer)
        {
            //
            // Necessario per il supporto di Progettazione Windows Form
            //
            InitializeComponent();

            //
            // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent
            //
            this.caller = caller;
            this.model = model;
            this.localizer = localizer;
            this.localizer.LocalizeControls(this);
            this.lblUpperUseCase.Text = caller.Name;
            this.lblLowerUseCase.Text = "";
            this.selected = null;
            this.btnOK.Enabled = false;
            this.btnSwap.Enabled = false;
        }
예제 #13
0
		public frmOptions(ApplicationSettings appSettings, Localizer localizer)
		{
			//
			// Necessario per il supporto di Progettazione Windows Form
			//
			InitializeComponent();

			//
			// TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent
			//
			XmlDocument locals = new XmlDocument();
			try
			{
				locals.Load(appSettings.LanguagesFilePath + Path.DirectorySeparatorChar + "Localization_list.xml");
			}
			catch(Exception)
			{
				MessageBox.Show(
					this,
					"Cannot load the localization list file!",
					Application.ProductName,
					MessageBoxButtons.OK,
					MessageBoxIcon.Warning);
				return;
			}

			try
			{
				XmlNode localsNode = locals.SelectSingleNode("//Localizations");
				foreach(XmlNode node in localsNode.ChildNodes)
				{
					if(node.NodeType == XmlNodeType.Element &&
						node.Name == "Localization")
					{
						if(node.Attributes["Description"] != null &&
							node.Attributes["Country"] != null && 
							node.Attributes["RefCode"] != null)
						{
							ListViewItem lvi = new ListViewItem();
							lvi.Text = node.Attributes["Description"].Value;
							lvi.SubItems.Add(node.Attributes["Country"].Value);
							lvi.SubItems.Add(node.Attributes["RefCode"].Value);
							lvOptLanguages.Items.Add(lvi);
						}
					}
				}
			}
			catch(XmlException)
			{
				MessageBox.Show(
					this,
					"Malformed xml format!",
					Application.ProductName,
					MessageBoxButtons.OK,
					MessageBoxIcon.Hand);
			}

			foreach(ListViewItem lvi in lvOptLanguages.Items)
			{
				if(lvi.SubItems[2].Text == appSettings.UILanguage)
				{
					lvi.Selected = true;
					break;
				}
			}

			this.previousLanguage = appSettings.UILanguage;
			this.appSettings = appSettings;
			this.localizer = localizer;
			localizer.LocalizeControls(this);
		}
예제 #14
0
        public frmOptions(ApplicationSettings appSettings, Localizer localizer)
        {
            //
            // Necessario per il supporto di Progettazione Windows Form
            //
            InitializeComponent();

            //
            // TODO: aggiungere il codice del costruttore dopo la chiamata a InitializeComponent
            //
            XmlDocument local = new XmlDocument();
            DirectoryInfo di = new DirectoryInfo(appSettings.LanguagesFilePath + Path.DirectorySeparatorChar);

            foreach(FileInfo fi in di.GetFiles(appSettings.LanguageFileNamePrefix + "*.xml"))
            {
                try
                {
                    local.Load(fi.FullName);
                }
                catch(Exception)
                {
                    MessageBox.Show(
                        this,
                        "Cannot load the localization file: " + fi.Name,
                        Application.ProductName,
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Warning);
                    return;
                }

                try
                {
                    XmlNode node = local.DocumentElement;
                    if(node.Attributes["Description"] != null &&
                        node.Attributes["Country"] != null &&
                        node.Attributes["RefCode"] != null)
                    {
                        ListViewItem lvi = new ListViewItem();
                        lvi.Text = node.Attributes["Description"].Value;
                        lvi.SubItems.Add(node.Attributes["Country"].Value);
                        lvi.SubItems.Add(node.Attributes["RefCode"].Value);
                        lvOptLanguages.Items.Add(lvi);
                    }
                }
                catch(XmlException)
                {
                    MessageBox.Show(
                        this,
                        "Malformed xml format: " + fi.Name,
                        Application.ProductName,
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Hand);
                }
            }

            if(lvOptLanguages.Items.Count == 0)
            {
                btnOK.Enabled = false;
            }

            foreach(ListViewItem lvi in lvOptLanguages.Items)
            {
                if(lvi.SubItems[2].Text == appSettings.UILanguage)
                {
                    lvi.Selected = true;
                    break;
                }
            }

            this.previousLanguage = appSettings.UILanguage;
            this.appSettings = appSettings;
            this.localizer = localizer;
            localizer.LocalizeControls(this);
        }