コード例 #1
0
 /// <summary>
 /// If not already disposed, it will dispose and deinitialize the discord client.
 /// </summary>
 public void Deinitialize()
 {
     //We dispose outside the scripting symbols as we always want to be able to dispose (just in case).
     if (_client != null)
     {
         Debug.Log("[DRP] Disposing Discord IPC Client...");
         _client.Dispose();
         _client = null;
         Debug.Log("[DRP] Finished Disconnecting");
     }
 }
コード例 #2
0
ファイル: Lucifer_Main.cs プロジェクト: ZelliDev/LuciferGUI
        public void pb_connect_Click(object sender, EventArgs e)
        {
            if (tb_token.Text == "")
            {
                MessageBox.Show("Vous devez mettre votre token", "ERREUR TOKEN", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                if (tb_accept_terms.Checked == false)
                {
                }
                else
                {
                    Connected.title = tb_projectname.Text;
                    Connected.token = tb_token.Text;
                    Connected connected = new Connected();


                    if (cb_typebot.Checked == true && cb_typesb.Checked == false)
                    {
                        Connected.BotType = "Bot";
                    }
                    if (cb_typebot.Checked == false && cb_typesb.Checked == true)
                    {
                        Connected.BotType = "Selfbot";
                    }

                    if (tb_projectname.Text == "" || tb_projectname.Text != "")
                    {
                        client.Dispose();
                        this.Hide();
                        connected.Show();
                    }
                }
            }
        }