Inheritance: AddinGui, IAddinControl
コード例 #1
0
        /// <summary>
        /// Constructor with
        /// </summary>
        /// <param name="settings">Object with settings</param>
        /// <param name="addinControl">Object with Control</param>
        public FrmSettingsToolbar(AddinSettings settings, AddinControlGui addinControl)
        {
            InitializeComponent();

            _settings = settings;
            _addinControl = addinControl;
            _model = addinControl.Model;

        }
        /// <summary>
        /// Constructor with
        /// </summary>
        /// <param name="settings">Object with settings</param>
        /// <param name="addinControl">Object with Control</param>
        public FrmSettingsLineStyle(AddinSettings settings, AddinControlGui addinControl)
        {
            InitializeComponent();

            _settings = settings;
            _addinControl = addinControl;

          
            #region line style
            // line style
            var items = new string[]{"A Automatic","C Custom","D Direct","B Bezier curve",
                "LV Lateral Vertical","LH Lateral Horizontal","no","OR Orthogonal Rounded",
                "OS Orthogonal Square","TH Tree Horizontal","TV Tree Vertical"};
            string[] itemsActivity = new string[items.Length];
            items.CopyTo(itemsActivity, 0);

            string[] itemsStatechart = new string[items.Length];
            items.CopyTo(itemsStatechart, 0);

            string[] itemsCustom = new string[items.Length];
            items.CopyTo(itemsCustom, 0);

            string[] itemsClass = new string[items.Length];
            items.CopyTo(itemsClass, 0);

            string[] itemsComponent = new string[items.Length];
            items.CopyTo(itemsComponent, 0);

            string[] itemsUseCase = new string[items.Length];
            items.CopyTo(itemsUseCase, 0);

            string[] itemsPackage = new string[items.Length];
            items.CopyTo(itemsPackage, 0);

            string[] itemsDeployment = new string[items.Length];
            items.CopyTo(itemsDeployment, 0);

            string[] itemsCompositeStructure = new string[items.Length];
            items.CopyTo(itemsCompositeStructure, 0);



            this.cboActivityLineStyle.DataSource = itemsActivity;
            this.cboStatechartLineStyle.DataSource = itemsStatechart;
            this.cboClassLineStyle.DataSource = itemsClass; 
            this.cboComponentLineStyle.DataSource = itemsComponent;
            this.cboPackageLineStyle.DataSource = itemsPackage; 
            this.cboCustomLineStyle.DataSource = itemsCustom; 
            this.cboUseCaseLineStyle.DataSource = itemsUseCase; 
            this.cboDeploymentLineStyle.DataSource = itemsDeployment;
            this.cboCompositeStructureLineStyle.DataSource = itemsCompositeStructure; 

            this.cboActivityLineStyle.Text = settings.ActivityLineStyle;
            this.cboStatechartLineStyle.Text = settings.StatechartLineStyle;
            this.cboClassLineStyle.Text = settings.ClassLineStyle;
            this.cboComponentLineStyle.Text = settings.ComponentLineStyle;
            this.cboPackageLineStyle.Text = settings.PackageLineStyle;
            this.cboCustomLineStyle.Text = settings.CustomLineStyle;
            this.cboUseCaseLineStyle.Text = settings.UseCaseLineStyle;
            this.cboDeploymentLineStyle.Text = settings.DeploymentLineStyle;
            this.cboCompositeStructureLineStyle.Text = settings.CompositeStructureLineStyle;
            #endregion

            
            // Search
           


        }
コード例 #3
0
        /// <summary>
        /// Constructor with
        /// </summary>
        /// <param name="settings">Object with settings</param>
        /// <param name="addinControl"></param>
        public FrmSettingsGeneral(AddinSettings settings, AddinControlGui addinControl)
        {
            InitializeComponent();
            _settings = settings;
            _addinControl = addinControl;


            #region miscellaneous
            // SQL paths
            txtSqlSearchPath.Text = _settings.SqlPaths;
            txtAddinTabToFirstActivate.Text = _settings.AddinTabToFirstActivate;

            chkLineStyleSupport.Checked = settings.IsLineStyleSupport;
            chkShortKeySupport.Checked = settings.IsShortKeySupport;
            _chkQuickSearchSupport.Checked = settings.IsQuickSearchSupport;

            chkShowServiceButtons.Checked = settings.IsShowServiceButton;
            chkShowQueryButtons.Checked = settings.IsShowQueryButton;
            chkFavoriteSupport.Checked = settings.IsFavoriteSupport;
            chkConveyedItemSupport.Checked = settings.IsConveyedItemsSupport;


            txtQuickSearch.Text = settings.QuickSearchName;
            txtFileManagerPath.Text = settings.FileManagerPath;
            chkAdvancedFeatures.Checked = settings.IsAdvancedFeatures;
            chkSvnSupport.Checked = settings.IsSvnSupport;
            chkVcSupport.Checked = settings.IsVcSupport;
            chkAdvancedPort.Checked = settings.IsAdvancedPort;
            chkAdvancedDiagramNote.Checked = settings.IsAdvancedDiagramNote;
            #endregion

            #region AutoLoadMdg
            // Initialize Auto Load MDG
            switch (_settings.AutoLoadMdgXml)
            {
                case AddinSettings.AutoLoadMdg.Basic:
                    rbAutoLoadMdgBasic.Checked = true;
                    break;
                case AddinSettings.AutoLoadMdg.Compilation:
                    rbAutoLoadMdgCompilation.Checked = true;
                    break;
                default:
                    rbAutoLoadMdgNo.Checked = true;
                    break;
            }
            #endregion

            #region LineStyleAndMoreWindow
            // Initialize LineStyle Window
            switch (_settings.LineStyleAndMoreWindow)
            {
                case AddinSettings.ShowInWindow.AddinWindow:
                    rbLineStyleAndMoreAddinWindow.Checked = true;
                    break;
                case AddinSettings.ShowInWindow.TabWindow:
                    rbLineStyleAndMoreTabWindow.Checked = true;
                    break;
                default:
                    rbLineStyleAndMoreDisableWindow.Checked = true;
                    break;
            }
            #endregion

            #region SearchAndReplaceWindow
            // Initialize Search and Replace Window
            switch (_settings.SearchAndReplaceWindow)
            {
                case AddinSettings.ShowInWindow.AddinWindow:
                    rbSearchAndReplaceAddinWindow.Checked = true;
                    break;
                case AddinSettings.ShowInWindow.TabWindow:
                    rbSearchAndReplaceTabWindow.Checked = true;
                    break;
                default:
                    rbSearchAndReplaceDisableWindow.Checked = true;
                    break;
            }
            #endregion
        }