public DisComboBox()
 {
     Click += new EventHandler(DisComboBox_Click);
       Leave += new EventHandler(DisComboBox_Leave);
       ForeColor = System.Drawing.Color.Gray;
       Margin = new Padding(ConstControls.CONTROL_INDENT_SMALL);
 }
        public MarginCommand(CommandManager commandManager)
            : base(CommandId.MarginsGroup)
        {
            RepresentativeString = Res.Get(StringId.SpinnerPixelRepresentativeString);
            FormatString = Res.Get(StringId.SpinnerPixelFormatString);

            // @RIBBON TODO: Have a way to initialize this.
            marginValue = new Padding(Convert.ToInt32(MinMargin));

            commandManager.BeginUpdate();

            commandLeftMargin = new SpinnerCommand(CommandId.AdjustLeftMargin, MinMargin, MaxMargin, MinMargin, Increment, DecimalPlaces, RepresentativeString, FormatString);
            commandManager.Add(commandLeftMargin, commandMargin_ExecuteWithArgs);

            commandTopMargin = new SpinnerCommand(CommandId.AdjustTopMargin, MinMargin, MaxMargin, MinMargin, Increment, DecimalPlaces, RepresentativeString, FormatString);
            commandManager.Add(commandTopMargin, commandMargin_ExecuteWithArgs);

            commandRightMargin = new SpinnerCommand(CommandId.AdjustRightMargin, MinMargin, MaxMargin, MinMargin, Increment, DecimalPlaces, RepresentativeString, FormatString);
            commandManager.Add(commandRightMargin, commandMargin_ExecuteWithArgs);

            commandBottomMargin = new SpinnerCommand(CommandId.AdjustBottomMargin, MinMargin, MaxMargin, MinMargin, Increment, DecimalPlaces, RepresentativeString, FormatString);
            commandManager.Add(commandBottomMargin, commandMargin_ExecuteWithArgs);

            commandManager.EndUpdate();
        }
        /// <summary>
        /// Deserializes the padding.
        /// </summary>
        /// <param name="encodedValue">The encoded value.</param>
        /// <param name="defaultValue">The default value.</param>
        /// <returns></returns>
        public static Padding DeserializePadding(string encodedValue, Padding defaultValue)
        {
            if (!string.IsNullOrEmpty(encodedValue))
            {
                var intValues = new int[4];
                string[] values = encodedValue.Split(new[] {PaddingSeperator});

                if (values.Length >= 4)
                {
                    for (int i = 0; i < 4; i++)
                    {
                        if (!Int32.TryParse(values[i], out intValues[i]))
                        {
                            goto returnDefault;
                        }
                    }

                    return new Padding(intValues[0], intValues[1], intValues[2], intValues[3]);
                }
            }

            returnDefault:

            return defaultValue;
        }
 public BasicControl()
 {
     DoubleBuffered = true;
     ResizeRedraw = true;
     Margin = new Padding(0);
     Dock = DockStyle.Fill;
 }
Exemple #5
0
 public MenuStrip()
 {
     BorderColor = Drawing.Color.Transparent;
     Orientation = Forms.Orientation.Horizontal;
     Padding = new Padding(2);
     Size = new System.Drawing.Size(600, 24);
 }
Exemple #6
0
 public DarkTextBox()
 {
     BackColor = Colors.LightBackground;
     ForeColor = Colors.LightText;
     Padding = new Padding(2, 2, 2, 2);
     BorderStyle = BorderStyle.FixedSingle;
 }
Exemple #7
0
        public FormToon()
        {
            InitializeComponent();

            this.camera = new Camera(CameraType.Ortho, this.glCanvas1.Width, this.glCanvas1.Height);

            satelliteRoration = new SatelliteRotator(camera);

            Padding padding = new System.Windows.Forms.Padding(40, 40, 40, 40);
            Size size = new Size(100, 100);
            IUILayoutParam param;
            param = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Bottom, padding, size);
            uiLeftBottomAxis = new SimpleUIAxis(param);

            uiLeftBottomAxis.Initialize();

            CreateElement();

            this.glCanvas1.MouseWheel += glCanvas1_MouseWheel;
            this.glCanvas1.KeyPress += glCanvas1_KeyPress;
            this.glCanvas1.MouseDown += glCanvas1_MouseDown;
            this.glCanvas1.MouseMove += glCanvas1_MouseMove;
            this.glCanvas1.MouseUp += glCanvas1_MouseUp;
            this.glCanvas1.OpenGLDraw += glCanvas1_OpenGLDraw;
            this.glCanvas1.Resize += glCanvas1_Resize;

            Application.Idle += Application_Idle;
        }
        public GráficoCotação()
        {
            InitializeComponent();

            períodoInicial = DateTime.Now.Subtract(new TimeSpan(182, 0, 0, 0));
            períodoFinal = DateTime.MaxValue;
            Padding = new Padding(0);
        }
        public FormSimpleUIRect()
        {
            InitializeComponent();

            //if (CameraDictionary.Instance.ContainsKey(this.GetType().Name))
            //{
            //    this.camera = CameraDictionary.Instance[this.GetType().Name];
            //}
            //else
            {
                this.camera = new Camera(CameraType.Ortho, this.glCanvas1.Width, this.glCanvas1.Height);
                //CameraDictionary.Instance.Add(this.GetType().Name, this.camera);
            }

            satelliteRoration = new SatelliteRotator(camera);

            Padding padding = new System.Windows.Forms.Padding(10, 10, 10, 10);
            Size size = new Size(100, 100);
            IUILayoutParam param;
            param = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Bottom, padding, size);
            uiLeftBottomRect = new SimpleUIRect(param);
            legacyLeftBottomRect = new LegacySimpleUIRect(param, new Objects.GLColor(1, 1, 1, 1));

            param = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Top, padding, size);
            uiLeftTopRect = new SimpleUIRect(param);
            legacyLeftTopRect = new LegacySimpleUIRect(param, new Objects.GLColor(1, 1, 1, 1));

            param = new IUILayoutParam(AnchorStyles.Right | AnchorStyles.Bottom, padding, size);
            uiRightBottomRect = new SimpleUIRect(param);
            legacyRightBottomRect = new LegacySimpleUIRect(param, new Objects.GLColor(1, 1, 1, 1));

            param = new IUILayoutParam(AnchorStyles.Right | AnchorStyles.Top, padding, size);
            uiRightTopRect = new SimpleUIRect(param);
            legacyRightTopRect = new LegacySimpleUIRect(param, new Objects.GLColor(1, 1, 1, 1));

            uiLeftBottomRect.Initialize();
            uiLeftTopRect.Initialize();
            uiRightBottomRect.Initialize();
            uiRightTopRect.Initialize();

            legacyLeftBottomRect.Initialize();
            legacyLeftTopRect.Initialize();
            legacyRightBottomRect.Initialize();
            legacyRightTopRect.Initialize();

            axisElement = new AxisElement();
            axisElement.Initialize();
            axisElement.BeforeRendering += axisElement_BeforeRendering;
            axisElement.AfterRendering += axisElement_AfterRendering;

            this.glCanvas1.MouseWheel += glCanvas1_MouseWheel;
            this.glCanvas1.KeyPress += glCanvas1_KeyPress;
            this.glCanvas1.MouseDown += glCanvas1_MouseDown;
            this.glCanvas1.MouseMove += glCanvas1_MouseMove;
            this.glCanvas1.MouseUp += glCanvas1_MouseUp;
            this.glCanvas1.OpenGLDraw += glCanvas1_OpenGLDraw;
            this.glCanvas1.Resize += glCanvas1_Resize;
        }
 private void InitGridStyle()
 {
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
     System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
     //
     // gridData
     //
     AllowUserToResizeColumns = true;
     AllowUserToOrderColumns = true;
     AllowUserToResizeRows = false;
     dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(250)))), ((int)(((byte)(250)))), ((int)(((byte)(250)))));
     dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
     AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells;
     BackgroundColor = System.Drawing.Color.White;
     BorderStyle = System.Windows.Forms.BorderStyle.None;
     ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
     dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(240)))), ((int)(((byte)(245)))));
     dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     dataGridViewCellStyle2.ForeColor = System.Drawing.Color.Black;
     dataGridViewCellStyle2.Padding = new System.Windows.Forms.Padding(0, 4, 0, 4);
     dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
     dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
     dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
     ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
     ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
     dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
     dataGridViewCellStyle3.BackColor = System.Drawing.Color.White;
     dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
     dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
     dataGridViewCellStyle3.NullValue = null;
     dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
     dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
     dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
     DefaultCellStyle = dataGridViewCellStyle3;
     Dock = System.Windows.Forms.DockStyle.Fill;
     EnableHeadersVisualStyles = false;
     GridColor = System.Drawing.Color.Gainsboro;
     Location = new System.Drawing.Point(1, 50);
     Margin = new System.Windows.Forms.Padding(1);
     Name = "gridData";
     RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
     dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
     dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(240)))), ((int)(((byte)(245)))));
     dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
     dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
     dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
     dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
     RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
     RowHeadersWidth = 30;
     RowTemplate.Height = 25;
     Size = new System.Drawing.Size(834, 436);
 }
        public FormLegacyTexture3D2()
        {
            InitializeComponent();


            //if (CameraDictionary.Instance.ContainsKey(this.GetType().Name))
            //{
            //    this.camera = CameraDictionary.Instance[this.GetType().Name];
            //}
            //else
            {
                this.camera = new Camera(CameraType.Ortho, this.glCanvas1.Width, this.glCanvas1.Height);
                //CameraDictionary.Instance.Add(this.GetType().Name, this.camera);
            }

            satelliteRoration = new SatelliteRotator(camera);

            Padding padding = new System.Windows.Forms.Padding(10, 10, 10, 10);
            Size size = new Size(100, 100);
            //Size size = new Size(5, 5);
            IUILayoutParam param;
            param = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Bottom, padding, size);
            legacyUIRect = new LegacySimpleUIRect(param, new Objects.GLColor(1, 0, 0, 1));

            param = new IUILayoutParam(AnchorStyles.Bottom | AnchorStyles.Right, padding, size);
            modernUIRect = new SimpleUIRect(param, new GLColor(0, 1, 1, 1));

            param = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Bottom, padding, size);
            leftUIAxis = new SimpleUIAxis(param, new GLColor(1, 1, 1, 1));

            param = new IUILayoutParam(AnchorStyles.Right | AnchorStyles.Bottom, padding, size);
            rightUIAxis = new SimpleUIAxis(param, new GLColor(1, 1, 1, 1));


            legacyUIRect.Initialize();
            modernUIRect.Initialize();
            leftUIAxis.Initialize();
            rightUIAxis.Initialize();

            legacyUIRect.BeforeRendering += legacyUIRect_BeforeRendering;
            legacyUIRect.AfterRendering += legacyUIRect_AfterRendering;

            element = new DemoLegacyGLTexture3D();
            element.Initialize();
            element.BeforeRendering += element_BeforeRendering;
            element.AfterRendering += element_AfterRendering;

            this.glCanvas1.MouseWheel += glCanvas1_MouseWheel;
            this.glCanvas1.KeyPress += glCanvas1_KeyPress;
            this.glCanvas1.MouseDown += glCanvas1_MouseDown;
            this.glCanvas1.MouseMove += glCanvas1_MouseMove;
            this.glCanvas1.MouseUp += glCanvas1_MouseUp;
            this.glCanvas1.OpenGLDraw += glCanvas1_OpenGLDraw;
            this.glCanvas1.Resize += glCanvas1_Resize;

            UpdateInfo();
        }
        public void Serialize()
        {
            var padding = new Padding(10, 20, 30, 40);

            string encodedValue = PaddingSerializer.SerializePadding(padding);
            Assert.AreEqual("10,20,30,40", encodedValue);

            Padding padding2 = PaddingSerializer.DeserializePadding(encodedValue, Padding.Empty);
            Assert.AreEqual(padding, padding2);
        }
Exemple #13
0
 public static CheckBox CreateCheckBox(string text, Padding margin)
 {
     return new CheckBox
     {
         Anchor = AnchorStyles.Left,
         AutoSize = true,
         Margin = margin,
         Text = text
     };
 }
Exemple #14
0
 public static Label CreateLabel(string text, Padding margin)
 {
     return new Label
     {
         Anchor = AnchorStyles.Left,
         AutoSize = true,
         Margin = margin,
         Text = text
     };
 }
Exemple #15
0
 public static RadioButton CreateRadioButton(string text, Padding margin)
 {
     return new RadioButton
     {
         AutoSize = true,
         Anchor = AnchorStyles.Left,
         Text = text,
         Margin = margin
     };
 }
Exemple #16
0
 public IUILayoutParam(AnchorStyles anchorStyle, Padding padding, System.Drawing.Size size,
     int zNear = -1000, int zFar = 1000)
 {
     // TODO: Complete member initialization
     this.Anchor = anchorStyle;
     this.Margin = padding;
     this.Size = size;
     this.zNear = zNear;
     this.zFar = zFar;
 }
		public PreferencesForm() {
			SetStyle(ControlStyles.ContainerControl, false);
			SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
			SetStyle(ControlStyles.AllPaintingInWmPaint, true);
			SetStyle(ControlStyles.UserPaint, true);
			UpdateStyles();

			Padding = new System.Windows.Forms.Padding(0);

			InitializeComponent();
		}
Exemple #18
0
		public void RoundTrip ()
		{
			Padding p1 = new Padding (1, 2, 3, 4);
			Padding p2 = new Padding (1);
			Padding p3 = new Padding ();

			Assert.AreEqual (p1, RoundTripPadding (p1), "B1");
			Assert.AreEqual (p2, RoundTripPadding (p2), "B2");
			Assert.AreEqual (p3, RoundTripPadding (p3), "B3");
			
		}
Exemple #19
0
 public static ComboBox CreateComboBox(string[] text, Padding margin)
 {
     var box = new ComboBox
     {
         Anchor = AnchorStyles.Left,
         AutoSize = true,
         Margin = margin,
         DropDownStyle =  ComboBoxStyle.DropDownList
     };
     box.Items.AddRange(text);
     return box;
 }
        /// <summary>
        /// Serializes the padding.
        /// </summary>
        /// <param name="padding">The padding.</param>
        /// <returns></returns>
        public static string SerializePadding(Padding padding)
        {
            var builder = new StringBuilder();
            builder.Append(padding.Left);
            builder.Append(PaddingSeperator);
            builder.Append(padding.Top);
            builder.Append(PaddingSeperator);
            builder.Append(padding.Right);
            builder.Append(PaddingSeperator);
            builder.Append(padding.Bottom);

            return builder.ToString();
        }
        public DialogueTab(string scene)
        {
            Text = scene;
            Location = new System.Drawing.Point(4, 22);
            Name = scene;
            Padding = new System.Windows.Forms.Padding(3);
            Size = new System.Drawing.Size(787, 413);
            TabIndex = 1;
            UseVisualStyleBackColor = true;

            dataGrid = new DataGridView();
            dataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            dataGrid.Dock = System.Windows.Forms.DockStyle.Fill;
            dataGrid.Location = new System.Drawing.Point(3, 3);
            dataGrid.Name = "dataGrid" + scene;

            DataGridViewComboBoxColumn type, character, image;
            DataGridViewTextBoxColumn id, dialogue;

            type = new DataGridViewComboBoxColumn();
            type.Resizable = DataGridViewTriState.False;
            type.Items.Add("Speak");
            type.Items.Add("Question");
            type.Items.Add("Answer");
            character = new DataGridViewComboBoxColumn();
            character.Resizable = DataGridViewTriState.False;
            image = new DataGridViewComboBoxColumn();
            image.Resizable = DataGridViewTriState.False;
            id = new DataGridViewTextBoxColumn();
            id.MaxInputLength = 5;
            id.Width = 70;
            id.Resizable = DataGridViewTriState.False;
            dataGrid.EditingControlShowing += dataGrid_EditingControlShowing;
            dialogue = new DataGridViewTextBoxColumn();
            dialogue.MinimumWidth = 1065;
            dialogue.Resizable = DataGridViewTriState.False;

            dataGrid.Columns.AddRange(new DataGridViewColumn[]{
                type, id, dialogue, character, image
            });

            dataGrid.Columns[0].Name = "Type";
            dataGrid.Columns[1].Name = "DialogueID";
            dataGrid.Columns[2].Name = "Dialogue";
            dataGrid.Columns[3].Name = "Character";
            dataGrid.Columns[4].Name = "ImageID";

            Controls.Add(this.dataGrid);
        }
 private void SetTimeSpanLabelMargin()
 {
     int desiredX = 12 + TimeTrackBar.Value * (TimeTrackBar.Width - 24) / TimeTrackBar.Maximum;
     Padding margin = new Padding();
     if (desiredX < TimeTrackBar.Width / 2)
     {
         margin.Left = desiredX - TimeSpanLabel.PreferredSize.Width / 2;
         TimeSpanLabel.Anchor = AnchorStyles.Top | AnchorStyles.Left;
     }
     else
     {
         margin.Right = TimeTrackBar.Width - desiredX - TimeSpanLabel.PreferredSize.Width / 2;
         TimeSpanLabel.Anchor = AnchorStyles.Top | AnchorStyles.Right;
     }
     TimeSpanLabel.Margin = margin;
 }
Exemple #23
0
        public MatTab()
        {
            SuspendLayout();
            m_child = new Sce.Atf.Controls.PropertyEditing.PropertyGrid();

            m_child.Location = new System.Drawing.Point(158, 3);
            m_child.Size = new System.Drawing.Size(341, 188);
            m_child.TabIndex = 1;
            m_child.Dock = DockStyle.Fill;
            m_child.Visible = true;

            Controls.Add(m_child);
            Dock = DockStyle.Fill;
            Padding = new System.Windows.Forms.Padding(0);
            ResumeLayout(false);
        }
        public FormSimplePointSprite(float fontSize, bool foreshortening, FragShaderType type)
        {
            InitializeComponent();

            //if (CameraDictionary.Instance.ContainsKey(this.GetType().Name))
            //{
            //    this.camera = CameraDictionary.Instance[this.GetType().Name];
            //}
            //else
            {
                this.camera = new Camera(CameraType.Ortho, this.glCanvas1.Width, this.glCanvas1.Height);
                //CameraDictionary.Instance.Add(this.GetType().Name, this.camera);
            }

            satelliteRoration = new SatelliteRotator(camera);

            Padding padding = new System.Windows.Forms.Padding(40, 40, 40, 40);
            Size size = new Size(100, 100);
            //Size size = new Size(5, 5);
            IUILayoutParam param;
            param = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Bottom, padding, size);
            uiLeftBottomAxis = new SimpleUIAxis(param);
            param = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Top, padding, size);
            uiLeftTopAxis = new SimpleUIAxis(param);
            param = new IUILayoutParam(AnchorStyles.Right | AnchorStyles.Bottom, padding, size);
            uiRightBottomAxis = new SimpleUIAxis(param);
            param = new IUILayoutParam(AnchorStyles.Right | AnchorStyles.Top, padding, size);
            uiRightTopAxis = new SimpleUIAxis(param);

            uiLeftBottomAxis.Initialize();
            uiLeftTopAxis.Initialize();
            uiRightBottomAxis.Initialize();
            uiRightTopAxis.Initialize();

            pointSpriteElement = new DemoSimplePointSpriteElement(fontSize, foreshortening, type);
            pointSpriteElement.Initialize();
            pointSpriteElement.BeforeRendering += pointSpriteElement_BeforeRendering;
            pointSpriteElement.AfterRendering += pointSpriteElement_AfterRendering;

            this.glCanvas1.MouseWheel += glCanvas1_MouseWheel;
            this.glCanvas1.KeyPress += glCanvas1_KeyPress;
            this.glCanvas1.MouseDown += glCanvas1_MouseDown;
            this.glCanvas1.MouseMove += glCanvas1_MouseMove;
            this.glCanvas1.MouseUp += glCanvas1_MouseUp;
            this.glCanvas1.OpenGLDraw += glCanvas1_OpenGLDraw;
            this.glCanvas1.Resize += glCanvas1_Resize;
        }
Exemple #25
0
 public DistanceControl(DistanceCollectionControl col, Unit unit)
 {
     _collection = col;
     _unit = unit;
     Text = string.Empty;
     Image = unit.Image;
     ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
     TextAlign = System.Drawing.ContentAlignment.MiddleRight;
     FlatStyle = FlatStyle.Flat;
     BackColor = System.Drawing.Color.Transparent;
     AutoSize = false;
     Size = new System.Drawing.Size(DistanceCollectionControl.TravelWidth, 21);
     Margin = new Padding(0);
     Padding = new Padding(0);
     FlatAppearance.BorderSize = 0;
     Enabled = false;
 }
Exemple #26
0
 public BoardForm(Board i_Board, string i_FirstName, string i_SecondName)
 {
     InitializeComponent();
     FlowLayoutPanel mainLayout = new FlowLayoutPanel();
     mainLayout.FlowDirection = FlowDirection.TopDown;
     mainLayout.Padding = new Padding(15, 5, 5, 5);
     mainLayout.AutoSize = true;
     mainLayout.AutoSizeMode = AutoSizeMode.GrowAndShrink;
     r_CellsView = new CellsView(i_Board);
     r_NamesView = new NamesView(i_FirstName, i_SecondName);
     mainLayout.Controls.AddRange(new Control[] { r_CellsView, r_NamesView });
     Controls.Add(mainLayout);
     AutoSize = true;
     AutoSizeMode = AutoSizeMode.GrowAndShrink;
     Padding = new Padding(0, 0, 0, 0);
     Closed += BoardForm_Closed;
 }
		public ControlPanelForm() {
			SetStyle(ControlStyles.ContainerControl, false);
			SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
			SetStyle(ControlStyles.AllPaintingInWmPaint, true);
			SetStyle(ControlStyles.UserPaint, true);
			UpdateStyles();

			Padding = new System.Windows.Forms.Padding(0);

			InitFonts();

			InitializeComponent();

			foreach (var panel in _Panels.Controls.OfType<DoubleBufferedPanel>()) {
				panel.Size = new Size(_Panels.Width - (_Panels.Padding.Left + _Panels.Padding.Right), _Panels.Height - (_Panels.Padding.Top + _Panels.Padding.Bottom));
				panel.Anchor = AnchorStyles.None;
			}
		}
Exemple #28
0
        public ResultTabPage()
        {
            InitializeComponent();
            
            gridview = new DataGridView();
            gridview.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            gridview.Dock = System.Windows.Forms.DockStyle.Fill;
            gridview.Location = new System.Drawing.Point(3, 3);
            gridview.Name = "resultGridView";
            gridview.TabIndex = 0;

            Controls.Add(gridview);
            Location = new System.Drawing.Point(4, 22);
            Padding = new System.Windows.Forms.Padding(3);
            Size = new System.Drawing.Size(422, 379);
            TabIndex = 0;
            UseVisualStyleBackColor = true;
        }
        public DistanceCollectionControl()
        {
            AutoSize = false;
            BackColor = System.Drawing.Color.Transparent;
            Margin = new Padding(0);
            Padding = new Padding(0);

            World.Default.EventPublisher.Loaded += World_Loaded;
            World.Default.Map.EventPublisher.VillagesSelected += World_VillagesSelected;

            // Loads the speed strip & items
            _speedStrip = new ContextMenuStrip();
            _speedStrip.Items.Add(new DistanceContextMenuItem("Travel time", ShowDistanceEnum.TravelTime, this));
            _speedStrip.Items.Add(new DistanceContextMenuItem("Travel time * 2", ShowDistanceEnum.TravelTime2, this));
            _speedStrip.Items.Add(new DistanceContextMenuItem("Arrival time", ShowDistanceEnum.ArrivalTime, this));
            _speedStrip.Items.Add(new DistanceContextMenuItem("Return time", ShowDistanceEnum.ReturnTime, this));
            ((ToolStripMenuItem)_speedStrip.Items[0]).Checked = true;

            _speedButton = new Button();
            _speedButton.AutoSize = false;
            _speedButton.Image = Properties.Resources.speed;
            _speedButton.ContextMenuStrip = _speedStrip;
            _speedButton.Size = new System.Drawing.Size(21, 21);
            _speedButton.Text = string.Empty;
            _speedButton.FlatStyle = FlatStyle.Flat;
            _speedButton.FlatAppearance.BorderSize = 0;
            _speedButton.Margin = new Padding(0);
            _speedButton.Padding = new Padding(0);
            _speedButton.Font = new System.Drawing.Font(System.Drawing.FontFamily.GenericSansSerif, 15, System.Drawing.FontStyle.Bold);
            _speedButton.MouseClick += SpeedButton_MouseClick;
            Controls.Add(_speedButton);

            #region Commented Morale
            // morale
            /*_moraleButton = new Button();
            _moraleButton.AutoSize = false;
            _moraleButton.Size = new System.Drawing.Size(70, 21);
            _moraleButton.Text = string.Empty;
            _moraleButton.FlatStyle = FlatStyle.Flat;
            _moraleButton.FlatAppearance.BorderSize = 0;
            _moraleButton.Font = new System.Drawing.Font(System.Drawing.FontFamily.GenericSansSerif, 15, System.Drawing.FontStyle.Bold);
            Controls.Add(_moraleButton);*/
            #endregion
        }
        private void InitializeControl(PropertyChangedEventHandler propertyChanged)
        {
            _expanderToolTip = Utils.CreateToolTip(new List<Control>() {pbExpander}, Constants.ViewAdvancedSettings);
            _actionToolTip = Utils.CreateToolTip(new List<Control>() { cbPerformAction, pnlHeader, pbImage, lblTitle }, Constants.CompressesAllFiles);

            Padding = new Padding(0, 1, 0, 0);

            _passwordControl = new PasswordControl(propertyChanged, PropertyNames.ZipPassword);
            _passwordControl.Dock = DockStyle.Top;

            cbPerformAction.CheckedChanged += (sender, args) =>
                                                  {
                                                      _passwordControl.EnableControls(cbPerformAction.Checked);
                                                      RaisePropertyChanged(PropertyNames.ZipAttachments,
                                                                           cbPerformAction.Checked);
                                                  };

          
            this.pnlContent.Controls.Add(_passwordControl);
        }
Exemple #31
0
        public FormDebugging()
        {
            InitializeComponent();

            //if (CameraDictionary.Instance.ContainsKey(this.GetType().Name))
            //{
            //    this.camera = CameraDictionary.Instance[this.GetType().Name];
            //}
            //else
            {
                this.camera = new Camera(CameraType.Ortho, this.glCanvas1.Width, this.glCanvas1.Height);
                //CameraDictionary.Instance.Add(this.GetType().Name, this.camera);
            }

            satelliteRoration = new SatelliteRotator(camera);

            Padding        padding = new System.Windows.Forms.Padding(10, 10, 10, 10);
            Size           size    = new Size(100, 100);
            IUILayoutParam param;

            param                = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right, padding, size);
            uiLeftBottomRect     = new SimpleUIRect(param);
            legacyLeftBottomRect = new LegacySimpleUIRect(param, new Objects.GLColor(1, 1, 1, 1));
            param                = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Bottom, padding, size);
            uiLeftBottomAxis     = new SimpleUIAxis(param);

            uiLeftBottomRect.Initialize();
            legacyLeftBottomRect.Initialize();
            uiLeftBottomAxis.Initialize();

            axisElement = new AxisElement();
            axisElement.Initialize();

            this.glCanvas1.MouseWheel += glCanvas1_MouseWheel;
            this.glCanvas1.KeyPress   += glCanvas1_KeyPress;
            this.glCanvas1.MouseDown  += glCanvas1_MouseDown;
            this.glCanvas1.MouseMove  += glCanvas1_MouseMove;
            this.glCanvas1.MouseUp    += glCanvas1_MouseUp;
            this.glCanvas1.OpenGLDraw += glCanvas1_OpenGLDraw;
            this.glCanvas1.Resize     += glCanvas1_Resize;
        }
Exemple #32
0
        private void resimekle2(Bitmap imgInput, PictureBox temp)//Image<Bgr, byte> imgInput)
        {
            Bitmap resim = imgInput;



            if (imgInput.Width <= temp.Width && imgInput.Height <= temp.Height)
            {
                //gri = 0;
            }
            else
            {
                // gri = 0;

                if (imgInput.Width > temp.Width && imgInput.Height > temp.Height)
                {
                    resim = new Bitmap(imgInput, new Size(temp.Width, temp.Height));
                }
                else if (imgInput.Width > temp.Width)
                {
                    resim = new Bitmap(imgInput, new Size(temp.Width, imgInput.Height));
                }
                else
                {
                    resim = new Bitmap(imgInput, new Size(imgInput.Width, temp.Height));
                }
            }



            if (resim != null)
            {
                temp.Image = resim;
                int     a = temp.Width - temp.Image.Width;
                int     b = temp.Height - temp.Image.Height;
                Padding p = new System.Windows.Forms.Padding();
                p.Left       = a / 2;
                p.Top        = b / 2;
                temp.Padding = p;
            }
        }
Exemple #33
0
        public FormColorCodedPicking()
        {
            InitializeComponent();

            //if (CameraDictionary.Instance.ContainsKey(this.GetType().Name))
            //{
            //    this.camera = CameraDictionary.Instance[this.GetType().Name];
            //}
            //else
            {
                this.camera = new Camera(CameraType.Perspecitive, this.glCanvas1.Width, this.glCanvas1.Height);
                //CameraDictionary.Instance.Add(this.GetType().Name, this.camera);
            }

            const int size = 3;

            this.camera.Position = new vec3(size * 3, size * 3, size * 3);

            rotator = new SatelliteRotator(this.camera);

            element = new DemoColorCodedPickingElement(size);
            element.Initialize();
            element.Count = 405;

            Padding        uiPadding = new System.Windows.Forms.Padding(10, 10, 10, 10);
            Size           uiSize    = new System.Drawing.Size(50, 50);
            IUILayoutParam uiParam   = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Bottom, uiPadding, uiSize);

            uiAxis = new SimpleUIAxis(uiParam);
            uiAxis.Initialize();

            this.glCanvas1.MouseWheel += glCanvas1_MouseWheel;
            this.glCanvas1.KeyPress   += glCanvas1_KeyPress;
            this.glCanvas1.MouseDown  += glCanvas1_MouseDown;
            this.glCanvas1.MouseMove  += glCanvas1_MouseMove;
            this.glCanvas1.MouseUp    += glCanvas1_MouseUp;
            this.glCanvas1.OpenGLDraw += glCanvas1_OpenGLDraw;
            this.glCanvas1.Resize     += glCanvas1_Resize;

            this.Load += FormColorCodedPicking_Load;
        }
Exemple #34
0
        public AggroVirus()
        {
            VirusSize = new Size(100, 76);

            Size   = VirusSize;
            Anchor = System.Windows.Forms.AnchorStyles.None;
            BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            Image       = ScaleImage(global::Prototype_Virus_Game.Properties.Resources.AggresiverVirus, VirusSize);
            Margin      = new System.Windows.Forms.Padding(3, 2, 3, 2);
            Name        = "pbVirus";
            SizeMode    = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
            TabIndex    = 3;
            TabStop     = false;
            VirusHealth = 1;
            VirusSpeed  = 2;
            AIType      = "aggressive";
            Points      = 3;

            PositionVirus();
            TargetPosition = ChasePlayer();
        }
Exemple #35
0
        public ShieldedVirus()
        {
            VirusSize = new Size(160, 142);

            Size   = VirusSize;
            Anchor = System.Windows.Forms.AnchorStyles.None;
            BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            Image       = ScaleImage(global::Prototype_Virus_Game.Properties.Resources.VirusDickSchild, VirusSize);
            Margin      = new System.Windows.Forms.Padding(3, 2, 3, 2);
            Name        = "pbVirus";
            SizeMode    = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
            TabIndex    = 3;
            TabStop     = false;
            VirusHealth = 3;
            VirusSpeed  = 1;
            AIType      = "passive";
            Points      = 2;

            PositionVirus();
            TargetPosition = CalculateRandomPosition();
        }
        private void mvBtn_Demo_Click(object sender, EventArgs e)
        {
            mvpbAnimacja.Visible       = true;
            mvDgv_Tablica.Visible      = false;
            mvdgvTabelaWynikow.Visible = false;


            switch (mvCb_Algorytm.SelectedIndex)
            {
            case 0:
                mvpbAnimacja.Image = Properties.Resources.Selection_Sort_Animation;
                break;

            case 1:
                mvpbAnimacja.Image = Properties.Resources.Insertion;
                break;

            case 2:
                mvpbAnimacja.Image = Properties.Resources.Sorting_shellsort_anim;;
                break;

            case 3:
                mvpbAnimacja.Image = Properties.Resources.Sorting_shaker_sort_anim;;

                break;

            // Case'y dla kolejnych metod sortowania
            default:
                errorProvider1.SetError(mvBtn_TabelarycznaPrezentacja,
                                        "UWAGA: jeszcze tej metody nie opracowałem!!!"); return;
            }

            int     a = mvpbAnimacja.Width - mvpbAnimacja.Image.Width;
            int     b = mvpbAnimacja.Height - mvpbAnimacja.Image.Height;
            Padding p = new System.Windows.Forms.Padding();

            p.Left = a / 2;
            p.Top  = b / 2;
            mvpbAnimacja.Padding = p;
        }
Exemple #37
0
        public FormSimpleUIColorIndicator()
        {
            InitializeComponent();

            //if (CameraDictionary.Instance.ContainsKey(this.GetType().Name))
            //{
            //    this.camera = CameraDictionary.Instance[this.GetType().Name];
            //}
            //else
            {
                this.camera = new Camera(CameraType.Ortho, this.glCanvas1.Width, this.glCanvas1.Height);
                //CameraDictionary.Instance.Add(this.GetType().Name, this.camera);
            }

            satelliteRoration = new SatelliteRotator(camera);

            ColorPalette colorPalette = ColorPaletteFactory.CreateRainbow();

            Padding        padding = new System.Windows.Forms.Padding(40, 40, 40, 40);
            Size           size    = new Size(100, 30);
            IUILayoutParam param;

            param = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right, padding, size);
            this.colorIndicator = new SimpleUIColorIndicator(param, colorPalette, new GLColor(1, 1, 1, 1), -100, 100, 5);
            this.colorIndicator.Initialize();

            axisElement = new AxisElement();
            axisElement.Initialize();
            axisElement.BeforeRendering += axisElement_BeforeRendering;
            axisElement.AfterRendering  += axisElement_AfterRendering;

            this.glCanvas1.MouseWheel += glCanvas1_MouseWheel;
            this.glCanvas1.KeyPress   += glCanvas1_KeyPress;
            this.glCanvas1.MouseDown  += glCanvas1_MouseDown;
            this.glCanvas1.MouseMove  += glCanvas1_MouseMove;
            this.glCanvas1.MouseUp    += glCanvas1_MouseUp;
            this.glCanvas1.OpenGLDraw += glCanvas1_OpenGLDraw;
            this.glCanvas1.Resize     += glCanvas1_Resize;
        }
Exemple #38
0
        public BossVirus()
        {
            VirusSize = new Size(649, 514);

            Size   = VirusSize;
            Anchor = System.Windows.Forms.AnchorStyles.None;
            BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            Image       = ScaleImage(global::Prototype_Virus_Game.Properties.Resources.Virus_Boss, VirusSize);
            Margin      = new System.Windows.Forms.Padding(3, 2, 3, 2);
            Name        = "pbVirus";
            SizeMode    = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
            TabIndex    = 3;
            TabStop     = false;
            VirusHealth = 50;
            AIType      = "boss";

            DateTime timerStart = DateTime.Now;

            timerEnd = timerStart.AddSeconds(5);

            TargetPosition = CalculateRandomPositionBoss();
        }
Exemple #39
0
        swf.Padding GetMargin(int x, int y)
        {
            var margin = new swf.Padding();

            if (x > 0)
            {
                margin.Left = (int)Math.Floor(spacing.Width / 2.0);
            }
            if (x < columnScale.Length - 1)
            {
                margin.Right = (int)Math.Ceiling(spacing.Width / 2.0);
            }
            if (y > 0)
            {
                margin.Top = (int)Math.Floor(spacing.Height / 2.0);
            }
            if (y < rowScale.Length - 1)
            {
                margin.Bottom = (int)Math.Ceiling(spacing.Height / 2.0);
            }
            return(margin);
        }
Exemple #40
0
        protected SnipPagePart(SnipPageDesigner designer)
        {
            ResourcesReader.SetObjectResourcesHelper(this);
            _designer           = designer;
            Text                = "";
            Padding             = new System.Windows.Forms.Padding(0);
            Index               = -1;
            HtmlTagName         = "div";
            FactLines           = 2;
            _cssSection         = new CssSection();
            PartType            = SnipPartType.Static;
            ChildParts          = new SnipPagePartCollection(this);
            _classPartContainer = new ClassPartContainer(this);
            Random random = new Random();

            //BackColor = System.Drawing.Color.FromArgb(random.Next(0, 256), random.Next(0, 256), random.Next(0, 256));
            _cssSection.Properties["width"]  = "100%";
            _cssSection.Properties["height"] = "20px";
            _cssSection.Properties["float"]  = "left";
            BoxIconXOffset = 0;
            BoxIconYOffset = -8;
            BoxIconSize    = new Size(16, 16);
        }
        public ToolBoxGroupPanel()
        {
            ItemPanel    = new Panel();
            GroupHeader1 = new ToolBoxGroupHeader();
            SuspendLayout();

            //
            // ItemPanel
            //
            ItemPanel.Dock     = DockStyle.Fill;
            ItemPanel.Location = new Point(1, 21);
            ItemPanel.Name     = "ItemPanel";
            ItemPanel.Size     = new Size(198, 0);
            ItemPanel.TabIndex = 1;
            //
            // GroupHeader1
            //
            GroupHeader1.Dock     = DockStyle.Top;
            GroupHeader1.Expanded = true;
            GroupHeader1.Location = new Point(1, 1);
            GroupHeader1.Margin   = new Padding(0);
            GroupHeader1.Name     = "GroupHeader1";
            GroupHeader1.Padding  = new Padding(1, 1, 1, 0);
            GroupHeader1.Size     = new Size(198, 20);
            GroupHeader1.TabIndex = 0;

            Controls.Add(this.ItemPanel);
            Controls.Add(this.GroupHeader1);
            Name    = "ToolBoxGroupPanel";
            Padding = new System.Windows.Forms.Padding(1, 1, 1, 0);
            Size    = new System.Drawing.Size(200, 20);
            ResumeLayout(false);

            GroupHeader1.ExpandedChanged += new EventHandler(GroupHeader1_ExpandedChanged);
            ItemPanel.ControlAdded       += new ControlEventHandler(ItemPanel_ControlAdded);
            Layout += new LayoutEventHandler(ToolBoxGroupPanel_Layout);
        }
Exemple #42
0
        private void InitBoard()
        {
            int x = 550;
            int y = 50;

            masu = new PictureBox[81];

            for (int i = 0; i < 81; i++)
            {
                masu[i] = new PictureBox();

                masu[i].Parent      = this;
                masu[i].Width       = 50;
                masu[i].Height      = 50;
                masu[i].BorderStyle = BorderStyle.FixedSingle;

                Padding p = new System.Windows.Forms.Padding();
                p.Left          = 3;
                p.Top           = 8;
                p.Bottom        = 5;
                masu[i].Padding = p;

                masu[i].SizeMode = PictureBoxSizeMode.StretchImage;
            }

            for (int i = 0; i < 9; i++)
            {
                y  = 50;
                x -= 50;

                for (int j = 0; j < 9; j++)
                {
                    masu[i + j * 9].Location = new Point(x, y);
                    y += 50;
                }
            }
        }
Exemple #43
0
        //Camera modelRotationCamera;
        //SatelliteRotator modelRotator;
        //private float rotateAngle;

        public FormSimpleRenderer()
        {
            InitializeComponent();

            this.camera          = new Camera(CameraType.Perspecitive, this.glCanvas1.Width, this.glCanvas1.Height);
            this.camera.Position = new GLM.vec3(5, 5, 5);

            this.cameraRotator = new SatelliteRotator(this.camera);

            //this.modelRotationCamera = new Camera(CameraType.Perspecitive, this.glCanvas1.Width, this.glCanvas1.Height);
            //this.modelRotator = new SatelliteRotator(this.modelRotationCamera);
            this.modelRotator = new ArcBallRotator(this.camera);

            this.groundRenderer = new GroundRenderer(new Ground());
            this.groundRenderer.Initialize();

            Padding        uiPadding = new System.Windows.Forms.Padding(10, 10, 10, 10);
            Size           uiSize    = new System.Drawing.Size(50, 50);
            IUILayoutParam uiParam   = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Bottom, uiPadding, uiSize);

            uiAxis = new SimpleUIAxis(uiParam);
            uiAxis.Initialize();

            IModel model = (new TeapotFactory()).Create(1.0f);

            this.renderer = new SimpleRenderer(model);
            this.renderer.Initialize();//不在此显式初始化也可以。

            this.glCanvas1.MouseWheel += glCanvas1_MouseWheel;
            this.glCanvas1.KeyPress   += glCanvas1_KeyPress;
            this.glCanvas1.MouseDown  += glCanvas1_MouseDown;
            this.glCanvas1.MouseMove  += glCanvas1_MouseMove;
            this.glCanvas1.MouseUp    += glCanvas1_MouseUp;
            this.glCanvas1.OpenGLDraw += glCanvas1_OpenGLDraw;
            this.glCanvas1.Resize     += glCanvas1_Resize;
        }
Exemple #44
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog theDialog = new OpenFileDialog();

            theDialog.Title            = "Open Photo file";
            theDialog.Filter           = "All files|*.*";
            theDialog.Multiselect      = true;
            theDialog.InitialDirectory = Settings.Default["photoFile"].ToString();
            if (theDialog.ShowDialog() == DialogResult.OK)
            {
                Settings.Default["photoFile"] = Path.GetDirectoryName(theDialog.FileName);
                Settings.Default.Save();

                string path  = Path.GetFullPath(theDialog.FileName);
                Image  image = Image.FromFile(path);

                int     image_width  = 162;
                int     image_height = 167;
                Padding p            = new System.Windows.Forms.Padding();
                if (image.Height < image.Width)
                {
                    image_height = 167 * image.Height / image.Width;
                    p.Top        = (167 - image_height) / 2;
                }
                if (image.Height >= image.Width)
                {
                    image_width = 162 * image.Width / image.Height;
                    p.Left      = (162 - image_width);
                }
                image                         = (Image)(new Bitmap(image, new Size(image_width, image_height)));
                imagePath.Padding             = p;
                imagePath.Image               = image;
                Settings.Default["imageList"] = path;
                Settings.Default.Save();
            }
        }
 public static Padding ToEto(this swf.Padding padding)
 {
     return(new Padding(padding.Left, padding.Top, padding.Right, padding.Bottom));
 }
Exemple #46
0
 public LVGROUPMETRICS(System.Windows.Forms.Padding padding)
 {
     this.Padding = padding;
 }
        private void gvHistoryLoginUser_CellFormatting(object sender, CellFormattingEventArgs e)
        {
            Padding pad = new System.Windows.Forms.Padding(3);

            e.CellElement.Padding = pad;
        }
Exemple #48
0
        //Camera modelRotationCamera;
        //SatelliteRotator modelRotator;
        //private float rotateAngle;

        public FormNewNormalLine()
        {
            InitializeComponent();

            this.camera          = new Camera(CameraType.Perspecitive, this.glCanvas1.Width, this.glCanvas1.Height);
            this.camera.Position = new GLM.vec3(50, 5, 5);

            this.cameraRotator = new SatelliteRotator(this.camera);

            //this.modelRotationCamera = new Camera(CameraType.Perspecitive, this.glCanvas1.Width, this.glCanvas1.Height);
            //this.modelRotator = new SatelliteRotator(this.modelRotationCamera);
            this.modelRotator = new ArcBallRotator(this.camera);

            {
                const string           strGround = "Ground";
                IConvert2BufferPointer model     = new Ground();
                CodeShader[]           shaders   = new CodeShader[2];
                shaders[0] = CSharpGL.Objects.Common.ShaderLoadingHelper.LoadShaderSourceCode(strGround, CodeShader.GLSLShaderType.VertexShader);
                shaders[1] = CSharpGL.Objects.Common.ShaderLoadingHelper.LoadShaderSourceCode(strGround, CodeShader.GLSLShaderType.FragmentShader);
                PropertyNameMap propertyNameMap = CSharpGL.Objects.Common.ShaderLoadingHelper.LoadPropertyNameMap(strGround);
                UniformNameMap  uniformNameMap  = CSharpGL.Objects.Common.ShaderLoadingHelper.LoadUniformNameMap(strGround);
                this.groundRenderer = new ModernRenderer(model, shaders, propertyNameMap, uniformNameMap);
                this.groundRenderer.Initialize();
            }

            Padding        uiPadding = new System.Windows.Forms.Padding(10, 10, 10, 10);
            Size           uiSize    = new System.Drawing.Size(50, 50);
            IUILayoutParam uiParam   = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Bottom, uiPadding, uiSize);

            uiAxis = new SimpleUIAxis(uiParam);
            uiAxis.Initialize();

            //IModel model = (new TeapotFactory()).Create(1.0f);
            {
                IConvert2BufferPointer model       = new NewNormalLineDemoModel();
                CodeShader[]           codeShaders = new CodeShader[3];
                codeShaders[0] = new CodeShader(ShaderHelper.Load("NewNormalLine.vert"), CodeShader.GLSLShaderType.VertexShader);
                codeShaders[1] = new CodeShader(ShaderHelper.Load("NewNormalLine.geom"), CodeShader.GLSLShaderType.GeometryShader);
                codeShaders[2] = new CodeShader(ShaderHelper.Load("NewNormalLine.frag"), CodeShader.GLSLShaderType.FragmentShader);
                var propertyNameMap = new PropertyNameMap();
                propertyNameMap.Add("in_Position", NewNormalLineDemoModel.strPosition);
                propertyNameMap.Add("in_Normal", NewNormalLineDemoModel.strNormal);
                var uniformNameMap = new UniformNameMap();
                uniformNameMap.Add("model matrix", "modelMatrix");
                uniformNameMap.Add("view matrix", "viewMatrix");
                uniformNameMap.Add("projection matrix", "projectionMatrix");
                uniformNameMap.Add("show model", "showModel");
                uniformNameMap.Add("show normal", "showNormal");
                uniformNameMap.Add("normal length", "normalLength");
                this.renderer = new ModernRenderer(model, codeShaders, propertyNameMap, uniformNameMap);
                this.renderer.Initialize();//不在此显式初始化也可以。
                this.renderer.SetUniformValue("show model", 1.0f);
                this.renderer.SetUniformValue("show normal", 1.0f);
                this.renderer.SetUniformValue("normal length", 1.0f);
            }

            //this.demoLifebar = new DemoLifeBar(0.2f, 0.02f, 4);
            //this.demolifebarRenderer = new NormalLineRenderer(this.demoLifebar);
            //this.demolifebarRenderer.Initialize();

            this.lifebarRenderer = new LifeBarRenderer(new LifeBar(2f, 0.2f, 4f));
            this.lifebarRenderer.Initialize();

            //StringModel stringModel = DummyStringModelFactory.GetModel("teapot");
            this.stringRenderer = new StringRenderer("teapot".GetDummyModel());
            this.stringRenderer.Initialize();

            uiParam    = new IUILayoutParam(AnchorStyles.Right | AnchorStyles.Bottom, new Padding(10, 10, 120, 10), new Size(50, 50));
            this.label = new DummyLabel(uiParam, "Hello Label!");
            this.label.Initialize();

            this.glCanvas1.MouseWheel += glCanvas1_MouseWheel;
            this.glCanvas1.KeyPress   += glCanvas1_KeyPress;
            this.glCanvas1.MouseDown  += glCanvas1_MouseDown;
            this.glCanvas1.MouseMove  += glCanvas1_MouseMove;
            this.glCanvas1.MouseUp    += glCanvas1_MouseUp;
            this.glCanvas1.OpenGLDraw += glCanvas1_OpenGLDraw;
            this.glCanvas1.Resize     += glCanvas1_Resize;

            Application.Idle += Application_Idle;
        }
Exemple #49
0
        protected FieldContainerBase()
        {
            SuspendLayout();

            SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer, true);

            Margin  = new System.Windows.Forms.Padding(0);
            Padding = new System.Windows.Forms.Padding(0);

            #region Setup More Info label
            lblMoreInfo                  = new LabelX();
            lblMoreInfo.Name             = "lblMoreInfo";
            lblMoreInfo.AutoSize         = true;
            lblMoreInfo.MarkupLinkClick += new MarkupLinkClickEventHandler(OnMoreInfoClicked);
            lblMoreInfo.Text             = (String.IsNullOrEmpty(LongDescription)) ? MoreInfoDisabledString : ShowMoreInfoString;
            lblMoreInfo.BackColor        = Color.Transparent;
            //Controls.Add(lblMoreInfo);
            lblMoreInfo = null;
            #endregion

            #region Setup Warning label
            lblWarning               = new LabelX();
            lblWarning.AutoSize      = true;
            lblWarning.MaximumSize   = new Size(500, 0);
            lblWarning.MinimumSize   = new Size(500, 0);
            lblWarning.Name          = "lblWarning";
            lblWarning.PaddingLeft   = 2;
            lblWarning.PaddingRight  = 2;
            lblWarning.PaddingTop    = 1;
            lblWarning.PaddingBottom = 1;
            //lblWarning.Font = WarningFont; // This is taken care of using WarningFont.
            lblWarning.WordWrap      = true;
            lblWarning.TextAlignment = StringAlignment.Near;
            //lblWarning.TextLineAlignment = StringAlignment.Near;
            lblWarning.ForeColor       = Color.DarkRed;
            lblWarning.SingleLineColor = lblWarning.ForeColor;
            lblWarning.BackColor       = System.Drawing.Color.FromArgb(220, 175, 175);
            lblWarning.BorderType      = eBorderType.DoubleLine;
            Controls.Add(lblWarning);
            //lblWarning = null;
            #endregion

            #region Setup Description label
            lblDescription               = new LabelX();
            lblDescription.Name          = "lblDescription";
            lblDescription.AutoSize      = true;
            lblDescription.Visible       = (!string.IsNullOrEmpty(ShortDescription) || !string.IsNullOrEmpty(LongDescription));
            lblDescription.WordWrap      = true;
            lblDescription.TextAlignment = StringAlignment.Near;
            //lblDescription.TextLineAlignment = StringAlignment.Near;
            lblDescription.BackColor        = Color.Transparent;
            lblDescription.MarkupLinkClick += new MarkupLinkClickEventHandler(OnMoreInfoClicked);
            //lblDescription.Font = ShortDescriptionFont;

            Controls.Add(lblDescription);
            #endregion

            //lblDescription = new LabelX();
            //Controls.Add(lblDescription);

            #region Setup Collapse button
            btnCollapse               = new ToggleButton();
            btnCollapse.Name          = "btnCollapse";
            btnCollapse.Toggled       = false;
            btnCollapse.Image         = Prometheus.Properties.Resources.CollapseTitle;
            btnCollapse.ToggledImage  = Prometheus.Properties.Resources.ExpandTitle;
            btnCollapse.Size          = new Size(11, 11);
            btnCollapse.BeforeToggle += new EventHandler(OnBeforeToggle);
            btnCollapse.AfterToggle  += new EventHandler(OnAfterToggle);
            Controls.Add(btnCollapse);
            #endregion

            #region Setup fonts
            NameFont   = new Font("Arial", 9.75F, FontStyle.Bold, GraphicsUnit.Point, 0);
            FooterFont = new System.Drawing.Font("Segoe UI", 8.25F, FontStyle.Bold);
            if (lblMoreInfo != null)
            {
                MoreInfoFont = new Font(NameFont.FontFamily, NameFont.Size - 1.5f, FontStyle.Regular);
            }
            ShortDescriptionFont = new Font(NameFont.FontFamily, NameFont.Size - 1.5f, FontStyle.Regular);
            LongDescriptionFont  = new Font(NameFont.FontFamily, NameFont.Size - 1.5f, FontStyle.Regular);
            //if (lblWarning != null)
            WarningFont = new Font(NameFont.FontFamily, NameFont.Size - 1.5f, FontStyle.Regular);
            if (lblDescription != null)
            {
                lblDescription.Font = ShortDescriptionFont;
            }
            #endregion

            SetupMoreInfoStrings();

            if (DevComponents.DotNetBar.Rendering.GlobalManager.Renderer is Office2007Renderer)
            {
                renderer = GlobalManager.Renderer as Office2007Renderer;

                UpdateTheme();

                renderer.ColorTableChanged += new EventHandler(OnColorTableChanged);
            }

            ResumeLayout(false);
            PerformLayout();
        }
Exemple #50
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
     mainMenu_               = new System.Windows.Forms.MenuStrip();
     fileMi_                 = new System.Windows.Forms.ToolStripMenuItem();
     exitMi_                 = new System.Windows.Forms.ToolStripMenuItem();
     serverMi_               = new System.Windows.Forms.ToolStripMenuItem();
     connectMi_              = new System.Windows.Forms.ToolStripMenuItem();
     disconnecMi_            = new System.Windows.Forms.ToolStripMenuItem();
     separatorS1_            = new System.Windows.Forms.ToolStripMenuItem();
     viewStatusMi_           = new System.Windows.Forms.ToolStripMenuItem();
     browseMi_               = new System.Windows.Forms.ToolStripMenuItem();
     separatorS2_            = new System.Windows.Forms.ToolStripMenuItem();
     readMi_                 = new System.Windows.Forms.ToolStripMenuItem();
     writeMi_                = new System.Windows.Forms.ToolStripMenuItem();
     menuItem1_              = new System.Windows.Forms.ToolStripMenuItem();
     outputMi_               = new System.Windows.Forms.ToolStripMenuItem();
     outputClearMi_          = new System.Windows.Forms.ToolStripMenuItem();
     optionsMi_              = new System.Windows.Forms.ToolStripMenuItem();
     clearHistoryMi_         = new System.Windows.Forms.ToolStripMenuItem();
     forceDa20UsageMenuItem_ = new System.Windows.Forms.ToolStripMenuItem();
     helpMi_                 = new System.Windows.Forms.ToolStripMenuItem();
     aboutMi_                = new System.Windows.Forms.ToolStripMenuItem();
     toolBar_                = new System.Windows.Forms.ToolStrip();
     toolBarImageList_       = new System.Windows.Forms.ImageList(components);
     connectBtn_             = new System.Windows.Forms.ToolStripButton();
     disconnectBtn_          = new System.Windows.Forms.ToolStripButton();
     viewStatusBtn_          = new System.Windows.Forms.ToolStripButton();
     browseBtn_              = new System.Windows.Forms.ToolStripButton();
     toolStripSeparator1     = new System.Windows.Forms.ToolStripSeparator();
     readBtn_                = new System.Windows.Forms.ToolStripButton();
     writeBtn_               = new System.Windows.Forms.ToolStripButton();
     toolStripSeparator2     = new System.Windows.Forms.ToolStripSeparator();
     aboutBtn_               = new System.Windows.Forms.ToolStripButton();
     bottomPn_               = new System.Windows.Forms.Panel();
     outputCtrl_             = new System.Windows.Forms.RichTextBox();
     splitterH_              = new System.Windows.Forms.Splitter();
     splitterV_              = new System.Windows.Forms.Splitter();
     leftPn_                 = new System.Windows.Forms.Panel();
     subscriptionCtrl_       = new SampleClients.Da.Subscription.SubscriptionsTreeCtrl();
     rightPn_                = new System.Windows.Forms.Panel();
     updatesCtrl_            = new SampleClients.Da.UpdatesListViewCtrl();
     updateTimerControl_     = new System.Windows.Forms.Timer(components);
     statusCtrl_             = new SampleClients.Da.Server.ServerStatusCtrl();
     selectServerCtrl_       = new SampleClients.Common.SelectServerCtrl();
     mainMenu_.SuspendLayout();
     toolBar_.SuspendLayout();
     bottomPn_.SuspendLayout();
     leftPn_.SuspendLayout();
     rightPn_.SuspendLayout();
     SuspendLayout();
     //
     // mainMenu_
     //
     mainMenu_.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         fileMi_,
         serverMi_,
         outputMi_,
         optionsMi_,
         helpMi_
     });
     mainMenu_.Location = new System.Drawing.Point(0, 0);
     mainMenu_.Name     = "mainMenu_";
     mainMenu_.Size     = new System.Drawing.Size(200, 24);
     mainMenu_.TabIndex = 0;
     //
     // fileMi_
     //
     fileMi_.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         exitMi_
     });
     fileMi_.Name = "fileMi_";
     fileMi_.Size = new System.Drawing.Size(37, 20);
     fileMi_.Text = "&File";
     //
     // exitMi_
     //
     exitMi_.Name   = "exitMi_";
     exitMi_.Size   = new System.Drawing.Size(93, 22);
     exitMi_.Text   = "&Exit";
     exitMi_.Click += new System.EventHandler(ExitMI_Click);
     //
     // serverMi_
     //
     serverMi_.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         connectMi_,
         disconnecMi_,
         separatorS1_,
         viewStatusMi_,
         browseMi_,
         separatorS2_,
         readMi_,
         writeMi_,
         menuItem1_
     });
     serverMi_.Name = "serverMi_";
     serverMi_.Size = new System.Drawing.Size(51, 20);
     serverMi_.Text = "&Server";
     //
     // connectMi_
     //
     connectMi_.Name   = "connectMi_";
     connectMi_.Size   = new System.Drawing.Size(134, 22);
     connectMi_.Text   = "&Connect";
     connectMi_.Click += new System.EventHandler(ConnectMI_Click);
     //
     // disconnecMi_
     //
     disconnecMi_.Name   = "disconnecMi_";
     disconnecMi_.Size   = new System.Drawing.Size(134, 22);
     disconnecMi_.Text   = "&Disconnect";
     disconnecMi_.Click += new System.EventHandler(DisconnectMI_Click);
     //
     // separatorS1_
     //
     separatorS1_.Name = "separatorS1_";
     separatorS1_.Size = new System.Drawing.Size(134, 22);
     separatorS1_.Text = "-";
     //
     // viewStatusMi_
     //
     viewStatusMi_.Name   = "viewStatusMi_";
     viewStatusMi_.Size   = new System.Drawing.Size(134, 22);
     viewStatusMi_.Text   = "&View Status";
     viewStatusMi_.Click += new System.EventHandler(ViewStatusMI_Click);
     //
     // browseMi_
     //
     browseMi_.Name   = "browseMi_";
     browseMi_.Size   = new System.Drawing.Size(134, 22);
     browseMi_.Text   = "&Browse...";
     browseMi_.Click += new System.EventHandler(BrowseMI_Click);
     //
     // separatorS2_
     //
     separatorS2_.Name = "separatorS2_";
     separatorS2_.Size = new System.Drawing.Size(134, 22);
     separatorS2_.Text = "-";
     //
     // readMi_
     //
     readMi_.Name   = "readMi_";
     readMi_.Size   = new System.Drawing.Size(134, 22);
     readMi_.Text   = "&Read...";
     readMi_.Click += new System.EventHandler(ReadMI_Click);
     //
     // writeMi_
     //
     writeMi_.Name   = "writeMi_";
     writeMi_.Size   = new System.Drawing.Size(134, 22);
     writeMi_.Text   = "&Write...";
     writeMi_.Click += new System.EventHandler(WriteMI_Click);
     //
     // menuItem1_
     //
     menuItem1_.Name = "menuItem1_";
     menuItem1_.Size = new System.Drawing.Size(134, 22);
     menuItem1_.Text = "-";
     //
     // outputMi_
     //
     outputMi_.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         outputClearMi_
     });
     outputMi_.Name = "outputMi_";
     outputMi_.Size = new System.Drawing.Size(57, 20);
     outputMi_.Text = "&Output";
     //
     // outputClearMi_
     //
     outputClearMi_.Name   = "outputClearMi_";
     outputClearMi_.Size   = new System.Drawing.Size(101, 22);
     outputClearMi_.Text   = "&Clear";
     outputClearMi_.Click += new System.EventHandler(OutputClearMI_Click);
     //
     // optionsMi_
     //
     optionsMi_.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         clearHistoryMi_,
         forceDa20UsageMenuItem_
     });
     optionsMi_.Name = "optionsMi_";
     optionsMi_.Size = new System.Drawing.Size(61, 20);
     optionsMi_.Text = "O&ptions";
     //
     // clearHistoryMi_
     //
     clearHistoryMi_.Name   = "clearHistoryMi_";
     clearHistoryMi_.Size   = new System.Drawing.Size(175, 22);
     clearHistoryMi_.Text   = "&Clear History";
     clearHistoryMi_.Click += new System.EventHandler(ClearHistoryMI_Click);
     //
     // forceDa20UsageMenuItem_
     //
     forceDa20UsageMenuItem_.Name   = "forceDa20UsageMenuItem_";
     forceDa20UsageMenuItem_.Size   = new System.Drawing.Size(175, 22);
     forceDa20UsageMenuItem_.Text   = "&Force DA 2.0 Usage";
     forceDa20UsageMenuItem_.Click += new System.EventHandler(OnForceDa20Usage);
     //
     // helpMi_
     //
     helpMi_.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         aboutMi_
     });
     helpMi_.Name = "helpMi_";
     helpMi_.Size = new System.Drawing.Size(44, 20);
     helpMi_.Text = "&Help";
     //
     // aboutMi_
     //
     aboutMi_.Name   = "aboutMi_";
     aboutMi_.Size   = new System.Drawing.Size(116, 22);
     aboutMi_.Text   = "&About...";
     aboutMi_.Click += new System.EventHandler(AboutMI_Click);
     //
     // toolBar_
     //
     toolBar_.ImageList = toolBarImageList_;
     toolBar_.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         connectBtn_,
         disconnectBtn_,
         viewStatusBtn_,
         browseBtn_,
         toolStripSeparator1,
         readBtn_,
         writeBtn_,
         toolStripSeparator2,
         aboutBtn_
     });
     toolBar_.Location = new System.Drawing.Point(3, 0);
     toolBar_.Name     = "toolBar_";
     toolBar_.Size     = new System.Drawing.Size(1010, 25);
     toolBar_.TabIndex = 0;
     //
     // toolBarImageList_
     //
     toolBarImageList_.ColorDepth       = System.Windows.Forms.ColorDepth.Depth24Bit;
     toolBarImageList_.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("toolBarImageList_.ImageStream")));
     toolBarImageList_.TransparentColor = System.Drawing.Color.Teal;
     toolBarImageList_.Images.SetKeyName(0, "");
     toolBarImageList_.Images.SetKeyName(1, "");
     toolBarImageList_.Images.SetKeyName(2, "");
     toolBarImageList_.Images.SetKeyName(3, "");
     toolBarImageList_.Images.SetKeyName(4, "");
     toolBarImageList_.Images.SetKeyName(5, "");
     toolBarImageList_.Images.SetKeyName(6, "");
     toolBarImageList_.Images.SetKeyName(7, "");
     toolBarImageList_.Images.SetKeyName(8, "");
     toolBarImageList_.Images.SetKeyName(9, "");
     toolBarImageList_.Images.SetKeyName(10, "");
     toolBarImageList_.Images.SetKeyName(11, "");
     toolBarImageList_.Images.SetKeyName(12, "");
     toolBarImageList_.Images.SetKeyName(13, "");
     //
     // connectBtn_
     //
     connectBtn_.ImageIndex  = 0;
     connectBtn_.Name        = "connectBtn_";
     connectBtn_.Size        = new System.Drawing.Size(23, 22);
     connectBtn_.ToolTipText = "Connect to Server";
     connectBtn_.Click      += new System.EventHandler(ConnectMI_Click);
     //
     // disconnectBtn_
     //
     disconnectBtn_.ImageIndex  = 1;
     disconnectBtn_.Name        = "disconnectBtn_";
     disconnectBtn_.Size        = new System.Drawing.Size(23, 22);
     disconnectBtn_.ToolTipText = "Disconnect from Server";
     disconnectBtn_.Click      += new System.EventHandler(DisconnectMI_Click);
     //
     // viewStatusBtn_
     //
     viewStatusBtn_.ImageIndex  = 4;
     viewStatusBtn_.Name        = "viewStatusBtn_";
     viewStatusBtn_.Size        = new System.Drawing.Size(23, 22);
     viewStatusBtn_.ToolTipText = "View Server Status";
     viewStatusBtn_.Click      += new System.EventHandler(ViewStatusMI_Click);
     //
     // browseBtn_
     //
     browseBtn_.ImageIndex  = 6;
     browseBtn_.Name        = "browseBtn_";
     browseBtn_.Size        = new System.Drawing.Size(23, 22);
     browseBtn_.ToolTipText = "Browse Address Space";
     browseBtn_.Click      += new System.EventHandler(BrowseMI_Click);
     //
     // toolStripSeparator1
     //
     toolStripSeparator1.Name = "toolStripSeparator1";
     toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
     //
     // readBtn_
     //
     readBtn_.ImageIndex  = 7;
     readBtn_.Name        = "readBtn_";
     readBtn_.Size        = new System.Drawing.Size(23, 22);
     readBtn_.ToolTipText = "Read Items";
     readBtn_.Click      += new System.EventHandler(ReadMI_Click);
     //
     // writeBtn_
     //
     writeBtn_.ImageIndex  = 8;
     writeBtn_.Name        = "writeBtn_";
     writeBtn_.Size        = new System.Drawing.Size(23, 22);
     writeBtn_.ToolTipText = "Write Items";
     writeBtn_.Click      += new System.EventHandler(WriteMI_Click);
     //
     // toolStripSeparator2
     //
     toolStripSeparator2.Name = "toolStripSeparator2";
     toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
     //
     // aboutBtn_
     //
     aboutBtn_.ImageIndex  = 13;
     aboutBtn_.Name        = "aboutBtn_";
     aboutBtn_.Size        = new System.Drawing.Size(23, 22);
     aboutBtn_.ToolTipText = "About";
     aboutBtn_.Click      += new System.EventHandler(AboutMI_Click);
     //
     // bottomPn_
     //
     bottomPn_.Controls.Add(outputCtrl_);
     bottomPn_.Dock     = System.Windows.Forms.DockStyle.Bottom;
     bottomPn_.Location = new System.Drawing.Point(3, 463);
     bottomPn_.Name     = "bottomPn_";
     bottomPn_.Size     = new System.Drawing.Size(1010, 123);
     bottomPn_.TabIndex = 3;
     //
     // outputCtrl_
     //
     outputCtrl_.Dock     = System.Windows.Forms.DockStyle.Fill;
     outputCtrl_.Location = new System.Drawing.Point(0, 0);
     outputCtrl_.Name     = "outputCtrl_";
     outputCtrl_.Size     = new System.Drawing.Size(1010, 123);
     outputCtrl_.TabIndex = 0;
     outputCtrl_.Text     = "";
     //
     // splitterH_
     //
     splitterH_.Dock     = System.Windows.Forms.DockStyle.Bottom;
     splitterH_.Location = new System.Drawing.Point(3, 459);
     splitterH_.Name     = "splitterH_";
     splitterH_.Size     = new System.Drawing.Size(1010, 4);
     splitterH_.TabIndex = 4;
     splitterH_.TabStop  = false;
     //
     // splitterV_
     //
     splitterV_.Location = new System.Drawing.Point(319, 52);
     splitterV_.Name     = "splitterV_";
     splitterV_.Size     = new System.Drawing.Size(4, 407);
     splitterV_.TabIndex = 5;
     splitterV_.TabStop  = false;
     //
     // leftPn_
     //
     leftPn_.Controls.Add(subscriptionCtrl_);
     leftPn_.Dock     = System.Windows.Forms.DockStyle.Left;
     leftPn_.Location = new System.Drawing.Point(3, 52);
     leftPn_.Name     = "leftPn_";
     leftPn_.Padding  = new System.Windows.Forms.Padding(0, 3, 0, 0);
     leftPn_.Size     = new System.Drawing.Size(316, 407);
     leftPn_.TabIndex = 6;
     //
     // subscriptionCtrl_
     //
     subscriptionCtrl_.Dock     = System.Windows.Forms.DockStyle.Fill;
     subscriptionCtrl_.Location = new System.Drawing.Point(0, 3);
     subscriptionCtrl_.Name     = "subscriptionCtrl_";
     subscriptionCtrl_.Size     = new System.Drawing.Size(316, 404);
     subscriptionCtrl_.TabIndex = 0;
     //
     // rightPn_
     //
     rightPn_.Controls.Add(updatesCtrl_);
     rightPn_.Dock     = System.Windows.Forms.DockStyle.Fill;
     rightPn_.Location = new System.Drawing.Point(323, 52);
     rightPn_.Name     = "rightPn_";
     rightPn_.Padding  = new System.Windows.Forms.Padding(0, 3, 0, 0);
     rightPn_.Size     = new System.Drawing.Size(690, 407);
     rightPn_.TabIndex = 7;
     //
     // updatesCtrl_
     //
     updatesCtrl_.AllowDrop = true;
     updatesCtrl_.Dock      = System.Windows.Forms.DockStyle.Fill;
     updatesCtrl_.Location  = new System.Drawing.Point(0, 3);
     updatesCtrl_.Name      = "updatesCtrl_";
     updatesCtrl_.Size      = new System.Drawing.Size(690, 404);
     updatesCtrl_.TabIndex  = 0;
     //
     // updateTimerControl_
     //
     updateTimerControl_.Interval = 10000;
     updateTimerControl_.Tick    += new System.EventHandler(UpdateTimerCtrlTick);
     //
     // statusCtrl_
     //
     statusCtrl_.Location = new System.Drawing.Point(3, 586);
     statusCtrl_.Name     = "statusCtrl_";
     statusCtrl_.Size     = new System.Drawing.Size(1010, 22);
     statusCtrl_.TabIndex = 8;
     //
     // selectServerCtrl_
     //
     selectServerCtrl_.Dock     = System.Windows.Forms.DockStyle.Top;
     selectServerCtrl_.Label    = "Server";
     selectServerCtrl_.Location = new System.Drawing.Point(3, 25);
     selectServerCtrl_.Name     = "selectServerCtrl_";
     selectServerCtrl_.Padding  = new System.Windows.Forms.Padding(4, 0, 4, 0);
     selectServerCtrl_.Size     = new System.Drawing.Size(1010, 27);
     selectServerCtrl_.TabIndex = 0;
     //
     // MainForm
     //
     AutoScaleBaseSize = new System.Drawing.Size(6, 16);
     ClientSize        = new System.Drawing.Size(1016, 608);
     Controls.Add(rightPn_);
     Controls.Add(splitterV_);
     Controls.Add(leftPn_);
     Controls.Add(splitterH_);
     Controls.Add(bottomPn_);
     Controls.Add(statusCtrl_);
     Controls.Add(selectServerCtrl_);
     Controls.Add(toolBar_);
     MainMenuStrip = mainMenu_;
     Name          = "MainForm";
     Padding       = new System.Windows.Forms.Padding(3, 0, 3, 0);
     Text          = "OPC DA Sample Client";
     mainMenu_.ResumeLayout(false);
     mainMenu_.PerformLayout();
     toolBar_.ResumeLayout(false);
     toolBar_.PerformLayout();
     bottomPn_.ResumeLayout(false);
     leftPn_.ResumeLayout(false);
     rightPn_.ResumeLayout(false);
     ResumeLayout(false);
     PerformLayout();
 }
        private void compileDocument()
        {
            //doc.LineSpacing = 12;

            /*
             * Paragraph paragraph1 = new Paragraph();
             * Stream stream = Application.GetResourceStream(new Uri(@"/RadRichTextBox-Getting-Started;component/Images/RadRichTextBox.png", UriKind.RelativeOrAbsolute)).Stream;
             * Size size = new Size(236, 50);
             * ImageInline imageInline = new ImageInline(stream, size, "png");
             * paragraph1.Inlines.Add(imageInline);
             * section.Blocks.Add(paragraph1);
             */
            // вид документа:
            // предыстория, на отдельной странице (потом разрыв)
            // имя персонажа большими буквами посередине страницы
            // описание, сюжет
            // список целей, ненумерованным списком
            // список предметов (если есть), нумерованным списком
            // правила игры


            doc = new RadDocument();
            doc.MergeSpansWithSameStyles();
            doc.ParagraphDefaultSpacingAfter  = 0;
            doc.ParagraphDefaultSpacingBefore = 0;
            Padding padding = new System.Windows.Forms.Padding(0, 20, 100, 60);

            doc.SectionDefaultPageMargin = padding;
            //doc.SectionDefaultPageMargin.
            //doc.DefaultPageLayoutSettings.Width = 200;
            //doc.DefaultPageLayoutSettings.Height = 250;
            RadDocument tempDoc = new RadDocument();

            // **** Prehistory***********
            tempDoc = htmlProvider.Import(prehistory.writtenText);
            mergeDocuments(tempDoc);
            doc.CaretPosition.MoveToLastPositionInDocument();
            doc.InsertPageBreak();

            // **** Person Name ***********
            Section   section    = new Section();
            Paragraph paragraph1 = new Paragraph();

            paragraph1.TextAlignment = Telerik.WinControls.RichTextBox.Layout.RadTextAlignment.Center;
            Span span1 = new Span(chosenPerson.getName());

            span1.FontSize      = 24;
            span1.FontStyle     = TextStyle.Bold;
            span1.UnderlineType = Telerik.WinControls.RichTextBox.UI.UnderlineType.Wave;
            paragraph1.Inlines.Add(span1);
            section.Blocks.Add(paragraph1);
            doc.Sections.Add(section);

            // **** Person's description***********
            tempDoc = htmlProvider.Import(chosenPerson.description);
            mergeDocuments(tempDoc, section);

            // **** Aim list***********
            BulletedList aimList  = new BulletedList(char.ConvertFromUtf32(0x25CF)[0], doc);
            Section      section2 = new Section();
            Paragraph    par2     = new Paragraph();

            doc.CaretPosition.MoveToLastPositionInDocument();
            doc.InsertLineBreak();
            Span span2 = new Span("Your Aims:");

            par2.Inlines.Add(span2);
            section2.Blocks.Add(par2);

            foreach (int aimID in chosenPerson.aimsId)
            {
                CAim      aim  = aimManager.getAim(aimID);
                Paragraph par  = new Paragraph();
                Span      span = new Span(aim.getName());
                if (aim.description != "")
                {
                    span.Text += " (" + aim.description + ")";
                }
                par.Inlines.Add(span);
                par.LineSpacingType = LineSpacingType.AtLeast;
                aimList.AddParagraph(par);
                section2.Blocks.Add(par);
            }
            doc.Sections.Add(section2);

            // **** Item list***********
            if (chosenPerson.itemsId.Count > 0)
            {
                NumberedList itemList = new NumberedList(doc);
                Section      section3 = new Section();
                Paragraph    par3     = new Paragraph();
                Span         span3    = new Span("Your Items:");
                par3.Inlines.Add(span3);
                section3.Blocks.Add(par3);

                foreach (int itemID in chosenPerson.itemsId)
                {
                    CItem     item = itemManager.getItem(itemID);
                    Paragraph par  = new Paragraph();
                    Span      span = new Span(item.getName());
                    if (item.description != "")
                    {
                        span.Text += " (" + item.description + ")";
                    }
                    par.Inlines.Add(span);
                    par.LineSpacingType = LineSpacingType.AtLeast;
                    itemList.AddParagraph(par);
                    section3.Blocks.Add(par);
                }
                doc.Sections.Add(section3);
            }

            // **** Rules***********
            doc.CaretPosition.MoveToLastPositionInDocument();
            doc.InsertLineBreak();
            tempDoc = htmlProvider.Import(rules.writtenText);
            mergeDocuments(tempDoc, doc.Sections.Last);
        }
        private GroupBox GetRatioBoxGroup()
        {
            int width  = 0;
            int height = 0;

            GroupBox           Group    = new GroupBox();
            List <ChannelInfo> channels = new List <ChannelInfo>();

            try
            {
                EpsonLCD.GetAllChannelsFromBoard_Y2(channelNum, NameList, ref channels);
                //int groupNum = channels.Count > 16 ? m_GroupNum : 1;//分组个数
                int groupNum = GetHeadParameterGroupNum(channels.Count);

                int group     = 0;
                int colPerGrp = channels.Count / groupNum;
                int rowPerGrp = 2;
                int cidx      = 0;
                int colidx    = 0; //当前列
                int rowidx    = 0; //当前行

                TableLayoutPanel Table = new TableLayoutPanel();
                Table.RowCount       = 2 * groupNum;
                Table.ColumnCount    = colPerGrp + 1;
                numericUpDown_Ratios = new NumericUpDown[channels.Count];

                Label   label = new Label();
                Padding p     = new System.Windows.Forms.Padding(0, 7, 0, 0);
                Padding p2    = new System.Windows.Forms.Padding(0, 0, 0, 0);

                for (int i = 0; i < Table.ColumnCount; i++)
                {
                    if (0 == i)
                    {
                        //第一列放文字,宽一些
                        Table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 80));
                    }
                    else
                    {
                        Table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 70));
                    }
                    Table.Dock = DockStyle.Fill;

                    width += 80;
                }

                do
                {
                    for (int i = 0; i < colPerGrp; i++)
                    {
                        colidx = i + 1;
                        cidx   = i + group * colPerGrp;
                        ChannelInfo cinfo = null;
                        if (cidx >= 0 && cidx <= channels.Count)
                        {
                            cinfo = channels[cidx];
                        }
                        else
                        {
                            continue;
                        }

                        //行头
                        if (i == 0)
                        {
                            //rowidx = 0 + group * rowPerGrp;
                            //label = new Label();
                            //label.Text = ResString.GetResString("TemperatureChannel");
                            //Table.Controls.Add(label, 0, rowidx);


                            rowidx       = 1 + group * rowPerGrp;
                            label        = new Label();
                            label.Margin = new System.Windows.Forms.Padding(3, 3, 0, 0);
                            label.Text   = ResString.GetResString("ParamterRatio");
                            Table.Controls.Add(label, 0, rowidx);
                        }

                        //TemperatureChannel
                        rowidx         = 0 + group * rowPerGrp;
                        label          = new Label();
                        label.AutoSize = true;
                        label.Text     = cinfo.Name;
                        label.Margin   = p;
                        Table.Controls.Add(label, colidx, rowidx);
                        //ParamterRatio
                        rowidx = 1 + group * rowPerGrp;
                        NumericUpDown Number = new NumericUpDown();
                        Number.Width         = 58;
                        Number.Margin        = p2;
                        Number.DecimalPlaces = 1;
                        Number.Minimum       = new System.Decimal(-50.0f);
                        Number.Maximum       = new System.Decimal(50.0f);
                        int value = (int)((sbyte)cinfo.Value);
                        UIPreference.SetValueAndClampWithMinMax(Number, value);
                        Number.Tag = cidx;
                        this.numericUpDown_Ratios[cidx] = Number;
                        Table.Controls.Add(Number, colidx, rowidx);
                    }

                    group++;
                }while (group < groupNum);

                height     = groupNum * 70;
                Group.Text = ResString.GetResString("HeadParamter");
                Group.Controls.Add(Table);
                Group.Dock   = DockStyle.Fill;
                Group.Height = height;
                Group.Width  = width;
            }
            catch (Exception ex)
            {
            }

            return(Group);
        }
        /// <summary>
        /// -> Metodo buscar
        /// </summary>
        /// <param name="val_mes ">Mes a buscar</param>
        public void fu_bus_car(string val_mes, int val_año)
        {
            try
            {
                DateTime fec_ini;
                //** Fecha Inicial
                DateTime fec_fin;
                //** Fecha Final
                int nro_dms = 0;
                //** Numero de dias del mes
                int str_dia = 0;
                //** Nombre del dia

                fl_cal_end.Controls.Clear();

                fec_ini = Convert.ToDateTime("01/" + val_mes.ToString() + "/" + val_año.ToString());
                fec_fin = fec_ini;
                fec_fin = fec_ini.AddMonths(1);
                fec_fin = fec_fin.AddDays(-1);

                nro_dms = (fec_fin - fec_ini).Days;
                nro_dms = nro_dms + 1;


                switch (fec_ini.DayOfWeek)
                {
                case DayOfWeek.Sunday:
                    str_dia = 1;
                    break;

                case DayOfWeek.Monday:
                    str_dia = 2;
                    break;

                case DayOfWeek.Tuesday:
                    str_dia = 3;
                    break;

                case DayOfWeek.Wednesday:
                    str_dia = 4;
                    break;

                case DayOfWeek.Thursday:
                    str_dia = 5;
                    break;

                case DayOfWeek.Friday:
                    str_dia = 6;
                    break;

                case DayOfWeek.Saturday:
                    str_dia = 7;
                    break;
                }

                //--** Bucle para dias iniciales deshabilitados
                for (int j = 0; j <= str_dia - 2; j++)
                {
                    Button bot_val = new Button();
                    System.Windows.Forms.Padding val_pad = new System.Windows.Forms.Padding();
                    val_pad.All = 0;
                    var _with1 = bot_val;
                    // .Location = New Point(64, 40)
                    _with1.Size      = new Size(72, 70);
                    _with1.Margin    = val_pad;
                    _with1.TabIndex  = 0;
                    _with1.Text      = "T.C" + (Char)13 + "0.00" + (Char)13 + (Char)13 + "---------";
                    _with1.Name      = j.ToString();
                    _with1.FlatStyle = FlatStyle.Popup;
                    _with1.Enabled   = false;
                    if (j == 0)
                    {
                        _with1.BackColor = Color.Wheat;
                    }
                    fl_cal_end.Controls.Add(bot_val);
                }

                //** Obtiene T.C de todo el mes
                tab_adm013 = o_adm013._01(int.Parse(val_mes), val_año);

                for (int i = 1; i <= nro_dms; i++)
                {
                    Button   bot_val = new Button();
                    DateTime fec_aux;
                    System.Windows.Forms.Padding val_pad = new System.Windows.Forms.Padding();
                    val_pad.All = 0;
                    fec_aux     = Convert.ToDateTime(i + "/" + val_mes + "/" + val_año).Date;


                    int ban_dat = 0;

                    for (int j = 0; j <= tab_adm013.Rows.Count - 1; j++)
                    {
                        if (Convert.ToDateTime(tab_adm013.Rows[j]["va_fec_bus"].ToString()) == fec_aux)
                        {
                            var _with2 = bot_val;
                            _with2.Size     = new Size(72, 70);
                            _with2.Margin   = val_pad;
                            _with2.TabIndex = i;
                            _with2.Text     = "T.C" + (Char)13 +
                                              tab_adm013.Rows[j]["va_val_bus"].ToString().Trim() + (Char)13 + (Char)13 +
                                              Convert.ToDateTime(tab_adm013.Rows[j]["va_fec_bus"]).ToShortDateString();
                            _with2.Name      = fec_aux.ToString();
                            _with2.BackColor = Color.Azure;
                            _with2.ForeColor = Color.DarkBlue;
                            _with2.Cursor    = Cursors.Hand;

                            //--** Los dias domingos son mintados casi rojos
                            //string dia = "";
                            //dia = Weekday(Weekday(fec_aux, DayOfWeek.Sunday), false, DayOfWeek.Sunday);

                            int nro_dia = Weekday(fec_aux, DayOfWeek.Sunday);

                            if (fec_aux.DayOfWeek == DayOfWeek.Sunday)
                            {
                                _with2.BackColor = Color.Wheat;
                                //.FlatAppearance.BorderColor = Color.Blue
                                //.FlatAppearance.BorderSize = 1
                            }

                            decimal valor = Convert.ToDecimal(tab_adm013.Rows[j]["va_val_bus"].ToString());
                            if (valor == 0)
                            {
                                _with2.FlatStyle = FlatStyle.System;
                            }

                            bot_val.Click += mt_bot_tcd;
                            ban_dat        = 1;
                            break; // TODO: might not be correct. Was : Exit For
                        }
                    }

                    if (ban_dat == 0)
                    {
                        var _with3 = bot_val;
                        _with3.Size     = new Size(72, 70);
                        _with3.Margin   = val_pad;
                        _with3.TabIndex = i;
                        _with3.Text     = "T.C" + (Char)13 + "0.00" + (Char)13 + (Char)13 + fec_aux.ToShortDateString();
                        _with3.Name     = fec_aux.ToString();
                        _with3.Cursor   = Cursors.Hand;

                        //--** Los dias domingos son mintados casi rojos
                        if (fec_aux.DayOfWeek == DayOfWeek.Sunday)
                        {
                            _with3.BackColor = Color.Wheat;
                        }
                        else
                        {
                            _with3.FlatStyle = FlatStyle.System;
                        }
                        bot_val.Click += mt_bot_tcd;
                    }
                    //If tab_adm014.Rows.Count Then
                    //    With bot_val
                    //        .Size = New Size(72, 70)
                    //        .Margin = val_pad
                    //        .TabIndex = i
                    //        .Text = "T.C" & Chr(13) & _
                    //           Trim(tab_adm014.Rows(0).Item("va_val_buf")) & Chr(13) & Chr(13) & _
                    //            Trim(tab_adm014.Rows(0).Item("va_fec_buf"))
                    //        .Name = fec_aux
                    //        .BackColor = Color.Azure
                    //        .ForeColor = Color.DarkBlue
                    //        .Cursor = Cursors.Hand
                    //        '.FlatStyle = FlatStyle.System
                    //        '--** Los dias domingos son mintados casi rojos
                    //        Dim dia As String
                    //        dia = WeekdayName(Weekday(fec_aux, FirstDayOfWeek.Sunday), False, FirstDayOfWeek.Sunday)

                    //        Dim nro_dia As Integer
                    //        nro_dia = Weekday(fec_aux, FirstDayOfWeek.Sunday)

                    //        If Weekday(fec_aux, FirstDayOfWeek.Sunday) = 1 Then
                    //            .BackColor = Color.Wheat
                    //            .FlatAppearance.BorderColor = Color.Blue
                    //            .FlatAppearance.BorderSize = 1
                    //        End If


                    //        AddHandler bot_val.Click, AddressOf mt_bot_tcd
                    //    End With

                    //Else
                    //    With bot_val
                    //        .Size = New Size(72, 70)
                    //        .Margin = val_pad
                    //        .TabIndex = i
                    //        .Text = "T.C" & Chr(13) & _
                    //            "0.00" & Chr(13) & Chr(13) & _
                    //            fec_aux
                    //        .Name = fec_aux
                    //        .Cursor = Cursors.Hand

                    //        Dim dia As String
                    //        dia = WeekdayName(Weekday(fec_aux, FirstDayOfWeek.Sunday), False, FirstDayOfWeek.Sunday)

                    //        Dim nro_dia As Integer
                    //        nro_dia = Weekday(fec_aux, FirstDayOfWeek.Sunday)


                    //        '--** Los dias domingos son mintados casi rojos
                    //        If Weekday(fec_aux, FirstDayOfWeek.Sunday) = 1 Then
                    //            .BackColor = Color.Wheat
                    //        Else
                    //            .FlatStyle = FlatStyle.System
                    //        End If
                    //        AddHandler bot_val.Click, AddressOf mt_bot_tcd
                    //    End With

                    //End If

                    fl_cal_end.Controls.Add(bot_val);
                }
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message, "Error", MessageBoxButtons.OK);
            }
        }
Exemple #54
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     okBtn_                   = new System.Windows.Forms.Button();
     cancelBtn_               = new System.Windows.Forms.Button();
     buttonsPn_               = new System.Windows.Forms.Panel();
     applyBtn_                = new System.Windows.Forms.Button();
     propertyFiltersCtrl_     = new PropertyFiltersCtrl();
     maxElementsReturnedCtrl_ = new System.Windows.Forms.NumericUpDown();
     elementNameFilterTb_     = new System.Windows.Forms.TextBox();
     returnPropertiesLb_      = new System.Windows.Forms.Label();
     elementNameFilterLb_     = new System.Windows.Forms.Label();
     returnPropertiesCb_      = new System.Windows.Forms.CheckBox();
     vendorFilterLb_          = new System.Windows.Forms.Label();
     vendorFilterTb_          = new System.Windows.Forms.TextBox();
     browseFilterLb_          = new System.Windows.Forms.Label();
     browseFilterCtrl_        = new EnumCtrl();
     maxElementsReturnedLb_   = new System.Windows.Forms.Label();
     topPn_                   = new System.Windows.Forms.Panel();
     buttonsPn_.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(maxElementsReturnedCtrl_)).BeginInit();
     topPn_.SuspendLayout();
     SuspendLayout();
     //
     // OkBTN
     //
     okBtn_.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     okBtn_.Location = new System.Drawing.Point(118, 6);
     okBtn_.Name     = "okBtn_";
     okBtn_.Size     = new System.Drawing.Size(75, 23);
     okBtn_.TabIndex = 1;
     okBtn_.Text     = "OK";
     okBtn_.Click   += new System.EventHandler(OkBTN_Click);
     //
     // CancelBTN
     //
     cancelBtn_.Anchor       = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     cancelBtn_.DialogResult = System.Windows.Forms.DialogResult.Cancel;
     cancelBtn_.Location     = new System.Drawing.Point(280, 6);
     cancelBtn_.Name         = "cancelBtn_";
     cancelBtn_.Size         = new System.Drawing.Size(75, 23);
     cancelBtn_.TabIndex     = 0;
     cancelBtn_.Text         = "Cancel";
     cancelBtn_.Click       += new System.EventHandler(CancelBTN_Click);
     //
     // ButtonsPN
     //
     buttonsPn_.Controls.Add(applyBtn_);
     buttonsPn_.Controls.Add(cancelBtn_);
     buttonsPn_.Controls.Add(okBtn_);
     buttonsPn_.Dock     = System.Windows.Forms.DockStyle.Bottom;
     buttonsPn_.Location = new System.Drawing.Point(4, 274);
     buttonsPn_.Name     = "buttonsPn_";
     buttonsPn_.Size     = new System.Drawing.Size(360, 36);
     buttonsPn_.TabIndex = 0;
     //
     // ApplyBTN
     //
     applyBtn_.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
     applyBtn_.Location = new System.Drawing.Point(199, 6);
     applyBtn_.Name     = "applyBtn_";
     applyBtn_.Size     = new System.Drawing.Size(75, 23);
     applyBtn_.TabIndex = 2;
     applyBtn_.Text     = "Apply";
     applyBtn_.Click   += new System.EventHandler(ApplyBTN_Click);
     //
     // PropertyFiltersCTRL
     //
     propertyFiltersCtrl_.Dock                 = System.Windows.Forms.DockStyle.Fill;
     propertyFiltersCtrl_.Location             = new System.Drawing.Point(4, 124);
     propertyFiltersCtrl_.Name                 = "propertyFiltersCtrl_";
     propertyFiltersCtrl_.PropertyIDs          = new TsDaPropertyID[0];
     propertyFiltersCtrl_.ReturnAllProperties  = true;
     propertyFiltersCtrl_.ReturnPropertyValues = true;
     propertyFiltersCtrl_.Size                 = new System.Drawing.Size(360, 150);
     propertyFiltersCtrl_.TabIndex             = 0;
     //
     // MaxElementsReturnedCTRL
     //
     maxElementsReturnedCtrl_.Location = new System.Drawing.Point(112, 24);
     maxElementsReturnedCtrl_.Maximum  = new System.Decimal(new int[] {
         10000,
         0,
         0,
         0
     });
     maxElementsReturnedCtrl_.Name     = "maxElementsReturnedCtrl_";
     maxElementsReturnedCtrl_.Size     = new System.Drawing.Size(72, 20);
     maxElementsReturnedCtrl_.TabIndex = 3;
     //
     // ElementNameFilterTB
     //
     elementNameFilterTb_.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                         | System.Windows.Forms.AnchorStyles.Right)));
     elementNameFilterTb_.Location = new System.Drawing.Point(112, 48);
     elementNameFilterTb_.Name     = "elementNameFilterTb_";
     elementNameFilterTb_.Size     = new System.Drawing.Size(240, 20);
     elementNameFilterTb_.TabIndex = 5;
     //
     // ReturnPropertiesLB
     //
     returnPropertiesLb_.Location  = new System.Drawing.Point(0, 96);
     returnPropertiesLb_.Name      = "returnPropertiesLb_";
     returnPropertiesLb_.Size      = new System.Drawing.Size(112, 23);
     returnPropertiesLb_.TabIndex  = 8;
     returnPropertiesLb_.Text      = "Return Properties";
     returnPropertiesLb_.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // ElementNameFilterLB
     //
     elementNameFilterLb_.Location  = new System.Drawing.Point(0, 48);
     elementNameFilterLb_.Name      = "elementNameFilterLb_";
     elementNameFilterLb_.Size      = new System.Drawing.Size(112, 23);
     elementNameFilterLb_.TabIndex  = 4;
     elementNameFilterLb_.Text      = "Element Name Filter";
     elementNameFilterLb_.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // ReturnPropertiesCB
     //
     returnPropertiesCb_.Checked         = true;
     returnPropertiesCb_.CheckState      = System.Windows.Forms.CheckState.Checked;
     returnPropertiesCb_.Location        = new System.Drawing.Point(112, 96);
     returnPropertiesCb_.Name            = "returnPropertiesCb_";
     returnPropertiesCb_.Size            = new System.Drawing.Size(16, 24);
     returnPropertiesCb_.TabIndex        = 9;
     returnPropertiesCb_.CheckedChanged += new System.EventHandler(ReturnPropertiesCB_CheckedChanged);
     //
     // VendorFilterLB
     //
     vendorFilterLb_.Location  = new System.Drawing.Point(0, 72);
     vendorFilterLb_.Name      = "vendorFilterLb_";
     vendorFilterLb_.Size      = new System.Drawing.Size(112, 23);
     vendorFilterLb_.TabIndex  = 6;
     vendorFilterLb_.Text      = "Vendor Filter";
     vendorFilterLb_.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // VendorFilterTB
     //
     vendorFilterTb_.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                    | System.Windows.Forms.AnchorStyles.Right)));
     vendorFilterTb_.Location = new System.Drawing.Point(112, 72);
     vendorFilterTb_.Name     = "vendorFilterTb_";
     vendorFilterTb_.Size     = new System.Drawing.Size(240, 20);
     vendorFilterTb_.TabIndex = 7;
     //
     // BrowseFilterLB
     //
     browseFilterLb_.Location  = new System.Drawing.Point(0, 0);
     browseFilterLb_.Name      = "browseFilterLb_";
     browseFilterLb_.Size      = new System.Drawing.Size(112, 23);
     browseFilterLb_.TabIndex  = 0;
     browseFilterLb_.Text      = "Browse Filter";
     browseFilterLb_.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // BrowseFilterCTRL
     //
     browseFilterCtrl_.Location = new System.Drawing.Point(112, 0);
     browseFilterCtrl_.Name     = "browseFilterCtrl_";
     browseFilterCtrl_.Size     = new System.Drawing.Size(152, 24);
     browseFilterCtrl_.TabIndex = 1;
     browseFilterCtrl_.Value    = null;
     //
     // MaxElementsReturnedLB
     //
     maxElementsReturnedLb_.Location  = new System.Drawing.Point(0, 24);
     maxElementsReturnedLb_.Name      = "maxElementsReturnedLb_";
     maxElementsReturnedLb_.Size      = new System.Drawing.Size(112, 23);
     maxElementsReturnedLb_.TabIndex  = 2;
     maxElementsReturnedLb_.Text      = "Maximum Returned";
     maxElementsReturnedLb_.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
     //
     // TopPN
     //
     topPn_.Controls.Add(elementNameFilterTb_);
     topPn_.Controls.Add(maxElementsReturnedCtrl_);
     topPn_.Controls.Add(browseFilterCtrl_);
     topPn_.Controls.Add(browseFilterLb_);
     topPn_.Controls.Add(returnPropertiesLb_);
     topPn_.Controls.Add(vendorFilterLb_);
     topPn_.Controls.Add(maxElementsReturnedLb_);
     topPn_.Controls.Add(returnPropertiesCb_);
     topPn_.Controls.Add(elementNameFilterLb_);
     topPn_.Controls.Add(vendorFilterTb_);
     topPn_.Dock     = System.Windows.Forms.DockStyle.Top;
     topPn_.Location = new System.Drawing.Point(4, 4);
     topPn_.Name     = "topPn_";
     topPn_.Size     = new System.Drawing.Size(360, 120);
     topPn_.TabIndex = 32;
     //
     // BrowseFiltersDlg
     //
     AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     ClientSize        = new System.Drawing.Size(368, 310);
     Controls.Add(propertyFiltersCtrl_);
     Controls.Add(buttonsPn_);
     Controls.Add(topPn_);
     Name          = "BrowseFiltersDlg";
     Padding       = new System.Windows.Forms.Padding(4, 4, 4, 0);
     StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
     Text          = "Browse Filters";
     buttonsPn_.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(maxElementsReturnedCtrl_)).EndInit();
     topPn_.ResumeLayout(false);
     topPn_.PerformLayout();
     ResumeLayout(false);
 }
        public ShaderFragmentArchiveControl(
            NodeEditorCore.ShaderFragmentArchiveModel archiveModel)
        {
            DoubleBuffered = false;

            Margin = new System.Windows.Forms.Padding(0);

            var fragmentTree    = new Aga.Controls.Tree.TreeViewAdv();
            var treeColumn1     = new Aga.Controls.Tree.TreeColumn();
            var treeColumn3     = new Aga.Controls.Tree.TreeColumn();
            var treeColumn4     = new Aga.Controls.Tree.TreeColumn();
            var treeColumn5     = new Aga.Controls.Tree.TreeColumn();
            var icon            = new Aga.Controls.Tree.NodeControls.NodeStateIcon();
            var visibleName     = new Aga.Controls.Tree.NodeControls.NodeTextBox();
            var returnType      = new Aga.Controls.Tree.NodeControls.NodeTextBox();
            var parameters      = new Aga.Controls.Tree.NodeControls.NodeTextBox();
            var exceptionString = new Aga.Controls.Tree.NodeControls.NodeTextBox();

            // treeColumn1
            treeColumn1.Header      = "Name";
            treeColumn1.SortOrder   = System.Windows.Forms.SortOrder.None;
            treeColumn1.TooltipText = null;
            treeColumn1.Width       = 300;
            // treeColumn3
            treeColumn3.Header      = "ReturnType";
            treeColumn3.SortOrder   = System.Windows.Forms.SortOrder.None;
            treeColumn3.TooltipText = null;
            treeColumn3.Width       = 75;
            // treeColumn4
            treeColumn4.Header      = "Parameters";
            treeColumn4.SortOrder   = System.Windows.Forms.SortOrder.None;
            treeColumn4.TooltipText = null;
            treeColumn4.Width       = 400;
            // treeColumn5
            treeColumn5.Header      = "Exception";
            treeColumn5.SortOrder   = System.Windows.Forms.SortOrder.None;
            treeColumn5.TooltipText = null;
            treeColumn5.Width       = 200;
            // _icon
            icon.DataPropertyName = "Icon";
            icon.LeftMargin       = 1;
            icon.ParentColumn     = treeColumn1;
            icon.ScaleMode        = Aga.Controls.Tree.ImageScaleMode.Clip;
            // _visibleName
            visibleName.DataPropertyName         = "Name";
            visibleName.IncrementalSearchEnabled = true;
            visibleName.LeftMargin   = 8;
            visibleName.ParentColumn = treeColumn1;
            visibleName.Trimming     = System.Drawing.StringTrimming.EllipsisCharacter;
            // visibleName.Font = new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            visibleName.UseCompatibleTextRendering = true;
            // _returnType
            returnType.DataPropertyName         = "ReturnType";
            returnType.IncrementalSearchEnabled = true;
            returnType.LeftMargin   = 3;
            returnType.ParentColumn = treeColumn3;
            returnType.UseCompatibleTextRendering = true;
            // _parameters
            parameters.DataPropertyName         = "Parameters";
            parameters.IncrementalSearchEnabled = true;
            parameters.LeftMargin   = 3;
            parameters.ParentColumn = treeColumn4;
            parameters.UseCompatibleTextRendering = true;
            // _exceptionString
            exceptionString.DataPropertyName         = "ExceptionString";
            exceptionString.IncrementalSearchEnabled = true;
            exceptionString.LeftMargin   = 3;
            exceptionString.ParentColumn = treeColumn5;
            exceptionString.UseCompatibleTextRendering = true;
            // fragment tree
            fragmentTree.BackColor   = System.Drawing.Color.Silver;
            fragmentTree.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            fragmentTree.ColumnFont  = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            fragmentTree.Columns.Add(treeColumn1);
            fragmentTree.Columns.Add(treeColumn3);
            fragmentTree.Columns.Add(treeColumn4);
            fragmentTree.Columns.Add(treeColumn5);
            fragmentTree.DefaultToolTipProvider = null;
            fragmentTree.Dock = System.Windows.Forms.DockStyle.Fill;
            fragmentTree.DragDropMarkColor = System.Drawing.Color.Black;
            fragmentTree.Font = System.Drawing.SystemFonts.MenuFont;
            // new System.Drawing.Font("Arial", 10F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            fragmentTree.ForeColor     = System.Drawing.Color.Gray;
            fragmentTree.FullRowSelect = true;
            fragmentTree.GridLineStyle = ((Aga.Controls.Tree.GridLineStyle)((Aga.Controls.Tree.GridLineStyle.Horizontal | Aga.Controls.Tree.GridLineStyle.Vertical)));
            fragmentTree.LineColor     = System.Drawing.Color.White;
            fragmentTree.LoadOnDemand  = true;
            fragmentTree.Location      = new System.Drawing.Point(0, 0);
            fragmentTree.Model         = null;
            fragmentTree.Name          = "_fragmentTree";
            fragmentTree.NodeControls.Add(icon);
            fragmentTree.NodeControls.Add(visibleName);
            fragmentTree.NodeControls.Add(returnType);
            fragmentTree.NodeControls.Add(parameters);
            fragmentTree.NodeControls.Add(exceptionString);
            fragmentTree.RowHeight    = 32;
            fragmentTree.SelectedNode = null;
            fragmentTree.Size         = new System.Drawing.Size(288, 311);
            fragmentTree.TabIndex     = 3;
            fragmentTree.UseColumns   = true;
            // fragmentTree.MouseEnter += new System.EventHandler(this.OnFragmentsMouseEnter);
            // fragmentTree.MouseLeave += new System.EventHandler(this.OnFragmentsMouseLeave);

            fragmentTree.Padding = new System.Windows.Forms.Padding(0);
            fragmentTree.Dock    = System.Windows.Forms.DockStyle.Fill;

            fragmentTree.Model     = new Aga.Controls.Tree.SortedTreeModel(archiveModel);
            fragmentTree.ItemDrag += new ItemDragEventHandler(OnFragmentTreeItemDrag);

            Controls.Add(fragmentTree);
        }
Exemple #56
0
        private void gvAsalSurat_CellFormatting(object sender, CellFormattingEventArgs e)
        {
            Padding pad = new System.Windows.Forms.Padding(3);

            e.CellElement.Padding = pad;
        }
Exemple #57
0
        //Camera modelRotationCamera;
        //SatelliteRotator modelRotator;
        //private float rotateAngle;

        public FormNormalLine()
        {
            InitializeComponent();

            this.camera          = new Camera(CameraType.Perspecitive, this.glCanvas1.Width, this.glCanvas1.Height);
            this.camera.Position = new GLM.vec3(50, 5, 5);

            this.cameraRotator = new SatelliteRotator(this.camera);

            //this.modelRotationCamera = new Camera(CameraType.Perspecitive, this.glCanvas1.Width, this.glCanvas1.Height);
            //this.modelRotator = new SatelliteRotator(this.modelRotationCamera);
            this.modelRotator = new ArcBallRotator(this.camera);

            //this.groundRenderer = new GroundRenderer(new Ground(100, 100, 0.1f, 0.1f));
            this.groundRenderer = new GroundRenderer(new Ground(100, 100, 1f, 1f));
            this.groundRenderer.Initialize();

            Padding        uiPadding = new System.Windows.Forms.Padding(10, 10, 10, 10);
            Size           uiSize    = new System.Drawing.Size(50, 50);
            IUILayoutParam uiParam   = new IUILayoutParam(AnchorStyles.Left | AnchorStyles.Bottom, uiPadding, uiSize);

            uiAxis = new SimpleUIAxis(uiParam);
            uiAxis.Initialize();

            IModel model = (new TeapotFactory()).Create(1.0f);

            this.renderer = new NormalLineRenderer(model);
            this.renderer.Initialize();//不在此显式初始化也可以。

            //this.demoLifebar = new DemoLifeBar(0.2f, 0.02f, 4);
            //this.demolifebarRenderer = new NormalLineRenderer(this.demoLifebar);
            //this.demolifebarRenderer.Initialize();

            this.lifebarRenderer = new LifeBarRenderer(new LifeBar(2f, 0.2f, 4f));
            this.lifebarRenderer.Initialize();

            //StringModel stringModel = DummyStringModelFactory.GetModel("teapot");
            this.stringRenderer = new StringRenderer("teapot".GetModel());
            this.stringRenderer.Initialize();

            uiParam    = new IUILayoutParam(AnchorStyles.Right | AnchorStyles.Bottom, new Padding(10, 10, 120, 10), new Size(50, 50));
            this.label = new DummyLabel(uiParam, "Hello Label!");
            this.label.Initialize();

            this.glCanvas1.MouseWheel += glCanvas1_MouseWheel;
            this.glCanvas1.KeyPress   += glCanvas1_KeyPress;
            this.glCanvas1.MouseDown  += glCanvas1_MouseDown;
            this.glCanvas1.MouseMove  += glCanvas1_MouseMove;
            this.glCanvas1.MouseUp    += glCanvas1_MouseUp;
            this.glCanvas1.OpenGLDraw += glCanvas1_OpenGLDraw;
            this.glCanvas1.Resize     += glCanvas1_Resize;

            //var displayer = new FormNormalLineDisplay(this.demolifebarRenderer);
            //displayer.Show();
            var displayer = new FormNormalLineDisplay(this.renderer);

            displayer.Show();
            var cameraController = new FormCameraController(this.camera);

            cameraController.Show();

            Application.Idle += Application_Idle;
        }
Exemple #58
0
        private void gvJenisPengiriman_CellFormatting(object sender, CellFormattingEventArgs e)
        {
            Padding pad = new System.Windows.Forms.Padding(3);

            e.CellElement.Padding = pad;
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     pictureBox       = new System.Windows.Forms.PictureBox();
     label            = new Label();
     tableLayoutPanel = new TableLayoutPanel();
     ((System.ComponentModel.ISupportInitialize)(pictureBox)).BeginInit();
     tableLayoutPanel.SuspendLayout();
     SuspendLayout();
     //
     // pictureBox
     //
     pictureBox.Location    = new System.Drawing.Point(0, 0);
     pictureBox.Margin      = new System.Windows.Forms.Padding(0);
     pictureBox.Name        = "pictureBox";
     pictureBox.Size        = new System.Drawing.Size(20, 20);
     pictureBox.TabIndex    = 2;
     pictureBox.TabStop     = false;
     pictureBox.Click      += new EventHandler(EmulateExpInfoButton_Click);
     pictureBox.MouseDown  += new MouseEventHandler(EmulateExpInfoButton_MouseDown);
     pictureBox.MouseEnter += new EventHandler(EmulateExpInfoButton_MouseEnter);
     pictureBox.MouseLeave += new EventHandler(EmulateExpInfoButton_MouseLeave);
     pictureBox.MouseUp    += new MouseEventHandler(EmulateExpInfoButton_MouseUp);
     //
     // label
     //
     label.AutoSize    = true;
     label.Dock        = System.Windows.Forms.DockStyle.Fill;
     label.Location    = new System.Drawing.Point(20, 0);
     label.Margin      = new System.Windows.Forms.Padding(0);
     label.MaximumSize = new System.Drawing.Size(130, 0);
     label.Name        = "label";
     label.Padding     = new System.Windows.Forms.Padding(0, 2, 0, 0);
     label.Size        = new System.Drawing.Size(70, 20);
     label.TabIndex    = 3;
     label.Text        = "label";
     label.Click      += new EventHandler(EmulateExpInfoButton_Click);
     label.MouseDown  += new MouseEventHandler(EmulateExpInfoButton_MouseDown);
     label.MouseEnter += new EventHandler(EmulateExpInfoButton_MouseEnter);
     label.MouseLeave += new EventHandler(EmulateExpInfoButton_MouseLeave);
     label.MouseUp    += new MouseEventHandler(EmulateExpInfoButton_MouseUp);
     //
     // tableLayoutPanel
     //
     tableLayoutPanel.AutoSize    = true;
     tableLayoutPanel.ColumnCount = 2;
     tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
     tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
     tableLayoutPanel.Controls.Add(pictureBox, 0, 0);
     tableLayoutPanel.Controls.Add(label, 1, 0);
     tableLayoutPanel.Dock     = System.Windows.Forms.DockStyle.Fill;
     tableLayoutPanel.Location = new System.Drawing.Point(0, 0);
     tableLayoutPanel.Margin   = new System.Windows.Forms.Padding(0);
     tableLayoutPanel.Name     = "tableLayoutPanel";
     tableLayoutPanel.RowCount = 1;
     tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
     tableLayoutPanel.Size        = new System.Drawing.Size(90, 20);
     tableLayoutPanel.TabIndex    = 4;
     tableLayoutPanel.Click      += new EventHandler(EmulateExpInfoButton_Click);
     tableLayoutPanel.MouseDown  += new MouseEventHandler(EmulateExpInfoButton_MouseDown);
     tableLayoutPanel.MouseEnter += new EventHandler(EmulateExpInfoButton_MouseEnter);
     tableLayoutPanel.MouseLeave += new EventHandler(EmulateExpInfoButton_MouseLeave);
     tableLayoutPanel.MouseUp    += new MouseEventHandler(EmulateExpInfoButton_MouseUp);
     //
     // EmulateExpInfoButton
     //
     AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     AutoSize            = true;
     Controls.Add(tableLayoutPanel);
     Margin      = new System.Windows.Forms.Padding(0);
     MinimumSize = new System.Drawing.Size(0, 20);
     Name        = "EmulateExpInfoButton";
     Size        = new System.Drawing.Size(90, 20);
     Enter      += new System.EventHandler(EmulateExpInfoButton_Enter);
     Leave      += new System.EventHandler(EmulateExpInfoButton_Leave);
     ((System.ComponentModel.ISupportInitialize)(pictureBox)).EndInit();
     tableLayoutPanel.ResumeLayout(false);
     tableLayoutPanel.PerformLayout();
     ResumeLayout(false);
     PerformLayout();
 }
 private void InitializeComponent()
 {
     itemList   = new ListBox();
     TablePanel = new TableLayoutPanel();
     sortBox    = new ComboBox();
     SuspendLayout();
     itemList.FormattingEnabled = true;
     itemList.Location          = new Point(12, 12);
     itemList.Name                  = "itemList";
     itemList.Size                  = new Size(151, 238);
     itemList.TabIndex              = 0;
     itemList.SelectedIndexChanged += new EventHandler(itemList_SelectedIndexChanged);
     TablePanel.AutoSize            = true;
     TablePanel.ColumnCount         = 1;
     TablePanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100f));
     TablePanel.Location = new Point(169, 12);
     TablePanel.Name     = "TablePanel";
     TablePanel.RowCount = 15;
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20f));
     TablePanel.Size           = new Size(4, 332);
     TablePanel.TabIndex       = 1;
     sortBox.FormattingEnabled = true;
     sortBox.Items.AddRange(new object[]
     {
         "Alphabetize",
         "Highest Margin",
         "Insta-buy",
         "Insta-sell",
         "Insta-transaction"
     });
     sortBox.Location              = new Point(12, 256);
     sortBox.Name                  = "sortBox";
     sortBox.Size                  = new Size(151, 21);
     sortBox.TabIndex              = 2;
     sortBox.Text                  = "Highest Margin";
     sortBox.SelectedIndexChanged += new EventHandler(sortBox_SelectedIndexChanged);
     AutoScaleDimensions           = new SizeF(6f, 13f);
     AutoScaleMode                 = AutoScaleMode.Font;
     ClientSize = new Size(535, 283);
     Controls.Add(sortBox);
     Controls.Add(TablePanel);
     Controls.Add(itemList);
     DoubleBuffered   = true;
     EnableGlass      = false;
     FlattenMDIBorder = false;
     FormBorderStyle  = FormBorderStyle.FixedDialog;
     MaximizeBox      = false;
     MinimizeBox      = false;
     Name             = "Creation_Form";
     Padding          = new System.Windows.Forms.Padding(9);
     StartPosition    = FormStartPosition.CenterParent;
     Text             = "Creation Form";
     ResumeLayout(false);
     PerformLayout();
 }