mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-30 00:10:36 +00:00
38 lines
943 B
C#
38 lines
943 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Toolbox.Library.Forms
|
|
{
|
|
public partial class GenericEditorForm : STForm
|
|
{
|
|
public GenericEditorForm(bool UseSaveDialog, UserControl control)
|
|
{
|
|
control.Dock = DockStyle.Fill;
|
|
InitializeComponent();
|
|
stPanel1.Controls.Add(control);
|
|
SetSaveDialog(UseSaveDialog);
|
|
}
|
|
|
|
public Control GetControl()
|
|
{
|
|
return stPanel1.Controls[0];
|
|
}
|
|
|
|
public void SetSaveDialog(bool UseSaveDialog)
|
|
{
|
|
if (!UseSaveDialog)
|
|
{
|
|
stButton1.Visible = false;
|
|
stButton2.Visible = false;
|
|
stPanel1.Dock = DockStyle.Fill;
|
|
}
|
|
}
|
|
}
|
|
}
|