void TemplateFadeOut() { // Set Gradient to Fade In White Gradient g = new Gradient(); GradientColorKey[] gck = new GradientColorKey[2]; gck[0].color = Color.white; gck[0].time = 0f; gck[1].color = Color.white; gck[1].time = 1f; GradientAlphaKey[] gak = new GradientAlphaKey[2]; gak[0].alpha = 1f; gak[0].time = 0f; gak[1].alpha = 0f; gak[1].time = 1f; g.SetKeys(gck, gak); colorOverLifeTime = g; sizeOverLifeTime = AnimationCurve.Constant(0f, 1f, 1f); mixMode = MixMode.Multiply; activationMode = ActivationMode.Manual; enableRaycastTarget = false; onFinishedEvent = new UnityEvent(); UnityEditor.Events.UnityEventTools.AddPersistentListener(onFinishedEvent, () => { gameObject.SetActive(false); }); }
private static void HandleActivationModeChanged(DependencyObject target, DependencyPropertyChangedEventArgs e) { var itemsControl = target as ItemsControl; // if trying to attach to something else than a ItemsControl, just ignore if (target == null) { return; } ActivationMode newActivation = (ActivationMode)e.NewValue; if ((newActivation & ActivationMode.Mouse) == ActivationMode.Mouse) { itemsControl.MouseDoubleClick += ItemsControlMouseDoubleClickHandler; } else { itemsControl.MouseDoubleClick -= ItemsControlMouseDoubleClickHandler; } if ((newActivation & ActivationMode.Keyboard) == ActivationMode.Keyboard) { itemsControl.KeyDown += ItemsControlKeyDownHandler; } else { itemsControl.KeyDown -= ItemsControlKeyDownHandler; } }
public PopUpConstArg( IUIManager uim, IUISystemProcessFactory processFactory, IUIElementFactory uiElementFactory, IPopUpAdaptor popUpAdaptor, IUIImage image, ActivationMode activationMode, IPopUpManager popUpManager, bool hidesOnTappingOthers, PopUpMode popUpMode ) : base( uim, processFactory, uiElementFactory, popUpAdaptor, image, activationMode ) { thisPopUpManager = popUpManager; thisHidesOnTappingOthers = hidesOnTappingOthers; thisPopUpMode = popUpMode; }
// ctor public ActionCommandCls(string dev, string inp, int nodeIx) { Input = inp; DevID = dev; ActivationMode = new ActivationMode(ActivationMode.Default); NodeIndex = nodeIx; }
// ctor public ActionCommandCls(ActionCommandCls other) { Input = other.Input; DevID = other.DevID; ActivationMode = new ActivationMode(other.ActivationMode); NodeIndex = other.NodeIndex; }
// ctor public ActionCommandCls(String dev, String inp) { Input = inp; DevID = dev; ActivationMode = new ActivationMode(ActivationMode.Default); NodeIndex = -1; }
public ConstArg( int initiallyCursoredElementIndex, int[] cursorSize, float startSearchSpeed, bool activatesCursoredElementsOnly, Vector2 relativeCursorPosition, ScrollerAxis scrollerAxis, Vector2 rubberBandLimitMultiplier, bool isEnabledInertia, float inertiaDecay, bool swipeToSnapNext, float newScrollSpeedThreshold, IUIElementGroupScrollerAdaptor adaptor, ActivationMode activationMode ) : base( scrollerAxis, relativeCursorPosition, rubberBandLimitMultiplier, isEnabledInertia, inertiaDecay, newScrollSpeedThreshold, adaptor, activationMode ) { thisCursorSize = cursorSize; thisInitiallyCursoredElementIndex = initiallyCursoredElementIndex; thisStartSearchSpeed = startSearchSpeed; thisSwipeToSnapNext = swipeToSnapNext; thisActivatesCursoredElementsOnly = activatesCursoredElementsOnly; }
public ConstArg( Vector2 relativeCursorLength, ScrollerAxis scrollerAxis, Vector2 rubberBandLimitMultiplier, Vector2 relativeCursorPosition, bool isEnabledInertia, float inertiaDecay, float newScrollSpeedThreshold, IGenericSingleElementScrollerAdaptor adaptor, ActivationMode activationMode ) : base( relativeCursorLength, scrollerAxis, relativeCursorPosition, rubberBandLimitMultiplier, isEnabledInertia, inertiaDecay, newScrollSpeedThreshold, adaptor, activationMode ) { }
/// <summary> /// Constructs the RootViewModel with the specified parameters. /// </summary> /// <param name="activationMode">How the app was launched.</param> /// <param name="openedFile">The file the app was opened to (or null).</param> /// <param name="passwordGenViewModel">The ViewModel for the password generation flyout.</param> /// <param name="helpViewModel">The ViewModel for the help flyout.</param> /// <param name="appSettingsViewModel">The ViewModel for the settings flyout.</param> /// <param name="clipboardViewModel">a ViewModel over a clipboard clear timer.</param> /// <param name="taskNotificationService">A service used to control the UI for blocking operations.</param> /// <param name="clipboardService">A service for accessing the clipboard.</param> /// <param name="settingsService">A service for accessing app settings.</param> /// <param name="idleTimer">A timer used for computing idle timer.</param> public RootViewModel( ActivationMode activationMode, ITestableFile openedFile, IPasswordGenViewModel passwordGenViewModel, IHelpViewModel helpViewModel, IAppSettingsViewModel appSettingsViewModel, IClipboardClearTimerViewModel clipboardViewModel, ITaskNotificationService taskNotificationService, ISensitiveClipboardService clipboardService, IAppSettingsService settingsService ) { ActivationMode = activationMode; CandidateFile = openedFile; PasswordGenViewModel = passwordGenViewModel ?? throw new ArgumentNullException(nameof(passwordGenViewModel)); HelpViewModel = helpViewModel ?? throw new ArgumentNullException(nameof(helpViewModel)); AppSettingsViewModel = appSettingsViewModel ?? throw new ArgumentNullException(nameof(appSettingsViewModel)); TaskNotificationService = taskNotificationService ?? throw new ArgumentNullException(nameof(taskNotificationService)); ClipboardClearViewModel = clipboardViewModel ?? throw new ArgumentNullException(nameof(clipboardViewModel)); this.clipboardService = clipboardService ?? throw new ArgumentNullException(nameof(clipboardService)); this.settingsService = settingsService; }
private async Task <Proxy <TRemote> > ActivateAsync <TRemote>(ActivationMode mode, object[] parameter, CancellationToken cancellation) where TRemote : class { int seqNum; Task <Proxy <TRemote> > result; Message message; do { seqNum = Interlocked.Increment(ref _nextSeqNum); message = new Message(); using (var stream = message.PushFrame().OpenStream()) using (var writer = new BinaryWriter(stream, Encoding.UTF8, leaveOpen: false)) { writer.Write((byte)MessageType.Activation); writer.Write(seqNum); Serialize(writer, new ActivationDescripor { Mode = mode, RemoteType = typeof(TRemote).AssemblyQualifiedName, Parameter = parameter }); } }while (!TryGetResultTask(seqNum, out result)); await SendAsync(message, cancellation); return(await result); }
public GenericSingleElementScrollerConstArg( Vector2 relativeCursorLength, ScrollerAxis scrollerAxis, Vector2 rubberBandLimitMultiplier, Vector2 relativeCursorPosition, bool isEnabledInertia, float newScrollSpeedThreshold, IUIManager uim, IUISystemProcessFactory processFactory, IUIElementFactory uieFactory, IGenericSingleElementScrollerAdaptor uia, IUIImage image, ActivationMode activationMode ) : base( scrollerAxis, relativeCursorPosition, rubberBandLimitMultiplier, isEnabledInertia, newScrollSpeedThreshold, uim, processFactory, uieFactory, uia, image, activationMode ) { thisRelativeCursorLength = relativeCursorLength; }
public ScrollerConstArg( ScrollerAxis scrollerAxis, Vector2 relativeCursorPosition, Vector2 rubberBandLimitMultiplier, bool isEnabledInertia, float newScrollSpeedThreshold, IUIManager uim, IUISystemProcessFactory processFactory, IUIElementFactory uieFactory, IScrollerAdaptor uia, IUIImage uiImage, ActivationMode activationMode ) : base( uim, processFactory, uieFactory, uia, uiImage, activationMode ) { thisScrollerAxis = scrollerAxis; thisRelativeCursorPos = relativeCursorPosition; thisRubberBandLimitMultiplier = rubberBandLimitMultiplier; thisIsEnabledInertia = isEnabledInertia; thisNewScrollSpeedThreshold = newScrollSpeedThreshold; }
public void ActivateManualy(ActivationMode mode) { if (item != null && enabled) { TSSItemBase.Activate(item, mode); } }
/// <summary> /// Define modo de activacao com valor indicado. /// </summary> /// <param name="activationMode">Nova definicao de modo de activacao.</param> /// <exception cref="DuplicateConfigurationException">Ocorre, se definicao for dupla, ou seja, se nao for 1a definicao.</exception> public void SetActivationMode(ActivationMode activationMode) { if (IsActivationModeDefined) { throw new DuplicateConfigurationException("Activação".ErrMsgAttemptedDoubleConfig(ActivationModeV.ToString(), activationMode.ToString())); } ActivationModeV = activationMode; }
// ctor public ActionCommandCls( ) { // init with something to debug if needed Input = "UNDEF"; DevID = "NA0"; ActivationMode = new ActivationMode(ActivationMode.Default); NodeIndex = -1; }
public ConstArg( IPopUpHideButtonAdaptor adaptor, ActivationMode activationMode ) : base( adaptor, activationMode ) { }
public ConstArg( IGameplayRootUIAdaptor adaptor, ActivationMode activationMode ) : base( adaptor, activationMode ) { }
public ConstArg( IUIAdaptor adaptor, ActivationMode activationMode ) : base( adaptor ) { thisActivationMode = activationMode; }
internal Proxy(ProxyHost proxyHost, int id, ActivationMode activationMode, object[] activationParameters) { _host = proxyHost; Id = id; ActivationMode = activationMode; ActivationParamers = activationParameters; _isActivated = false; _disposeHelper = new AsyncDisposeHelper(DisposeInternalAsync); }
public static void Activate(TSSItem item, ActivationMode mode) { item.loopActivated = false; if (mode == ActivationMode.disabled) { return; } activators[(int)mode - 1](item); }
/// <summary> /// Strange behavior of SC - needs a proper multitap to accept ActivationModes /// </summary> /// <param name="actMode"></param> /// <returns></returns> private string MutitapFudge(ActivationMode actMode) { if (actMode.IsDoubleTap) { return("multiTap = \"2\""); } else { return("multiTap = \"1\""); } }
public BubblePushField(Vector2 position, int width, int height, float strength, float upwardStrength, string direction, bool water, ActivationMode activationMode, string flag) { Position = position; Strength = strength; UpwardStrength = upwardStrength; _water = water; this.activationMode = activationMode; this.flag = flag; Rand = new Random(); Enum.TryParse(direction, out Direction); Collider = new Hitbox(width, height); }
public virtual IActivationDepth ActivationDepthFor(ClassMetadata classMetadata, ActivationMode mode) { if (mode.IsPrefetch()) { return new LegacyActivationDepth(1, mode); } var globalLegacyActivationDepth = ConfigImpl(classMetadata).ActivationDepth(); var config = classMetadata.ConfigOrAncestorConfig(); var defaultDepth = null == config ? globalLegacyActivationDepth : config.AdjustActivationDepth (globalLegacyActivationDepth); return new LegacyActivationDepth(defaultDepth, mode); }
public UIEActivationStateEngine( IUISystemProcessFactory processFactory, IUIElement uiElement, ActivationMode activationMode ) { thisProcessFactory = processFactory; thisUIElement = uiElement; thisActivationMode = activationMode; thisActivatingState = new UIEActivatingState(this); thisActivationCompletedState = new UIEActivationCompletedState(this); thisDeactivatingState = new UIEDeactivatingState(this); thisDeactivationCompletedState = new UIEDeactivationCompletedState(this); SetToDeactivationCompletedState(); }
private static ItemLoopModePattern ActivationModeToLoopPattern(ActivationMode activationMode) { switch (activationMode) { case ActivationMode.disabled: return(ItemLoopModePattern.None); case ActivationMode.close: return(ItemLoopModePattern.Yoyo); case ActivationMode.closeBranch: return(ItemLoopModePattern.YoyoBranch); case ActivationMode.closeImmediately: return(ItemLoopModePattern.Restart); case ActivationMode.closeBranchImmediately: return(ItemLoopModePattern.RestartBranch); default: return(ItemLoopModePattern.None); } }
/// <summary> /// Dump the action as partial XML nicely formatted /// </summary> /// <returns>the action as XML fragment</returns> public string toXML( ) { string r = ""; if (!string.IsNullOrEmpty(Input)) { // regular - apply XML formatting to internally blended items r += string.Format("input=\"{0}_{1}\" {2} ", DevID, DeviceCls.toXML(Input), DeviceCls.toXMLBlendExtension(Input)); // add multitap override if needed if (!ActivationMode.Equals(ActivationMode.Default)) { r += string.Format("ActivationMode=\"{0}\" {1} ", ActivationMode.Name, MutitapFudge(ActivationMode)); } } r += string.Format(" />\n"); return(r); }
public FullActivationDepth(ActivationMode mode) : base(mode) { }
public DescendingActivationDepth(IActivationDepthProvider provider, ActivationMode mode) : base(mode) { _provider = provider; }
public static void SetActivationMode(DependencyObject obj, ActivationMode value) { obj.SetValue(ActivationModeProperty, value); }
public NonDescendingActivationDepth(ActivationMode mode) : base(mode) { }
public FixedActivationDepth(int depth, ActivationMode mode) : base(mode) { _depth = depth; }
public virtual IActivationDepth ActivationDepth(int depth, ActivationMode mode) { return new LegacyActivationDepth(depth, mode); }
//static public object CheckingIfSingletonAndObtaining(this Dictionary<Type, TypeConfig> configs, List<object> singletons, // List<Type> types, Type type) //{ // types.Add(type); // if (configs.ContainsKey(type) && (configs[type].ActivationModeV == ActivationMode.Singleton)) // { // return singletons.Where(o => (o.GetType() == type)).FirstOrDefault(); // } // return null; //} static public object PrepareReturnAfterCheckingAndTreatingIfSingleton(this object result, ActivationMode mode, ref Dictionary<string, object> singletons, ref List<Type> types, ref Type type) // List<object> singletons { //if ((mode == ActivationMode.Singleton) && !singletons.Select(o => o.GetType()).Contains(result.GetType())) if ((mode == ActivationMode.Singleton) && !singletons.ContainsKey(type.FullName ?? "")) { //singletons.Add(result); singletons.Add(type.FullName ?? "", result); } types.Remove(type); return result; }
protected ActivationDepthImpl(ActivationMode mode) { _mode = mode; }