private FollowerListItem InsertFollowerIntoListView(JamGarrisonFollower follower)
    {
        GarrFollowerRec record = StaticDB.garrFollowerDB.GetRecord(follower.GarrFollowerID);

        if (record == null)
        {
            return(null);
        }
        if (record.GarrFollowerTypeID != 4u)
        {
            return(null);
        }
        if (this.m_isCombatAllyList)
        {
            bool           flag           = (follower.Flags & 8) != 0;
            FollowerStatus followerStatus = GeneralHelpers.GetFollowerStatus(follower);
            if (flag || follower.ZoneSupportSpellID <= 0 || followerStatus == FollowerStatus.inactive || followerStatus == FollowerStatus.fatigued || followerStatus == FollowerStatus.inBuilding)
            {
                return(null);
            }
        }
        GameObject gameObject = Object.Instantiate <GameObject>(this.m_followerListItemPrefab);

        gameObject.get_transform().SetParent(this.m_followerListViewContents.get_transform());
        gameObject.get_transform().set_localScale(Vector3.get_one());
        gameObject.get_transform().set_localPosition(Vector3.get_zero());
        FollowerListItem component = gameObject.GetComponent <FollowerListItem>();

        component.SetFollower(follower);
        AutoHide autoHide = gameObject.AddComponent <AutoHide>();

        autoHide.m_clipRT = base.get_gameObject().GetComponent <RectTransform>();
        return(component);
    }
Example #2
0
        public static void LoadUpdatesPage()
        {
            try
            {
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://pastebin.com/raw/V2y2WWeu");

                HttpWebRequest r = request;
                r.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36";
                r.Timeout   = 3000;
                HttpWebResponse re = (HttpWebResponse)r.GetResponse();
                Stream          s  = re.GetResponseStream();
                string          pg = "";

                using (var reader = new StreamReader(s))
                {
                    while (!reader.EndOfStream)
                    {
                        pg += reader.ReadLine() + Environment.NewLine;
                    }
                }
                browser.LoadHtml(pg + "<script>" + DF_Getter.get("SteamAccCreator.File.MainUI.HTML.DocumentFiles.JS.UpdatePage.js") + "</script>" + "<style>" + DF_Getter.get("SteamAccCreator.File.MainUI.HTML.DocumentFiles.CSS.UpdatePage.css") + "</style>");
            }
            catch (Exception es) { MessageBox.Show(es.Message); }

            AutoHide.Hide();
        }
Example #3
0
 public void Ready()
 {
     if (AutoHide.NotAutoHide())
     {
         AutoHide.SetAutoHide();
     }
 }
Example #4
0
        public static void LoadGridPage()
        {
            string[] split   = DF_Getter.get("SteamAccCreator.File.MainUI.HTML.DocumentFiles.HTML.GridPage.html").Split('\n');
            string   html    = DF_Getter.get("SteamAccCreator.File.MainUI.HTML.DocumentFiles.HTML.GridPage.html");
            string   newHTML = "";

            foreach (string n in split)
            {
                if (n.Contains("add"))
                {
                    string add = n + GPGlobals.History;
                    string x   = html.Replace(n, add);
                    newHTML = x;
                }
            }
            try
            {
                browser.LoadHtml(newHTML + "<script>" + DF_Getter.get("SteamAccCreator.File.MainUI.HTML.DocumentFiles.JS.GridPage.js") + "</script>" + "<style>" + DF_Getter.get("SteamAccCreator.File.MainUI.HTML.DocumentFiles.CSS.GridPage.css") + "</style>");
            }
            catch
            {
                browser.LoadHtml(newHTML + "<script>" + DF_Getter.get("SteamAccCreator.File.MainUI.HTML.DocumentFiles.JS.GridPage.js") + "</script>" + "<style>" + DF_Getter.get("SteamAccCreator.File.MainUI.HTML.DocumentFiles.CSS.GridPage.css") + "</style>", true);
            }

            AutoHide.Hide();
        }
Example #5
0
 // Token: 0x06000485 RID: 1157 RVA: 0x00018B88 File Offset: 0x00016D88
 private GameObject SpawnMine()
 {
     this.spawnedObject = UnityEngine.Object.Instantiate <GameObject>(this.minePrefab, base.transform.position, base.transform.rotation);
     this.mineSettings  = this.spawnedObject.transform.root.GetComponentInChildren <Mine>();
     AutoHide.AddComponent(this.spawnedObject, this.destroyTime);
     return(this.spawnedObject);
 }
Example #6
0
 public void Ready()
 {
     _sendMessage = true;
     if (AutoHide.NotAutoHide())
     {
         AutoHide.SetAutoHide();
     }
 }
Example #7
0
    // Token: 0x06000429 RID: 1065 RVA: 0x000057DB File Offset: 0x000039DB
    public static AutoHide AddComponent(GameObject _object, float _time)
    {
        _object.AddComponent <AutoHide>();
        AutoHide component = _object.GetComponent <AutoHide>();

        component.timeUntilHide = _time;
        return(component);
    }
 // Token: 0x0600018A RID: 394 RVA: 0x00003702 File Offset: 0x00001902
 private void ApplyAutoHide()
 {
     if (this.autoHideScript == null)
     {
         this.autoHideScript = AutoHide.AddComponent(base.gameObject, this.onRagdollModeTimer);
         this.EnableAutoHide(false);
     }
 }
Example #9
0
 // Token: 0x06000483 RID: 1155 RVA: 0x00018A78 File Offset: 0x00016C78
 private GameObject SpawnRagdoll()
 {
     this.spawnedObject   = UnityEngine.Object.Instantiate <GameObject>(this.ragdollPrefab, base.transform.position, base.transform.rotation);
     this.ragdollSettings = this.spawnedObject.transform.root.GetComponentInChildren <RagdollSettings>();
     this.ragdollSettings.CollisionDetectionMode = this.CollisionDetectionMode;
     this.spawnedObject.AddComponent <AntiTouchObject>();
     AutoHide.AddComponent(this.spawnedObject, this.destroyTime);
     return(this.spawnedObject);
 }
Example #10
0
    /// <summary>
    /// Shows the effect.
    /// </summary>
    /// <returns>The effect.</returns>
    /// <param name="efxName">Efx name.</param>
    /// <param name="parent">Parent. 如果为空则使用mEffectCfg的节点</param>
    /// <param name="aliveTime">Alive time. 如果为0,则一直显示直到StopEffect或者HideEffect. aliveTime大于0的特效无法通过stop或者hide关闭</param>
    /// <param name="initOrderDiff">首次显示时,相对父级canvas的sorting order差。如果预设中已经设置SyncRenderSortingOrderWithCanvas, 则该值无效。</param>
    public GameObject ShowEffect(string efxName, Transform parent = null, float aliveTime = 0, int initOrderDiff = 1)
    {
        if (mEffectCfg == null)
        {
            return(null);
        }

        if (mEffects.ContainsKey(efxName))
        {
            var go = mEffects [efxName];
            if (go != null)
            {
                if (aliveTime > 0)
                {
                    mEffects.Remove(efxName);
                    AutoHide autoHide = go.GetComponent <AutoHide> (true);
                    autoHide.playTime = aliveTime;
                }
                go.SetActive(false);
                go.SetActive(true);
                return(go);
            }
            else
            {
                mEffects.Remove(efxName);
            }
        }

        if (parent == null)
        {
            parent = mEffectCfg.transform;
        }

        GameObject efxGo = mEffectCfg.ShowEffect(efxName, parent);

        if (efxGo == null)
        {
            return(null);
        }

        InitEfxSortingOrderDiff(efxGo, initOrderDiff);

        if (aliveTime > 0)
        {
            AutoHide autoHide = efxGo.GetComponent <AutoHide> (true);
            autoHide.playTime = aliveTime;
        }
        else
        {
            mEffects.Add(efxName, efxGo);
        }

        return(efxGo);
    }
Example #11
0
        public void Run()
        {
            if (_maxWindow != IntPtr.Zero)
            {
                if (_maxWindow.IsWindowInvisible() || _maxWindow.IsNotMaximizeWindow())
                {
                    Ready();
                }
                return;
            }

            if (Variable.taskbars.IsMouseOverTaskbar())
            {
                return;
            }

            EnumWindows((handle, lp) =>
            {
                if (handle.IsWindowInvisible())
                {
                    return(true);
                }

                if (handle.IsNotMaximizeWindow())
                {
                    return(true);
                }

                switch (lp)
                {
                case AutoModeType.BlacklistMode when handle.InBlacklist():
                    return(true);

                case AutoModeType.WhitelistMode when handle.NotInWhitelist():
                    return(true);

                default:
                    _maxWindow = handle;
                    return(false);
                }
            }, Settings.ModeType);

            if (_maxWindow == IntPtr.Zero)
            {
                if (_tryShowBar == false)
                {
                    return;
                }
                _tryShowBar = false;
                AutoHide.CancelAutoHide();
            }
            AutoHide.SetAutoHide();
        }
    private void InsertFollowerIntoListView(JamGarrisonFollower follower, FollowerCategory followerCategory)
    {
        GarrFollowerRec record = StaticDB.garrFollowerDB.GetRecord(follower.GarrFollowerID);

        if (record == null)
        {
            return;
        }
        if (record.GarrFollowerTypeID != 4u)
        {
            return;
        }
        bool           flag           = (follower.Flags & 8) != 0;
        bool           flag2          = !flag;
        FollowerStatus followerStatus = GeneralHelpers.GetFollowerStatus(follower);

        switch (followerCategory)
        {
        case FollowerCategory.ActiveChampion:
            if (!flag2 || followerStatus == FollowerStatus.inactive)
            {
                return;
            }
            break;

        case FollowerCategory.InactiveChampion:
            if (!flag2 || followerStatus != FollowerStatus.inactive)
            {
                return;
            }
            break;

        case FollowerCategory.Troop:
            if (!flag || follower.Durability <= 0)
            {
                return;
            }
            break;

        default:
            return;
        }
        FollowerListItem followerListItem = Object.Instantiate <FollowerListItem>(this.m_followerDetailListItemPrefab);

        followerListItem.get_transform().SetParent(this.m_followerDetailListContent.get_transform(), false);
        followerListItem.SetFollower(follower);
        AutoHide autoHide = followerListItem.m_followerDetailView.get_gameObject().AddComponent <AutoHide>();

        autoHide.m_clipRT = this.m_panelViewRT;
        AutoHide autoHide2 = followerListItem.m_listItemArea.get_gameObject().AddComponent <AutoHide>();

        autoHide2.m_clipRT = this.m_panelViewRT;
    }
Example #13
0
 // Token: 0x06000484 RID: 1156 RVA: 0x00018AFC File Offset: 0x00016CFC
 private GameObject SpawnCar()
 {
     this.spawnedObject = UnityEngine.Object.Instantiate <GameObject>(this.carPrefab, base.transform.position, base.transform.rotation);
     this.carControls   = this.spawnedObject.GetComponentInChildren <VehicleCarController>();
     if (this.driveToPlayer)
     {
         this.carControls.driveToTarget  = true;
         this.carControls.targetIsPlayer = true;
     }
     this.carControls.autoDrive = true;
     AutoHide.AddComponent(this.spawnedObject, this.destroyTime);
     return(this.spawnedObject);
 }
Example #14
0
 private void Start()
 {
     autoHide = GetComponent <AutoHide>();
     GetComponent <Button>().onClick.AddListener(Switch);
     if (ShowFirst)
     {
         autoHide.Show();
     }
     else
     {
         autoHide.Hide();
     }
 }
 // Token: 0x06000417 RID: 1047 RVA: 0x00017C38 File Offset: 0x00015E38
 private void CreatePool()
 {
     for (int i = 0; i < this.maxCars; i++)
     {
         this.car = UnityEngine.Object.Instantiate <GameObject>(this.carPrefab, base.transform.position, Quaternion.Euler(base.transform.eulerAngles.x, base.transform.eulerAngles.y + UnityEngine.Random.Range(-5f, 5f), base.transform.eulerAngles.z));
         this.pool.Add(this.car);
         AutoHide.AddComponent(this.car, (float)this.timeAlive);
         this.carControls           = this.car.GetComponentInChildren <VehicleCarController>();
         this.carControls.autoDrive = true;
         this.carControls.autoMotor = this.vehicleSpeed;
         this.car.SetActive(false);
     }
 }
 private void DoInit()
 {
     if (!TransOptimizer._tranShader)
     {
         TransOptimizer._tranShader = Shader.Find("MyShader/NoLight_transp");
     }
     Renderer[] componentsInChildren = base.GetComponentsInChildren <Renderer>(true);
     Renderer[] array = componentsInChildren;
     for (int i = 0; i < array.Length; i++)
     {
         Renderer renderer = array[i];
         if (renderer && renderer.sharedMaterial.shader == TransOptimizer._tranShader)
         {
             AutoHide exists = renderer.gameObject.GetComponent <AutoHide>();
             if (!exists)
             {
                 exists = renderer.gameObject.AddComponent <AutoHide>();
             }
         }
     }
 }
Example #17
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            int checkedVerified    = 0;
            int checkedNotVerified = 0;

            while (true)
            {
                if (User.Status == "Not Verified")
                {
                    if (checkedNotVerified == 0)
                    {
                        AutoHide.Hide();
                        checkedNotVerified += 1;
                        checkedVerified     = 0;
                    }
                    this.Invoke((MethodInvoker) delegate()
                    {
                        l_verified.Text      = User.Status;
                        l_verified.ForeColor = Color.Red;
                    });
                }
                else if (User.Status == "Verified")
                {
                    if (checkedVerified == 0)
                    {
                        AutoHide.ShowPremiumItems();
                        checkedVerified   += 1;
                        checkedNotVerified = 0;
                    }
                    this.Invoke((MethodInvoker) delegate()
                    {
                        l_verified.Text      = User.Status;
                        l_verified.ForeColor = Color.Green;
                    });
                }
                Thread.Sleep(200);
            }
        }
Example #18
0
        public static void LoadSettingsPage()
        {
            string[] split   = DF_Getter.get("SteamAccCreator.File.MainUI.HTML.DocumentFiles.HTML.SettingsPage.html").Split('\n');
            string   html    = DF_Getter.get("SteamAccCreator.File.MainUI.HTML.DocumentFiles.HTML.SettingsPage.html");
            string   newHTML = "";

            foreach (string n in split)
            {
                if (n.Contains("cb_email"))
                {
                    string add = n + SPGlobals.EmailProvidersHTML;
                    string x   = html.Replace(n, add);
                    newHTML = x;
                }
                if (n.Contains("cb_proxy"))
                {
                    string add = n + SPGlobals.ProxyHTML;
                    string x   = newHTML.Replace(n, add);
                    newHTML = x;
                }
            }
            browser.LoadHtml(newHTML + "<script>" + DF_Getter.get("SteamAccCreator.File.MainUI.HTML.DocumentFiles.JS.SettingsPage.js") + "</script>" + "<style>" + DF_Getter.get("SteamAccCreator.File.MainUI.HTML.DocumentFiles.CSS.SettingsPage.css") + "</style>");
            AutoHide.Hide();
        }
Example #19
0
 public static void LoadStartPage()
 {
     browser.Load("about:blank");
     browser.LoadHtml(DF_Getter.get("SteamAccCreator.File.MainUI.HTML.DocumentFiles.HTML.StartPage.html") + "<script>" + DF_Getter.get("SteamAccCreator.File.MainUI.HTML.DocumentFiles.JS.StartPage.js") + "</script>" + "<style>" + DF_Getter.get("SteamAccCreator.File.MainUI.HTML.DocumentFiles.CSS.StartPage.css") + "</style>");
     AutoHide.Hide();
 }
    private void InitFollowerList()
    {
        FollowerListItem[] componentsInChildren = this.m_followerDetailListContent.GetComponentsInChildren <FollowerListItem>(true);
        FollowerListItem[] array = componentsInChildren;
        for (int i = 0; i < array.Length; i++)
        {
            FollowerListItem followerListItem = array[i];
            if (!PersistentFollowerData.followerDictionary.ContainsKey(followerListItem.m_followerID))
            {
                followerListItem.get_gameObject().SetActive(false);
                followerListItem.get_transform().SetParent(Main.instance.get_transform());
            }
            else
            {
                JamGarrisonFollower jamGarrisonFollower = PersistentFollowerData.followerDictionary.get_Item(followerListItem.m_followerID);
                bool flag = (jamGarrisonFollower.Flags & 8) != 0;
                if (flag && jamGarrisonFollower.Durability <= 0)
                {
                    followerListItem.get_gameObject().SetActive(false);
                    followerListItem.get_transform().SetParent(Main.instance.get_transform());
                }
                else
                {
                    followerListItem.SetFollower(jamGarrisonFollower);
                }
            }
        }
        this.SortFollowerListData();
        if (this.m_championsHeader == null)
        {
            this.m_championsHeader = Object.Instantiate <FollowerListHeader>(this.m_followerListHeaderPrefab);
        }
        this.m_championsHeader.get_transform().SetParent(this.m_followerDetailListContent.get_transform(), false);
        this.m_championsHeader.m_title.set_font(GeneralHelpers.LoadStandardFont());
        this.m_championsHeader.m_title.set_text(StaticDB.GetString("CHAMPIONS", null) + ": ");
        int numActiveChampions = GeneralHelpers.GetNumActiveChampions();
        int maxActiveChampions = GeneralHelpers.GetMaxActiveChampions();

        if (numActiveChampions <= maxActiveChampions)
        {
            this.m_championsHeader.m_count.set_text(string.Concat(new object[]
            {
                string.Empty,
                numActiveChampions,
                "/",
                maxActiveChampions
            }));
        }
        else
        {
            this.m_championsHeader.m_count.set_text(string.Concat(new object[]
            {
                "<color=#ff0000ff>",
                numActiveChampions,
                "/",
                maxActiveChampions,
                "</color>"
            }));
        }
        AutoHide autoHide = this.m_championsHeader.get_gameObject().AddComponent <AutoHide>();

        autoHide.m_clipRT = this.m_panelViewRT;
        using (List <KeyValuePair <int, JamGarrisonFollower> > .Enumerator enumerator = this.m_sortedFollowerList.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                KeyValuePair <int, JamGarrisonFollower> current = enumerator.get_Current();
                bool flag2 = false;
                FollowerListItem[] array2 = componentsInChildren;
                for (int j = 0; j < array2.Length; j++)
                {
                    FollowerListItem followerListItem2 = array2[j];
                    if (followerListItem2.m_followerID == current.get_Value().GarrFollowerID)
                    {
                        flag2 = true;
                        break;
                    }
                }
                if (!flag2)
                {
                    this.InsertFollowerIntoListView(current.get_Value(), FollowerCategory.ActiveChampion);
                }
            }
        }
        int numTroops = GeneralHelpers.GetNumTroops();

        if (this.m_troopsHeader == null)
        {
            this.m_troopsHeader = Object.Instantiate <FollowerListHeader>(this.m_followerListHeaderPrefab);
        }
        this.m_troopsHeader.get_transform().SetParent(this.m_followerDetailListContent.get_transform(), false);
        this.m_troopsHeader.m_title.set_font(GeneralHelpers.LoadStandardFont());
        this.m_troopsHeader.m_title.set_text(StaticDB.GetString("TROOPS", null) + ": ");
        this.m_troopsHeader.m_count.set_font(GeneralHelpers.LoadStandardFont());
        this.m_troopsHeader.m_count.set_text(string.Empty + numTroops);
        autoHide          = this.m_troopsHeader.get_gameObject().AddComponent <AutoHide>();
        autoHide.m_clipRT = this.m_panelViewRT;
        using (List <KeyValuePair <int, JamGarrisonFollower> > .Enumerator enumerator2 = this.m_sortedFollowerList.GetEnumerator())
        {
            while (enumerator2.MoveNext())
            {
                KeyValuePair <int, JamGarrisonFollower> current2 = enumerator2.get_Current();
                bool flag3 = false;
                FollowerListItem[] array3 = componentsInChildren;
                for (int k = 0; k < array3.Length; k++)
                {
                    FollowerListItem followerListItem3 = array3[k];
                    if (followerListItem3.m_followerID == current2.get_Value().GarrFollowerID)
                    {
                        flag3 = true;
                        break;
                    }
                }
                if (!flag3)
                {
                    this.InsertFollowerIntoListView(current2.get_Value(), FollowerCategory.Troop);
                }
            }
        }
        int numInactiveChampions = GeneralHelpers.GetNumInactiveChampions();

        if (this.m_inactiveHeader == null)
        {
            this.m_inactiveHeader = Object.Instantiate <FollowerListHeader>(this.m_followerListHeaderPrefab);
        }
        this.m_inactiveHeader.get_transform().SetParent(this.m_followerDetailListContent.get_transform(), false);
        this.m_inactiveHeader.m_title.set_font(GeneralHelpers.LoadStandardFont());
        this.m_inactiveHeader.m_title.set_text(StaticDB.GetString("INACTIVE", null) + ": ");
        this.m_inactiveHeader.m_count.set_font(GeneralHelpers.LoadStandardFont());
        this.m_inactiveHeader.m_count.set_text(string.Empty + numInactiveChampions);
        autoHide          = this.m_inactiveHeader.get_gameObject().AddComponent <AutoHide>();
        autoHide.m_clipRT = this.m_panelViewRT;
        using (List <KeyValuePair <int, JamGarrisonFollower> > .Enumerator enumerator3 = this.m_sortedFollowerList.GetEnumerator())
        {
            while (enumerator3.MoveNext())
            {
                KeyValuePair <int, JamGarrisonFollower> current3 = enumerator3.get_Current();
                bool flag4 = false;
                FollowerListItem[] array4 = componentsInChildren;
                for (int l = 0; l < array4.Length; l++)
                {
                    FollowerListItem followerListItem4 = array4[l];
                    if (followerListItem4.m_followerID == current3.get_Value().GarrFollowerID)
                    {
                        flag4 = true;
                        break;
                    }
                }
                if (!flag4)
                {
                    this.InsertFollowerIntoListView(current3.get_Value(), FollowerCategory.InactiveChampion);
                }
            }
        }
        this.SyncVisibleListOrderToSortedFollowerList();
        this.m_championsHeader.get_gameObject().SetActive(numActiveChampions > 0);
        this.m_troopsHeader.get_gameObject().SetActive(numTroops > 0);
        this.m_inactiveHeader.get_gameObject().SetActive(numInactiveChampions > 0);
        this.m_championsHeader.get_transform().SetSiblingIndex(0);
        this.m_troopsHeader.get_transform().SetSiblingIndex(numActiveChampions + 1);
        this.m_inactiveHeader.get_transform().SetSiblingIndex(numActiveChampions + numTroops + 2);
    }
Example #21
0
 public static void SetAutoHide(DependencyObject obj, AutoHide value)
 {
     obj.SetValue(AutoHideProperty, value);
 }
    public void InitMissionList()
    {
        this.m_combatAllyListItem.get_gameObject().SetActive(false);
        MiniMissionListItem[] componentsInChildren = this.m_availableMission_listContents.GetComponentsInChildren <MiniMissionListItem>(true);
        MiniMissionListItem[] array = componentsInChildren;
        for (int i = 0; i < array.Length; i++)
        {
            MiniMissionListItem miniMissionListItem = array[i];
            bool flag = true;
            if (PersistentMissionData.missionDictionary.ContainsKey(miniMissionListItem.GetMissionID()))
            {
                JamGarrisonMobileMission jamGarrisonMobileMission = (JamGarrisonMobileMission)PersistentMissionData.missionDictionary.get_Item(miniMissionListItem.GetMissionID());
                if (jamGarrisonMobileMission.MissionState == 0)
                {
                    flag = false;
                    miniMissionListItem.UpdateMechanicPreview(false, jamGarrisonMobileMission);
                }
            }
            if (flag)
            {
                Object.DestroyImmediate(miniMissionListItem.get_gameObject());
            }
        }
        componentsInChildren = this.m_inProgressMission_listContents.GetComponentsInChildren <MiniMissionListItem>(true);
        MiniMissionListItem[] array2 = componentsInChildren;
        for (int j = 0; j < array2.Length; j++)
        {
            MiniMissionListItem miniMissionListItem2 = array2[j];
            bool flag2 = true;
            if (PersistentMissionData.missionDictionary.ContainsKey(miniMissionListItem2.GetMissionID()))
            {
                JamGarrisonMobileMission jamGarrisonMobileMission2 = (JamGarrisonMobileMission)PersistentMissionData.missionDictionary.get_Item(miniMissionListItem2.GetMissionID());
                if (jamGarrisonMobileMission2.MissionState != 0)
                {
                    flag2 = false;
                }
            }
            if (flag2)
            {
                Object.DestroyImmediate(miniMissionListItem2.get_gameObject());
            }
        }
        MiniMissionListItem[] componentsInChildren2 = this.m_availableMission_listContents.GetComponentsInChildren <MiniMissionListItem>(true);
        MiniMissionListItem[] componentsInChildren3 = this.m_inProgressMission_listContents.GetComponentsInChildren <MiniMissionListItem>(true);
        IEnumerator           enumerator            = PersistentMissionData.missionDictionary.get_Values().GetEnumerator();

        try
        {
            while (enumerator.MoveNext())
            {
                JamGarrisonMobileMission jamGarrisonMobileMission3 = (JamGarrisonMobileMission)enumerator.get_Current();
                bool flag3 = false;
                MiniMissionListItem[] array3 = componentsInChildren2;
                for (int k = 0; k < array3.Length; k++)
                {
                    MiniMissionListItem miniMissionListItem3 = array3[k];
                    if (miniMissionListItem3.GetMissionID() == jamGarrisonMobileMission3.MissionRecID)
                    {
                        flag3 = true;
                        break;
                    }
                }
                if (!flag3)
                {
                    MiniMissionListItem[] array4 = componentsInChildren3;
                    for (int l = 0; l < array4.Length; l++)
                    {
                        MiniMissionListItem miniMissionListItem4 = array4[l];
                        if (miniMissionListItem4.GetMissionID() == jamGarrisonMobileMission3.MissionRecID)
                        {
                            flag3 = true;
                            break;
                        }
                    }
                }
                if (!flag3)
                {
                    GarrMissionRec record = StaticDB.garrMissionDB.GetRecord(jamGarrisonMobileMission3.MissionRecID);
                    if (record == null)
                    {
                        Debug.LogWarning("Mission Not Found: ID " + jamGarrisonMobileMission3.MissionRecID);
                    }
                    else if (record.GarrFollowerTypeID == 4u)
                    {
                        if ((record.Flags & 16u) != 0u)
                        {
                            this.m_combatAllyListItem.get_gameObject().SetActive(true);
                        }
                        else
                        {
                            GameObject gameObject = Object.Instantiate <GameObject>(this.m_miniMissionListItemPrefab);
                            if (jamGarrisonMobileMission3.MissionState == 0)
                            {
                                gameObject.get_transform().SetParent(this.m_availableMission_listContents.get_transform(), false);
                            }
                            else
                            {
                                gameObject.get_transform().SetParent(this.m_inProgressMission_listContents.get_transform(), false);
                            }
                            MiniMissionListItem component = gameObject.GetComponent <MiniMissionListItem>();
                            component.SetMission(jamGarrisonMobileMission3);
                            AutoHide autoHide = gameObject.AddComponent <AutoHide>();
                            autoHide.m_clipRT = base.get_gameObject().GetComponent <RectTransform>();
                        }
                    }
                }
            }
        }
        finally
        {
            IDisposable disposable = enumerator as IDisposable;
            if (disposable != null)
            {
                disposable.Dispose();
            }
        }
        componentsInChildren2 = this.m_availableMission_listContents.GetComponentsInChildren <MiniMissionListItem>(true);
        componentsInChildren3 = this.m_inProgressMission_listContents.GetComponentsInChildren <MiniMissionListItem>(true);
        int num  = componentsInChildren2.Length;
        int num2 = componentsInChildren3.Length;

        this.m_availableMissionsTabLabel.set_text(StaticDB.GetString("AVAILABLE", null) + " - " + num);
        this.m_inProgressMissionsTabLabel.set_text(StaticDB.GetString("IN_PROGRESS", null) + " - " + num2);
        this.m_noMissionsAvailableLabel.get_gameObject().SetActive(num == 0);
        this.m_noMissionsInProgressLabel.get_gameObject().SetActive(num2 == 0);
    }
Example #23
0
 public static void SetAutoHide(DependencyObject obj, AutoHide value)
 {
     obj.SetValue(AutoHideProperty, value);
 }
Example #24
0
        public void Run()
        {
            if (_maxWindow != IntPtr.Zero)
            {
                if (_maxWindow.IsWindowInvisible() || _maxWindow.IsNotMaximizeWindow())
                {
                    Ready();
                }
                return;
            }

            if (Variable.taskbars.IsMouseOverTaskbar())
            {
                return;
            }

            EnumWindows((handle, lp) =>
            {
                if (handle.IsWindowInvisible())
                {
                    return(true);
                }

                if (handle.IsNotMaximizeWindow())
                {
                    return(true);
                }

                switch (lp)
                {
                case AutoModeType.BlacklistMode when handle.InBlacklist():
                    return(true);

                case AutoModeType.WhitelistMode when handle.NotInWhitelist():
                    return(true);

                default:
                    _maxWindow = handle;
                    return(false);
                }
            }, Settings.ModeType);

            if (_maxWindow == IntPtr.Zero)
            {
                if (_tryShowBar == false)
                {
                    return;
                }
                _tryShowBar = false;
                switch (Settings.ModeType)
                {
                case AutoModeType.ClassicAutoMode:
                    AutoHide.CancelAutoHide();
                    return;

                case AutoModeType.ClassicAdaptiveMode:
                    ButtonSize.SetIconSize(Constant.IconLarge);
                    return;

                case AutoModeType.BlacklistMode:
                    Settings.BlistDefaultState.SetState();
                    return;

                case AutoModeType.WhitelistMode:
                    Settings.WlistDefaultState.SetState();
                    return;

                default:
                    return;
                }
            }

            switch (Settings.ModeType)
            {
            case AutoModeType.ClassicAutoMode:
                AutoHide.SetAutoHide();
                return;

            case AutoModeType.ClassicAdaptiveMode:
                ButtonSize.SetIconSize(Constant.IconSmall);
                return;

            case AutoModeType.BlacklistMode:
                Settings.BlistTargetState.SetState();
                return;

            case AutoModeType.WhitelistMode:
                Settings.WlistTargetState.SetState();
                return;
            }
        }