コード例 #1
0
        private void changeToolSettings(int intValue)
        {
            bool flag = intValue == 1;

            if (this.sendActiveState && Object.op_Inequality((Object)this.noPillarsDropDown, (Object)null))
            {
                int num = !this.TZWrapper.active ? 0 : (flag ? 3 : 2);
                Logger.Info("newSetting: " + (object)num);
                this.noPillarsDropDown.set_selectedIndex(num);
            }
            foreach (UIComponent componentsInChild in (UIComponent[])((Component)UIUtils.Find <UIComponent>("RoadsPanel")).GetComponentsInChildren <UIButton>())
            {
                try
                {
                    object objectUserData = componentsInChild.get_objectUserData();
                    if (objectUserData is NetInfo)
                    {
                        if (objectUserData != null)
                        {
                            if (((NetInfo)objectUserData).m_netAI is RoadAI)
                            {
                                ZoningTogglesUI.zoningToggleAction((RoadAI)((NetInfo)objectUserData).m_netAI, flag);
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    Logger.Warning("Skipping " + ((Object)componentsInChild).get_name());
                }
            }
        }
コード例 #2
0
 private void DestroyView()
 {
     if (LoadingExtension.Ui == null)
     {
         return;
     }
     LoadingExtension.Ui.DestroyView();
     LoadingExtension.Ui = (ZoningTogglesUI)null;
 }
コード例 #3
0
 private void onWaitComplete(UIPanel roadOptionsPanel)
 {
     Logger.Info(nameof(onWaitComplete));
     using (IEnumerator <PluginManager.PluginInfo> enumerator = Singleton <PluginManager> .get_instance().GetPluginsInfo().GetEnumerator())
     {
         while (((IEnumerator)enumerator).MoveNext())
         {
             PluginManager.PluginInfo current         = enumerator.Current;
             PublishedFileId          publishedFileId = current.get_publishedFileID();
             bool flag = ((PublishedFileId) ref publishedFileId).get_AsUInt64() == 543722850UL;
             Logger.Info((flag && current.get_isEnabled()).ToString() ?? "");
             if (flag)
             {
                 break;
             }
         }
     }
     if (this.loading.get_currentMode() != null || LoadingExtension.Ui != null)
     {
         return;
     }
     LoadingExtension.Ui = new ZoningTogglesUI();
     LoadingExtension.Ui.CreateButtons(roadOptionsPanel);
 }