示例#1
0
        /// <summary>
        /// Perform Initializations For This Object.
        /// </summary>
        public void Init()
        {
            // Setup the listener
            this.BindingCallbackOptionControl.SelectedIndexListener = this;

            // Set Dock To Fill
            this.Dock = DockStyle.Fill;

            // This is the first control, there is not a previous control
            this.PrevControl = ActiveControlEnum.NotSet;

            // Set the next control
            this.NextControl = ActiveControlEnum.DatabasesTab;

            // Load the binding choices
            BindingCallbackOptionControl.LoadItems(typeof(BindingCallbackOptionEnum));

            // Load the ProjectTypes combo box
            ProjectTypeControl.LoadItems(typeof(TargetFrameworkEnum));

            // Setup the listener
            ProjectTypeControl.SelectedIndexListener = this;

            // Set the SelectedIndex
            ProjectTypeControl.SelectedIndex = ProjectTypeControl.FindItemIndexByValue("Net6");

            // Should call UIEnable
            OnSelectedIndexChanged(ProjectTypeControl, ProjectTypeControl.SelectedIndex, ProjectTypeControl.SelectedObject);
        }
示例#2
0
        /// <summary>
        /// Display the selected project.
        /// </summary>
        public void DisplaySelectedProject()
        {
            // locals
            string projectName          = "";
            string projectFolder        = "";
            bool   enableBlazorFeatures = false;
            int    bindingIndex         = -1;
            int    projectTypeIndex     = ProjectTypeControl.FindItemIndexByValue("Net6");
            string uiFolderPath         = "";

            // if the SelectedProject Exists
            if (this.SelectedProject != null)
            {
                // set values
                projectName          = this.SelectedProject.ProjectName;
                projectFolder        = this.SelectedProject.ProjectFolder;
                enableBlazorFeatures = SelectedProject.EnableBlazorFeatures;
                bindingIndex         = FindBindingIndex(SelectedProject.BindingCallbackOption);
                projectTypeIndex     = ProjectTypeControl.FindItemIndexByValue(SelectedProject.TargetFramework.ToString());
                uiFolderPath         = SelectedProject.UIFolderPath;
            }

            // dislay values now
            ProjectNameTextBox.Text                    = projectName;
            ProjectFolderTextBox.Text                  = projectFolder;
            ProjectTypeControl.SelectedIndex           = projectTypeIndex;
            BlazorServicesCheckBox.Checked             = enableBlazorFeatures;
            BindingCallbackOptionControl.SelectedIndex = bindingIndex;
            UIFolderTextBox.Text = uiFolderPath;

            // Enable controls
            UIEnable();
        }