mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-05-27 23:34:07 +02:00
34 lines
1.0 KiB
C#
34 lines
1.0 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;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
protected BaseTabSettings(){
|
|
Padding = new Padding(6);
|
|
}
|
|
|
|
public virtual void OnReady(){}
|
|
public virtual void OnClosing(){}
|
|
|
|
protected static void PromptRestart(){
|
|
if (FormMessage.Information("TweetDuck Options", "The application must restart for the option to take place. Do you want to restart now?", FormMessage.Yes, FormMessage.No)){
|
|
Program.Restart();
|
|
}
|
|
}
|
|
}
|
|
}
|