Update ControlPanel to use the new IServerInterface

This commit is contained in:
Cyberboss
2017-12-08 12:47:13 -05:00
parent d20a79c3f9
commit 50a78b3193
11 changed files with 136 additions and 166 deletions
+4 -4
View File
@@ -19,7 +19,7 @@ namespace TGS.ControlPanel
void LoadChatPage()
{
updatingChat = true;
var Chat = Interface.GetComponent<ITGChat>();
var Chat = Instance.Chat;
var PI = Chat.ProviderInfos()[(int)ModifyingProvider];
ChatAdminsTextBox.Visible = true;
IRCModesComboBox.Visible = false;
@@ -112,7 +112,7 @@ namespace TGS.ControlPanel
private void ChatReconnectButton_Click(object sender, EventArgs e)
{
Interface.GetComponent<ITGChat>().Reconnect(ModifyingProvider);
Instance.Chat.Reconnect(ModifyingProvider);
LoadChatPage();
}
@@ -149,7 +149,7 @@ namespace TGS.ControlPanel
}
void SetAdminsAreSpecial(bool value)
{
var Chat = Interface.GetComponent<ITGChat>();
var Chat = Instance.Chat;
var PI = Chat.ProviderInfos()[(int)ModifyingProvider];
PI.AdminsAreSpecial = value;
var res = Chat.SetProviderInfo(PI);
@@ -208,7 +208,7 @@ namespace TGS.ControlPanel
wip.Enabled = ChatEnabledCheckbox.Checked;
wip.AdminsAreSpecial = AdminModeSpecial.Checked;
res = Interface.GetComponent<ITGChat>().SetProviderInfo(wip);
res = Instance.Chat.SetProviderInfo(wip);
}
if (res != null)
MessageBox.Show(res);