FormattedText secondSign; //only used by certain decorations #endregion Fields #region Constructors public DecorationDrawing(EquationContainer parent, DecorationType decorationType) : base(parent) { this.decorationType = decorationType; IsStatic = true; CreateDecorations(); DetermineHeight(); }
public Decoration(DecorationType type, int X, int Y) { this.type = type; this.X = X; this.Y = Y; Width = 32; Height = 32; rand = new Random(); timer = new Timer(); timer.Enabled = true; timer.Interval = rand.Next(10, 30); timer.Tick += new EventHandler(Loop); switch(type) { case DecorationType.Blue_Fish: image = Image.FromFile(Path.Combine(Environment.CurrentDirectory, "Decoration/BlueFish1.png")); image2 = Image.FromFile(Path.Combine(Environment.CurrentDirectory, "Decoration/BlueFish2.png")); break; case DecorationType.FireBall: image = Image.FromFile(Path.Combine(Environment.CurrentDirectory, "Decoration/Fireball.png")); YCounter = -70; break; case DecorationType.Ghost: image = Image.FromFile(Path.Combine(Environment.CurrentDirectory, "Decoration/GhostL.png")); image2 = Image.FromFile(Path.Combine(Environment.CurrentDirectory, "Decoration/GhostR.png")); break; case DecorationType.Mole: image = Image.FromFile(Path.Combine(Environment.CurrentDirectory, "Decoration/Mole.png")); break; case DecorationType.Piranha: image = Image.FromFile(Path.Combine(Environment.CurrentDirectory, "Decoration/Piranha1.png")); image2 = Image.FromFile(Path.Combine(Environment.CurrentDirectory, "Decoration/Piranha2.png")); break; case DecorationType.Red_Fish: image = Image.FromFile(Path.Combine(Environment.CurrentDirectory, "Decoration/RedFish1.png")); image2 = Image.FromFile(Path.Combine(Environment.CurrentDirectory, "Decoration/RedFish2.png")); break; case DecorationType.Star: image = Image.FromFile(Path.Combine(Environment.CurrentDirectory, "Decoration/Star.png")); break; } }
public DecorationControl(DecorationType type, Control decoratedControl) { this.DecorationType = type; this.DecoratedControl = decoratedControl; decoratedControl.VisibleChanged += new EventHandler(this.control_VisibleChanged); decoratedControl.ParentChanged += new EventHandler(this.control_VisibleChanged); decoratedControl.LocationChanged += new EventHandler(this.control_VisibleChanged); decoratedControl.Paint += new PaintEventHandler(this.decoratedControl_Paint); base.SetStyle(ControlStyles.Selectable, false); base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true); this.InitPadding(); this.tm = new System.Windows.Forms.Timer(); this.tm.Interval = 100; this.tm.Tick += new EventHandler(this.tm_Tick); this.tm.Enabled = true; }
public void SetDecoration(Control control, DecorationType decoration) { var wrapper = DecorationByControls.ContainsKey(control) ? DecorationByControls[control] : null; if (decoration == DecorationType.None) { if (wrapper != null) { wrapper.Dispose(); } DecorationByControls.Remove(control); } else { if (wrapper == null) { wrapper = new DecorationControl(decoration, control); } wrapper.DecorationType = decoration; DecorationByControls[control] = wrapper; } }
public void SetDecoration(Control control, DecorationType decoration) { DecorationControl control2 = this.DecorationByControls.ContainsKey(control) ? this.DecorationByControls[control] : null; if (decoration == DecorationType.None) { if (control2 != null) { control2.Dispose(); } this.DecorationByControls.Remove(control); } else { if (control2 == null) { control2 = new DecorationControl(decoration, control); } control2.DecorationType = decoration; this.DecorationByControls[control] = control2; } }
private static LineDecorationModel CreateDecorator(ItemInfo itemInfo, DecorationType decoratorElementType, DecorationPool <LineDecorationModel> displayData, IDecorationPresenter <LineDecorationModel> owner) { if (owner == null) { return(null); } var lineDecorator = displayData.GetRecycledElement(); if (lineDecorator == null) { lineDecorator = new LineDecorationModel(); lineDecorator.Container = owner.GenerateContainerForDecorator(); } lineDecorator.ItemInfo = itemInfo; owner.ApplyDecoratorProperties(lineDecorator, decoratorElementType); displayData.AddToDisplayedElements(lineDecorator); return(lineDecorator); }
public DecorationControl(DecorationType type, Control decoratedControl) { this.Font = CCWin.Localization.Localizer.DefaultFont; this.DecorationType = type; this.DecoratedControl = decoratedControl; decoratedControl.VisibleChanged += new EventHandler(control_VisibleChanged); decoratedControl.ParentChanged += new EventHandler(control_VisibleChanged); decoratedControl.LocationChanged += new EventHandler(control_VisibleChanged); decoratedControl.Paint += new PaintEventHandler(decoratedControl_Paint); SetStyle(ControlStyles.Selectable, false); SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint, true); //BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; InitPadding(); tm = new Timer(); tm.Interval = 100; tm.Tick += new EventHandler(tm_Tick); tm.Enabled = true; }
public DecorationType[] GetStyles() { Console.WriteLine("Wybierz kolejność dekoracji do zastosowania: [r]amka, [m]argines, [p]odkreślenie, [n]awiasy, [b]rak"); var userStylesSequence = Console.ReadLine(); int userStylesSequenceLength = userStylesSequence.Length; DecorationType[] tableStylesSequence = new DecorationType[userStylesSequenceLength]; for (int i = 0; i < userStylesSequenceLength; i++) { switch (userStylesSequence.ElementAt(i)) { case 'r': tableStylesSequence[i] = DecorationType.Frame; break; case 'm': tableStylesSequence[i] = DecorationType.Margin; break; case 'p': tableStylesSequence[i] = DecorationType.Underline; break; case 'n': tableStylesSequence[i] = DecorationType.Bracket; break; default: tableStylesSequence[i] = DecorationType.Null; break; } } return(tableStylesSequence); }
internal void Load(DecorationType type) { CustomDecorationsData pack; switch (type) { case DecorationType.Grass: pack = AvailablePacks.Find(p => p.Name == Settings.SelectedGrassPack); break; case DecorationType.Fertile: pack = AvailablePacks.Find(p => p.Name == Settings.SelectedFertilePack); break; default: pack = AvailablePacks.Find(p => p.Name == Settings.SelectedCliffPack); break; } if (pack != null) { UnityMainThreadDispatcher.Instance().Enqueue(LoadResources(pack, type)); } }
internal void Load1(DecorationType type) { CustomDecorationsData pack; switch (type) { case DecorationType.Grass: pack = AvailablePacks.Find(p => p.Name == Settings.SelectedGrassPack); break; case DecorationType.Fertile: pack = AvailablePacks.Find(p => p.Name == Settings.SelectedFertilePack); break; default: pack = AvailablePacks.Find(p => p.Name == Settings.SelectedCliffPack); break; } if (pack != null) { LoadResources(pack, type); } }
public void SetRecentPurchaseData(DecorationType recentPurchaseType, int recentPurchaseId) { mostRecentPurchaseType = recentPurchaseType; mostRecentPurchaseId = recentPurchaseId; }
public void CreateDecoration(DecorationType dt, Vector3 positon, float scale, Vector3 rotation) { gameWorld.CreateDecoration(dt, positon, scale, rotation); }
void IDecorationPresenter <LineDecorationModel> .ApplyDecoratorProperties(LineDecorationModel lineDecorator, DecorationType decoratorElementType) { if (this.owner != null) { this.owner.ApplyLineDecoratorProperties(lineDecorator, decoratorElementType); } }
public DefinedDecorations() { None = new DecorationType(0, "", 0, 0); Shelf = new DecorationType(1, "decoration.shelf", 0, 1); Window = new DecorationType(2, "decoration.window", 0, 0); }
static Vector2 GetDecoratorVertex(DecorationType decorationType, Size size) { switch (decorationType) { default: case DecorationType.DownsideTriangle: return new Vector2(size.Width / 2.0f - DefaultTriangleSideLength / 2, (size.Height - (float)(DefaultTriangleSideLength / 2 * Math.Sqrt(3))) / 2); case DecorationType.Cross: return new Vector2(size.Width / 2.0f - DefaultCrossWidth / 2, DefaultCrossPaddingY); } }
private void GenerateColumnDecoratorForGroup(ItemInfo itemInfo, DecorationType decoratorElementType) { GenerateDecorator(itemInfo.Id, itemInfo, decoratorElementType, this.columnLinesElementsPool, this.displayedColumnDecorationsMap, this.decorationPresenter); }
public static void RegisterProperty(string propertyName, DecorationType type) { Function.Call(Hash.DECOR_REGISTER, propertyName, (int)type); }
private Texture2D DecorationTexture(DecorationType decorationType) { Texture2D output = new Texture2D(GraphicsDevice, BLOCK_SIZE.X, BLOCK_SIZE.Y); Color[] colorData = new Color[(int)(BLOCK_SIZE.X * BLOCK_SIZE.Y)]; for (int i = 0; i < colorData.Length; i++) { int x = i % BLOCK_SIZE.X; int y = i / BLOCK_SIZE.Y; switch (decorationType) { case DecorationType.None: colorData[i] = Color.Transparent; break; case DecorationType.Player: if (x - 1 >= BLOCK_SIZE.X / 5 && x + 1 < BLOCK_SIZE.X - (BLOCK_SIZE.X / 5) && y - 1 >= BLOCK_SIZE.Y / 5 && y + 1 < BLOCK_SIZE.Y - (BLOCK_SIZE.Y / 5)) { colorData[i] = Color.Black; } else { colorData[i] = Color.Transparent; } break; } } output.SetData<Color>(colorData); return output; }
public void CreateDecoration(DecorationType dT, Vector3 position) { gameWorld.CreateDecoration(dT, position); }
public static void RegisterProperty(string propertyName, DecorationType type) { DecorRegister(propertyName, (int)type); }
public static IDecoration GetDecoration(DecorationType type) { return(map[(byte)type]); }
void IDecorationPresenter <SelectionRegionModel> .ApplyDecoratorProperties(SelectionRegionModel decorator, DecorationType decoratorElementType) { if (this.owner != null) { this.owner.ApplyDecoratorProperties(decorator, decoratorElementType); } }
bool IDecorationPresenter <SelectionRegionModel> .HasDecorations(DecorationType decoratorElementType, ItemInfo itemInfo) { return(true); }
public DecorationAttribute(DecorationType decoration, float frequency, int r, int g, int b) { _decoration = decoration; _frequency = frequency; _color = new Color(r, g, b); }
public void PurchaseDecoration(int decorationDefinitionId, DecorationType type, int?count, IIglooCatalogPurchaseErrorHandler errorHandler) { PurchaseDecoration(new DecorationId(decorationDefinitionId, type), count, errorHandler); }
public DecorationId(int definitionId, DecorationType type, long?customId) { this.definitionId = definitionId; this.type = type; this.customId = customId; }
public QACreateDecorationOperation(int definitionId, DecorationType type, int count) { DefinitionId = definitionId; Count = count; Type = (int)type; }
public void DeleteDecoration(int decorationDefinitionId, DecorationType type) { DeleteDecoration(new DecorationId(decorationDefinitionId, type)); }
public DecorationId(int definitionId, DecorationType type) : this(definitionId, type, null) { }
public static DecorationLayoutData.DefinitionType ToDecorationLayoutDataDefinitionType(DecorationType layoutType) { switch (layoutType) { case DecorationType.Decoration: return(DecorationLayoutData.DefinitionType.Decoration); case DecorationType.Structure: return(DecorationLayoutData.DefinitionType.Structure); default: Log.LogErrorFormatted(typeof(IglooMediator), "Unknown decoration type {0}", layoutType); return(DecorationLayoutData.DefinitionType.Decoration); } }
public void SetDecoration(Control control, DecorationType decoration) { var wrapper = DecorationByControls.ContainsKey(control) ? DecorationByControls[control] : null; if (decoration == DecorationType.None) { if (wrapper!=null) wrapper.Dispose(); DecorationByControls.Remove(control); } else { if (wrapper == null) wrapper = new DecorationControl(decoration, control); wrapper.DecorationType = decoration; DecorationByControls[control] = wrapper; } }
public async Task AddTypeAsync(DecorationType decorationType) { await _typeRepository.CreateAsync(decorationType); }
internal abstract void ApplyLineDecoratorProperties(LineDecorationModel lineDecorator, DecorationType decoratorElementType);
public APICall <QACreateDecorationOperation> QaCreateDecoration(int definitionId, DecorationType type, int?count) { if (!count.HasValue) { count = 1; } QACreateDecorationOperation operation = new QACreateDecorationOperation(definitionId, type, count.Value); return(new APICall <QACreateDecorationOperation>(clubPenguinClient, operation)); }
private void Instil(ContentManager content, DecorationType itemType) => this.item = (Placeable) new DecorationFactory(content).GetDecoration(itemType, 0.0f, 0.0f, false, false, false, false);
internal abstract void ApplyDecoratorProperties(SelectionRegionModel decorator, DecorationType decoratorElementType);