Exemplo n.º 1
0
        private void Inizialize(object sender, EventArgs e)
        {
            Dash temp = new Dash();

            temp = GestioneFileXml.ReadConfig();

            if (File.Exists(GestioneFileXml.path + @"DashConfig.xml"))
            {
                EntryEnable.IsChecked     = temp.EntryEnable;
                MouseEnable.IsChecked     = temp.MouseEnable;
                SL_MouseSensibility.Value = temp.MouseSens;
                ShootEnable.IsChecked     = temp.MouseShootEnable;
                SL_MinBits.Value          = temp.MinBits;
                TestEnable.IsChecked      = temp.TestEnable;

                TB_MouseSensibility.Text = "Mouse Sensibility: " + (int)SL_MouseSensibility.Value;
                TB_MinBits.Text          = "Min Bits Donation: " + (int)SL_MinBits.Value;

                if (MouseEnable.IsChecked == false)
                {
                    ShootEnable.IsEnabled         = false;
                    SL_MouseSensibility.IsEnabled = false;
                }
                if (MouseEnable.IsChecked == true)
                {
                    ShootEnable.IsEnabled         = true;
                    SL_MouseSensibility.IsEnabled = true;
                }
            }
        }
Exemplo n.º 2
0
        private void connect()
        {
            ConnectionCredentials credentials = new ConnectionCredentials("", "");
            var clientOptions = new ClientOptions
            {
                MessagesAllowedInPeriod = 999, ThrottlingPeriod = TimeSpan.FromSeconds(3)
            };
            WebSocketClient costumClient = new WebSocketClient(clientOptions);

            client = new TwitchClient(costumClient);
            client.Initialize(credentials, Channel);
            client.OnConnected       += Client_OnConnected;
            client.OnDisconnected    += Client_OnDisconnected;
            client.OnMessageReceived += Client_OnMessageReceived;
            client.Connect();
            while (client.JoinedChannels.Count <= 0)
            {
                ;
            }
            var tmp = client.JoinedChannels.FirstOrDefault().Channel;

            if (GestioneFileXml.ReadConfig().TestEnable == false)
            {
                WebQuery.Navigate("http://ragebot.unaux.com/Files/Query.php?Name=" + tmp);
            }
        }
Exemplo n.º 3
0
        private void BT_Save_Click(object sender, RoutedEventArgs e)
        {
            Dash temp = new Dash();

            temp.EntryEnable      = (bool)EntryEnable.IsChecked;
            temp.MouseEnable      = (bool)MouseEnable.IsChecked;
            temp.MouseSens        = (int)SL_MouseSensibility.Value;
            temp.MouseShootEnable = (bool)ShootEnable.IsChecked;
            temp.MinBits          = (int)SL_MinBits.Value;
            temp.TestEnable       = (bool)TestEnable.IsChecked;
            GestioneFileXml.SaveConfig(temp);
        }
Exemplo n.º 4
0
        private void Client_OnMessageReceived(object sender, TwitchLib.Client.Events.OnMessageReceivedArgs e)
        {
            update();
            CommandRecived(e.ChatMessage.Message);
            try
            {
                if (e.ChatMessage.Bits >= DashConfig.MinBits)
                {
                    CommandRecived("!" + e.ChatMessage.Message.Split('!')[1]);
                }
            }
            catch (Exception E) { }

            if (GestioneFileXml.ReadConfig().TestEnable == true)
            {
                CommandRecived(e.ChatMessage.ToString());
            }
        }
Exemplo n.º 5
0
 private void Update()
 {
     LB_MinBits.Content = "Min bits donation: " + GestioneFileXml.ReadConfig().MinBits;
     dispatcherTimer    = new DispatcherTimer();
 }
Exemplo n.º 6
0
 public void update()
 {
     DashConfig = GestioneFileXml.ReadConfig();
 }