public override void Refresh(RefreshFlags flags = RefreshFlags.Default)
 {
     if (flags != RefreshFlags.Default)
     {
         base.Refresh(flags);
     }
 }
示例#2
0
        private void OnButtonRefresh()
        {
            Undo.RegisterFullObjectHierarchyUndo(this.tileSystem.gameObject, TileLang.ParticularText("Action", "Refresh Tiles"));

            RefreshFlags flags = RefreshFlags.None;

            if (s_ForceRefreshTiles)
            {
                flags |= RefreshFlags.Force;
            }
            if (s_UpdateProcedural)
            {
                flags |= RefreshFlags.UpdateProcedural;
            }
            if (s_PreserveFlags)
            {
                flags |= RefreshFlags.PreservePaintedFlags;
            }
            if (s_PreserveManualOffset)
            {
                flags |= RefreshFlags.PreserveTransform;
            }

            this.tileSystem.RefreshAllTiles(flags);

            this.Close();
        }
示例#3
0
 public void Refresh(RefreshFlags flags = RefreshFlags.Default)
 {
     if ((flags & RefreshFlags.StructureChanged) == RefreshFlags.StructureChanged)
     {
         ResetEditors();
     }
 }
 /// <summary>
 /// Default constructor for a single modified game
 /// </summary>
 /// <param name="modifiedGame">The game which has been modified</param>
 /// <param name="flags">The refresh flags indicating what has been modified</param>
 public RefreshRequiredEventArgs(Games modifiedGame, RefreshFlags flags)
 {
     ModifiedGames = new Games[]
     {
         modifiedGame
     };
     Flags = flags;
 }
示例#5
0
 private void InvalidateObject(int instanceId, RefreshFlags flags = RefreshFlags.Default)
 {
     if (UnityEngine.Object.FindObjectFromInstanceID(instanceId) is Component c)
     {
         queryEngine.InvalidateObject(c.gameObject.GetInstanceID());
     }
     else
     {
         queryEngine.InvalidateObject(instanceId);
     }
 }
示例#6
0
		void OKButton_Click(object sender, RoutedEventArgs e)
		{
			RefreshFlags = RefreshFlags.None;
			ILSpySettings.Update(
				delegate (XElement root) {
					foreach (var optionPage in optionPages)
						RefreshFlags |= optionPage.Save(root);
				});
			this.DialogResult = true;
			Close();
		}
示例#7
0
 void OKButton_Click(object sender, RoutedEventArgs e)
 {
     RefreshFlags = RefreshFlags.None;
     ILSpySettings.Update(
         delegate(XElement root) {
         foreach (var optionPage in optionPages)
         {
             RefreshFlags |= optionPage.Save(root);
         }
     });
     this.DialogResult = true;
     Close();
 }
示例#8
0
        private void Update(RefreshFlags flags)
        {
            if (items == null)
            {
                return;
            }

            // Set a default configuration if none
            if (m_TableConfig == null)
            {
                SetSearchTable(LoadDefaultTableConfig(reset: false));
            }

            if ((flags & RefreshFlags.ItemsChanged) == RefreshFlags.ItemsChanged)
            {
                UpdatePropertyTable();
            }
        }
        public void OnApply(IAppRefreshSettings appRefreshSettings)
        {
            RefreshFlags flags = 0;
            var          g     = _global_decompilerSettings;
            var          d     = decompilerSettings;

            d.DecompilationObject0 = DecompilationObject0.Object;
            d.DecompilationObject1 = DecompilationObject1.Object;
            d.DecompilationObject2 = DecompilationObject2.Object;
            d.DecompilationObject3 = DecompilationObject3.Object;
            d.DecompilationObject4 = DecompilationObject4.Object;

            if (g.AnonymousMethods != d.AnonymousMethods)
            {
                flags |= RefreshFlags.ILAst | RefreshFlags.ShowMember;
            }
            if (g.ExpressionTrees != d.ExpressionTrees)
            {
                flags |= RefreshFlags.ILAst;
            }
            if (g.YieldReturn != d.YieldReturn)
            {
                flags |= RefreshFlags.ILAst | RefreshFlags.ShowMember;
            }
            if (g.AsyncAwait != d.AsyncAwait)
            {
                flags |= RefreshFlags.ILAst | RefreshFlags.ShowMember;
            }
            if (g.AutomaticProperties != d.AutomaticProperties)
            {
                flags |= RefreshFlags.CSharp | RefreshFlags.ShowMember;
            }
            if (g.AutomaticEvents != d.AutomaticEvents)
            {
                flags |= RefreshFlags.CSharp | RefreshFlags.ShowMember;
            }
            if (g.UsingStatement != d.UsingStatement)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.ForEachStatement != d.ForEachStatement)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.LockStatement != d.LockStatement)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.SwitchStatementOnString != d.SwitchStatementOnString)
            {
                flags |= RefreshFlags.CSharp | RefreshFlags.ShowMember;
            }
            if (g.UsingDeclarations != d.UsingDeclarations)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.QueryExpressions != d.QueryExpressions)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.FullyQualifyAmbiguousTypeNames != d.FullyQualifyAmbiguousTypeNames)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.FullyQualifyAllTypes != d.FullyQualifyAllTypes)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.UseDebugSymbols != d.UseDebugSymbols)
            {
                flags |= RefreshFlags.DecompileAll;
            }
            if (g.ObjectOrCollectionInitializers != d.ObjectOrCollectionInitializers)
            {
                flags |= RefreshFlags.ILAst;
            }
            if (g.ShowXmlDocumentation != d.ShowXmlDocumentation)
            {
                flags |= RefreshFlags.DecompileAll;
            }
            if (g.RemoveEmptyDefaultConstructors != d.RemoveEmptyDefaultConstructors)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.IntroduceIncrementAndDecrement != d.IntroduceIncrementAndDecrement)
            {
                flags |= RefreshFlags.ILAst;
            }
            if (g.MakeAssignmentExpressions != d.MakeAssignmentExpressions)
            {
                flags |= RefreshFlags.ILAst;
            }
            if (g.AlwaysGenerateExceptionVariableForCatchBlocksUnlessTypeIsObject != d.AlwaysGenerateExceptionVariableForCatchBlocksUnlessTypeIsObject)
            {
                flags |= RefreshFlags.ILAst;
            }
            if (g.ShowTokenAndRvaComments != d.ShowTokenAndRvaComments)
            {
                flags |= RefreshFlags.DecompileAll;
            }
            if (g.DecompilationObject0 != d.DecompilationObject0)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.DecompilationObject1 != d.DecompilationObject1)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.DecompilationObject2 != d.DecompilationObject2)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.DecompilationObject3 != d.DecompilationObject3)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.DecompilationObject4 != d.DecompilationObject4)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.SortMembers != d.SortMembers)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.ForceShowAllMembers != d.ForceShowAllMembers)
            {
                flags |= RefreshFlags.CSharp | RefreshFlags.ShowMember;
            }
            if (g.SortSystemUsingStatementsFirst != d.SortSystemUsingStatementsFirst)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.MaxArrayElements != d.MaxArrayElements)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.SortCustomAttributes != d.SortCustomAttributes)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.UseSourceCodeOrder != d.UseSourceCodeOrder)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.AllowFieldInitializers != d.AllowFieldInitializers)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.OneCustomAttributePerLine != d.OneCustomAttributePerLine)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.TypeAddInternalModifier != d.TypeAddInternalModifier)
            {
                flags |= RefreshFlags.CSharp;
            }
            if (g.MemberAddPrivateModifier != d.MemberAddPrivateModifier)
            {
                flags |= RefreshFlags.CSharp;
            }

            if ((flags & RefreshFlags.ShowMember) != 0)
            {
                appRefreshSettings.Add(AppSettingsConstants.REFRESH_LANGUAGE_SHOWMEMBER);
            }
            if ((flags & RefreshFlags.ILAst) != 0)
            {
                appRefreshSettings.Add(SettingsConstants.REDECOMPILE_ILAST_ILSPY_CODE);
            }
            if ((flags & RefreshFlags.CSharp) != 0)
            {
                appRefreshSettings.Add(SettingsConstants.REDECOMPILE_CSHARP_ILSPY_CODE);
            }
            if ((flags & RefreshFlags.VB) != 0)
            {
                appRefreshSettings.Add(SettingsConstants.REDECOMPILE_VB_ILSPY_CODE);
            }

            decompilerSettings.CopyTo(_global_decompilerSettings);
        }
示例#10
0
 public override void Refresh(RefreshFlags flags = RefreshFlags.Default)
 {
     base.Refresh(flags);
     Update(flags);
 }
 /// <summary>
 /// Default constructor for no modified games
 /// </summary>
 /// <param name="flags">The refresh flags indicating what has been modified</param>
 public RefreshRequiredEventArgs(RefreshFlags flags) : this(null, flags)
 {
 }
 /// <summary>
 /// Default constructor for multiple modified games
 /// </summary>
 /// <param name="modifiedGames">The games which have been modified</param>
 /// <param name="flags">The refresh flags indicating what has been modified</param>
 public RefreshRequiredEventArgs(IEnumerable <Games>?modifiedGames, RefreshFlags flags)
 {
     ModifiedGames = modifiedGames?.ToArray() ?? Array.Empty <Games>();
     Flags         = flags;
 }