Пример #1
0
        private void CreateBox2()
        {
            Grid grid = new Grid()
            {
                Row = 1, Column = 0, Padding = new Thickness(2)
            };

            _PnlItems = grid;
            grid.ColumnDefinitions.Add(1, GridUnitType.Star);
            grid.ColumnDefinitions.Add(1, GridUnitType.Star);

            grid.RowDefinitions.Add(32, GridUnitType.Pixel);
            grid.RowDefinitions.Add(24, GridUnitType.Pixel);
            grid.RowDefinitions.Add(1, GridUnitType.Star);

            Box box = new Box()
            {
                Row = 0, Column = 0, RowSpan = 10, ColumnSpan = 10
            };

            grid.Controls.Add(box);

            _BtnCopyKeys = new Skill.Framework.UI.Button()
            {
                Row = 0, Column = 0, ColumnSpan = 2, Width = 46, HorizontalAlignment = HorizontalAlignment.Center, Margin = new Thickness(2)
            };
            _BtnCopyKeys.Content.tooltip = "Copy keys to translate dictionary";

            _SourceCaption = new Box()
            {
                Row = 1, Column = 0
            }; _SourceCaption.Content.text = "Source";
            _TranslateCaption = new Box()
            {
                Row = 1, Column = 1
            }; _TranslateCaption.Content.text = "Translate";

            _ListBox = new Skill.Framework.UI.ListBox()
            {
                Row = 2, Column = 0, ColumnSpan = 2, Margin = new Thickness(2)
            };
            _ListBox.BackgroundVisible = true;
            _ListBox.DisableFocusable();
            _ListBox.AlwayShowVertical = true;
            _ListBox.AutoScroll        = true;

            grid.Controls.Add(_BtnCopyKeys);
            grid.Controls.Add(_SourceCaption);
            grid.Controls.Add(_TranslateCaption);
            grid.Controls.Add(_ListBox);

            _Frame.Controls.Add(grid);
        }
Пример #2
0
        public BehaviorList(BehaviorTreeEditorWindow editor)
        {
            this._Editor = editor;
            this.RowDefinitions.Add(20, GridUnitType.Pixel);
            this.RowDefinitions.Add(1, GridUnitType.Star);
            this.ColumnDefinitions.Add(400, GridUnitType.Pixel);
            this.ColumnDefinitions.Add(1, GridUnitType.Star);

            _ListViewToolbarBg = new Box()
            {
                Row = 0, Column = 1
            };
            this.Controls.Add(_ListViewToolbarBg);

            _BehaviorTabs = new Toolbar()
            {
                Row = 0, Column = 0
            };
            this.Controls.Add(_BehaviorTabs);

            _BtnActions = new ToolbarButton();
            _BtnActions.Content.text = "Actions";
            _BehaviorTabs.Items.Add(_BtnActions);

            _BtnConditions = new ToolbarButton();
            _BtnConditions.Content.text = "Conditions";
            _BehaviorTabs.Items.Add(_BtnConditions);

            _BtnDecorators = new ToolbarButton();
            _BtnDecorators.Content.text = "Decorators";
            _BehaviorTabs.Items.Add(_BtnDecorators);

            _BtnComposites = new ToolbarButton();
            _BtnComposites.Content.text = "Composites";
            _BehaviorTabs.Items.Add(_BtnComposites);

            _LbItems = new Framework.UI.ListBox()
            {
                Row = 1, Column = 0, ColumnSpan = 2, BackgroundVisible = true
            };
            _LbItems.DisableFocusable();
            this.Controls.Add(_LbItems);

            _BehaviorTabs.SelectedIndex = 0;

            _BtnActions.Selected    += TabChanged;
            _BtnConditions.Selected += TabChanged;
            _BtnDecorators.Selected += TabChanged;
            _BtnComposites.Selected += TabChanged;

            _LbItems.SelectionChanged += _LbItems_SelectionChanged;
        }
Пример #3
0
        private void CreateUI()
        {
            _Frame = new Skill.Editor.UI.EditorFrame("Frame", this);
            _Frame.Grid.Padding = new Thickness(2);
            _Frame.Grid.RowDefinitions.Add(20, GridUnitType.Pixel);
            _Frame.Grid.RowDefinitions.Add(1, GridUnitType.Star);
            _Frame.Grid.RowDefinitions.Add(24, GridUnitType.Pixel);

            _Frame.Grid.ColumnDefinitions.Add(1, GridUnitType.Star);
            _Frame.Grid.ColumnDefinitions.Add(1, GridUnitType.Star);

            _TxtSearch = new TextField()
            {
                Name = "Search", Row = 0, Column = 0, ColumnSpan = 2, VerticalAlignment = VerticalAlignment.Center
            };
            _Frame.Controls.Add(_TxtSearch);

            _AnimationList = new ListBox()
            {
                Row = 1, Column = 0, ColumnSpan = 2
            };
            _AnimationList.DisableFocusable();
            _AnimationList.BackgroundVisible = true;
            _Frame.Controls.Add(_AnimationList);

            Thickness margin = new Thickness(2);

            _BtnCancel = new Button()
            {
                Row = 2, Column = 0, Margin = margin
            };
            _Frame.Controls.Add(_BtnCancel);

            _BtnSelect = new Button()
            {
                Row = 2, Column = 1, Margin = margin, IsEnabled = false
            };
            _Frame.Controls.Add(_BtnSelect);

            _BtnCancel.Content.text = "Cancel";
            _BtnSelect.Content.text = "Select";

            _BtnCancel.Click += _BtnCancel_Click;
            _BtnSelect.Click += _BtnSelect_Click;
            _AnimationList.SelectionChanged    += _AnimationList_SelectionChanged;
            _AnimationList.SelectedDoubleClick += _AnimationList_SelectionDoubleClick;
            _TxtSearch.TextChanged             += _TxtSearch_TextChanged;

            _FocuseText = true;
        }
Пример #4
0
        private void CreateAudioPanel()
        {
            _AudioPanel = new Grid()
            {
                Row = 1, Padding = new Thickness(2)
            };

            _AudioPanel.RowDefinitions.Add(262, Skill.Framework.UI.GridUnitType.Pixel); // audio subtitle editor
            _AudioPanel.RowDefinitions.Add(1, Skill.Framework.UI.GridUnitType.Star);    //

            _AudioClipEditor = new AudioClipSubtitleEditor(this)
            {
                Row = 0, Column = 0, ColumnSpan = 2
            };
            _AudioPanel.Controls.Add(_AudioClipEditor);

            Skill.Framework.UI.Grid pnl = new Skill.Framework.UI.Grid()
            {
                Row = 1, Column = 0
            };

            _Fields    = new List <AudioField>();
            _AudioList = new Skill.Framework.UI.ListBox()
            {
                Row = 0, Column = 0, AlwayShowVertical = true
            };
            _AudioList.BackgroundVisible = true;
            _AudioList.DisableFocusable();
            pnl.Controls.Add(_AudioList);

            _BtnNew = new Skill.Framework.UI.Button()
            {
                Row    = 0,
                Column = 0,
                Width  = 100,
                HorizontalAlignment = Skill.Framework.UI.HorizontalAlignment.Center,
                VerticalAlignment   = Skill.Framework.UI.VerticalAlignment.Top,
                Height = 26,
                Margin = new Skill.Framework.UI.Thickness(4, 10, 4, 0)
            };
            _BtnNew.Content.text = "New";

            pnl.Controls.Add(_BtnNew);

            _AudioPanel.Controls.Add(pnl);

            _BtnNew.Click += _BtnNew_Click;
            _AudioList.SelectionChanged += _AudioList_SelectionChanged;
        }
Пример #5
0
            public InputConnectorManager(AnimNodeItem item)
            {
                this._Item = item;
                this.RowDefinitions.Add(18, GridUnitType.Pixel); // header
                this.RowDefinitions.Add(1, GridUnitType.Star);   // items
                this.RowDefinitions.Add(20, GridUnitType.Pixel); // buttons
                this.Controls.Add(CreateHeader());

                _LbItems = new Framework.UI.ListBox()
                {
                    Row = 1
                };
                _LbItems.DisableFocusable();
                _LbItems.BackgroundVisible = true;
                _LbItems.Background.Style  = (GUIStyle)"RL Background";
                this.Controls.Add(_LbItems);

                _PnlButtons = new Grid()
                {
                    Row = 2
                };
                _PnlButtons.ColumnDefinitions.Add(1, GridUnitType.Star);
                _PnlButtons.ColumnDefinitions.Add(20, GridUnitType.Pixel); // btn add
                _PnlButtons.ColumnDefinitions.Add(20, GridUnitType.Pixel); // btn remove
                this.Controls.Add(_PnlButtons);

                _BtnAdd = new Button()
                {
                    Column = 1
                };
                _PnlButtons.Controls.Add(_BtnAdd);
                _BtnRemove = new Button()
                {
                    Column = 2, IsEnabled = false
                };
                _PnlButtons.Controls.Add(_BtnRemove);

                _LbItems.SelectionChanged += _LbItems_SelectionChanged;
                _BtnAdd.Click             += _BtnAdd_Click;
                _BtnRemove.Click          += _BtnRemove_Click;

                for (int i = 0; i < _Item.ConnectorCount; i++)
                {
                    var listItem = CreateItem();
                    listItem.Index = i;
                    _LbItems.Items.Add(listItem);
                }
            }
Пример #6
0
        private void CreateUI()
        {
            _Frame = new Skill.Editor.UI.EditorFrame("Frame", this);

            _Frame.Grid.RowDefinitions.Add(20, GridUnitType.Pixel);
            _Frame.Grid.RowDefinitions.Add(1, GridUnitType.Star);

            _Frame.Grid.ColumnDefinitions.Add(1, GridUnitType.Star);
            _Frame.Grid.ColumnDefinitions.Add(2, GridUnitType.Pixel);
            _Frame.Grid.ColumnDefinitions.Add(2, GridUnitType.Star);

            _LblAnimations = new Skill.Editor.UI.DropShadowLabel()
            {
                Row = 0, Column = 0, Text = "Animations"
            };
            _Frame.Controls.Add(_LblAnimations);

            _LblHierarchy = new Skill.Editor.UI.DropShadowLabel()
            {
                Row = 0, Column = 2, Text = "Hierarchy"
            };
            _Frame.Controls.Add(_LblHierarchy);

            _AnimationList = new ListBox()
            {
                Row = 1, Column = 0, Margin = new Thickness(2)
            };
            _AnimationList.DisableFocusable();
            _AnimationList.BackgroundVisible = true;
            _Frame.Controls.Add(_AnimationList);

            _VSplitter = new Skill.Editor.UI.GridSplitter()
            {
                Row = 0, RowSpan = 2, Column = 1, Orientation = Orientation.Vertical
            };
            _Frame.Controls.Add(_VSplitter);

            _TransformTree = new UI.TreeView()
            {
                Row = 1, Column = 2, Margin = new Thickness(2), IsEnabled = false
            };
            _TransformTree.DisableFocusable();
            _TransformTree.Background.Visibility = Visibility.Visible;
            _TransformTree.SelectedStyle         = new GUIStyle();
            _Frame.Controls.Add(_TransformTree);

            _AnimationList.SelectionChanged += _AnimationList_SelectionChanged;
        }
Пример #7
0
        private void CreateUI()
        {
            _CounterLimitField = new CounterLimitAccessKeyField(this)
            {
                Row = 2, Column = 0, ColumnSpan = 2, Visibility = Visibility.Hidden
            };
            _TimeLimitField = new TimeLimitAccessKeyField(this)
            {
                Row = 2, Column = 0, ColumnSpan = 2, Visibility = Visibility.Hidden
            };

            _Frame = new Frame("MainFrame");
            _Frame.Grid.RowDefinitions.Add(ButtonRowHeight, GridUnitType.Pixel);                     // _BtnAdd
            _Frame.Grid.RowDefinitions.Add(1, GridUnitType.Star);                                    // _ItemsList
            _Frame.Grid.RowDefinitions.Add(_CounterLimitField.LayoutHeight + 2, GridUnitType.Pixel); // _ObjectField
            _Frame.Grid.RowDefinitions.Add(30, GridUnitType.Pixel);                                  // Build button
            _Frame.Grid.RowDefinitions.Add(20, GridUnitType.Pixel);                                  // Build path

            _Frame.Grid.ColumnDefinitions.Add(1, GridUnitType.Star);                                 // TimeLimit
            _Frame.Grid.ColumnDefinitions.Add(1, GridUnitType.Star);                                 // Counter Limit

            _BtnAddTimeLimit = new Skill.Framework.UI.Button()
            {
                Row = 0, Column = 0, Margin = new Thickness(2)
            };
            _BtnAddTimeLimit.Content.text    = "Time";
            _BtnAddTimeLimit.Content.tooltip = "add timelimit accessy key";
            _BtnAddTimeLimit.Click          += _BtnAddTimeLimit_Click;

            _BtnAddCounterLimit = new Skill.Framework.UI.Button()
            {
                Row = 0, Column = 1, Margin = new Thickness(2)
            };
            _BtnAddCounterLimit.Content.text    = "Counter";
            _BtnAddCounterLimit.Content.tooltip = "add counterlimit accessy key";
            _BtnAddCounterLimit.Click          += _BtnAddCounterLimit_Click;

            _ItemsList = new Skill.Framework.UI.ListBox()
            {
                Row = 1, Column = 0, ColumnSpan = 2, Margin = new Thickness(2)
            };
            _ItemsList.BackgroundVisible = true;
            _ItemsList.DisableFocusable();

            _Frame.Controls.Add(new Box()
            {
                Row = 2, Column = 0, ColumnSpan = 2
            });
            _Frame.Controls.Add(_BtnAddTimeLimit);
            _Frame.Controls.Add(_BtnAddCounterLimit);
            _Frame.Controls.Add(_ItemsList);
            _Frame.Controls.Add(_CounterLimitField);
            _Frame.Controls.Add(_TimeLimitField);


            _BtnBuild = new Skill.Framework.UI.Button()
            {
                Row = 3, Column = 0, ColumnSpan = 2, Margin = new Skill.Framework.UI.Thickness(0, 2)
            };
            _BtnBuild.Content.text = "Build";
            _Frame.Controls.Add(_BtnBuild);

            _BuildPathField = new UI.TextField()
            {
                Row = 4, Column = 0, ColumnSpan = 2, Margin = new Skill.Framework.UI.Thickness(0, 2)
            };
            _BuildPathField.Label.text = "Path";
            _BuildPathField.Text       = Asset.BuildPath;
            _Frame.Controls.Add(_BuildPathField);


            _BtnBuild.Click             += _BtnBuild_Click;
            _BuildPathField.TextChanged += _BuildPathField_TextChanged;

            _ItemsList.SelectionChanged += _ItemsPanel_SelectionChanged;
        }
Пример #8
0
                public ParameterDifinitionEditor(ListItem owner, ParameterDataCollection data)
                {
                    this._OwnerListItem = owner;
                    this._Data          = data;
                    this.RowDefinitions.Add(24, GridUnitType.Pixel); // title
                    this.RowDefinitions.Add(18, GridUnitType.Pixel); // header
                    this.RowDefinitions.Add(1, GridUnitType.Star);   // items
                    this.RowDefinitions.Add(20, GridUnitType.Pixel); // buttons

                    Skill.Editor.UI.DropShadowLabel title = new UI.DropShadowLabel()
                    {
                        Text = "Parameter Difinition", Height = 20, Margin = new Thickness(0, 0, 0, 4)
                    };
                    this.Controls.Add(title);

                    _HeaderBg = new Box()
                    {
                        Row = 1, Style = (GUIStyle)"RL Header"
                    };
                    this.Controls.Add(_HeaderBg);
                    _Header = new Grid()
                    {
                        Row = 1
                    };
                    _Header.ColumnDefinitions.Add(1, GridUnitType.Star);
                    _Header.ColumnDefinitions.Add(2, GridUnitType.Star);
                    _Header.ColumnDefinitions.Add(2, GridUnitType.Star);
                    _Header.Controls.Add(new Label()
                    {
                        Column = 0, Text = "Type"
                    });
                    _Header.Controls.Add(new Label()
                    {
                        Column = 1, Text = "Name"
                    });
                    _Header.Controls.Add(new Label()
                    {
                        Column = 2, Text = "Default Value"
                    });
                    this.Controls.Add(_Header);


                    _LbItems = new Framework.UI.ListBox()
                    {
                        Row = 2
                    };
                    _LbItems.DisableFocusable();
                    _LbItems.BackgroundVisible = true;
                    _LbItems.Background.Style  = (GUIStyle)"RL Background";
                    this.Controls.Add(_LbItems);

                    _PnlButtons = new Grid()
                    {
                        Row = 3
                    };
                    _PnlButtons.ColumnDefinitions.Add(1, GridUnitType.Star);
                    _PnlButtons.ColumnDefinitions.Add(20, GridUnitType.Pixel); // btn add
                    _PnlButtons.ColumnDefinitions.Add(20, GridUnitType.Pixel); // btn remove
                    this.Controls.Add(_PnlButtons);

                    _BtnAdd = new Button {
                        Column = 1
                    };
                    _PnlButtons.Controls.Add(_BtnAdd);

                    _BtnRemove = new Button()
                    {
                        Column = 2, IsEnabled = false
                    };
                    _PnlButtons.Controls.Add(_BtnRemove);

                    _LbItems.SelectionChanged += _LbItems_SelectionChanged;
                    _BtnAdd.Click             += _BtnAdd_Click;
                    _BtnRemove.Click          += _BtnRemove_Click;

                    for (int i = 0; i < _Data.Count; i++)
                    {
                        ParameterItem item = new ParameterItem(_OwnerListItem, _Data[i]);
                        _LbItems.Items.Add(item);
                    }
                }
Пример #9
0
                public BreakPointsEditor(ItemProperties owner, AudioState state)
                {
                    _OwnerProperties   = owner;
                    this.State         = state;
                    this._RefreshStyle = true;

                    this.RowDefinitions.Add(16, GridUnitType.Pixel); // title
                    this.RowDefinitions.Add(1, GridUnitType.Star);   // list
                    this.RowDefinitions.Add(16, GridUnitType.Pixel); // buttons
                    this.RowDefinitions.Add(60, GridUnitType.Pixel); // Audio Preview
                    this.RowDefinitions.Add(24, GridUnitType.Pixel); // _BtnUpdatePreview

                    _Title = new Label {
                        Row = 0, Text = "Break Points"
                    };
                    this.Controls.Add(_Title);

                    _BreakPointsList = new Skill.Framework.UI.ListBox()
                    {
                        Row = 1
                    };
                    _BreakPointsList.DisableFocusable();
                    _BreakPointsList.BackgroundVisible = true;
                    this.Controls.Add(_BreakPointsList);

                    _ButtonsPanel = new Grid()
                    {
                        Row = 2
                    };
                    _ButtonsPanel.ColumnDefinitions.Add(1, GridUnitType.Star);
                    _ButtonsPanel.ColumnDefinitions.Add(20, GridUnitType.Pixel);
                    _ButtonsPanel.ColumnDefinitions.Add(20, GridUnitType.Pixel);
                    this.Controls.Add(_ButtonsPanel);

                    _BtnAdd = new Button()
                    {
                        Column = 1
                    };
                    _ButtonsPanel.Controls.Add(_BtnAdd);

                    _BtnRemove = new Button()
                    {
                        Column = 2, IsEnabled = false
                    };
                    _ButtonsPanel.Controls.Add(_BtnRemove);

                    _AudioPreview = new Skill.Editor.UI.AudioPreviewCurve()
                    {
                        Row = 3
                    };
                    this.Controls.Add(_AudioPreview);

                    _BtnUpdatePreview = new Button()
                    {
                        Row = 4, Margin = new Thickness(0, 2)
                    };
                    _BtnUpdatePreview.Content.text = "Update Preview Image";
                    this.Controls.Add(_BtnUpdatePreview);

                    _BreakPointsList.SelectionChanged += _BreakPointsList_SelectionChanged;
                    _BtnAdd.Click           += _BtnAdd_Click;
                    _BtnRemove.Click        += _BtnRemove_Click;
                    _BtnUpdatePreview.Click += _BtnUpdatePreview_Click;
                }
Пример #10
0
        private void CreateUI()
        {
            _ObjectField = new CacheObjectField(this)
            {
                Row = 2, Column = 1
            };

            _MainPanel = new ChangeCheck()
            {
                Row = 1, Column = 0
            };
            _MainPanel.RowDefinitions.Add(ButtonRowHeight, GridUnitType.Pixel);           // _BtnAdd
            _MainPanel.RowDefinitions.Add(1, GridUnitType.Star);                          // _ItemsList
            _MainPanel.RowDefinitions.Add(_ObjectField.LayoutHeight, GridUnitType.Pixel); // _ObjectField

            _BtnAdd = new Skill.Framework.UI.Button()
            {
                Row = 0, Column = 0, Margin = new Thickness(2)
            };
            _BtnAdd.Content.text = "Add";
            _BtnAdd.Click       += new System.EventHandler(_BtnAdd_Click);

            _ItemsList = new ListBox()
            {
                Row = 1, Column = 0, Margin = new Thickness(2)
            };
            _ItemsList.BackgroundVisible = true;
            _ItemsList.DisableFocusable();

            _MainPanel.Controls.Add(new Box()
            {
                Row = 2, Column = 1
            });
            _MainPanel.Controls.Add(_BtnAdd);
            _MainPanel.Controls.Add(_ItemsList);
            _MainPanel.Controls.Add(_ObjectField);


            _PnlControls = new StackPanel()
            {
                Row = 0, Column = 0
            };
            _BtnInitializeOnAwake = new UI.ToggleButton()
            {
                Height = 18
            };
            _BtnInitializeOnAwake.Label.text    = "Initialize On Awake";
            _BtnInitializeOnAwake.Label.tooltip = "create all cached objects on awake";
            _BtnInitializeOnAwake.IsChecked     = _Data.InitializeOnAwake;

            _BtnMakeAsChild = new UI.ToggleButton()
            {
                Height = 18
            };
            _BtnMakeAsChild.Label.text    = "Make as Child";
            _BtnMakeAsChild.Label.tooltip = "create all cached objects as childs of group";
            _BtnMakeAsChild.IsChecked     = _Data.MakeAsChild;

            _FlCleanInterval = new FloatField()
            {
                Height = 18
            };
            _FlCleanInterval.Label.text    = "Clean Interval";
            _FlCleanInterval.Label.tooltip = "Clean Interval of this group";
            _FlCleanInterval.Value         = _Data.CleanInterval;

            _PnlControls.Controls.Add(_BtnInitializeOnAwake);
            _PnlControls.Controls.Add(_BtnMakeAsChild);
            _PnlControls.Controls.Add(_FlCleanInterval);

            _Frame = new Frame("MainFrame");

            _Frame.Grid.RowDefinitions.Add(56, GridUnitType.Pixel); // _PnlControls
            _Frame.Grid.RowDefinitions.Add(1, GridUnitType.Star);   // _MainPanel

            _Frame.Grid.Controls.Add(_PnlControls);
            _Frame.Grid.Controls.Add(_MainPanel);

            _MainPanel.Changed          += new EventHandler(_ChangeCheck_Changed);
            _ItemsList.SelectionChanged += _ItemsPanel_SelectionChanged;

            _BtnInitializeOnAwake.Changed += Properties_Changed;
            _BtnMakeAsChild.Changed       += Properties_Changed;
            _FlCleanInterval.ValueChanged += Properties_Changed;
        }
Пример #11
0
        private void CreateTextPanel()
        {
            _TextPanel = new Grid()
            {
                Row = 1, Padding = new Thickness(2)
            };
            _TextPanel.ColumnDefinitions.Add(1, GridUnitType.Star);
            _TextPanel.ColumnDefinitions.Add(2, GridUnitType.Star);
            _TextPanel.ColumnDefinitions.Add(17, GridUnitType.Pixel);
            _TextPanel.ColumnDefinitions.Add(30, GridUnitType.Pixel);

            _TextPanel.RowDefinitions.Add(24, GridUnitType.Pixel);
            _TextPanel.RowDefinitions.Add(30, GridUnitType.Pixel);
            _TextPanel.RowDefinitions.Add(30, GridUnitType.Pixel);
            _TextPanel.RowDefinitions.Add(1, GridUnitType.Star);

            Box box = new Box()
            {
                Row = 0, Column = 0, RowSpan = 10, ColumnSpan = 10
            };

            _TextPanel.Controls.Add(box);


            _NameCaption = new Box()
            {
                Row = 0, Column = 0
            }; _NameCaption.Content.text = "Key";
            _ValueCaption = new Box()
            {
                Row = 0, Column = 1
            }; _ValueCaption.Content.text = "Value";

            _ListBox = new Skill.Framework.UI.ListBox()
            {
                Row = 1, RowSpan = 3, Column = 0, ColumnSpan = 3, Margin = new Thickness(2)
            };
            _ListBox.BackgroundVisible = true;
            _ListBox.DisableFocusable();
            _ListBox.AlwayShowVertical = true;
            _ListBox.AutoScroll        = true;

            _BtnAdd = new Skill.Framework.UI.Button()
            {
                Row = 1, Column = 3, Margin = new Thickness(2)
            }; _BtnAdd.Content.tooltip = "Add";
            _BtnRemove = new Skill.Framework.UI.Button()
            {
                Row = 2, Column = 3, Margin = new Thickness(2)
            }; _BtnAdd.Content.tooltip = "remove selected";
            _BtnSave = new Skill.Framework.UI.Button()
            {
                Row = 3, Column = 3, Margin = new Thickness(2, 2, 2, 4), VerticalAlignment = VerticalAlignment.Bottom, Height = 28
            }; _BtnSave.Content.tooltip = "Save Changes";

            _TextPanel.Controls.Add(_NameCaption);
            _TextPanel.Controls.Add(_ValueCaption);
            _TextPanel.Controls.Add(_BtnAdd);
            _TextPanel.Controls.Add(_BtnRemove);
            _TextPanel.Controls.Add(_BtnSave);
            _TextPanel.Controls.Add(_ListBox);

            _BtnSave.Click            += _BtnSave_Click;
            _BtnAdd.Click             += _BtnAdd_Click;
            _BtnRemove.Click          += _BtnRemove_Click;
            _ListBox.SelectionChanged += _ListBox_SelectionChanged;
        }
Пример #12
0
        private void CreateUI()
        {
            _ObjectField = new ImplantObjectField(this)
            {
                Row = 4, Column = 1
            };

            _MainPanel = new ChangeCheck();

            _MainPanel.RowDefinitions.Add(26, GridUnitType.Pixel);                        // property lable
            _MainPanel.RowDefinitions.Add(124, GridUnitType.Pixel);                       // properties
            _MainPanel.RowDefinitions.Add(ButtonRowHeight, GridUnitType.Pixel);           // button add
            _MainPanel.RowDefinitions.Add(1, GridUnitType.Star);                          // object list
            _MainPanel.RowDefinitions.Add(_ObjectField.LayoutHeight, GridUnitType.Pixel); // object filed


            _LblDefaultProperties = new DropShadowLabel()
            {
                Row = 0, Column = 0, Margin = new Thickness(0, 0, 0, 6)
            }; _LblDefaultProperties.Text = "Default properties";

            ImplantAsset asset = target as ImplantAsset;

            if (asset.DefaultObject == null)
            {
                asset.DefaultObject = CreateNew();
            }
            asset.DefaultObject.OverrideProperties = true;
            _PropertiesField = new ImplantObjectPropertiesField()
            {
                Row = 1, Column = 0, Object = asset.DefaultObject
            };

            _ItemsList = new ListBox()
            {
                Row = 3, Column = 0, Margin = new Thickness(0, 2)
            };
            _ItemsList.BackgroundVisible = true;
            _ItemsList.DisableFocusable();

            _BtnAdd = new Skill.Framework.UI.Button()
            {
                Row = 2, Column = 0, Margin = new Thickness(2)
            };
            _BtnAdd.Content.text = "Add";
            _BtnAdd.Click       += new System.EventHandler(_BtnAdd_Click);

            _MainPanel.Controls.Add(new Box()
            {
                Row = 4, Column = 0
            });
            _MainPanel.Controls.Add(new Box()
            {
                Row = 0, Column = 0, RowSpan = 2
            });

            _MainPanel.Controls.Add(_LblDefaultProperties);
            _MainPanel.Controls.Add(_PropertiesField);
            _MainPanel.Controls.Add(_BtnAdd);
            _MainPanel.Controls.Add(_ItemsList);
            _MainPanel.Controls.Add(_ObjectField);



            _Frame = new Frame("MainFrame");
            _Frame.Grid.Controls.Add(_MainPanel);

            _MainPanel.Changed          += new EventHandler(_ChangeCheck_Changed);
            _ItemsList.SelectionChanged += _ItemsList_SelectionChanged;
        }