Ejemplo n.º 1
0
            // Token: 0x060027CD RID: 10189 RVA: 0x0009371C File Offset: 0x0009191C
            public void method_0()
            {
                Class142 @class = this.object_0 as Class142;
                bool     flag   = false;

                this.invasions_0.cboDistricts.BeginUpdate();
                if (this.invasions_0.dictionary_1.ContainsKey(@class))
                {
                    Invasions.Class430 class2 = this.invasions_0.dictionary_1[@class];
                    if (this.invasions_0.cboDistricts.SelectedItem == class2)
                    {
                        flag = (class2.Windows.IndexOf(@class) == 0 && class2.Windows.Count == 1);
                    }
                    class2.Windows.Remove(@class);
                    this.invasions_0.dictionary_1.Remove(@class);
                    if (class2.Windows.Count == 0)
                    {
                        this.invasions_0.dictionary_0.Remove(class2.District);
                        this.invasions_0.cboDistricts.Items.Remove(class2);
                    }
                }
                if (this.eventArgs37_0.District == null)
                {
                    if (this.invasions_0.cboDistricts.Items.Count > 0)
                    {
                        if (flag)
                        {
                            this.invasions_0.cboDistricts.SelectedIndex = 0;
                        }
                    }
                    else
                    {
                        this.invasions_0.method_3(null, null);
                    }
                }
                else
                {
                    Invasions.Class430 class3;
                    if (this.invasions_0.dictionary_0.ContainsKey(this.eventArgs37_0.District))
                    {
                        class3 = this.invasions_0.dictionary_0[this.eventArgs37_0.District];
                    }
                    else
                    {
                        this.invasions_0.dictionary_0.Add(this.eventArgs37_0.District, class3 = new Invasions.Class430(this.eventArgs37_0.District));
                        this.invasions_0.cboDistricts.Items.Add(class3);
                    }
                    class3.Windows.Add(@class);
                    this.invasions_0.dictionary_1.Add(@class, class3);
                    this.invasions_0.cboDistricts.imethod_2(class3);
                    if (flag || this.invasions_0.cboDistricts.SelectedItem == null)
                    {
                        this.invasions_0.cboDistricts.SelectedItem = class3;
                    }
                }
                this.invasions_0.cboDistricts.EndUpdate();
            }
Ejemplo n.º 2
0
        // Token: 0x060027B2 RID: 10162 RVA: 0x00092DFC File Offset: 0x00090FFC
        private void method_0()
        {
            this.cboDistricts.Items.Clear();
            this.dictionary_0.Clear();
            this.dictionary_1.Clear();
            ReadOnlyCollection <Class142> openToonTownWindows = Class142.OpenToonTownWindows;

            lock (((ICollection)openToonTownWindows).SyncRoot)
            {
                foreach (Class142 @class in openToonTownWindows)
                {
                    if (@class.District != null)
                    {
                        Invasions.Class430 class2;
                        if (!this.dictionary_0.ContainsKey(@class.District))
                        {
                            this.dictionary_0.Add(@class.District, class2 = new Invasions.Class430(@class.District));
                        }
                        else
                        {
                            class2 = this.dictionary_0[@class.District];
                        }
                        class2.Windows.Add(@class);
                        this.dictionary_1.Add(@class, class2);
                    }
                }
            }
            IEnumerable <Invasions.Class430> values = this.dictionary_0.Values;

            if (Invasions.func_0 == null)
            {
                Invasions.func_0 = new Func <Invasions.Class430, string>(Invasions.smethod_2);
            }
            object[] array = values.OrderBy(Invasions.func_0).ToArray <Invasions.Class430>();
            this.cboDistricts.Items.AddRange(array);
            if (array.Length > 0)
            {
                this.cboDistricts.SelectedItem = array[0];
                return;
            }
            this.cboDistricts.SelectedItem = null;
        }
Ejemplo n.º 3
0
        // Token: 0x060027BE RID: 10174 RVA: 0x00093474 File Offset: 0x00091674
        private void cboDistricts_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.cboDistricts.SelectedItem == null)
            {
                this.method_3(null, null);
                return;
            }
            Invasions.Class430 @class = this.cboDistricts.SelectedItem as Invasions.Class430;
            Class142           class2 = Invasions.smethod_1(@class.Windows);

            if (class2 == null)
            {
                this.method_3(null, null);
                return;
            }
            this.method_3(class2.District, class2.Invasion);
            Struct26 value = class2.Invasion.Value;

            this.method_8(class2.District, value.class464_0.string_1, value.uint_0, value.bool_0, value.dateTime_0);
        }
Ejemplo n.º 4
0
            // Token: 0x060027CF RID: 10191 RVA: 0x0009393C File Offset: 0x00091B3C
            public void method_0()
            {
                Class142 @class = this.object_0 as Class142;

                Invasions.Class430 class2 = this.invasions_0.cboDistricts.SelectedItem as Invasions.Class430;
                if (class2 != null)
                {
                    Class177 district = class2.District;
                    if (class2.Windows.IndexOf(@class) == 0 && district == @class.District)
                    {
                        switch (this.eventArgs31_0.InvasionState.enum97_0)
                        {
                        case Enum97.const_0:
                        case Enum97.const_2:
                            if (!this.invasions_0.class343_0.Enabled)
                            {
                                this.invasions_0.class343_0.Enabled = true;
                            }
                            this.invasions_0.method_3(@class.District, new Struct26?(this.eventArgs31_0.InvasionState));
                            this.invasions_0.method_8(@class.District, this.eventArgs31_0.InvasionState.class464_0.string_1, this.eventArgs31_0.InvasionState.uint_0, this.eventArgs31_0.InvasionState.bool_0, this.eventArgs31_0.InvasionState.dateTime_0);
                            break;

                        case (Enum97)1:
                            break;

                        case Enum97.const_1:
                            this.invasions_0.method_3(null, null);
                            this.invasions_0.method_9(@class.District);
                            return;

                        default:
                            return;
                        }
                    }
                }
            }
Ejemplo n.º 5
0
 private static string smethod_2(Invasions.Class430 item)
 {
     return(item.District.string_0);
 }