Beispiel #1
0
        public void ProjectSettings(object sender, EventArgs eventArgs)
        {
            // TODO should load from datastore on save and load of map only, otherwise store in plugin
            using (var form = new ProjectSettingsForm(m_dataStore, m_projectId))
            {
                var result = form.ShowDialog();

                if (result == DialogResult.OK)
                {
                    m_dataStore.Save(form.ProjectSettings, $"{form.ProjectSettings.Name}.Settings");
                }
            }
        }
Beispiel #2
0
        private void ProjectSettings_Click(object sender, RoutedEventArgs e)
        {
            ProjectSettingsForm projectSettingsForm = new ProjectSettingsForm();

            projectSettingsForm.Owner                   = this;
            projectSettingsForm.RteGenerationPath       = autosarApp.GenerateRtePath;
            projectSettingsForm.ComponentGenerationPath = autosarApp.GenerateComponentsPath;
            projectSettingsForm.Frequency               = autosarApp.SystickFrequencyHz;
            projectSettingsForm.ShowDialog();
            if (projectSettingsForm.DialogResult == true)
            {
                autosarApp.SystickFrequencyHz     = projectSettingsForm.Frequency;
                autosarApp.GenerateRtePath        = projectSettingsForm.RteGenerationPath;
                autosarApp.GenerateComponentsPath = projectSettingsForm.ComponentGenerationPath;
            }
        }
        private void ProjectSettings_Click(object sender, RoutedEventArgs e)
        {
            ProjectSettingsForm projectSettingsForm = new ProjectSettingsForm();

            projectSettingsForm.Owner                         = this;
            projectSettingsForm.RteGenerationPath             = autosarApp.GenerateRtePath;
            projectSettingsForm.ComponentGenerationPath       = autosarApp.GenerateComponentsPath;
            projectSettingsForm.Frequency                     = autosarApp.SystickFrequencyHz;
            projectSettingsForm.McuTypeComboBox.SelectedIndex = autosarApp.MCUType.ToInt();
            projectSettingsForm.ShowDialog();
            if (projectSettingsForm.DialogResult == true)
            {
                autosarApp.SystickFrequencyHz     = projectSettingsForm.Frequency;
                autosarApp.GenerateRtePath        = projectSettingsForm.RteGenerationPath;
                autosarApp.GenerateComponentsPath = projectSettingsForm.ComponentGenerationPath;
                autosarApp.MCUType.Type           = (MCUTypeDef)projectSettingsForm.McuTypeComboBox.SelectedIndex;
            }
        }
		/// <summary>
		/// Edits the project settings with dialog.
		/// </summary>
		public void EditProjectSettingsWithDialog()
		{
			using (var form = new ProjectSettingsForm())
			{
				form.Initialize(Project);
				if (form.ShowDialog(this) == DialogResult.OK)
				{
					Project.MarkAsModified();
				}
			}
		}