예제 #1
0
        private void Form1_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (on)
            {
                xxt.Abort();
            }
            on = false;

            if (irc.IsConnected())
            {
                irc.Disconnect();
            }

            Properties.Settings.Default.tb1 = textBox1.Text;
            Properties.Settings.Default.tb2 = textBox2.Text;
            if (tbChannel.Text != "")
            {
                Properties.Settings.Default.channel = tbChannel.Text;
            }
            Properties.Settings.Default.Save();
        }
예제 #2
0
    public IEnumerator SaveRoutine()
    {
        twichIRC.Disconnect();
        yield return(new WaitForEndOfFrame());

        twichIRC.details.oauth = token.text;
        PlayerPrefs.SetString("oauth", token.text);
        twichIRC.details.nick = nickname.text;
        PlayerPrefs.SetString("nickname", nickname.text);
        twichIRC.details.channel = channel.text;
        PlayerPrefs.SetString("channel", channel.text);
        messageSender.MessageBox = messageBoxSelector.selected;
        PlayerPrefs.SetString("msgBox", messageBoxSelector.selected.gameObject.name);
        messageBoxSelector.selected.gameObject.SetActive(true);
        PlayerPrefs.SetString("chroma", string.Format("{0}|{1}|{2}", Camera.main.backgroundColor.r.ToString(),
                                                      Camera.main.backgroundColor.g.ToString(),
                                                      Camera.main.backgroundColor.b.ToString()));
        yield return(new WaitForEndOfFrame());

        twichIRC.Connect();
        yield return(new WaitForEndOfFrame());

        Close();
    }