1
0
mirror of synced 2024-12-11 15:25:59 +01:00
Switch-Toolbox/Switch_Toolbox_Library/Forms/ViewportDivider.cs

33 lines
739 B
C#

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Toolbox.Library.Forms
{
public partial class ViewportDivider : UserControl
{
public ViewportDivider()
{
InitializeComponent();
viewportPanel.Width = Runtime.ViewportEditor.Width;
}
public Viewport GetActiveViewport()
{
foreach (var control in viewportPanel.Controls)
{
if (control is Viewport)
return (Viewport)control;
}
return null;
}
}
}