예제 #1
0
        public MaterialControl()
        {
            InitializeComponent();

            // test is for designer only
            if (ParameterInput.MainParameterInput != null && ParameterInput.MainParameterInput.MainDataViewControl != null)
            {
                _rendererControl = new DataViewControlPage(ParameterInput.MainParameterInput.MainDataViewControl);
                _rendererControl.Dock = DockStyle.Fill;
                _rendererControl.Create(new string[]
                    {
                    "Renderer.ColorInside",
                    "Renderer.ColorOutside",
                    "Renderer.ColorIntensity",
                    "Renderer.ColorGreyness",
                    "Renderer.Brightness",
                    "Renderer.Contrast",
                    "Renderer.LightIntensity",
                    "Renderer.BrightLightLevel",
                    "Renderer.ShininessFactor",
                    "Renderer.Shininess",
                    "Renderer.ShadowJustify"
                    }
                    );
                pnlRenderer.Controls.Add(_rendererControl);
            }
        }
예제 #2
0
 /// <summary>
 /// Constructer.
 /// </summary>
 public AnimationControl()
 {
     InitializeComponent();
     _mainAnimationControl = this;
     if (ParameterInput.MainParameterInput != null && ParameterInput.MainParameterInput.MainDataViewControl != null)
     {
         _propertyControl = new DataViewControlPage(ParameterInput.MainParameterInput.MainDataViewControl);
         _propertyControl.Dock = DockStyle.Fill;
         _propertyControl.Create("Animation");
         panel3.Controls.Add(_propertyControl);
     }
 }
예제 #3
0
        /// <summary>
        /// Constructer.
        /// </summary>
        public AnimationControl()
        {
            InitializeComponent();
            _mainAnimationControl = this;
            if (ParameterInput.MainParameterInput != null && ParameterInput.MainParameterInput.MainDataViewControl != null)
            {
                _propertyControl = new DataViewControlPage(ParameterInput.MainParameterInput.MainDataViewControl);
                _propertyControl.Dock = DockStyle.Fill;
                _propertyControl.Create("Animation");
                panel3.Controls.Add(_propertyControl);
                this.cbSmooth.Visible = false;
                this.tbSize.Visible = false;
                this.label1.Visible = false;
                this.tbAnimationDescription.ScrollBars = ScrollBars.None;
                this.tbAnimationDescription.BorderStyle = BorderStyle.None;
            //                this.tbAnimationDescription.FlatStyle = System.Windows.Forms.FlatStyle.Flat;

            }
        }
예제 #4
0
        /// <summary>
        /// Contructer.
        /// </summary>
        public NavigateControl()
        {
            InitializeComponent();
            panel2.Visible = false;

            UpdateMoveButtonAppearance();
            UpdateMoveAngleButtonAppearance();

            // This prevents the designer to read this block.
            if (ParameterInput.MainParameterInput != null && ParameterInput.MainParameterInput.MainDataViewControl != null)
            {
                _propertyControl = new DataViewControlPage(ParameterInput.MainParameterInput.MainDataViewControl);
                _propertyControl.Dock = DockStyle.Fill;
                _propertyControl.Create("Transformation");
                pnlProperties.Controls.Add(_propertyControl);
                _propertyControlBbox = new DataViewControlPage(ParameterInput.MainParameterInput.MainDataViewControl);
                _propertyControlBbox.Dock = DockStyle.Fill;
                _propertyControlBbox.Create("Scene");
                pnlBorderProperties.Controls.Add(_propertyControlBbox);
            }
            mZoomFactor = 1.2;
        }
예제 #5
0
        /// <summary>
        /// A new category (as node in the tree view is selected). This control
        /// has to display all corresponding entries.
        /// </summary>
        public void Select(string category)
        {
            if (category == "")
            {
                return;
            }
            this.SuspendLayout();
            DataViewControlPage newPage = null;

            if (_pages.ContainsKey(category))
            {
                newPage = _pages[category];
                if (newPage.NodeHash == ParameterDict.Current.GetHashOfName(category))
                {
                    newPage.UpdateElements();
                    newPage.Update();
                }
                else
                {
                    newPage = new DataViewControlPage(this);
                    newPage.Create(category);
                    _pages[category] = newPage;
                }
            }
            else
            {
                newPage = new DataViewControlPage(this);
                newPage.Create(category);
                _pages[category] = newPage;
            }
            if (_oldNodeHash != newPage.NodeHash)
            {
                pnlMain.Controls.Clear();
                pnlMain.Controls.Add(newPage);
                this.Height = newPage.ComputedHeight;
            }
            this.ResumeLayout(true);
            _oldNodeHash = newPage.NodeHash;
        }
예제 #6
0
 /// <summary>
 /// A new category (as node in the tree view is selected). This control 
 /// has to display all corresponding entries.
 /// </summary>
 public void Select(string category)
 {
     if (category == "")
         return;
     this.SuspendLayout();
     DataViewControlPage newPage = null;
     if (_pages.ContainsKey(category))
     {
         newPage = _pages[category];
         if (newPage.NodeHash == ParameterDict.Current.GetHashOfName(category))
         {
             newPage.UpdateElements();
             newPage.Update();
         }
         else
         {
             newPage = new DataViewControlPage(this);
             newPage.Create(category);
             _pages[category] = newPage;
         }
     }
     else
     {
         newPage = new DataViewControlPage(this);
         newPage.Create(category);
         _pages[category] = newPage;
     }
     if (_oldNodeHash != newPage.NodeHash)
     {
         pnlMain.Controls.Clear();
         pnlMain.Controls.Add(newPage);
         this.Height = newPage.ComputedHeight;
     }
     this.ResumeLayout(true);
     _oldNodeHash = newPage.NodeHash;
 }