コード例 #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());
            }
        }
コード例 #2
0
ファイル: Autokick.cs プロジェクト: Gnomexfire/Shamia
        /// <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());
            }
        }
コード例 #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);
        }
コード例 #4
0
ファイル: Autokick.cs プロジェクト: Gnomexfire/Shamia
        /// <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);
        }