Example #1
0
        /// <summary>
        /// remove o usuario da lista temp kick
        /// </summary>
        /// <param name="user"></param>
        public static void RemoveUser(string user)
        {
            if (user == MainWindow.Configuration.StConfiguration.Owner || user == @"system" || user == @"azubu" || Kicks.Count == 0)
            {
                return;
            }

            try
            {
                Kick us = new Kick();
                foreach (Kick k in Kicks)
                {
                    if (k.User == user)
                    {
                        us = k;
                        //Console.WriteLine(@"remove " + user);
                    }
                }
                Kicks.Remove(us);

                Application.Current.Dispatcher.Invoke(
                    DispatcherPriority.Normal, (Action) delegate
                {
                    MyDelegates.OnChatCallBack(@"system :", @"RemoveUser => " + user);
                });
            }
            catch (Exception ex)
            {
                Console.Clear();
                Console.WriteLine(ex.ToString());
            }
        }
Example #2
0
        /// <summary>
        /// remove o usuario da lista temp kick
        /// </summary>
        /// <param name="user"></param>
        public static void RemoveUser(string user)
        {
            if (user == MainWindow.Configuration.StConfiguration.Owner || user == @"system" || user == @"azubu" || Kicks.Count == 0) { return; }

            try
            {
                Kick us = new Kick();
                foreach (Kick k in Kicks)
                {
                    if (k.User == user)
                    {
                        us = k;
                        //Console.WriteLine(@"remove " + user);
                    }
                }
                Kicks.Remove(us);

                Application.Current.Dispatcher.Invoke(
                              DispatcherPriority.Normal, (Action)delegate
                              {
                                  MyDelegates.OnChatCallBack(@"system :", @"RemoveUser => " + user);
                              });
            }
            catch (Exception ex)
            {
                Console.Clear();
                Console.WriteLine(ex.ToString());
            }
        }
Example #3
0
        /// <summary>
        /// adciona o usuario lista temp de kick
        /// </summary>
        /// <param name="user"></param>
        public static void AddUser(string user)
        {
            if (user == MainWindow.Configuration.StConfiguration.Owner || user == @"system" || user == @"azubu")
            {
                return;
            }
            foreach (Kick i in Kicks)
            {
                if (i.User == user)
                {
                    return;
                }
            }

            Kick k = new Kick()
            {
                User = user
            };

            Kicks.Add(k);

            Application.Current.Dispatcher.Invoke(
                DispatcherPriority.Normal, (Action) delegate
            {
                MyDelegates.OnChatCallBack(@"system :", @"AddUser => " + user);
            });
            //Console.WriteLine(@"add " + user);
        }
Example #4
0
        /// <summary>
        /// adciona o usuario lista temp de kick
        /// </summary>
        /// <param name="user"></param>
        public static void AddUser(string user)
        {
            if (user == MainWindow.Configuration.StConfiguration.Owner || user == @"system" || user == @"azubu") { return; }
            foreach (Kick i in Kicks)
            {
                if(i.User == user) { return;}
            }

            Kick k = new Kick()
            {
                User = user
            };
            Kicks.Add(k);

            Application.Current.Dispatcher.Invoke(
                                DispatcherPriority.Normal, (Action)delegate
                                {
                                    MyDelegates.OnChatCallBack(@"system :", @"AddUser => " + user);
                                });
            //Console.WriteLine(@"add " + user);
        }