private DrawingVisual CreateNodeVisual(VisibilityType visibility, bool IsHighlighted, bool IsPathHighlighted, bool IsSelected, bool UsedInConstruction) { var visual = new DrawingVisual(); using (var context = visual.RenderOpen()) { // Draw the actual circle var size = this.GetSize(IsHighlighted, IsPathHighlighted, IsSelected, UsedInConstruction); switch (visibility) { case VisibilityType.Important: context.DrawEllipse( this.GetFillBrush(IsSelected, UsedInConstruction), this.GetStrokePen(IsHighlighted, IsPathHighlighted, IsSelected, UsedInConstruction), new Point(0, 0), size.Width / 2, size.Height / 2); break; case VisibilityType.ShowWhenNecessary: if ((IsPathHighlighted) || (IsSelected) || (IsHighlighted) || (UsedInConstruction)) { context.DrawEllipse( this.GetFillBrush(IsSelected, UsedInConstruction), this.GetStrokePen(IsHighlighted, IsPathHighlighted, IsSelected, UsedInConstruction), new Point(0, 0), size.Width / 2, size.Height / 2); } break; } } return visual; }
/// <summary> /// Initializes a new instance of the Metadata attribute using the information supplied /// </summary> /// <param name="friendlyName">Name of the item as it will be shown in the Logic App designer. /// For actions, this controls how the operation id is generated (pascal-cased form of the name supplied)</param> /// <param name="description">Brief description of the item to display in the Swagger UI</param> /// <param name="visibility">Visibility of the item in the Logic App designer. Default is visible, Advanced requires the user to click a button to reveal, and Internal hides the item.</param> public MetadataAttribute(string friendlyName = null, string description = null, VisibilityType visibility = VisibilityType.Default) { FriendlyName = friendlyName; Description = description; Visibility = visibility; }
public static void SetVisibility(this Operation operation, VisibilityType visibility) { if (visibility == VisibilityType.Default) return; operation.EnsureVendorExtensions(); if (!operation.vendorExtensions.ContainsKey(Constants.X_MS_VISIBILITY)) operation.vendorExtensions.Add(Constants.X_MS_VISIBILITY, visibility.ToString().ToLowerInvariant()); }
public static void SetVisibility(this Parameter parameter, VisibilityType visibility) { if (visibility == VisibilityType.Default) return; parameter.EnsureVendorExtensions(); if (!parameter.vendorExtensions.ContainsKey(Constants.X_MS_VISIBILITY)) { parameter.vendorExtensions.Add(Constants.X_MS_VISIBILITY, visibility.ToString().ToLowerInvariant()); } }
/// <summary> /// The constructor for the record. /// </summary> /// <param name="biff">The GenericBiff record that should contain the correct type and data for the BOUNDSHEET record.</param> /// <exception cref="InvalidRecordIdException"> /// An InvalidRecordIdException is thrown if biff contains an invalid type or invalid data. /// </exception> public BoundSheetRecord(GenericBiff biff) { if (biff.Id == (ushort)RecordType.Boundsheet) { BinaryReader reader = new BinaryReader(biff.GetDataStream()); _bofPos = reader.ReadUInt32(); _visibility = (VisibilityType)reader.ReadByte(); _type = (SheetType)reader.ReadByte(); byte len = reader.ReadByte(); _name = Reader.ReadPossibleCompressedString(reader, len); } else throw new InvalidRecordIdException(biff.Id, RecordType.Boundsheet); }
public DrawingVisual GetVisual(VisibilityType visibility, bool IsHighlighted, bool IsPathHighlighted, bool IsSelected, bool UsedInConstruction) { /* DrawingVisual visual; var key = Tuple.Create(visibility, IsHighlighted, IsPathHighlighted, IsSelected, UsedInConstruction); if (this.visuals.TryGetValue(key, out visual)) { return visual; } this.visuals[key] = this.CreateNodeVisual(visibility, IsHighlighted, IsPathHighlighted, IsSelected, UsedInConstruction); return this.visuals[key]; * */ return this.CreateNodeVisual(visibility, IsHighlighted, IsPathHighlighted, IsSelected, UsedInConstruction); }
public static void SetVisibility(this Schema modelDescription, VisibilityType visibility) { if (visibility == VisibilityType.Default) { return; } modelDescription.EnsureVendorExtensions(); if (!modelDescription.vendorExtensions.ContainsKey(Constants.X_MS_VISIBILITY)) { modelDescription.vendorExtensions .Add(Constants.X_MS_VISIBILITY, visibility.ToString().ToLowerInvariant()); } }
VerbType determineVerbType(Verb verb) { switch (verb) { case AppendToArray _: return(VerbType.Comma); case End _: return(VerbType.End); case Assign _: return(VerbType.EqualSign); case When _: return(VerbType.Query); case Push push when stage == ParsingStage.Variable: value = push.Value; switch (value) { case Variable variable: variableName = variable.Name; return(VerbType.Variable); case Block pushBlock: if (block.Count == 1 && block[0] is Push blockPush && blockPush.Value is Variable pushVariable) { variableName = pushVariable.Name; lazy = true; return(VerbType.Variable); } block = pushBlock; return(VerbType.Block); default: return(VerbType.Push); } case ParameterModifiers modifiers when stage == ParsingStage.Variable: visibility = modifiers.VisibilityType; readOnly = modifiers.ReadOnly; return(VerbType.Modifiers); } return(VerbType.Verb); }
private void DrawHelperZ(Graphics imageGraphics, functionType function) { Point2D prevPoint, leftPoint = new Point2D(EMPTY_VALUE, EMPTY_VALUE), rightPoint = new Point2D(EMPTY_VALUE, EMPTY_VALUE); for (double currentZ = zMax; currentZ >= zMin; currentZ -= zStep) { double y; y = function(xMin, currentZ); prevPoint = TransformView(xMin, y, currentZ).ToPoint2D(); ProcessEdge(prevPoint, ref leftPoint); if (!(CheckPoint(prevPoint) && CheckPoint(leftPoint))) { continue; } VisibilityType prevVisibility = CheckVisibility(prevPoint); Point2D currentPoint = new Point2D(); for (double currentX = xMin; currentX <= xMax; currentX += xStep) { y = function(currentX, currentZ); currentPoint = TransformView(currentX, y, currentZ).ToPoint2D(); if (!CheckPoint(currentPoint)) { continue; } VisibilityType currentVisibility = CheckVisibility(currentPoint); if (currentVisibility == prevVisibility) { if (currentVisibility == VisibilityType.VisibleAndLower || currentVisibility == VisibilityType.VisibleAndUpper) { DrawLine(prevPoint, currentPoint); Smooth(prevPoint, currentPoint); } } else { ProcessHorizonIntersectingLine(currentVisibility, prevVisibility, prevPoint, currentPoint); } prevVisibility = currentVisibility; prevPoint = currentPoint; } ProcessEdge(currentPoint, ref rightPoint); } }
/// <summary> /// The constructor for the record. /// </summary> /// <param name="biff">The GenericBiff record that should contain the correct type and data for the BOUNDSHEET record.</param> /// <exception cref="InvalidRecordIdException"> /// An InvalidRecordIdException is thrown if biff contains an invalid type or invalid data. /// </exception> public BoundSheetRecord(GenericBiff biff) { if (biff.Id == (ushort)RecordType.Boundsheet) { BinaryReader reader = new BinaryReader(biff.GetDataStream()); _bofPos = reader.ReadUInt32(); _visibility = (VisibilityType)reader.ReadByte(); _type = (SheetType)reader.ReadByte(); byte len = reader.ReadByte(); _name = Reader.ReadPossibleCompressedString(reader, len); } else { throw new InvalidRecordIdException(biff.Id, RecordType.Boundsheet); } }
/// <summary> /// Returns a list of slides based on filters. /// </summary> /// <param name="playmode">Play Mode filter.</param> /// <param name="visibility">Visibility filter.</param> /// <returns>A list of filtered slides.</returns> public List <PresentationSlide> GetSlides(PlayModeType playmode, VisibilityType visibility) { if (playmode == PlayModeType.All && visibility == VisibilityType.All) { return(Slides); } var list = new List <PresentationSlide>(slides.Count); foreach (var slide in Slides) { if (slide.StartInPlayMode) { if ((playmode & PlayModeType.PlayMode) == 0) { continue; } } else { if ((playmode & PlayModeType.NonPlayMode) == 0) { continue; } } if (slide.Visible) { if ((visibility & VisibilityType.Visible) == 0) { continue; } } else { if ((visibility & VisibilityType.Hidden) == 0) { continue; } } list.Add(slide); } return(list); }
public ParameterValue(string name, Block block, VisibilityType visibility, bool lazy) { Name = name; Value = evaluateBlock(block, lazy); Bound = BoundValue.Unbind(Value, out var boundName, out var innerValue); if (Bound) { BoundName = boundName; Value = innerValue; } else { BoundName = ""; } Visibility = visibility; DefaultValue = PushValue(""); }
public ParameterValue(string name, Value value, VisibilityType visibility) { Name = name; Value = value.ArgumentValue(); Bound = BoundValue.Unbind(Value, out var boundName, out var innerValue); if (Bound) { BoundName = boundName; Value = innerValue; } else { BoundName = ""; } Visibility = visibility; DefaultValue = PushValue(""); }
public void Initialize(Health health) { this.health = health; RefreshBar(0, health.MaxHealth, health.CurrentHealth); follower.Target = health.transform; follower.Offset = new Vector2(0, 24f); follower.RefreshPosition(); VisibilityType visibility = Locator.Get <MapManager>().Map[health.Entity.CellTransform.Position].Visibility; if (visibility != VisibilityType.Visible) { canvasGroup.alpha = 0f; } SubscribeListeners(); }
/// <summary> /// Egy cella létrehozása véletlenszerű földdel. /// </summary> public Cell(int variantRandomNum) { MapObjects = new List <MapObject>(); switch (variantRandomNum) { case 0: Ground = GroundTexture.Grass1; break; case 1: Ground = GroundTexture.Grass2; break; case 2: Ground = GroundTexture.Grass3; break; case 3: Ground = GroundTexture.Grass4; break; case 4: Ground = GroundTexture.Grass5; break; default: Ground = GroundTexture.Grass1; break; } Visibility = VisibilityType.Unexplored; }
protected override void setValue(string name, Value value, VisibilityType visibility, bool overriding, bool allowNil, int index) { base.setValue(name, value, visibility, overriding, allowNil, index); if (value is InvokableReference) { return; } var builder = new CodeBuilder(); builder.Parameter("$0"); builder.AssignToField(name, new Variable("$0"), index); var lambda = builder.Lambda(); var setterName = SetterName(name); var invokableName = InvokableName(setterName); State.SetInvokable(invokableName, lambda); base.setValue(setterName, new InvokableReference(invokableName), VisibilityType.Public, false, false, index); removeAbstracts(name); }
public bool HideControls() { if (!AutoHide) { return(false); } if (IsRealized) { GdkWindow.GetPointer(out var x, out var y, out var type); if (Allocation.Contains(x, y)) { //hide.Start (); return(true); } } //hide.Stop (); Visibility = VisibilityType.None; return(false); }
/** * Initializes the Guid and sets initial visibility. */ public void StartIdent() { if (init) { init = false; if (gameObject.networkView.viewID == NetworkViewID.unassigned) { gameObject.networkView.viewID = Network.AllocateViewID(); } //Debug.Log("MyGuid Before: " + MyGuid); if (MyGuid == null || "guid_string".Equals(MyGuid) || "".Equals(MyGuid)) { MyGuid = gameObject.networkView.viewID.ToString(); } //Debug.Log("MyGuid After: " + MyGuid); //Debug.Log(MyGuid + ""); GuidList.AddObject(MyGuid, this.gameObject); Visibility = VisibilityType.Normal; World.AddUnitToWorld(gameObject); startTime = Time.time; timeNow = Time.time; } }
public void RefreshVisibility(bool visible) { VisibilityType newVisibility = visibility; if (visible == true) { newVisibility = VisibilityType.Visible; } else { if (visibility == VisibilityType.Visible) { newVisibility = VisibilityType.PreviouslySeen; } } if (newVisibility != visibility) { VisibilityType previousVisibility = visibility; visibility = newVisibility; Events.TriggerEvent(new CellVisibilityEventData(this, previousVisibility, visibility)); } }
private void ProcessHorizonIntersectingLine(VisibilityType currentVisibility, VisibilityType prevVisibility, Point2D prevPoint, Point2D currentPoint) { Point2D currentIntersection; if (currentVisibility == VisibilityType.Invisible) { if (prevVisibility == VisibilityType.VisibleAndUpper) { currentIntersection = GetCurvesIntersection(prevPoint, currentPoint, upperHorizon); } else { currentIntersection = GetCurvesIntersection(prevPoint, currentPoint, lowerHorizon); } DrawLine(prevPoint, currentIntersection); Smooth(prevPoint, currentIntersection); } else { bool Flag = (currentVisibility == VisibilityType.VisibleAndUpper); currentIntersection = ProcessVisibleNowLine(prevVisibility, currentPoint, prevPoint, Flag); } }
public Define(string variableName, VisibilityType visibility, bool readOnly = false) { this.variableName = variableName; this.visibility = visibility; this.readOnly = readOnly; }
/** * Sets the visibility of this object * * @param visibility * The new visibility of the obejct */ public void SetVisibility(VisibilityType visibility) { this.Visibility = visibility; }
public AddInCommandBase(string name, string buttonText, string toolTip, int bitmapNumber, VisibilityType commandType) { Init(name, buttonText, toolTip, bitmapNumber, commandType); }
public static Guid?GetPageVisibilityTypeId(VisibilityType type) { return(PageVisibilityTypes.Any(item => item.Key == type) ? PageVisibilityTypes.First(item => item.Key == type).Value : default(Guid?)); }
public void Init(string name, string buttonText, string toolTip, int bitmapNumber, VisibilityType commandType) { m_name = name; m_buttonText = buttonText; m_toolTip = toolTip; m_bitmapNumber = bitmapNumber; m_visibilityType = commandType; m_fullName = "AndroMDA.VS80AddIn.Connect." + name; }
protected override bool OnMotionNotifyEvent(Gdk.EventMotion args) { Visibility = VisibilityType.Full; base.OnMotionNotifyEvent(args); return(false); }
public static UserFileItem UpdateUserFile(this IFormFile uploadedFile, UserFileItem userFile, VehicleDbContext dbContext, VisibilityType visibility, string name = null, long?townId = null, long?groupId = null) { if (uploadedFile != null) { if (userFile != null) { if (userFile?.Status == StatusType.OK) { userFile.DeleteFromServer(); userFile.Status = StatusType.Deleted; dbContext.Entry(userFile).State = EntityState.Modified; } } userFile = uploadedFile.ToUserFile(name); userFile.GroupId = groupId; userFile.TownId = townId; userFile.Visibility = visibility; dbContext.Files.Add(userFile); } return(userFile); }
public LauncherAttribute(VisibilityType visibilityType) { VisibilityType = visibilityType; }
public CellVisibilityEventData(Cell cell, VisibilityType previousVisibility, VisibilityType currentVisibility) { Cell = cell; PreviousVisibility = previousVisibility; CurrentVisibility = currentVisibility; }
public override void CreateVariable(string variableName, bool global = false, VisibilityType visibility = VisibilityType.Public, bool _override = false) { variables[variableName] = new Nil(); visibilityTypes[variableName] = visibility; }
public Define() { variableName = ""; visibility = VisibilityType.Public; readOnly = false; }
public Styler Visibility(VisibilityType visibility) { this.visibility = visibility; return(this); }
protected override bool OnMotionNotifyEvent (Gdk.EventMotion args) { this.Visibility = VisibilityType.Full; base.OnMotionNotifyEvent (args); return false; }
public void Dismiss () { Visibility = VisibilityType.None; dismiss.Start (); }
public void Dismiss() { Visibility = VisibilityType.None; //dismiss.Start (); }
/// <summary> /// /// Overrides the default visibility rules about how player perceives the target object /// If player is OBJECT_INVALID, the global visibility override will be set /// /// Player == VALID -> override: /// NWNX_VISIBILITY_DEFAULT = Remove the player override /// NWNX_VISIBILITY_VISIBLE = Target is always visible for player /// NWNX_VISIBILITY_HIDDEN = Target is always hidden for player /// /// Player == OBJECT_INVALID -> override: /// NWNX_VISIBILITY_DEFAULT = Remove the global override /// NWNX_VISIBILITY_VISIBLE = Target is globally visible /// NWNX_VISIBILITY_HIDDEN = Target is globally hidden /// NWNX_VISIBILITY_DM_ONLY = Target is only visible to DMs /// /// Note: /// Player state overrides the global state which means if a global state is set /// to NWNX_VISIBILITY_HIDDEN or NWNX_VISIBILITY_DM_ONLY but the player's state is /// set to NWNX_VISIBILITY_VISIBLE for the target, the object will be visible to the player /// </summary> /// <param name="player"></param> /// <param name="target"></param> /// <param name="override"></param> public static void SetVisibilityOverride(NWGameObject player, NWGameObject target, VisibilityType @override) { string sFunc = "SetVisibilityOverride"; NWNXCore.NWNX_PushArgumentInt(NWNX_Visibility, sFunc, (int)@override); NWNXCore.NWNX_PushArgumentObject(NWNX_Visibility, sFunc, target); NWNXCore.NWNX_PushArgumentObject(NWNX_Visibility, sFunc, player); NWNXCore.NWNX_CallFunction(NWNX_Visibility, sFunc); }
public Visibility(VisibilityType type, string value) { Type = type; Value = value; }
public bool GetList(int id, int currentPage, int pageSize, string sortColumn, OrderType orderType, VisibilityType visibilityType, bool ignoreFilter, bool ignoreSort, out IEnumerable <WorklistAsset> assets, out int normalCount, out int hiddenCount, out int deletedCount) { AssetPagedRequest assetPagedRequest = new AssetPagedRequest() { assetId = id, currentPage = currentPage, pageSize = pageSize, sortColumn = sortColumn, orderType = orderType, visibilityType = visibilityType, ignoreFilter = ignoreFilter, ignoreSort = ignoreSort }; AssetPagedRequest assetPagedRequest1 = assetPagedRequest; string str = this._api.SendRequest("POST", "/Asset/Paged", JsonConvert.SerializeObject(assetPagedRequest1)); AssetPagedResponse assetPagedResponse = JsonConvert.DeserializeObject <AssetPagedResponse>(str); assets = assetPagedResponse.assets; normalCount = assetPagedResponse.normalCount; hiddenCount = assetPagedResponse.hiddenCount; deletedCount = assetPagedResponse.deletedCount; return(assetPagedResponse.IsSuccessful); }
public OperationInfo(VisibilityType visibility, string title, string function) { Visibility = visibility; Title = title; Func = function; }
//--------------------------------------
public override Verb CreateVerb(string[] tokens) { var whitespaces = tokens[1]; statementIndex = position + whitespaces.Length; var tokens2Length = tokens[2].Length; var visibilityName = tokens[2].Trim(); visibility = ParseVisibility(visibilityName); var tokens3Length = tokens[3].Length; @override = tokens3Length > 0; var tokens4Length = tokens[4].Length; var memoize = tokens4Length > 0; var tokens5Length = tokens[5].Length; var type = tokens[5].Trim(); var tokens6Length = tokens[6].Length; functionName = LongToMangledPrefix(type, tokens[6].Trim()); var parameterType = tokens[7]; var parametersType = parameterType switch { "(" => ParametersType.Standard, "[" => ParametersType.Pattern, _ => ParametersType.Message }; var xMethod = false; var isDef = true; lockedDown = false; var isInit = false; var isCoFunc = false; switch (type) { case "cofunc": isCoFunc = true; break; case "xfunc": xMethod = true; break; case "pure": lockedDown = true; break; case "init": isDef = false; isInit = true; break; } if (lockedDown) { type.Must().Not.Equal("set").OrThrow(VerboseName, () => "Setters not allowed in views"); } if (InClassDefinition) { xMethod.Must().Not.BeTrue().OrThrow(VerboseName, () => "xfunc not allowed inside class definitions"); } else { visibilityName.Must().BeEmpty() .OrThrow(VerboseName, () => $"Visibility specifier {visibility} not allowed allowed outside of class definition"); isDef.Must().BeTrue().OrThrow(VerboseName, () => $"{type} specifier not allowed outside of a class definition"); } Color(position, whitespaces.Length, Whitespaces); Color(tokens2Length, KeyWords); Color(tokens3Length, KeyWords); Color(tokens4Length, KeyWords); Color(tokens5Length, KeyWords); var invokable = parametersType == ParametersType.Standard || parametersType == ParametersType.Pattern; var entityType = invokable ? Invokeables : Messaging; Color(tokens6Length, entityType); Color(parameterType.Length, Structures); var index = NextPosition; var parametersParser = new ParametersParser(parametersType); if (parametersParser.Parse(source, index).If(out parameters, out index)) { if (source.Drop(index).Keep(1) == "(") { var curriedFunctionParser = new CurriedFunctionParser(functionName, parameters, visibility, @override); if (curriedFunctionParser.Scan(source, index)) { overridePosition = curriedFunctionParser.Position; return(curriedFunctionParser.Verb); } } } else { var builder = new StringBuilder(); var messageParameterParser = new MessageParameterParser(); var variableParser = new VariableParser(); var parameterList = new List <Parameter>(); if (variableParser.Scan(source, index)) { var variable = (Variable)variableParser.Value; var parameter = new Parameter(variable.Name); builder.Append(functionName); builder.Append("_"); parameterList.Add(parameter); index = variableParser.Position; } else { return(null); } while (messageParameterParser.Scan(source, index)) { var parameter = new Parameter(messageParameterParser.ParameterName); parameterList.Add(parameter); builder.Append(messageParameterParser.MessageName); builder.Append("_"); index = messageParameterParser.Result.Position; } functionName = builder.ToString(); parameters = new Parameters(parameterList); } parameters.Must().Not.BeNull().OrThrow(VerboseName, () => "Parameters malformed"); var currying = parametersParser.Currying; functionBodyParser.ExtractCondition = parametersType == ParametersType.Pattern; if (functionBodyParser.Parse(source, index).If(out var block, out var i)) { index = i; var condition = functionBodyParser.Condition; var where = functionBodyParser.Where; Verb verb; if (isInit) { verb = createInitializer(index, block); result.Value = lambda; singleLine = !functionBodyParser.MultiCapable; return(verb); } if (isCoFunc) { overridePosition = index; var builder = new CofunctionBuilder(functionName, parameters, block); return(builder.Generate()); } verb = createFunction(index, currying, condition, memoize, lockedDown, block); lambda.XMethod = xMethod; lambda.Expand = type == "rec"; result.Value = lambda; singleLine = !functionBodyParser.MultiCapable; if (lambda.Where == null) { lambda.Where = where; } return(verb); } return(null); }
public bool HideControls () { int x, y; Gdk.ModifierType type; if (!auto_hide) return false; if (IsRealized) { GdkWindow.GetPointer (out x, out y, out type); if (Allocation.Contains (x, y)) { hide.Start (); return true; } } hide.Stop (); Visibility = VisibilityType.None; return false; }