private void btnDel_Click(object sender, EventArgs e)
        {
            int num   = 0;
            int count = this.lstSelected.SelectedIndices.Count;
            int num2  = this.lstSelected.SelectedIndices[count - 1];

            this.lstUnselected.SelectedItems.Clear();
            while (this.lstSelected.SelectedItems.Count > 0)
            {
                Class14 @class = (Class14)this.lstSelected.SelectedItems[0];
                num = this.method_2(@class);
                @class.method_1(-1);
                this.lstUnselected.Items.Insert(num, @class);
                this.lstUnselected.SetSelected(num, true);
                this.lstSelected.Items.RemoveAt(this.lstSelected.SelectedIndices[0]);
            }
            int num3 = num2 - count + 1;

            if (num3 >= this.lstSelected.Items.Count)
            {
                num3 = this.lstSelected.Items.Count - 1;
            }
            this.lstSelected.SelectedIndex = num3;
            this.method_3();
            this.method_4();
        }
        private void btnAdd_Click(object sender, EventArgs e)
        {
            int num   = 0;
            int count = this.lstUnselected.SelectedIndices.Count;
            int num2  = this.lstUnselected.SelectedIndices[count - 1];
            int num3  = 0;

            this.lstSelected.SelectedItems.Clear();
            while (this.lstUnselected.SelectedItems.Count > 0 && this.lstSelected.Items.Count < 15)
            {
                num = this.lstSelected.Items.Count;
                Class14 @class = (Class14)this.lstUnselected.SelectedItems[0];
                @class.method_1(num);
                num3 = this.lstSelected.Items.Add(@class);
                this.lstSelected.SetSelected(num3, true);
                this.lstUnselected.Items.RemoveAt(this.lstUnselected.SelectedIndices[0]);
            }
            if (this.lstUnselected.SelectedItems.Count == 0)
            {
                int num4 = num2 - count + 1;
                if (num4 >= this.lstUnselected.Items.Count)
                {
                    num4 = this.lstUnselected.Items.Count - 1;
                }
                this.lstUnselected.SelectedIndex = num4;
            }
            this.method_3();
            this.method_4();
            if (!this.btnAdd.Enabled)
            {
                this.lstSelected.Focus();
            }
        }
 private void button2_Click(object sender, EventArgs e)
 {
     if (this.comboBox2.Text == "" || this.comboBox1.Text == "" || this.textBox1.Text == "")
     {
         MessageBox.Show("Fill all data", "Information", MessageBoxButtons.OK, MessageBoxIcon.Hand);
     }
     else
     {
         Class14 @class = new Class14(Convert.ToInt32(this.textBox1.Text));
         string text = "";
         string a = "get";
         for (int i = 0; i < this.int_0 * 2; i++)
         {
             if (a == "get")
             {
                 text = this.panel1.Controls[i].Text;
                 a = "set";
             }
             else
             {
                 string text2 = text;
                 if (text2 != null)
                 {
                     if (!(text2 == "String"))
                     {
                         if (!(text2 == "Int"))
                         {
                             if (text2 == "Bool")
                             {
                                 @class.method_2(this.panel1.Controls[i].Text == "true");
                             }
                         }
                         else
                         {
                             @class.method_1(Convert.ToInt32(this.panel1.Controls[i].Text));
                         }
                     }
                     else
                     {
                         @class.method_3(this.panel1.Controls[i].Text);
                     }
                 }
                 a = "get";
             }
         }
         if (this.comboBox2.Text.Contains("Server"))
         {
             Class1.class19_0.method_8(@class.method_5());
         }
         else
         {
             Class1.class19_0.method_7(@class.method_5());
         }
     }
 }
        private void method_3()
        {
            int  num  = 0;
            bool flag = false;

            this.lstSelected.BeginUpdate();
            for (num = 0; num < this.lstSelected.Items.Count; num++)
            {
                Class14 @class = (Class14)this.lstSelected.Items[num];
                if (@class.method_0() != num)
                {
                    @class.method_1(num);
                    flag = this.lstSelected.GetSelected(num);
                    this.lstSelected.Items[num] = @class;
                    if (flag)
                    {
                        this.lstSelected.SetSelected(num, true);
                    }
                }
            }
            this.lstSelected.EndUpdate();
        }
Пример #5
0
 private static void smethod_5()
 {
     foreach (Class29 current in Class28.dictionary_0.Values)
     {
         Thread.Sleep(600);
         Class14 @class = new Class14(311);
         @class.method_1(current.int_5);
         @class.method_1(-1);
         Class1.class19_0.method_8(@class.method_5());
     }
     foreach (Class29 current in Class28.dictionary_0.Values)
     {
         Class28.stringBuilder_0.Append(string.Concat(new object[]
        {
            "INSERT INTO `latinemu`.`catalog_pages` (`id`, `parentid`, `minrank`, `caption`, `caption_code`, `color_id`, `icon_id`, `layout`, `headline1`, `teaser1`, `special`, `text1`, `text2`, `text3`) VALUES (",
            current.int_0,
            ", '",
            current.int_1,
            "', '1', '",
            current.string_0.Replace("'", "\\'"),
            "', '",
            current.string_1.Replace("'", "\\'"),
            "', '",
            current.int_2,
            "', '",
            current.int_3,
            "', '",
            current.string_2,
            "', '",
            current.string_3.Replace("'", "\\'"),
            "', '",
            current.string_4.Replace("'", "\\'"),
            "', '",
            current.string_5.Replace("'", "\\'"),
            "', '",
            current.string_6.Replace("'", "\\'"),
            "', '",
            current.string_7.Replace("'", "\\'"),
            "', '",
            current.string_8.Replace("'", "\\'"),
            "');"
        }));
     }
     foreach (Class30 current2 in Class28.dictionary_1.Values)
     {
         Class28.stringBuilder_0.Append(string.Concat(new object[]
        {
            "INSERT INTO `latinemu`.`catalog_items` (`id`, `pageId`, `furniId`, `amount`, `cost_credits`, `cost_point`, `caption`, `parentId`, `insideBox`) VALUES (",
            current2.int_0,
            ", '",
            current2.int_1,
            "', '",
            current2.int_4,
            "', '",
            current2.int_5,
            "', '",
            current2.int_2,
            "', '",
            current2.int_3,
            "', '",
            current2.string_0.Replace("'", "\\'"),
            "', '",
            current2.int_6,
            "', '",
            current2.bool_0 ? 1 : 0,
            "');"
        }));
     }
     StreamWriter streamWriter = new StreamWriter("catalog.sql");
     streamWriter.WriteLine(Class28.stringBuilder_0.ToString());
     streamWriter.Close();
     Debug.WriteLine("Finished!");
 }