mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-25 17:34:06 +02:00
34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Windows.Forms;
|
|
using TweetDuck.Configuration;
|
|
|
|
namespace TweetDuck.Core.Other.Settings{
|
|
class BaseTabSettings : UserControl{
|
|
protected static UserConfig Config => Program.UserConfig;
|
|
|
|
public IEnumerable<Control> InteractiveControls{
|
|
get{
|
|
foreach(Panel panel in Controls.OfType<Panel>()){
|
|
foreach(Control control in panel.Controls){
|
|
yield return control;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
public BaseTabSettings(){
|
|
Padding = new Padding(6);
|
|
}
|
|
|
|
public virtual void OnReady(){}
|
|
public virtual void OnClosing(){}
|
|
|
|
protected static void PromptRestart(){
|
|
if (MessageBox.Show("The application must restart for the option to take place. Do you want to restart now?", Program.BrandName+" Options", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.Yes){
|
|
Program.Restart();
|
|
}
|
|
}
|
|
}
|
|
}
|