private static void OnPreferencesGUI() { scroll = EditorGUILayout.BeginScrollView(scroll, false, false); EditorGUILayout.Separator(); Enabled.DoGUI(); EditorGUILayout.Separator(); EditorGUILayout.HelpBox("Each item has a tooltip explaining what it does, keep the mouse over it to see.", MessageType.Info); EditorGUILayout.Separator(); using (Enabled.GetEnabledScope()) { using (new GUIIndent("Misc settings")) { using (new GUIIndent("Margins")) { RightMargin.DoGUISlider(-50, 50); LeftMargin.DoGUISlider(-50, 50); Indent.DoGUISlider(0, 35); } Tree.DoGUI(); using (new GUIIndent()) using (SelectOnTree.GetFadeScope(Tree)) SelectOnTree.DoGUI(); Tooltips.DoGUI(); using (new GUIIndent()) using (RelevantTooltipsOnly.GetFadeScope(Tooltips)) RelevantTooltipsOnly.DoGUI(); EnhancedSelection.DoGUI(); Trailing.DoGUI(); ChangeAllSelected.DoGUI(); NumericChildExpand.DoGUI(); using (HideDefaultIcon.GetFadeScope(IsButtonEnabled(new Icons.GameObjectIcon()))) HideDefaultIcon.DoGUI(); GUI.changed = false; using (AllowSelectingLocked.GetFadeScope(IsButtonEnabled(new Icons.Lock()))) AllowSelectingLocked.DoGUI(); using (AllowSelectingLockedSceneView.GetFadeScope(IsButtonEnabled(new Icons.Lock()) && AllowSelectingLocked)) AllowSelectingLockedSceneView.DoGUI(); if (GUI.changed && EditorUtility.DisplayDialog("Relock all objects", "Would you like to relock all objects?\n" + "This is recommended when changing this setting and might take a few seconds on large scenes" + "\nIt's also recommended to do this on all scenes", "Yes", "No")) { Utility.RelockAllObjects(); } HoverTintColor.DoGUI(); } using (new GUIIndent("Row separators")) { LineSize.DoGUISlider(0, 6); using (LineColor.GetFadeScope(LineSize > 0)) LineColor.DoGUI(); OddRowColor.DoGUI(); EvenRowColor.DoGUI(); GUI.changed = false; var rect = EditorGUILayout.GetControlRect(false, rowColorsList.GetHeight()); rect.xMin += EditorGUI.indentLevel * 16f; rowColorsList.DoList(rect); } MiniLabel.DoGUI(); using (new GUIIndent()) { using (SmallerMiniLabel.GetFadeScope(MiniLabel.Value != MiniLabelType.None)) SmallerMiniLabel.DoGUI(); using (HideDefaultTag.GetFadeScope(MiniLabelTagEnabled)) HideDefaultTag.DoGUI(); using (HideDefaultLayer.GetFadeScope(MiniLabelLayerEnabled)) HideDefaultLayer.DoGUI(); using (CentralizeMiniLabelWhenPossible.GetFadeScope((HideDefaultLayer || HideDefaultTag) && (MiniLabel.Value == MiniLabelType.TagAndLayer || MiniLabel.Value == MiniLabelType.LayerAndTag))) CentralizeMiniLabelWhenPossible.DoGUI(); } LeftSideButtonPref.DoGUI(); using (new GUIIndent()) using (LeftmostButton.GetFadeScope(LeftSideButton != IconBase.rightNone)) LeftmostButton.DoGUI(); using (new GUIIndent("Children behaviour on change")) { using (LockAskMode.GetFadeScope(IsButtonEnabled(new Icons.Lock()))) LockAskMode.DoGUI(); using (LayerAskMode.GetFadeScope(IsButtonEnabled(new Icons.Layer()) || MiniLabelLayerEnabled)) LayerAskMode.DoGUI(); using (TagAskMode.GetFadeScope(IsButtonEnabled(new Icons.Tag()) || MiniLabelTagEnabled)) TagAskMode.DoGUI(); using (StaticAskMode.GetFadeScope(IsButtonEnabled(new Icons.Static()))) StaticAskMode.DoGUI(); using (IconAskMode.GetFadeScope(IsButtonEnabled(new Icons.GameObjectIcon()))) IconAskMode.DoGUI(); EditorGUILayout.HelpBox(string.Format("Pressing down {0} while clicking on a button will make it temporary have the opposite children change mode", Utility.CtrlKey), MessageType.Info); } leftIconsList.displayAdd = LeftIconsMenu.GetItemCount() > 0; leftIconsList.DoLayoutList(); rightIconsList.displayAdd = RightIconsMenu.GetItemCount() > 0; rightIconsList.DoLayoutList(); EditorGUILayout.HelpBox("Alt + Click on child expand toggle makes it expand all the grandchildren too", MessageType.Info); if (IsButtonEnabled(new Icons.Memory())) { EditorGUILayout.HelpBox("\"Memory Used\" may create garbage and consequently framerate stutterings, leave it disabled if maximum performance is important for your project", MessageType.Warning); } if (IsButtonEnabled(new Icons.Lock())) { EditorGUILayout.HelpBox("Remember to always unlock your game objects when removing or disabling this extension, as you won't be able to unlock without it and may lose scene data", MessageType.Warning); } GUI.enabled = true; EditorGUILayout.EndScrollView(); using (new EditorGUILayout.HorizontalScope()) { GUILayout.FlexibleSpace(); EditorGUILayout.LabelField(versionContent, GUILayout.Width(170f)); } using (new EditorGUILayout.HorizontalScope()) { if (GUILayout.Button(resetSettingsContent, GUILayout.Width(120f))) { onResetPreferences(); } if (GUILayout.Button(unlockAllContent, GUILayout.Width(120f))) { Utility.UnlockAllObjects(); } if (GUILayout.Button(mailDeveloperContent, GUILayout.Width(120f))) { Application.OpenURL(GetEmailURL()); } } EditorGUILayout.Separator(); Styles.ReloadTooltips(); EditorApplication.RepaintHierarchyWindow(); } }
protected bool Equals(WorkingHours other) { return(Enabled.Equals(other.Enabled) && From.Equals(other.From) && To.Equals(other.To)); }
public override int GetHashCode() { return(Price.GetHashCode() ^ Enabled.GetHashCode() ^ Description.GetHashCode() ^ Title.GetHashCode()); }
public override int GetHashCode() { return(Enabled.GetHashCode() ^ IconReference.GetHashCode() ^ AutoApproval.GetHashCode() ^ VirtualServerObjects.GetEnumHashCode()); }
public override int GetHashCode() { return(MinVisible.GetHashCode() ^ MaxVisible.GetHashCode() ^ Enabled.GetHashCode() ^ Opacity.GetHashCode()); }
public override string ToString() { return(Command.Name + "*" + Key.ToString() + "*" + Modifiers.ToString() + "*" + Global.ToString() + "*" + Enabled.ToString()); }
public void StoreValues(Data data, string path) { data.SetValue(@"" + path + @"Enabled", Enabled.ToString()); data.SetValue(@"" + path + @"File", Data.EscapeString(File)); }
private static void OnPreferencesGUI() { scroll.Value = EditorGUILayout.BeginScrollView(scroll, false, false); EditorGUILayout.Separator(); Enabled.DoGUI(); EditorGUILayout.Separator(); using (Enabled.GetEnabledScope()) { using (new GUIIndent("Misc settings")) { Offset.DoGUI(); Tree.DoGUI(); Tooltips.DoGUI(); using (RelevantTooltipsOnly.GetFadeScope(Tooltips)) RelevantTooltipsOnly.DoGUI(); EnhancedSelection.DoGUI(); Trailing.DoGUI(); ChangeAllSelected.DoGUI(); NumericChildExpand.DoGUI(); using (HideDefaultIcon.GetFadeScope(IsButtonEnabled(new Icons.GameObjectIcon()))) HideDefaultIcon.DoGUI(); GUI.changed = false; using (AllowSelectingLocked.GetFadeScope(IsButtonEnabled(new Icons.Lock()))) AllowSelectingLocked.DoGUI(); using (AllowSelectingLockedSceneView.GetFadeScope(IsButtonEnabled(new Icons.Lock()) && AllowSelectingLocked)) AllowSelectingLockedSceneView.DoGUI(); if (GUI.changed && EditorUtility.DisplayDialog("Relock all objects", "Would you like to relock all objects?\n" + "This is recommended when changing this setting and might take a few seconds on large scenes" + "\nIt's also recommended to do this on all scenes", "Yes", "No")) { Utility.RelockAllObjects(); } } using (new GUIIndent("Row separators")) { LineSize.DoSlider(0, 6); using (LineColor.GetFadeScope(LineSize > 0)) LineColor.DoGUI(); OddRowColor.DoGUI(); EvenRowColor.DoGUI(); GUI.changed = false; var rect = EditorGUILayout.GetControlRect(false, rowColorsList.GetHeight()); rect.xMin += EditorGUI.indentLevel * 16f; rowColorsList.DoList(rect); if (GUI.changed) { PerLayerRowColors.Value = rowColorsList.list.Cast <LayerColor>().ToArray(); } } using (new GUIIndent(MiniLabelType)) { using (SmallerMiniLabel.GetFadeScope(MiniLabelType.Value != global::EnhancedHierarchy.MiniLabelType.None)) SmallerMiniLabel.DoGUI(); using (HideDefaultTag.GetFadeScope(MiniLabelTagEnabled)) HideDefaultTag.DoGUI(); using (HideDefaultLayer.GetFadeScope(MiniLabelLayerEnabled)) HideDefaultLayer.DoGUI(); using (CentralizeMiniLabelWhenPossible.GetFadeScope((HideDefaultLayer || HideDefaultTag) && (MiniLabelType.Value == global::EnhancedHierarchy.MiniLabelType.TagAndLayer || MiniLabelType.Value == global::EnhancedHierarchy.MiniLabelType.LayerAndTag))) CentralizeMiniLabelWhenPossible.DoGUI(); } using (new GUIIndent(LeftSideButton)) using (LeftmostButton.GetFadeScope(LeftSideButton.Value != new Icons.RightNone())) LeftmostButton.DoGUI(); using (new GUIIndent("Children behaviour on change")) { using (LockAskMode.GetFadeScope(IsButtonEnabled(new Icons.Lock()))) LockAskMode.DoGUI(); using (LayerAskMode.GetFadeScope(IsButtonEnabled(new Icons.Layer()) || MiniLabelLayerEnabled)) LayerAskMode.DoGUI(); using (TagAskMode.GetFadeScope(IsButtonEnabled(new Icons.Tag()) || MiniLabelTagEnabled)) TagAskMode.DoGUI(); using (StaticAskMode.GetFadeScope(IsButtonEnabled(new Icons.Static()))) StaticAskMode.DoGUI(); using (IconAskMode.GetFadeScope(IsButtonEnabled(new Icons.GameObjectIcon()))) IconAskMode.DoGUI(); EditorGUILayout.HelpBox(string.Format("Tip: Pressing down {0} while clicking on a button will make it temporary have the opposite children change mode", Utility.CtrlKey), MessageType.Info); } leftIconsList.displayAdd = LeftIconsMenu.GetItemCount() > 0; leftIconsList.DoLayoutList(); LeftIcons.Value = leftIconsList.list.Cast <LeftSideIcon>().ToArray(); rightIconsList.displayAdd = RightIconsMenu.GetItemCount() > 0; rightIconsList.DoLayoutList(); RightIcons.Value = rightIconsList.list.Cast <RightSideIcon>().ToArray(); if (IsButtonEnabled(new Icons.Lock())) { EditorGUILayout.HelpBox("Remember to always unlock your game objects when removing or disabling this extension, as you won't be able to unlock without it and may lose scene data", MessageType.Warning); } GUI.enabled = true; EditorGUILayout.EndScrollView(); EditorGUILayout.BeginHorizontal(); if (GUILayout.Button(resetSettingsContent, GUILayout.Width(120f))) { DeleteSavedValues(); } if (GUILayout.Button(unlockAllContent, GUILayout.Width(120f))) { Utility.UnlockAllObjects(); } GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); EditorGUILayout.Separator(); Styles.ReloadTooltips(); EditorApplication.RepaintHierarchyWindow(); } }
public bool Equals([AllowNull] GroupBy other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Type == other.Type && Type != null && other.Type != null && Type.Equals(other.Type)) && (Enabled == other.Enabled && Enabled != null && other.Enabled != null && Enabled.Equals(other.Enabled)) && (Equals(Groups, other.Groups) || Groups != null && other.Groups != null && Groups.SequenceEqual(other.Groups)) && (NameFormat == other.NameFormat && NameFormat != null && other.NameFormat != null && NameFormat.Equals(other.NameFormat)) && (Equals(Styles, other.Styles) || Styles != null && other.Styles != null && Styles.SequenceEqual(other.Styles)) && (GroupsSrc == other.GroupsSrc && GroupsSrc != null && other.GroupsSrc != null && GroupsSrc.Equals(other.GroupsSrc))); }
public override bool Equals(object o) { if (!(o is Security)) { return(false); } Security v = o as Security; if (!AllowPrinting.Equals(v.AllowPrinting)) { return(false); } if (!AllowScreenReader.Equals(v.AllowScreenReader)) { return(false); } if (!AllowToCopyContent.Equals(v.AllowToCopyContent)) { return(false); } if (!AllowToEditAssembly.Equals(v.AllowToEditAssembly)) { return(false); } if (!AllowToEditComments.Equals(v.AllowToEditComments)) { return(false); } if (!AllowToEditTheDocument.Equals(v.AllowToEditTheDocument)) { return(false); } if (!AllowToFillForms.Equals(v.AllowToFillForms)) { return(false); } if (!Enabled.Equals(v.Enabled)) { return(false); } if (!EncryptionLevel.Equals(v.EncryptionLevel)) { return(false); } if (!OwnerPassword.Equals(v.OwnerPassword)) { return(false); } if (!RequireUserPassword.Equals(v.RequireUserPassword)) { return(false); } if (!RestrictPrintingToLowQuality.Equals(v.RestrictPrintingToLowQuality)) { return(false); } if (!UserPassword.Equals(v.UserPassword)) { return(false); } return(true); }
public override bool Initialize(GameHost host) { host.Window.MouseEnter += window_MouseEnter; host.Window.MouseLeave += window_MouseLeave; mouseInWindow = host.Window.CursorInWindow; // Get the bindables we need to determine whether to confine the mouse to window or not DesktopGameWindow desktopWindow = host.Window as DesktopGameWindow; if (desktopWindow != null) { confineMode.BindTo(desktopWindow.ConfineMouseMode); windowMode.BindTo(desktopWindow.WindowMode); } Enabled.ValueChanged += enabled => { if (enabled) { host.InputThread.Scheduler.Add(scheduled = new ScheduledDelegate(delegate { if (!host.Window.Visible) { return; } bool useRawInput = mouseInWindow && host.Window.Focused; var state = useRawInput ? OpenTK.Input.Mouse.GetState() : OpenTK.Input.Mouse.GetCursorState(); if (state.Equals(lastState)) { return; } if (useRawInput) { if (!lastState.HasValue) { // when we return from being outside of the window, we want to set the new position of our game cursor // to where the OS cursor is, just once. var cursorState = OpenTK.Input.Mouse.GetCursorState(); var screenPoint = host.Window.PointToClient(new Point(cursorState.X, cursorState.Y)); currentPosition = new Vector2(screenPoint.X, screenPoint.Y); } else { currentPosition += new Vector2(state.X - lastState.Value.X, state.Y - lastState.Value.Y) * (float)sensitivity.Value; // When confining, clamp to the window size. if (confineMode.Value == ConfineMouseMode.Always || confineMode.Value == ConfineMouseMode.Fullscreen && windowMode.Value == WindowMode.Fullscreen) { currentPosition = Vector2.Clamp(currentPosition, Vector2.Zero, new Vector2(host.Window.Width, host.Window.Height)); } // update the windows cursor to match our raw cursor position. // this is important when sensitivity is decreased below 1.0, where we need to ensure the cursor stays withing the window. var screenPoint = host.Window.PointToScreen(new Point((int)currentPosition.X, (int)currentPosition.Y)); OpenTK.Input.Mouse.SetPosition(screenPoint.X, screenPoint.Y); } } else { var screenPoint = host.Window.PointToClient(new Point(state.X, state.Y)); currentPosition = new Vector2(screenPoint.X, screenPoint.Y); } IMouseState newState; // While not focused, let's silently ignore everything but position. if (host.IsActive) { lastState = state; newState = new OpenTKPollMouseState(state, host.IsActive, currentPosition); } else { lastState = null; newState = new UnfocusedMouseState(new MouseState(), host.IsActive, currentPosition); } PendingStates.Enqueue(new InputState { Mouse = newState }); FrameStatistics.Increment(StatisticsCounterType.MouseEvents); }, 0, 0)); } else { scheduled?.Cancel(); lastState = null; } }; Enabled.TriggerChange(); return(true); }
public override bool Initialize(GameHost host) { host.Window.MouseEnter += window_MouseEnter; host.Window.MouseLeave += window_MouseLeave; this.host = host; mouseInWindow = host.Window.CursorInWindow; // Get the bindables we need to determine whether to confine the mouse to window or not if (host.Window is DesktopGameWindow desktopWindow) { confineMode.BindTo(desktopWindow.ConfineMouseMode); windowMode.BindTo(desktopWindow.WindowMode); mapAbsoluteInputToWindow.BindTo(desktopWindow.MapAbsoluteInputToWindow); } Enabled.ValueChanged += enabled => { if (enabled) { host.InputThread.Scheduler.Add(scheduled = new ScheduledDelegate(delegate { if (!host.Window.Visible || host.Window.WindowState == WindowState.Minimized) { return; } if ((mouseInWindow || lastStates.Any(s => s.HasAnyButtonPressed)) && host.Window.Focused) { var newStates = new List <OpenTK.Input.MouseState>(mostSeenStates + 1); for (int i = 0; i <= mostSeenStates + 1; i++) { var s = OpenTK.Input.Mouse.GetState(i); if (s.IsConnected || i < mostSeenStates) { newStates.Add(s); mostSeenStates = i; } } while (lastStates.Count < newStates.Count) { lastStates.Add(null); } for (int i = 0; i < newStates.Count; i++) { if (newStates[i].IsConnected != true) { lastStates[i] = null; continue; } var state = newStates[i]; var lastState = lastStates[i]; if (lastState != null && state.Equals(lastState.RawState)) { continue; } var newState = new OpenTKPollMouseState(state, host.IsActive, getUpdatedPosition(state, lastState)) { LastState = lastState }; lastStates[i] = newState; if (lastState != null) { PendingStates.Enqueue(new InputState { Mouse = newState }); FrameStatistics.Increment(StatisticsCounterType.MouseEvents); } } } else { var state = OpenTK.Input.Mouse.GetCursorState(); var screenPoint = host.Window.PointToClient(new Point(state.X, state.Y)); PendingStates.Enqueue(new InputState { Mouse = new UnfocusedMouseState(new OpenTK.Input.MouseState(), host.IsActive, new Vector2(screenPoint.X, screenPoint.Y)) }); FrameStatistics.Increment(StatisticsCounterType.MouseEvents); lastStates.Clear(); } }, 0, 0)); } else { scheduled?.Cancel(); lastStates.Clear(); } }; Enabled.TriggerChange(); return(true); }
private void load(APIAccess api) { localUser.BindTo(api.LocalUser); localUser.BindValueChanged(userChanged, true); Enabled.BindValueChanged(enabledChanged, true); }
protected bool Equals(VoiceMail other) { return(string.Equals(Url, other.Url) && Enabled.Equals(other.Enabled) && TimeOut == other.TimeOut); }
public IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg) { System.Diagnostics.Trace.Write("1. Enter Pipeline"); try { System.Diagnostics.Trace.Write("2. Namespace Replace Enable : " + Enabled.ToString()); //If enabled if (Enabled) { //Create StreamReader, VirtualStream and StreamWriter instance StreamReader sReader = new StreamReader(pInMsg.BodyPart.Data); VirtualStream vInStream = new VirtualStream(); StreamWriter sWriter = new StreamWriter(vInStream); System.Diagnostics.Trace.Write("3. Created StreamReader, VirtualStream and StreamWriter instances."); //Write message body to a virutal memory stream sWriter.Write(sReader.ReadToEnd()); sWriter.Flush(); sReader.Close(); System.Diagnostics.Trace.Write("4. Message body written to a virutal memory stream."); vInStream.Seek(0, SeekOrigin.Begin); //create a string string body = new StreamReader(vInStream).ReadToEnd(); System.Diagnostics.Trace.Write("5. Message body : " + body); System.Diagnostics.Trace.Write("6. Old Namespace : " + OldNamespace); System.Diagnostics.Trace.Write("7. New Namespace : " + NewNamespace); VirtualStream vOutStream = new VirtualStream(); //Add property to Namespace. //Manipulate the Namespace of the message body = body.Replace(OldNamespace, NewNamespace); System.Diagnostics.Trace.Write("8. Namespace replaced"); //Write the output StreamWriter writer = new StreamWriter(vOutStream); writer.AutoFlush = true; writer.Write(body); vOutStream.Position = 0; System.Diagnostics.Trace.Write("9. Write output."); //Put the stream back pInMsg.BodyPart.Data = vOutStream; System.Diagnostics.Trace.Write("10. Exit Pipeline."); } return(pInMsg); } catch (Exception ex) { if (pInMsg != null) { pInMsg.SetErrorInfo(ex); } throw ex; } }
public override string ToString() { return(Enabled.ToString()); }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (LastModifiedTimestampMs != 0L) { hash ^= LastModifiedTimestampMs.GetHashCode(); } if (Latitude != 0D) { hash ^= Latitude.GetHashCode(); } if (Longitude != 0D) { hash ^= Longitude.GetHashCode(); } if (Enabled != false) { hash ^= Enabled.GetHashCode(); } if (Type != 0) { hash ^= Type.GetHashCode(); } if (OwnedByTeam != 0) { hash ^= OwnedByTeam.GetHashCode(); } if (GuardPokemonId != 0) { hash ^= GuardPokemonId.GetHashCode(); } if (GuardPokemonCp != 0) { hash ^= GuardPokemonCp.GetHashCode(); } if (GymPoints != 0L) { hash ^= GymPoints.GetHashCode(); } if (IsInBattle != false) { hash ^= IsInBattle.GetHashCode(); } hash ^= activeFortModifier_.GetHashCode(); if (lureInfo_ != null) { hash ^= LureInfo.GetHashCode(); } if (CooldownCompleteTimestampMs != 0L) { hash ^= CooldownCompleteTimestampMs.GetHashCode(); } if (Sponsor != 0) { hash ^= Sponsor.GetHashCode(); } if (RenderingType != 0) { hash ^= RenderingType.GetHashCode(); } return(hash); }
public override bool Equals(object o) { if (!(o is Signature)) { return(false); } Signature v = o as Signature; if (!AllowMultiSigning.Equals(v.AllowMultiSigning)) { return(false); } if (!CertificateFile.Equals(v.CertificateFile)) { return(false); } if (!DisplaySignatureInDocument.Equals(v.DisplaySignatureInDocument)) { return(false); } if (!Enabled.Equals(v.Enabled)) { return(false); } if (!LeftX.Equals(v.LeftX)) { return(false); } if (!LeftY.Equals(v.LeftY)) { return(false); } if (!RightX.Equals(v.RightX)) { return(false); } if (!RightY.Equals(v.RightY)) { return(false); } if (!SignContact.Equals(v.SignContact)) { return(false); } if (!SignLocation.Equals(v.SignLocation)) { return(false); } if (!SignReason.Equals(v.SignReason)) { return(false); } if (!SignatureCustomPage.Equals(v.SignatureCustomPage)) { return(false); } if (!SignaturePage.Equals(v.SignaturePage)) { return(false); } if (!SignaturePassword.Equals(v.SignaturePassword)) { return(false); } if (!TimeServerAccountId.Equals(v.TimeServerAccountId)) { return(false); } return(true); }
public override bool Initialize(GameHost host) { base.Initialize(host); // Get the bindables we need to determine whether to confine the mouse to window or not if (host.Window is DesktopGameWindow desktopWindow) { confineMode.BindTo(desktopWindow.ConfineMouseMode); windowMode.BindTo(desktopWindow.WindowMode); mapAbsoluteInputToWindow.BindTo(desktopWindow.MapAbsoluteInputToWindow); } Enabled.BindValueChanged(e => { if (e.NewValue) { host.InputThread.Scheduler.Add(scheduled = new ScheduledDelegate(delegate { if (!host.Window.Visible || host.Window.WindowState == osuTK.WindowState.Minimized) { return; } if ((MouseInWindow || lastEachDeviceStates.Any(s => s != null && s.Buttons.HasAnyButtonPressed)) && host.Window.Focused) { osuTK.Input.Mouse.GetStates(newRawStates); while (lastEachDeviceStates.Count < newRawStates.Count) { lastEachDeviceStates.Add(null); } for (int i = 0; i < newRawStates.Count; i++) { if (newRawStates[i].IsConnected != true) { lastEachDeviceStates[i] = null; continue; } var rawState = newRawStates[i]; var lastState = lastEachDeviceStates[i]; if (lastState != null && rawState.Equals(lastState.RawState)) { continue; } var newState = new OsuTKPollMouseState(rawState, host.IsActive.Value, getUpdatedPosition(rawState, lastState)); HandleState(newState, lastState, rawState.Flags.HasFlag(MouseStateFlags.MoveAbsolute)); lastEachDeviceStates[i] = newState; lastUnfocusedState = null; } } else { var state = osuTK.Input.Mouse.GetCursorState(); var screenPoint = host.Window.PointToClient(new Point(state.X, state.Y)); var newState = new UnfocusedMouseState(new MouseState(), host.IsActive.Value, new Vector2(screenPoint.X, screenPoint.Y)); HandleState(newState, lastUnfocusedState, true); lastUnfocusedState = newState; lastEachDeviceStates.Clear(); } }, 0, 0)); } else { scheduled?.Cancel(); lastEachDeviceStates.Clear(); lastUnfocusedState = null; } }, true); return(true); }
private void OnEnable() { Enabled?.Invoke(); }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (LastModifiedTimestampMs != 0L) { hash ^= LastModifiedTimestampMs.GetHashCode(); } if (Latitude != 0D) { hash ^= Latitude.GetHashCode(); } if (Longitude != 0D) { hash ^= Longitude.GetHashCode(); } if (Enabled != false) { hash ^= Enabled.GetHashCode(); } if (Type != global::POGOProtos.Map.Fort.FortType.Gym) { hash ^= Type.GetHashCode(); } if (OwnedByTeam != global::POGOProtos.Enums.TeamColor.Neutral) { hash ^= OwnedByTeam.GetHashCode(); } if (GuardPokemonId != global::POGOProtos.Enums.PokemonId.Missingno) { hash ^= GuardPokemonId.GetHashCode(); } if (GuardPokemonCp != 0) { hash ^= GuardPokemonCp.GetHashCode(); } if (GymPoints != 0L) { hash ^= GymPoints.GetHashCode(); } if (IsInBattle != false) { hash ^= IsInBattle.GetHashCode(); } hash ^= activeFortModifier_.GetHashCode(); if (lureInfo_ != null) { hash ^= LureInfo.GetHashCode(); } if (CooldownCompleteTimestampMs != 0L) { hash ^= CooldownCompleteTimestampMs.GetHashCode(); } if (Sponsor != global::POGOProtos.Map.Fort.FortSponsor.UnsetSponsor) { hash ^= Sponsor.GetHashCode(); } if (RenderingType != global::POGOProtos.Map.Fort.FortRenderingType.Default) { hash ^= RenderingType.GetHashCode(); } return(hash); }
/////////////////////////////////////////////////////////////////////// /// <summary> /// Handles the notifications from the USB device manager of a new USB device. /// </summary> /// <param name="usbDevice">Reference the the USB device that has been attached.</param> public void OnEnabled(object sender, EventArgs e) { _isEnabled = true; // Check if anyone has registered for the event. Enabled?.Invoke(sender, e); }
protected internal override void WriteXML(XmlTextWriter writer) { writer.WriteAttributeString(Prefix + "Enabled", Enabled.ToString()); _ourSettingsControl.WriteXML(writer); }
public override int GetHashCode() { return(Enabled.GetHashCode() * 5 + Message.GetHashCode() * 13); }
public void StoreValues(Data data, string path) { data.SetValue(@"" + path + @"Enabled", Enabled.ToString()); data.SetValue(@"" + path + @"EnsureUniqueFilenames", EnsureUniqueFilenames.ToString()); data.SetValue(@"" + path + @"TargetDirectory", Data.EscapeString(TargetDirectory)); }
public bool Equals([AllowNull] TickFormatStop other) { if (other == null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return((Enabled == other.Enabled && Enabled != null && other.Enabled != null && Enabled.Equals(other.Enabled)) && (Equals(DTickRange, other.DTickRange) || DTickRange != null && other.DTickRange != null && DTickRange.SequenceEqual(other.DTickRange)) && (Value == other.Value && Value != null && other.Value != null && Value.Equals(other.Value)) && (Name == other.Name && Name != null && other.Name != null && Name.Equals(other.Name)) && (TemplateItemName == other.TemplateItemName && TemplateItemName != null && other.TemplateItemName != null && TemplateItemName.Equals(other.TemplateItemName))); }
private static void OnPreferencesGUI(string search) { scroll = EditorGUILayout.BeginScrollView(scroll, false, false); EditorGUILayout.Separator(); Enabled.DoGUI(); EditorGUILayout.Separator(); EditorGUILayout.HelpBox("Each item has a tooltip explaining what it does, keep the mouse over it to see.", MessageType.Info); EditorGUILayout.Separator(); using (Enabled.GetEnabledScope()) { using (new GUIIndent("Misc settings")) { using (new GUIIndent("Margins")) { RightMargin.DoGUISlider(-50, 50); using (new GUIEnabled(Reflected.HierarchyArea.Supported)) { LeftMargin.DoGUISlider(-50, 50); Indent.DoGUISlider(0, 35); } if (!Reflected.HierarchyArea.Supported) { EditorGUILayout.HelpBox("Custom Indent and Margins are not supported in this Unity version", MessageType.Warning); } } IconsSize.DoGUISlider(13, 23); TreeOpacity.DoGUISlider(0f, 1f); using (new GUIIndent()) { using (SelectOnTree.GetFadeScope(TreeOpacity.Value > 0.01f)) SelectOnTree.DoGUI(); using (TreeStemProportion.GetFadeScope(TreeOpacity.Value > 0.01f)) TreeStemProportion.DoGUISlider(0f, 1f); } Tooltips.DoGUI(); using (new GUIIndent()) using (RelevantTooltipsOnly.GetFadeScope(Tooltips)) RelevantTooltipsOnly.DoGUI(); if (EnhancedSelectionSupported) { EnhancedSelection.DoGUI(); } Trailing.DoGUI(); ChangeAllSelected.DoGUI(); NumericChildExpand.DoGUI(); using (new GUIEnabled(Reflected.IconWidthSupported)) DisableNativeIcon.DoGUI(); using (HideDefaultIcon.GetFadeScope(IsButtonEnabled(new Icons.GameObjectIcon()))) HideDefaultIcon.DoGUI(); using (OpenScriptsOfLogs.GetFadeScope(IsButtonEnabled(new Icons.Warnings()))) OpenScriptsOfLogs.DoGUI(); GUI.changed = false; using (AllowSelectingLockedObjects.GetFadeScope(IsButtonEnabled(new Icons.Lock()))) AllowSelectingLockedObjects.DoGUI(); #if !UNITY_2019_3_OR_NEWER using (new GUIEnabled(false)) #endif using (AllowPickingLockedObjects.GetFadeScope(IsButtonEnabled(new Icons.Lock()))) AllowPickingLockedObjects.DoGUI(); HoverTintColor.DoGUI(); } using (new GUIIndent("Row separators")) { LineSize.DoGUISlider(0, 6); using (LineColor.GetFadeScope(LineSize > 0)) LineColor.DoGUI(); OddRowColor.DoGUI(); EvenRowColor.DoGUI(); GUI.changed = false; var rect = EditorGUILayout.GetControlRect(false, rowColorsList.GetHeight()); rect.xMin += EditorGUI.indentLevel * 16f; rowColorsList.DoList(rect); var rectNamedColor = EditorGUILayout.GetControlRect(false, rowColorsNamedList.GetHeight()); rectNamedColor.xMin += EditorGUI.indentLevel * 16f; rowColorsNamedList.DoList(rectNamedColor); } GUI.changed = false; MiniLabels.Value[0] = EditorGUILayout.Popup("Mini Label Top", MiniLabels.Value[0], minilabelsNames); MiniLabels.Value[1] = EditorGUILayout.Popup("Mini Label Bottom", MiniLabels.Value[1], minilabelsNames); if (GUI.changed) { MiniLabels.ForceSave(); RecreateMiniLabelProviders(); } // MiniLabel.DoGUI(); using (new GUIIndent()) { using (SmallerMiniLabel.GetFadeScope(miniLabelProviders.Length > 0)) SmallerMiniLabel.DoGUI(); using (HideDefaultTag.GetFadeScope(MiniLabelTagEnabled)) HideDefaultTag.DoGUI(); using (HideDefaultLayer.GetFadeScope(MiniLabelLayerEnabled)) HideDefaultLayer.DoGUI(); using (CentralizeMiniLabelWhenPossible.GetFadeScope(miniLabelProviders.Length >= 2)) CentralizeMiniLabelWhenPossible.DoGUI(); } LeftSideButtonPref.DoGUI(); using (new GUIIndent()) using (LeftmostButton.GetFadeScope(LeftSideButton != IconBase.none)) LeftmostButton.DoGUI(); using (new GUIIndent("Children behaviour on change")) { using (LockAskMode.GetFadeScope(IsButtonEnabled(new Icons.Lock()))) LockAskMode.DoGUI(); using (LayerAskMode.GetFadeScope(IsButtonEnabled(new Icons.Layer()) || MiniLabelLayerEnabled)) LayerAskMode.DoGUI(); using (TagAskMode.GetFadeScope(IsButtonEnabled(new Icons.Tag()) || MiniLabelTagEnabled)) TagAskMode.DoGUI(); using (StaticAskMode.GetFadeScope(IsButtonEnabled(new Icons.Static()))) StaticAskMode.DoGUI(); using (IconAskMode.GetFadeScope(IsButtonEnabled(new Icons.GameObjectIcon()))) IconAskMode.DoGUI(); EditorGUILayout.HelpBox(string.Format("Pressing down {0} while clicking on a button will make it temporary have the opposite children change mode", Utility.CtrlKey), MessageType.Info); } leftIconsList.displayAdd = LeftIconsMenu.GetItemCount() > 0; leftIconsList.DoLayoutList(); rightIconsList.displayAdd = RightIconsMenu.GetItemCount() > 0; rightIconsList.DoLayoutList(); EditorGUILayout.HelpBox("Alt + Click on child expand toggle makes it expand all the grandchildren too", MessageType.Info); if (IsButtonEnabled(new Icons.Memory())) { EditorGUILayout.HelpBox("\"Memory Used\" may create garbage and consequently framerate stutterings, leave it disabled if maximum performance is important for your project", MessageType.Warning); } if (IsButtonEnabled(new Icons.Lock())) { EditorGUILayout.HelpBox("Remember to always unlock your game objects when removing or disabling this extension, as you won't be able to unlock without it and may lose scene data", MessageType.Warning); } GUI.enabled = true; EditorGUILayout.EndScrollView(); using (new EditorGUILayout.HorizontalScope()) { GUILayout.FlexibleSpace(); EditorGUILayout.LabelField(versionContent, GUILayout.Width(170f)); } using (new EditorGUILayout.HorizontalScope()) { if (GUILayout.Button(resetSettingsContent, GUILayout.Width(120f))) { onResetPreferences(); } // if (GUILayout.Button(unlockAllContent, GUILayout.Width(120f))) // Utility.UnlockAllObjects(); if (GUILayout.Button(mailDeveloperContent, GUILayout.Width(120f))) { OpenSupportEmail(); } } EditorGUILayout.Separator(); Styles.ReloadTooltips(); EditorApplication.RepaintHierarchyWindow(); } }
public override void SaveSettings() { ConfigurationManager.Logger.ProviderSettings[Properties.Settings.Default.KeyAlphaSqlLogProviderIsEnabled].Value = Enabled.ToString(); ConfigurationManager.SaveSettings(); }
protected internal override void WriteXML(XmlTextWriter Writer) { Writer.WriteAttributeString(PluginName + "Enabled", Enabled.ToString()); OurSettingsControl.WriteXML(Writer); }
public bool Equals(ContentTypeProperty input) { if (input == null) { return(false); } return (( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( RootPropertyName == input.RootPropertyName || (RootPropertyName != null && RootPropertyName.Equals(input.RootPropertyName)) ) && ( ReadableName == input.ReadableName || (ReadableName != null && ReadableName.Equals(input.ReadableName)) ) && ( Value == input.Value || (Value != null && Value.Equals(input.Value)) ) && ( PropertyDescription == input.PropertyDescription || (PropertyDescription != null && PropertyDescription.Equals(input.PropertyDescription)) ) && ( Localizable == input.Localizable || (Localizable != null && Localizable.Equals(input.Localizable)) ) && ( Fallback == input.Fallback || (Fallback != null && Fallback.Equals(input.Fallback)) ) && ( Enabled == input.Enabled || (Enabled != null && Enabled.Equals(input.Enabled)) ) && ( Order == input.Order || (Order.Equals(input.Order)) ) && ( Visible == input.Visible || (Visible != null && Visible.Equals(input.Visible)) ) && ( IsTitle == input.IsTitle || (IsTitle != null && IsTitle.Equals(input.IsTitle)) ) && ( Required == input.Required || (Required != null && Required.Equals(input.Required)) ) && ( MaxLength == input.MaxLength || (MaxLength.Equals(input.MaxLength)) ) && ( MaxByteLength == input.MaxByteLength || (MaxByteLength.Equals(input.MaxByteLength)) ) && ( MaxFileSize == input.MaxFileSize || (MaxFileSize.Equals(input.MaxFileSize)) ) && ( Regexp == input.Regexp || (Regexp != null && Regexp.Equals(input.Regexp)) ) && ( ValidateAs == input.ValidateAs || (ValidateAs != null && ValidateAs.Equals(input.ValidateAs)) ) && ( RssAttribute == input.RssAttribute || (RssAttribute != null && RssAttribute.Equals(input.RssAttribute)) ) && ( VisibleDependency == input.VisibleDependency || (VisibleDependency != null && VisibleDependency.Equals(input.VisibleDependency)) ) && ( VisibleOn == input.VisibleOn || (VisibleOn != null && VisibleOn.Equals(input.VisibleOn)) ) && ( Datatype == input.Datatype || (Datatype != null && Datatype.Equals(input.Datatype)) ) && ( Attributes == input.Attributes || (Attributes != null && Attributes.SequenceEqual(input.Attributes)) ) && ( ChildProperties == input.ChildProperties || (ChildProperties != null && ChildProperties.SequenceEqual(input.ChildProperties)) ) && ( ContentTypeAllowed == input.ContentTypeAllowed || (ContentTypeAllowed != null && ContentTypeAllowed.Equals(input.ContentTypeAllowed)) ) && ( BindToProperty == input.BindToProperty || (BindToProperty != null && BindToProperty.Equals(input.BindToProperty)) ) && ( BoundRegex == input.BoundRegex || (BoundRegex != null && BoundRegex.Equals(input.BoundRegex)) ) && ( RepresentationSelection == input.RepresentationSelection || (RepresentationSelection != null && RepresentationSelection.SequenceEqual(input.RepresentationSelection)) ) && ( DefaultValues == input.DefaultValues || (DefaultValues != null && DefaultValues.SequenceEqual(input.DefaultValues)) ) && ( IsExternalAllowed == input.IsExternalAllowed || (IsExternalAllowed != null && IsExternalAllowed.Equals(input.IsExternalAllowed)) ) && ( PropertySection == input.PropertySection || (PropertySection != null && PropertySection.Equals(input.PropertySection)) ) && ( Weight == input.Weight || (Weight.Equals(input.Weight)) ) && ( Entitytype == input.Entitytype || (Entitytype != null && Entitytype.Equals(input.Entitytype)) ) && ( IsCombo == input.IsCombo || (IsCombo != null && IsCombo.Equals(input.IsCombo)) ) && ( SuppressProperty == input.SuppressProperty || (SuppressProperty != null && SuppressProperty.Equals(input.SuppressProperty)) ) && ( LegalContentTypes == input.LegalContentTypes || (LegalContentTypes != null && LegalContentTypes.SequenceEqual(input.LegalContentTypes)) ) && ( RepresentationValidationString == input.RepresentationValidationString || (RepresentationValidationString != null && RepresentationValidationString.Equals(input.RepresentationValidationString)) ) && ( MinWidth == input.MinWidth || (MinWidth.Equals(input.MinWidth)) ) && ( MaxWidth == input.MaxWidth || (MaxWidth.Equals(input.MaxWidth)) ) && ( MinHeight == input.MinHeight || (MinHeight.Equals(input.MinHeight)) ) && ( MaxHeight == input.MaxHeight || (MaxHeight.Equals(input.MaxHeight)) ) && ( IsVideo == input.IsVideo || (IsVideo != null && IsVideo.Equals(input.IsVideo)) ) && ( IsImage == input.IsImage || (IsImage != null && IsImage.Equals(input.IsImage)) )); }