Пример #1
0
        void menu_up(object sender, System.EventArgs e)
        {
            string     strError = "";
            List <int> indices  = null;

            if (ListViewUtil.MoveItemUpDown(this.ListView,
                                            true,
                                            out indices,
                                            out strError) == -1)
            {
                MessageBox.Show(this, strError);
                return;
            }

            if (indices != null &&
                indices.Count >= 2)
            {
                Server o = (Server)Servers[indices[0]];
                Servers.RemoveAt(indices[0]);
                Servers.Insert(indices[1], o);

                Servers.Changed = true;
                m_bChanged      = true;
            }
        }