Ejemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ImportFilesDialog"/> class.
        /// </summary>
        /// <param name="entries">The entries to edit settings.</param>
        public ImportFilesDialog(List <ImportFileEntry> entries)
            : base("Import files settings")
        {
            if (entries == null || entries.Count < 1)
            {
                throw new ArgumentNullException();
            }

            const float TotalWidth   = 920;
            const float EditorHeight = 450;

            Width = TotalWidth;

            // Header and help description
            var headerLabel = new Label(0, 0, TotalWidth, 40)
            {
                Text      = "Import settings",
                DockStyle = DockStyle.Top,
                Parent    = this,
                Font      = Style.Current.FontTitle
            };
            var infoLabel = new Label(10, headerLabel.Bottom + 5, TotalWidth - 20, 40)
            {
                Text = "Specify options for importing files. Every file can have different settings. Select entries on the left panel to modify them.\nPro Tip: hold CTRL key and select entries to edit multiple at once.",
                HorizontalAlignment = TextAlignment.Near,
                Margin    = new Margin(7),
                DockStyle = DockStyle.Top,
                Parent    = this
            };

            // Buttons
            const float ButtonsWidth  = 60;
            const float ButtonsMargin = 8;
            var         importButton  = new Button(TotalWidth - ButtonsMargin - ButtonsWidth, infoLabel.Bottom - 30, ButtonsWidth)
            {
                Text        = "Import",
                AnchorStyle = AnchorStyle.UpperRight,
                Parent      = this
            };

            importButton.Clicked += OnImport;
            var cancelButton = new Button(importButton.Left - ButtonsMargin - ButtonsWidth, importButton.Y, ButtonsWidth)
            {
                Text        = "Cancel",
                AnchorStyle = AnchorStyle.UpperRight,
                Parent      = this
            };

            cancelButton.Clicked += OnCancel;

            // Split panel for entries list and settings editor
            var splitPanel = new SplitPanel(Orientation.Horizontal, ScrollBars.Vertical, ScrollBars.Vertical)
            {
                Y         = infoLabel.Bottom,
                Size      = new Vector2(TotalWidth, EditorHeight),
                DockStyle = DockStyle.Fill,
                Parent    = this
            };

            // Settings editor
            _settingsEditor = new CustomEditorPresenter(null);
            _settingsEditor.Panel.Parent = splitPanel.Panel2;

            // Setup tree
            var tree = new Tree(true);

            tree.Parent = splitPanel.Panel1;
            _rootNode   = new TreeNode(false);
            for (int i = 0; i < entries.Count; i++)
            {
                var entry = entries[i];

                // TODO: add icons for textures/models/etc from FileEntry to tree node??
                var node = new TreeNode(false)
                {
                    Text   = Path.GetFileName(entry.SourceUrl),
                    Tag    = entry,
                    Parent = _rootNode
                };
                node.LinkTooltip(entry.SourceUrl);
            }
            _rootNode.Expand();
            _rootNode.Parent      = tree;
            tree.SelectedChanged += OnSelectedChanged;

            // Select the first item
            tree.Select(_rootNode.Children[0] as TreeNode);

            Size = new Vector2(TotalWidth, splitPanel.Bottom);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ContentWindow"/> class.
        /// </summary>
        /// <param name="editor">The editor.</param>
        public ContentWindow(Editor editor)
            : base(editor, true, ScrollBars.None)
        {
            Title = "Content";
            Icon  = editor.Icons.Folder32;

            // Content database events
            editor.ContentDatabase.WorkspaceModified += () => _isWorkspaceDirty = true;
            editor.ContentDatabase.ItemRemoved       += ContentDatabaseOnItemRemoved;

            var options = Editor.Options;

            options.OptionsChanged += OnOptionsChanged;

            // Toolstrip
            _toolStrip = new ToolStrip(34.0f)
            {
                Parent = this,
            };
            _importButton = (ToolStripButton)_toolStrip.AddButton(Editor.Icons.Import64, () => Editor.ContentImporting.ShowImportFileDialog(CurrentViewFolder)).LinkTooltip("Import content");
            _toolStrip.AddSeparator();
            _navigateBackwardButton = (ToolStripButton)_toolStrip.AddButton(Editor.Icons.Left64, NavigateBackward).LinkTooltip("Navigate backward");
            _navigateForwardButton  = (ToolStripButton)_toolStrip.AddButton(Editor.Icons.Right64, NavigateForward).LinkTooltip("Navigate forward");
            _navigateUpButton       = (ToolStripButton)_toolStrip.AddButton(Editor.Icons.Up64, NavigateUp).LinkTooltip("Navigate up");

            // Navigation bar
            _navigationBar = new NavigationBar
            {
                Parent = this,
            };

            // Split panel
            _split = new SplitPanel(options.Options.Interface.ContentWindowOrientation, ScrollBars.Both, ScrollBars.Vertical)
            {
                AnchorPreset  = AnchorPresets.StretchAll,
                Offsets       = new Margin(0, 0, _toolStrip.Bottom, 0),
                SplitterValue = 0.2f,
                Parent        = this,
            };

            // Content structure tree searching query input box
            var headerPanel = new ContainerControl
            {
                AnchorPreset = AnchorPresets.HorizontalStretchTop,
                IsScrollable = true,
                Offsets      = new Margin(0, 0, 0, 18 + 6),
                Parent       = _split.Panel1,
            };

            _foldersSearchBox = new TextBox
            {
                AnchorPreset  = AnchorPresets.HorizontalStretchMiddle,
                WatermarkText = "Search...",
                Parent        = headerPanel,
                Bounds        = new Rectangle(4, 4, headerPanel.Width - 8, 18),
            };
            _foldersSearchBox.TextChanged += OnFoldersSearchBoxTextChanged;

            // Content structure tree
            _tree = new Tree(false)
            {
                Y      = headerPanel.Bottom,
                Parent = _split.Panel1,
            };
            _tree.SelectedChanged += OnTreeSelectionChanged;

            // Content items searching query input box and filters selector
            var contentItemsSearchPanel = new ContainerControl
            {
                AnchorPreset = AnchorPresets.HorizontalStretchTop,
                IsScrollable = true,
                Offsets      = new Margin(0, 0, 0, 18 + 8),
                Parent       = _split.Panel2,
            };
            const float viewDropdownWidth = 50.0f;

            _itemsSearchBox = new TextBox
            {
                AnchorPreset  = AnchorPresets.HorizontalStretchMiddle,
                WatermarkText = "Search...",
                Parent        = contentItemsSearchPanel,
                Bounds        = new Rectangle(viewDropdownWidth + 8, 4, contentItemsSearchPanel.Width - 12 - viewDropdownWidth, 18),
            };
            _itemsSearchBox.TextChanged += UpdateItemsSearch;
            _viewDropdown = new ViewDropdown
            {
                AnchorPreset       = AnchorPresets.MiddleLeft,
                SupportMultiSelect = true,
                TooltipText        = "Change content view and filter options",
                Parent             = contentItemsSearchPanel,
                Offsets            = new Margin(4, viewDropdownWidth, -9, 18),
            };
            _viewDropdown.SelectedIndexChanged += e => UpdateItemsSearch();
            for (int i = 0; i <= (int)ContentItemSearchFilter.Other; i++)
            {
                _viewDropdown.Items.Add(((ContentItemSearchFilter)i).ToString());
            }
            _viewDropdown.PopupCreate += OnViewDropdownPopupCreate;

            // Content View
            _view = new ContentView
            {
                AnchorPreset = AnchorPresets.HorizontalStretchTop,
                Offsets      = new Margin(0, 0, contentItemsSearchPanel.Bottom + 4, 0),
                IsScrollable = true,
                Parent       = _split.Panel2,
            };
            _view.OnOpen         += Open;
            _view.OnNavigateBack += NavigateBackward;
            _view.OnRename       += Rename;
            _view.OnDelete       += Delete;
            _view.OnDuplicate    += Duplicate;
            _view.OnPaste        += Paste;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ContentWindow"/> class.
        /// </summary>
        /// <param name="editor">The editor.</param>
        public ContentWindow(Editor editor)
            : base(editor, true, ScrollBars.None)
        {
            Title = "Content";

            // Content database events
            editor.ContentDatabase.OnWorkspaceModified += () => _isWorkspaceDirty = true;
            editor.ContentDatabase.ItemRemoved         += ContentDatabaseOnItemRemoved;

            // Tool strip
            _toolStrip    = new ToolStrip();
            _importButton = (ToolStripButton)_toolStrip.AddButton(Editor.Icons.Import32, () => Editor.ContentImporting.ShowImportFileDialog(CurrentViewFolder)).LinkTooltip("Import content");
            _toolStrip.AddSeparator();
            _navigateBackwardButton = (ToolStripButton)_toolStrip.AddButton(Editor.Icons.ArrowLeft32, NavigateBackward).LinkTooltip("Navigate backward");
            _navigateForwardButton  = (ToolStripButton)_toolStrip.AddButton(Editor.Icons.ArrowRight32, NavigateForward).LinkTooltip("Navigate forward");
            _nnavigateUpButton      = (ToolStripButton)_toolStrip.AddButton(Editor.Icons.ArrowUp32, NavigateUp).LinkTooltip("Navigate up");
            _toolStrip.Parent       = this;

            // Navigation bar
            _navigationBar = new NavigationBar
            {
                Parent = this
            };

            // Split panel
            _split = new SplitPanel(Orientation.Horizontal, ScrollBars.Both, ScrollBars.Vertical)
            {
                DockStyle     = DockStyle.Fill,
                SplitterValue = 0.2f,
                Parent        = this
            };

            // Content structure tree searching query input box
            var headerPanel = new ContainerControl();

            headerPanel.DockStyle    = DockStyle.Top;
            headerPanel.IsScrollable = true;
            headerPanel.Parent       = _split.Panel1;
            //
            _foldersSearchBox               = new TextBox(false, 4, 4, headerPanel.Width - 8);
            _foldersSearchBox.AnchorStyle   = AnchorStyle.Upper;
            _foldersSearchBox.WatermarkText = "Search...";
            _foldersSearchBox.Parent        = headerPanel;
            _foldersSearchBox.TextChanged  += OnFoldersSearchBoxTextChanged;
            //
            headerPanel.Height = _foldersSearchBox.Bottom + 6;

            // Content structure tree
            _tree   = new Tree(false);
            _tree.Y = headerPanel.Bottom;
            _tree.SelectedChanged += OnTreeSelectionChanged;
            _tree.Parent           = _split.Panel1;

            // Content items searching query input box and filters selector
            var contentItemsSearchPanel = new ContainerControl();

            contentItemsSearchPanel.DockStyle    = DockStyle.Top;
            contentItemsSearchPanel.IsScrollable = true;
            contentItemsSearchPanel.Parent       = _split.Panel2;
            //
            const float filterBoxWidth = 56.0f;

            _itemsSearchBox               = new TextBox(false, filterBoxWidth + 8, 4, contentItemsSearchPanel.Width - 8 - filterBoxWidth);
            _itemsSearchBox.AnchorStyle   = AnchorStyle.Upper;
            _itemsSearchBox.WatermarkText = "Search...";
            _itemsSearchBox.Parent        = contentItemsSearchPanel;
            _itemsSearchBox.TextChanged  += UpdateItemsSearch;
            //
            contentItemsSearchPanel.Height = _itemsSearchBox.Bottom + 4;
            //
            _itemsFilterBox        = new SearchFilterComboBox(4, (contentItemsSearchPanel.Height - ComboBox.DefaultHeight) * 0.5f, filterBoxWidth);
            _itemsFilterBox.Parent = contentItemsSearchPanel;
            _itemsFilterBox.SelectedIndexChanged += e => UpdateItemsSearch();
            _itemsFilterBox.SupportMultiSelect    = true;
            for (int i = 0; i <= (int)ContentItemSearchFilter.Other; i++)
            {
                _itemsFilterBox.Items.Add(((ContentItemSearchFilter)i).ToString());
            }

            // Content View
            _view                 = new ContentView();
            _view.OnOpen         += Open;
            _view.OnNavigateBack += NavigateBackward;
            _view.OnRename       += Rename;
            _view.OnDelete       += Delete;
            _view.OnDuplicate    += Clone;
            _view.OnPaste        += Paste;
            _view.Parent          = _split.Panel2;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="DebugLogWindow"/> class.
        /// </summary>
        /// <param name="editor">The editor.</param>
        public DebugLogWindow(Editor editor)
            : base(editor, true, ScrollBars.None)
        {
            Title = "Debug Log";
            Icon  = IconInfo;
            OnEditorOptionsChanged(Editor.Options.Options);

            // Toolstrip
            var toolstrip = new ToolStrip(22.0f)
            {
                Parent = this,
            };

            toolstrip.AddButton("Clear", Clear).LinkTooltip("Clears all log entries");
            _clearOnPlayButton  = (ToolStripButton)toolstrip.AddButton("Clear on Play").SetAutoCheck(true).SetChecked(true).LinkTooltip("Clears all log entries on enter playmode");
            _pauseOnErrorButton = (ToolStripButton)toolstrip.AddButton("Pause on Error").SetAutoCheck(true).LinkTooltip("Performs auto pause on error");
            toolstrip.AddSeparator();
            _groupButtons[0] = (ToolStripButton)toolstrip.AddButton(editor.Icons.Error32, () => UpdateLogTypeVisibility(LogGroup.Error, _groupButtons[0].Checked)).SetAutoCheck(true).SetChecked(true).LinkTooltip("Shows/hides error messages");
            _groupButtons[1] = (ToolStripButton)toolstrip.AddButton(editor.Icons.Warning32, () => UpdateLogTypeVisibility(LogGroup.Warning, _groupButtons[1].Checked)).SetAutoCheck(true).SetChecked(true).LinkTooltip("Shows/hides warning messages");
            _groupButtons[2] = (ToolStripButton)toolstrip.AddButton(editor.Icons.Info32, () => UpdateLogTypeVisibility(LogGroup.Info, _groupButtons[2].Checked)).SetAutoCheck(true).SetChecked(true).LinkTooltip("Shows/hides info messages");
            UpdateCount();

            // Split panel
            _split = new SplitPanel(Orientation.Vertical, ScrollBars.Vertical, ScrollBars.Both)
            {
                AnchorPreset  = AnchorPresets.StretchAll,
                Offsets       = new Margin(0, 0, toolstrip.Bottom, 0),
                SplitterValue = 0.8f,
                Parent        = this
            };

            // Info detail info
            _logInfo = new Label
            {
                Parent              = _split.Panel2,
                AutoWidth           = true,
                AutoHeight          = true,
                Margin              = new Margin(4),
                VerticalAlignment   = TextAlignment.Near,
                HorizontalAlignment = TextAlignment.Near,
                Offsets             = Margin.Zero,
            };

            // Entries panel
            _entriesPanel = new VerticalPanel
            {
                AnchorPreset = AnchorPresets.HorizontalStretchTop,
                Offsets      = Margin.Zero,
                IsScrollable = true,
                Parent       = _split.Panel1,
            };

            // Cache entries icons
            IconInfo    = Editor.Icons.Info64;
            IconWarning = Editor.Icons.Warning64;
            IconError   = Editor.Icons.Error64;

            // Bind events
            Editor.Options.OptionsChanged            += OnEditorOptionsChanged;
            Debug.Logger.LogHandler.SendLog          += LogHandlerOnSendLog;
            Debug.Logger.LogHandler.SendExceptionLog += LogHandlerOnSendExceptionLog;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ImportFilesDialog"/> class.
        /// </summary>
        /// <param name="entries">The entries to edit settings.</param>
        public ImportFilesDialog(List <ImportFileEntry> entries)
            : base("Import files settings")
        {
            if (entries == null || entries.Count < 1)
            {
                throw new ArgumentNullException();
            }

            const float TotalWidth   = 920;
            const float EditorHeight = 450;

            Width = TotalWidth;

            // Header and help description
            var headerLabel = new Label
            {
                Text         = "Import settings",
                AnchorPreset = AnchorPresets.HorizontalStretchTop,
                Offsets      = new Margin(0, 0, 0, 40),
                Parent       = this,
                Font         = new FontReference(Style.Current.FontTitle)
            };
            var infoLabel = new Label
            {
                Text = "Specify options for importing files. Every file can have different settings. Select entries on the left panel to modify them.\nPro Tip: hold CTRL key and select entries to edit multiple at once or use CTRL+A to select them all.",
                HorizontalAlignment = TextAlignment.Near,
                Margin       = new Margin(7),
                AnchorPreset = AnchorPresets.HorizontalStretchTop,
                Offsets      = new Margin(10, -20, 45, 70),
                Parent       = this
            };

            // Buttons
            const float ButtonsWidth  = 60;
            const float ButtonsHeight = 24;
            const float ButtonsMargin = 8;
            var         importButton  = new Button
            {
                Text         = "Import",
                AnchorPreset = AnchorPresets.BottomRight,
                Offsets      = new Margin(-ButtonsWidth - ButtonsMargin, ButtonsWidth, -ButtonsHeight - ButtonsMargin, ButtonsHeight),
                Parent       = this
            };

            importButton.Clicked += OnSubmit;
            var cancelButton = new Button
            {
                Text         = "Cancel",
                AnchorPreset = AnchorPresets.BottomRight,
                Offsets      = new Margin(-ButtonsWidth - ButtonsMargin - ButtonsWidth - ButtonsMargin, ButtonsWidth, -ButtonsHeight - ButtonsMargin, ButtonsHeight),
                Parent       = this
            };

            cancelButton.Clicked += OnCancel;

            // Split panel for entries list and settings editor
            var splitPanel = new SplitPanel(Orientation.Horizontal, ScrollBars.Both, ScrollBars.Vertical)
            {
                AnchorPreset = AnchorPresets.StretchAll,
                Offsets      = new Margin(2, 2, infoLabel.Bottom + 2, ButtonsHeight + ButtonsMargin + ButtonsMargin),
                Parent       = this
            };

            // Settings editor
            _settingsEditor = new CustomEditorPresenter(null);
            _settingsEditor.Panel.Parent = splitPanel.Panel2;

            // Setup tree
            var tree = new Tree(true)
            {
                Parent = splitPanel.Panel1
            };

            tree.RightClick += OnTreeRightClick;
            _rootNode        = new TreeNode(false);
            for (int i = 0; i < entries.Count; i++)
            {
                var entry = entries[i];

                // TODO: add icons for textures/models/etc from FileEntry to tree node??
                var node = new ItemNode(entry)
                {
                    Parent = _rootNode
                };
            }
            _rootNode.Expand();
            _rootNode.ChildrenIndent = 0;
            _rootNode.Parent         = tree;
            tree.Margin           = new Margin(0.0f, 0.0f, -14.0f, 2.0f); // Hide root node
            tree.SelectedChanged += OnSelectedChanged;

            // Select the first item
            tree.Select(_rootNode.Children[0] as TreeNode);

            _dialogSize = new Vector2(TotalWidth, EditorHeight + splitPanel.Offsets.Height);
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DragDropTargetEventArgs">DragDropTargetEventArgs</see> class.
 /// </summary>
 /// <param name="target"></param>
 public DragDropTargetEventArgs(SplitPanel target)
 {
     this.dropTarget = target;
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Constructs a new <see cref="DockWindowTransaction">DockWindowTransaction</see> instance.
 /// </summary>
 /// <param name="state">The target state for the transaction.</param>
 /// <param name="window">The window associated with the transaction.</param>
 /// <param name="targetWindow">The target window for the transaction (may be null).</param>
 /// <param name="anchor">The <see cref="SplitPanel">SplitPanel</see> instance that is used as a dock anchor.</param>
 /// <param name="position">The <see cref="DockPosition">DockPosition</see> where the window should be docked.</param>
 public DockWindowTransaction(DockState state, DockWindow window, DockWindow targetWindow, SplitPanel anchor, DockPosition position)
     : base(state, new DockWindow[] { window }, anchor, position)
 {
     this.targetWindow = targetWindow;
 }
 private void InitializeComponent()
 {
   ListViewDetailColumn viewDetailColumn1 = new ListViewDetailColumn("Column 0", "Title");
   ListViewDetailColumn viewDetailColumn2 = new ListViewDetailColumn("Column 1", "Size on disk");
   ListViewDetailColumn viewDetailColumn3 = new ListViewDetailColumn("Column 0", "Title");
   ListViewDetailColumn viewDetailColumn4 = new ListViewDetailColumn("Column 1", "Size on disk");
   ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof (frmAdvancedDiskManagement));
   this.lstTitles = new RadListView();
   this.cmdDelete = new RadButton();
   this.lstEmuTitles = new RadListView();
   this.cmdDeleteEmu = new RadButton();
   this.radGroupBox1 = new RadGroupBox();
   this.radSplitContainer1 = new RadSplitContainer();
   this.splitPanel1 = new SplitPanel();
   this.radGroupBox2 = new RadGroupBox();
   this.radButton1 = new RadButton();
   this.lblTotalRaw = new RadLabel();
   this.radLabel1 = new RadLabel();
   this.splitPanel2 = new SplitPanel();
   this.radGroupBox3 = new RadGroupBox();
   this.lblTotalEmu = new RadLabel();
   this.radLabel2 = new RadLabel();
   this.lstTitles.BeginInit();
   this.cmdDelete.BeginInit();
   this.lstEmuTitles.BeginInit();
   this.cmdDeleteEmu.BeginInit();
   this.radGroupBox1.BeginInit();
   this.radGroupBox1.SuspendLayout();
   this.radSplitContainer1.BeginInit();
   this.radSplitContainer1.SuspendLayout();
   this.splitPanel1.BeginInit();
   this.splitPanel1.SuspendLayout();
   this.radGroupBox2.BeginInit();
   this.radGroupBox2.SuspendLayout();
   this.radButton1.BeginInit();
   this.lblTotalRaw.BeginInit();
   this.radLabel1.BeginInit();
   this.splitPanel2.BeginInit();
   this.splitPanel2.SuspendLayout();
   this.radGroupBox3.BeginInit();
   this.radGroupBox3.SuspendLayout();
   this.lblTotalEmu.BeginInit();
   this.radLabel2.BeginInit();
   this.BeginInit();
   this.SuspendLayout();
   viewDetailColumn1.HeaderText = "Title";
   viewDetailColumn1.Width = 400f;
   viewDetailColumn2.HeaderText = "Size on disk";
   this.lstTitles.Columns.AddRange(viewDetailColumn1, viewDetailColumn2);
   this.lstTitles.Dock = DockStyle.Fill;
   this.lstTitles.ItemSpacing = -1;
   this.lstTitles.Location = new Point(2, 120);
   this.lstTitles.Name = "lstTitles";
   this.lstTitles.ShowGridLines = true;
   this.lstTitles.Size = new Size(726, 614);
   this.lstTitles.TabIndex = 1;
   this.lstTitles.Text = "radListView1";
   this.lstTitles.ViewType = ListViewType.DetailsView;
   this.lstTitles.ItemRemoving += new ListViewItemCancelEventHandler(this.lstTitles_ItemRemoving);
   this.cmdDelete.Dock = DockStyle.Bottom;
   this.cmdDelete.Location = new Point(2, 764);
   this.cmdDelete.Name = "cmdDelete";
   this.cmdDelete.Size = new Size(726, 24);
   this.cmdDelete.TabIndex = 2;
   this.cmdDelete.Text = "Delete";
   this.cmdDelete.Click += new EventHandler(this.cmdDelete_Click);
   this.lstEmuTitles.AllowEdit = false;
   viewDetailColumn3.HeaderText = "Title";
   viewDetailColumn3.Width = 400f;
   viewDetailColumn4.HeaderText = "Size on disk";
   this.lstEmuTitles.Columns.AddRange(viewDetailColumn3, viewDetailColumn4);
   this.lstEmuTitles.Dock = DockStyle.Fill;
   this.lstEmuTitles.ItemSpacing = -1;
   this.lstEmuTitles.Location = new Point(2, 120);
   this.lstEmuTitles.Name = "lstEmuTitles";
   this.lstEmuTitles.ShowGridLines = true;
   this.lstEmuTitles.Size = new Size(726, 614);
   this.lstEmuTitles.TabIndex = 3;
   this.lstEmuTitles.Text = "radListView1";
   this.lstEmuTitles.ViewType = ListViewType.DetailsView;
   this.lstEmuTitles.ItemRemoving += new ListViewItemCancelEventHandler(this.lstEmuTitles_ItemRemoving);
   this.cmdDeleteEmu.Dock = DockStyle.Bottom;
   this.cmdDeleteEmu.Location = new Point(2, 764);
   this.cmdDeleteEmu.Name = "cmdDeleteEmu";
   this.cmdDeleteEmu.Size = new Size(726, 24);
   this.cmdDeleteEmu.TabIndex = 3;
   this.cmdDeleteEmu.Text = "Delete";
   this.cmdDeleteEmu.Click += new EventHandler(this.cmdDeleteEmu_Click);
   this.radGroupBox1.AccessibleRole = AccessibleRole.Grouping;
   this.radGroupBox1.Controls.Add((Control) this.radSplitContainer1);
   this.radGroupBox1.Dock = DockStyle.Fill;
   this.radGroupBox1.HeaderText = "Manage Data";
   this.radGroupBox1.Location = new Point(0, 0);
   this.radGroupBox1.Name = "radGroupBox1";
   this.radGroupBox1.Padding = new Padding(20);
   this.radGroupBox1.Size = new Size(1504, 830);
   this.radGroupBox1.TabIndex = 5;
   this.radGroupBox1.Text = "Manage Data";
   this.radSplitContainer1.Controls.Add((Control) this.splitPanel1);
   this.radSplitContainer1.Controls.Add((Control) this.splitPanel2);
   this.radSplitContainer1.Dock = DockStyle.Fill;
   this.radSplitContainer1.Location = new Point(20, 20);
   this.radSplitContainer1.Name = "radSplitContainer1";
   this.radSplitContainer1.RootElement.MinSize = new Size(25, 25);
   this.radSplitContainer1.Size = new Size(1464, 790);
   this.radSplitContainer1.TabIndex = 7;
   this.radSplitContainer1.TabStop = false;
   this.radSplitContainer1.Text = "radSplitContainer1";
   this.splitPanel1.Controls.Add((Control) this.radGroupBox2);
   this.splitPanel1.Location = new Point(0, 0);
   this.splitPanel1.Name = "splitPanel1";
   this.splitPanel1.RootElement.MinSize = new Size(25, 25);
   this.splitPanel1.Size = new Size(730, 790);
   this.splitPanel1.TabIndex = 0;
   this.splitPanel1.TabStop = false;
   this.splitPanel1.Text = "splitPanel1";
   this.radGroupBox2.AccessibleRole = AccessibleRole.Grouping;
   this.radGroupBox2.Controls.Add((Control) this.radButton1);
   this.radGroupBox2.Controls.Add((Control) this.lstTitles);
   this.radGroupBox2.Controls.Add((Control) this.lblTotalRaw);
   this.radGroupBox2.Controls.Add((Control) this.cmdDelete);
   this.radGroupBox2.Controls.Add((Control) this.radLabel1);
   this.radGroupBox2.Dock = DockStyle.Fill;
   this.radGroupBox2.HeaderText = "Raw content";
   this.radGroupBox2.Location = new Point(0, 0);
   this.radGroupBox2.Name = "radGroupBox2";
   this.radGroupBox2.Size = new Size(730, 790);
   this.radGroupBox2.TabIndex = 6;
   this.radGroupBox2.Text = "Raw content";
   this.radButton1.Dock = DockStyle.Bottom;
   this.radButton1.Location = new Point(2, 710);
   this.radButton1.Name = "radButton1";
   this.radButton1.Size = new Size(726, 24);
   this.radButton1.TabIndex = 4;
   this.radButton1.Text = "Delete all useless data";
   this.radButton1.Click += new EventHandler(this.radButton1_Click);
   this.lblTotalRaw.Dock = DockStyle.Bottom;
   this.lblTotalRaw.Font = new Font("Segoe UI", 14.25f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
   this.lblTotalRaw.Location = new Point(2, 734);
   this.lblTotalRaw.Name = "lblTotalRaw";
   this.lblTotalRaw.Size = new Size(17, 30);
   this.lblTotalRaw.TabIndex = 3;
   this.lblTotalRaw.Text = "-";
   this.radLabel1.AutoSize = false;
   this.radLabel1.Dock = DockStyle.Top;
   this.radLabel1.Location = new Point(2, 18);
   this.radLabel1.Name = "radLabel1";
   this.radLabel1.Padding = new Padding(20, 0, 0, 0);
   this.radLabel1.Size = new Size(726, 102);
   this.radLabel1.TabIndex = 0;
   this.radLabel1.Text = componentResourceManager.GetString("radLabel1.Text");
   this.splitPanel2.Controls.Add((Control) this.radGroupBox3);
   this.splitPanel2.Location = new Point(734, 0);
   this.splitPanel2.Name = "splitPanel2";
   this.splitPanel2.RootElement.MinSize = new Size(25, 25);
   this.splitPanel2.Size = new Size(730, 790);
   this.splitPanel2.TabIndex = 1;
   this.splitPanel2.TabStop = false;
   this.splitPanel2.Text = "splitPanel2";
   this.radGroupBox3.AccessibleRole = AccessibleRole.Grouping;
   this.radGroupBox3.Controls.Add((Control) this.lstEmuTitles);
   this.radGroupBox3.Controls.Add((Control) this.lblTotalEmu);
   this.radGroupBox3.Controls.Add((Control) this.radLabel2);
   this.radGroupBox3.Controls.Add((Control) this.cmdDeleteEmu);
   this.radGroupBox3.Dock = DockStyle.Fill;
   this.radGroupBox3.HeaderText = "Emulation Content";
   this.radGroupBox3.Location = new Point(0, 0);
   this.radGroupBox3.Name = "radGroupBox3";
   this.radGroupBox3.Size = new Size(730, 790);
   this.radGroupBox3.TabIndex = 6;
   this.radGroupBox3.Text = "Emulation Content";
   this.lblTotalEmu.Dock = DockStyle.Bottom;
   this.lblTotalEmu.Font = new Font("Segoe UI", 14.25f, FontStyle.Regular, GraphicsUnit.Point, (byte) 0);
   this.lblTotalEmu.Location = new Point(2, 734);
   this.lblTotalEmu.Name = "lblTotalEmu";
   this.lblTotalEmu.Size = new Size(17, 30);
   this.lblTotalEmu.TabIndex = 4;
   this.lblTotalEmu.Text = "-";
   this.radLabel2.AutoSize = false;
   this.radLabel2.Dock = DockStyle.Top;
   this.radLabel2.Location = new Point(2, 18);
   this.radLabel2.Name = "radLabel2";
   this.radLabel2.Padding = new Padding(20, 0, 0, 0);
   this.radLabel2.Size = new Size(726, 102);
   this.radLabel2.TabIndex = 1;
   this.radLabel2.Text = "<html><p>We call 'Emulation' content files that have been unpacked/decrypted/converted from the RAW files.</p><p>This is the format emulators can use to play games.</p><p></p></html>";
   this.AutoScaleDimensions = new SizeF(6f, 13f);
   this.AutoScaleMode = AutoScaleMode.Font;
   this.ClientSize = new Size(1504, 830);
   this.Controls.Add((Control) this.radGroupBox1);
   this.Icon = (Icon) componentResourceManager.GetObject("$this.Icon");
   this.Name = nameof (frmAdvancedDiskManagement);
   this.RootElement.ApplyShapeToControl = true;
   this.StartPosition = FormStartPosition.CenterScreen;
   this.Text = "Advanced Disk Space Manager";
   this.lstTitles.EndInit();
   this.cmdDelete.EndInit();
   this.lstEmuTitles.EndInit();
   this.cmdDeleteEmu.EndInit();
   this.radGroupBox1.EndInit();
   this.radGroupBox1.ResumeLayout(false);
   this.radSplitContainer1.EndInit();
   this.radSplitContainer1.ResumeLayout(false);
   this.splitPanel1.EndInit();
   this.splitPanel1.ResumeLayout(false);
   this.radGroupBox2.EndInit();
   this.radGroupBox2.ResumeLayout(false);
   this.radGroupBox2.PerformLayout();
   this.radButton1.EndInit();
   this.lblTotalRaw.EndInit();
   this.radLabel1.EndInit();
   this.splitPanel2.EndInit();
   this.splitPanel2.ResumeLayout(false);
   this.radGroupBox3.EndInit();
   this.radGroupBox3.ResumeLayout(false);
   this.radGroupBox3.PerformLayout();
   this.lblTotalEmu.EndInit();
   this.radLabel2.EndInit();
   this.EndInit();
   this.ResumeLayout(false);
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Initializes a new <see cref="PerformDockTransaction">PerformDockTransaction</see> instance.
 /// </summary>
 /// <param name="state">The target state for the transaction.</param>
 /// <param name="windows">The associated DockWindow instances</param>
 /// <param name="anchor">The SplitPanel instance, which will be treated as a DockAnchor.</param>
 /// <param name="position">The DockPosition to be used when performing the DockWindow operation.</param>
 public PerformDockTransaction(DockState state, IEnumerable <DockWindow> windows, SplitPanel anchor, DockPosition position)
     : base(state, windows)
 {
     this.dockAnchor = anchor;
     this.position   = position;
 }
Ejemplo n.º 10
0
 public SplitPanelEventArgs(SplitPanel panel)
 {
     this.panel = panel;
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DragDropDockPositionEventArgs">DragDropDockPositionEventArgs</see> class.
 /// </summary>
 /// <param name="dropTarget"></param>
 /// <param name="position"></param>
 /// <param name="guidePosition"></param>
 public DragDropDockPositionEventArgs(SplitPanel dropTarget, AllowedDockPosition position, DockingGuidesPosition guidePosition)
 {
     this.dropTarget          = dropTarget;
     this.allowedDockPosition = position;
     this.guidePosition       = guidePosition;
 }
 public override void Initialize(IComponent component)
 {
     base.Initialize(component);
     this.m_SplitPanel = base.Component as SplitPanel;
 }
Ejemplo n.º 13
0
        /// <summary>
        /// Constructs a new <see cref="DragDropTransaction">DragDropTransaction</see> instance.
        /// </summary>
        /// <param name="state">The target state of the transaction.</param>
        /// <param name="draggedWindow">The DockWindow instance that has been dragged. May be null if the drag context has been DockTabStrip instance.</param>
        /// <param name="panel">The SplitPanel instance that has been dragged. May be null of the drag context has been DockWindow instance.</param>
        /// <param name="anchor">The SplitPanel instance that is used as dock anchor.</param>
        /// <param name="position">The DockPosition where to dock the dragged context.</param>
        public DragDropTransaction(DockState state, DockWindow draggedWindow, SplitPanel panel, SplitPanel anchor, DockPosition position)
            : base(state, null, anchor, position)
        {
            this.associatedPanel = panel;
            this.draggedWindow   = draggedWindow;

            if (this.draggedWindow != null)
            {
                this.AssociatedWindows.Add(this.draggedWindow);
            }
            else
            {
                RadDock dockManager = null;
                if (panel is DockTabStrip)
                {
                    dockManager = (panel as DockTabStrip).DockManager;
                }
                else if (panel is RadSplitContainer)
                {
                    FloatingWindow floatingParent = ControlHelper.FindAncestor <FloatingWindow>(panel);
                    if (floatingParent != null)
                    {
                        dockManager = floatingParent.DockManager;
                    }
                }
                this.AssociatedWindows.AddRange(DockHelper.GetDockWindows(panel, true, dockManager));
            }
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Traverses the tree of split containers and finds the panel,
        /// which is direct child of the specified container and contains the specified split panel as a descendant.
        /// </summary>
        /// <param name="container"></param>
        /// <param name="descendant"></param>
        /// <returns></returns>
        public static SplitPanel GetDirectChildContainingPanel(RadSplitContainer container, SplitPanel descendant)
        {
            RadSplitContainer parent = container;
            SplitPanel        curr   = descendant;

            while (parent != null)
            {
                if (parent.SplitPanels.IndexOf(curr) != -1)
                {
                    return(curr);
                }

                curr = curr.SplitContainer;
            }

            return(null);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Create child dock panel
        /// </summary>
        /// <param name="state">Dock panel state</param>
        /// <param name="splitterValue">Initial splitter value</param>
        /// <returns>Child panel</returns>
        public DockPanel CreateChildPanel(DockState state, float splitterValue)
        {
            createTabsProxy();

            // Create child dock panel
            var dockPanel = new DockPanel(this);

            // Switch dock mode
            Control     c1;
            Control     c2;
            Orientation o;

            switch (state)
            {
            case DockState.DockTop:
            {
                o  = Orientation.Vertical;
                c1 = dockPanel;
                c2 = _tabsProxy;
                break;
            }

            case DockState.DockBottom:
            {
                splitterValue = 1 - splitterValue;
                o             = Orientation.Vertical;
                c1            = _tabsProxy;
                c2            = dockPanel;
                break;
            }

            case DockState.DockLeft:
            {
                o  = Orientation.Horizontal;
                c1 = dockPanel;
                c2 = _tabsProxy;
                break;
            }

            case DockState.DockRight:
            {
                splitterValue = 1 - splitterValue;
                o             = Orientation.Horizontal;
                c1            = _tabsProxy;
                c2            = dockPanel;
                break;
            }

            default: throw new ArgumentOutOfRangeException();
            }

            // Create splitter and link controls
            var        parent   = _tabsProxy.Parent;
            SplitPanel splitter = new SplitPanel(o, ScrollBars.None, ScrollBars.None);

            splitter.DockStyle     = DockStyle.Fill;
            splitter.SplitterValue = splitterValue;
            splitter.Panel1.AddChild(c1);
            splitter.Panel2.AddChild(c2);
            parent.AddChild(splitter);

            // Update
            splitter.UnlockChildrenRecursive();
            splitter.PerformLayout();

            return(dockPanel);
        }
Ejemplo n.º 16
0
 /// <summary>
 /// Initializes a new <see cref="FloatTransaction">FloatTransaction</see> instance.
 /// </summary>
 /// <param name="windows"></param>
 /// <param name="panel"></param>
 /// <param name="bounds"></param>
 public FloatTransaction(IEnumerable <DockWindow> windows, SplitPanel panel, Rectangle bounds)
     : base(DockState.Floating, windows)
 {
     this.bounds          = bounds;
     this.associatedPanel = panel;
 }
Ejemplo n.º 17
0
        private void InitializeComponent()
        {
            this.icontainer_0 = (IContainer) new Container();
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(frmShortcutType));

            this.cmdShortcut        = new RadButton();
            this.cmdSteam           = new RadButton();
            this.pictureBox1        = new PictureBox();
            this.pictureBox2        = new PictureBox();
            this.radLabel1          = new RadLabel();
            this.radLabel2          = new RadLabel();
            this.timer_0            = new Timer(this.icontainer_0);
            this.lblCloseSteam      = new RadLabel();
            this.radSplitContainer1 = new RadSplitContainer();
            this.splitPanel1        = new SplitPanel();
            this.splitPanel2        = new SplitPanel();
            this.radSteamLink       = new RadButton();
            this.chkSteamLink       = new RadCheckBox();
            this.cmdShortcut.BeginInit();
            this.cmdSteam.BeginInit();
            ((ISupportInitialize)this.pictureBox1).BeginInit();
            ((ISupportInitialize)this.pictureBox2).BeginInit();
            this.radLabel1.BeginInit();
            this.radLabel2.BeginInit();
            this.lblCloseSteam.BeginInit();
            this.radSplitContainer1.BeginInit();
            this.radSplitContainer1.SuspendLayout();
            this.splitPanel1.BeginInit();
            this.splitPanel1.SuspendLayout();
            this.splitPanel2.BeginInit();
            this.splitPanel2.SuspendLayout();
            this.radSteamLink.BeginInit();
            this.chkSteamLink.BeginInit();
            this.BeginInit();
            this.SuspendLayout();
            this.cmdShortcut.Location    = new Point(100, 168);
            this.cmdShortcut.Name        = "cmdShortcut";
            this.cmdShortcut.Size        = new Size(172, 24);
            this.cmdShortcut.TabIndex    = 0;
            this.cmdShortcut.Text        = "Create a desktop shortcut";
            this.cmdShortcut.Click      += new EventHandler(this.cmdShortcut_Click);
            this.cmdSteam.Location       = new Point(85, 138);
            this.cmdSteam.Name           = "cmdSteam";
            this.cmdSteam.Size           = new Size(172, 24);
            this.cmdSteam.TabIndex       = 1;
            this.cmdSteam.Text           = "Add game to Steam";
            this.cmdSteam.Click         += new EventHandler(this.cmdSteam_Click);
            this.pictureBox1.Image       = (Image)Class123.icnSteam;
            this.pictureBox1.Location    = new Point(123, 17);
            this.pictureBox1.Name        = "pictureBox1";
            this.pictureBox1.Size        = new Size(96, 96);
            this.pictureBox1.SizeMode    = PictureBoxSizeMode.AutoSize;
            this.pictureBox1.TabIndex    = 2;
            this.pictureBox1.TabStop     = false;
            this.pictureBox2.Image       = (Image)Class123.icnDesktop;
            this.pictureBox2.Location    = new Point(138, 47);
            this.pictureBox2.Name        = "pictureBox2";
            this.pictureBox2.Size        = new Size(96, 96);
            this.pictureBox2.SizeMode    = PictureBoxSizeMode.AutoSize;
            this.pictureBox2.TabIndex    = 3;
            this.pictureBox2.TabStop     = false;
            this.radLabel1.AutoSize      = false;
            this.radLabel1.Location      = new Point(59, 198);
            this.radLabel1.Name          = "radLabel1";
            this.radLabel1.Size          = new Size(227, 21);
            this.radLabel1.TabIndex      = 4;
            this.radLabel1.Text          = "<html><ul><li>Launch the game from your dekstop</li></ul></html>";
            this.radLabel2.Location      = new Point(40, 168);
            this.radLabel2.Name          = "radLabel2";
            this.radLabel2.Size          = new Size(263, 46);
            this.radLabel2.TabIndex      = 5;
            this.radLabel2.Text          = "<html><ul><li>Launch the game from Steam</li><li>Launch the game from the Big Picture Mode</li><li>Launch the game with the Steam Link</li></ul></html>";
            this.timer_0.Enabled         = true;
            this.timer_0.Interval        = 150;
            this.timer_0.Tick           += new EventHandler(this.timer_0_Tick);
            this.lblCloseSteam.Cursor    = Cursors.Hand;
            this.lblCloseSteam.ForeColor = Color.Red;
            this.lblCloseSteam.Location  = new Point(41, 119);
            this.lblCloseSteam.Name      = "lblCloseSteam";
            this.lblCloseSteam.Size      = new Size(260, 18);
            this.lblCloseSteam.TabIndex  = 6;
            this.lblCloseSteam.Text      = "Please close Steam to proceed (click to force close)";
            this.lblCloseSteam.Visible   = false;
            this.lblCloseSteam.Click    += new EventHandler(this.lblCloseSteam_Click);
            this.radSplitContainer1.Controls.Add((Control)this.splitPanel1);
            this.radSplitContainer1.Controls.Add((Control)this.splitPanel2);
            this.radSplitContainer1.Dock                = DockStyle.Fill;
            this.radSplitContainer1.Location            = new Point(0, 0);
            this.radSplitContainer1.Name                = "radSplitContainer1";
            this.radSplitContainer1.RootElement.MinSize = new Size(25, 25);
            this.radSplitContainer1.Size                = new Size(691, 266);
            this.radSplitContainer1.TabIndex            = 8;
            this.radSplitContainer1.TabStop             = false;
            this.radSplitContainer1.Text                = "radSplitContainer1";
            this.splitPanel1.Controls.Add((Control)this.pictureBox2);
            this.splitPanel1.Controls.Add((Control)this.cmdShortcut);
            this.splitPanel1.Controls.Add((Control)this.radLabel1);
            this.splitPanel1.Location            = new Point(0, 0);
            this.splitPanel1.Name                = "splitPanel1";
            this.splitPanel1.RootElement.MinSize = new Size(25, 25);
            this.splitPanel1.Size                = new Size(344, 266);
            this.splitPanel1.TabIndex            = 0;
            this.splitPanel1.TabStop             = false;
            this.splitPanel1.Text                = "splitPanel1";
            this.splitPanel2.Controls.Add((Control)this.chkSteamLink);
            this.splitPanel2.Controls.Add((Control)this.radSteamLink);
            this.splitPanel2.Controls.Add((Control)this.pictureBox1);
            this.splitPanel2.Controls.Add((Control)this.cmdSteam);
            this.splitPanel2.Controls.Add((Control)this.lblCloseSteam);
            this.splitPanel2.Controls.Add((Control)this.radLabel2);
            this.splitPanel2.Location            = new Point(348, 0);
            this.splitPanel2.Name                = "splitPanel2";
            this.splitPanel2.RootElement.MinSize = new Size(25, 25);
            this.splitPanel2.Size                = new Size(343, 266);
            this.splitPanel2.TabIndex            = 1;
            this.splitPanel2.TabStop             = false;
            this.splitPanel2.Text                = "splitPanel2";
            this.radSteamLink.Location           = new Point(114, 239);
            this.radSteamLink.Name               = "radSteamLink";
            this.radSteamLink.Size               = new Size(226, 24);
            this.radSteamLink.TabIndex           = 7;
            this.radSteamLink.Text               = "Download Steam Link Input Configuration";
            this.radSteamLink.Click             += new EventHandler(this.radSteamLink_Click);
            this.chkSteamLink.Location           = new Point(19, 242);
            this.chkSteamLink.Name               = "chkSteamLink";
            this.chkSteamLink.Size               = new Size(89, 18);
            this.chkSteamLink.TabIndex           = 8;
            this.chkSteamLink.Text               = "Steam Link fix";
            this.AutoScaleDimensions             = new SizeF(6f, 13f);
            this.AutoScaleMode = AutoScaleMode.Font;
            this.ClientSize    = new Size(691, 266);
            this.Controls.Add((Control)this.radSplitContainer1);
            this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
            this.Icon            = (Icon)componentResourceManager.GetObject("$this.Icon");
            this.Name            = nameof(frmShortcutType);
            this.RootElement.ApplyShapeToControl = true;
            this.ShowIcon      = false;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Text          = "Choose a shortcut";
            this.Load         += new EventHandler(this.frmShortcutType_Load);
            this.cmdShortcut.EndInit();
            this.cmdSteam.EndInit();
            ((ISupportInitialize)this.pictureBox1).EndInit();
            ((ISupportInitialize)this.pictureBox2).EndInit();
            this.radLabel1.EndInit();
            this.radLabel2.EndInit();
            this.lblCloseSteam.EndInit();
            this.radSplitContainer1.EndInit();
            this.radSplitContainer1.ResumeLayout(false);
            this.splitPanel1.EndInit();
            this.splitPanel1.ResumeLayout(false);
            this.splitPanel1.PerformLayout();
            this.splitPanel2.EndInit();
            this.splitPanel2.ResumeLayout(false);
            this.splitPanel2.PerformLayout();
            this.radSteamLink.EndInit();
            this.chkSteamLink.EndInit();
            this.EndInit();
            this.ResumeLayout(false);
        }
Ejemplo n.º 18
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DragDropHitTestEventArgs">DragDropHitTestEventArgs</see> class.
 /// </summary>
 /// <param name="dropTarget"></param>
 /// <param name="hitTest"></param>
 public DragDropHitTestEventArgs(SplitPanel dropTarget, DockingGuideHitTest hitTest)
 {
     this.hitTest    = hitTest;
     this.dropTarget = dropTarget;
 }
Ejemplo n.º 19
0
        /// <summary>
        /// Initializes a new instance of the <see cref="VisjectSurfaceWindow{TAsset, TSurface, TPreview}"/> class.
        /// </summary>
        /// <param name="editor">The editor.</param>
        /// <param name="item">The item.</param>
        /// <param name="useTabs">if set to <c>true</c> [use tabs].</param>
        protected VisjectSurfaceWindow(Editor editor, AssetItem item, bool useTabs = false)
            : base(editor, item)
        {
            // Undo
            _undo             = new FlaxEditor.Undo();
            _undo.UndoDone   += OnUndoRedo;
            _undo.RedoDone   += OnUndoRedo;
            _undo.ActionDone += OnUndoRedo;

            // Split Panel 1
            _split1 = new SplitPanel(Orientation.Horizontal, ScrollBars.None, ScrollBars.None)
            {
                AnchorPreset  = AnchorPresets.StretchAll,
                Offsets       = new Margin(0, 0, _toolstrip.Bottom, 0),
                SplitterValue = 0.7f,
                Parent        = this
            };

            // Split Panel 2
            _split2 = new SplitPanel(Orientation.Vertical, ScrollBars.None, ScrollBars.Vertical)
            {
                AnchorPreset  = AnchorPresets.StretchAll,
                Offsets       = Margin.Zero,
                SplitterValue = 0.4f,
                Parent        = _split1.Panel2
            };

            // Properties editor
            if (useTabs)
            {
                _tabs = new Tabs
                {
                    AnchorPreset = AnchorPresets.StretchAll,
                    Offsets      = Margin.Zero,
                    TabsSize     = new Vector2(60, 20),
                    TabsTextHorizontalAlignment = TextAlignment.Center,
                    UseScroll = true,
                    Parent    = _split2.Panel2
                };
                var propertiesTab = new Tab("Properties", _undo);
                _propertiesEditor = propertiesTab.Presenter;
                _tabs.AddTab(propertiesTab);
            }
            else
            {
                _propertiesEditor = new CustomEditorPresenter(_undo);
                _propertiesEditor.Panel.Parent = _split2.Panel2;
            }
            _propertiesEditor.Modified += OnPropertyEdited;

            // Toolstrip
            _saveButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Save64, Save).LinkTooltip("Save");
            _toolstrip.AddSeparator();
            _undoButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Undo64, _undo.PerformUndo).LinkTooltip("Undo (Ctrl+Z)");
            _redoButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Redo64, _undo.PerformRedo).LinkTooltip("Redo (Ctrl+Y)");
            _toolstrip.AddSeparator();
            _toolstrip.AddButton(editor.Icons.CenterView64, ShowWholeGraph).LinkTooltip("Show whole graph");

            // Setup input actions
            InputActions.Add(options => options.Undo, _undo.PerformUndo);
            InputActions.Add(options => options.Redo, _undo.PerformRedo);
        }
        /// <summary>
        /// Updates the provides panel after a splitter drag operation.
        /// </summary>
        /// <param name="panel"></param>
        /// <param name="dragLength"></param>
        /// <param name="left"></param>
        private void ApplySplitterCorrection(SplitPanel panel, int dragLength, bool left)
        {
            SizeF autoSizeScale = panel.SizeInfo.AutoSizeScale;
            Size  absolute      = panel.SizeInfo.AbsoluteSize;
            Size  correction    = panel.SizeInfo.SplitterCorrection;
            SizeF relativeRatio = panel.SizeInfo.RelativeRatio;
            int   offset;

            if (left)
            {
                dragLength *= -1;
            }

            switch (this.layoutInfo.Orientation)
            {
            case Orientation.Vertical:
                correction.Width   += dragLength;
                offset              = panel.Width + dragLength;
                relativeRatio.Width = offset / (float)this.layoutInfo.autoSizeLength;
                autoSizeScale.Width = relativeRatio.Width - this.layoutInfo.autoSizeCountFactor;
                absolute.Width      = offset;
                break;

            default:
                correction.Height   += dragLength;
                offset               = panel.Height + dragLength;
                relativeRatio.Height = offset / (float)this.layoutInfo.autoSizeLength;
                autoSizeScale.Height = offset / (float)this.layoutInfo.autoSizeLength - this.layoutInfo.autoSizeCountFactor;
                absolute.Height      = offset;
                break;
            }

            panel.SizeInfo.SplitterCorrection = correction;

            if (this.layoutInfo.fillPanel != null)
            {
                panel.SizeInfo.AbsoluteSize = absolute;
            }
            else
            {
                switch (panel.SizeInfo.SizeMode)
                {
                case SplitPanelSizeMode.Absolute:
                    panel.SizeInfo.AbsoluteSize = absolute;
                    break;

                case SplitPanelSizeMode.Relative:
                    panel.SizeInfo.RelativeRatio = relativeRatio;
                    break;

                case SplitPanelSizeMode.Auto:
                    panel.SizeInfo.AutoSizeScale = autoSizeScale;
                    break;
                }
            }

            if (panel is RadSplitContainer)
            {
                PropagateSplitterChangeOnChildren((RadSplitContainer)panel);
            }
        }