public virtual ImageInsightResponse GetImageInsights( string query = "", int height = 0, int width = 0, int count = 0, int offset = 0, string languageCode = "", AspectOptions aspect = AspectOptions.All, ColorOptions color = ColorOptions.All, FreshnessOptions freshness = FreshnessOptions.All, ImageContentOptions imageContent = ImageContentOptions.All, ImageTypeOptions imageType = ImageTypeOptions.All, LicenseOptions license = LicenseOptions.All, SizeOptions size = SizeOptions.All, SafeSearchOptions safeSearch = SafeSearchOptions.Off, List <ModulesRequestedOptions> modulesRequested = null, float cab = 0f, float cal = 0f, float car = 0f, float cat = 0f, int ct = 0, string cc = "", string id = "", string imgUrl = "", string insightsToken = "") { return(Task.Run(async() => await GetImageInsightsAsync(query, height, width, count, offset, languageCode, aspect, color, freshness, imageContent, imageType, license, size, safeSearch, modulesRequested, cab, cal, car, cat, ct, cc, id, imgUrl, insightsToken)).Result); }
public virtual async Task <ImageInsightResponse> GetImageInsightsAsync( string query = "", int height = 0, int width = 0, int count = 0, int offset = 0, string languageCode = "", AspectOptions aspect = AspectOptions.All, ColorOptions color = ColorOptions.All, FreshnessOptions freshness = FreshnessOptions.All, ImageContentOptions imageContent = ImageContentOptions.All, ImageTypeOptions imageType = ImageTypeOptions.All, LicenseOptions license = LicenseOptions.All, SizeOptions size = SizeOptions.All, SafeSearchOptions safeSearch = SafeSearchOptions.Off, List <ModulesRequestedOptions> modulesRequested = null, float cab = 0f, float cal = 0f, float car = 0f, float cat = 0f, int ct = 0, string cc = "", string id = "", string imgUrl = "", string insightsToken = "") { var url = GetImageInsightUrl(query, height, width, count, offset, languageCode, aspect, color, freshness, imageContent, imageType, license, size, safeSearch, modulesRequested, cab, cal, car, cat, ct, cc, id, imgUrl, insightsToken); var response = await RepositoryClient.SendPostMultiPartAsync(ApiKeys.BingSearch, url, "{}"); return(JsonConvert.DeserializeObject <ImageInsightResponse>(response)); }
public MyTextBox(Control control, Func <RectangleF> area, InputFormEnum inputForm, Func <string, IEnumerable <string> > autoCompleteSuggestions, Func <MyTextBox, IBorderDrawer> borderDrawer, int margin, Font font) { if (autoCompleteSuggestions != null) { m_dropDown = new ToolStripDropDown(); m_dropDown.Opened += (a, b) => { m_dropDownOpen = true; }; m_dropDown.Closed += (a, b) => { m_dropDownOpen = false; m_itemIndex = -1; m_dropDownWindow = 0; }; } m_area = area; m_requestedSize = SizeF.Empty; m_control = control; Margin = margin; Font = font; Colors = new ColorOptions(); CursorPos = new CP(0); SelectionLength = 0; control.SizeChanged += (a, b) => UpdateRequestedArea(); InputForm = inputForm; AutoCompleteSuggestions = autoCompleteSuggestions; m_disposeActions.Add(Mouse.MouseUp.Register(this, (me, point) => me.GlobalMouseUp())); Border = borderDrawer(this); }
public Test26Model(IOptions <PositionOptions> options, IMyDependency myDependency, IOptions <ColorOptions> colorOptions) { _options = options.Value; _color_options = colorOptions.Value; _myDependency = myDependency; }
public void Start() { //Call Start of lib OnStart(); //Set the first page CurrentPage = VisualsPage.Player; //Enable Hack List by default EnableHacksList = true; //Set Distances and update rates EspDistance = 200; UpdateRate = 10; //Set Distances for overrides PlayerEspDistance = 200; ZombieEspDistance = 200; ItemEspDistance = 200; //Set Text sizes for scale CloseSize = 7; FarSize = 5; Dropoff = 350; //Set Sizes and positions of menus var size = new Vector2(450, 500); CenterMenu = MenuTools.GetRectAtLoc(size, MenuTools.Horizontal.Center, MenuTools.Vertical.Center, false); size = new Vector2(200, 500); MenuBar = new Rect(CenterMenu.x - 210, CenterMenu.y, size.x, size.y); SettingsBar = new Rect(CenterMenu.x + 460, CenterMenu.y, size.x, size.y); //set starting color indexs for colors FPlayerColorIndex = 0; EPlayerColorIndex = 9; VEPlayerColorIndex = 4; ZombieColorIndex = 12; ItemColorIndex = 2; VehicleColorIndex = 11; AnimalColorIndex = 6; StorageColorIndex = 8; //Set colors from indicies; FriendlyPlayerColor = (ColorOptions)FPlayerColorIndex; EnemyPlayerColor = (ColorOptions)EPlayerColorIndex; VisibleEnemyPlayerColor = (ColorOptions)VEPlayerColorIndex; ZombieColor = (ColorOptions)ZombieColorIndex; ItemColor = (ColorOptions)ItemColorIndex; VehicleColor = (ColorOptions)VehicleColorIndex; AnimalColor = (ColorOptions)AnimalColorIndex; StorageColor = (ColorOptions)StorageColorIndex; //Set starting NV Nv = NvType.None; }
public static Pix Translate(Pix pix, int horizontalShift, int verticalShift, ColorOptions options) { IntPtr ptr = LeptonicaNativeApi.Native.pixTranslate(IntPtr.Zero, pix.Reference, horizontalShift, verticalShift, options); if (ptr == IntPtr.Zero) { throw new NullReferenceException("failed to translate"); } return(Pix.Create(ptr)); }
private void ZombiePage() { GUILayout.BeginHorizontal(); GUILayout.Space(3f); GUILayout.BeginVertical(); GUILayout.Space(2f); GUILayout.Label(" Box\n --------------------------------------"); ZombieBoxes = GUILayout.Toggle(ZombieBoxes, " 2D Boxes"); GUILayout.Label(" Glow\n --------------------------------------"); ZombieGlow = GUILayout.Toggle(ZombieGlow, " Glow ESP"); GUILayout.Space(2f); GUILayout.Label(" Labels\n --------------------------------------"); ZombieName = GUILayout.Toggle(ZombieName, " Show Name"); ZombieType = GUILayout.Toggle(ZombieType, " Show Type"); ZombieDistance = GUILayout.Toggle(ZombieDistance, " Show Distance"); GUILayout.Space(2f); GUILayout.Label(" Other\n --------------------------------------"); ZombieSkeleton = GUILayout.Toggle(ZombieSkeleton, " Skeleton ESP"); ZombieTracers = GUILayout.Toggle(ZombieTracers, " Tracers (Beta Only)"); GUILayout.EndVertical(); GUILayout.BeginVertical(); GUILayout.Space(2f); GUILayout.Label(" Zombie Colors\n --------------------------------------"); GUILayout.Space(2f); if (GUILayout.Button($" Zombies: {ZombieColor.ToString().First().ToString().ToUpper() + ZombieColor.ToString().Substring(1)}")) { ZombieColorIndex++; if (ZombieColorIndex > 12) { ZombieColorIndex = 0; } ZombieColor = (ColorOptions)ZombieColorIndex; } GUILayout.Label(" Override Dist\n --------------------------------------"); GUILayout.Space(2f); ZombieOverrideDistance = GUILayout.Toggle(ZombieOverrideDistance, " Enable Override"); GUILayout.Space(1f); ZombieInfDistance = GUILayout.Toggle(ZombieInfDistance, " Infinite Zombie Dist"); GUILayout.Label($" Zombie Esp Distance: {ZombieEspDistance}"); ZombieEspDistance = (int)GUILayout.HorizontalSlider(ZombieEspDistance, 50f, 10000f); GUILayout.EndVertical(); GUILayout.Space(3f); GUILayout.EndHorizontal(); }
public WeatherForecastController ( ILogger <WeatherForecastController> logger, IOptions <PositionOptions> options, IOptions <ColorOptions> colorOptions // IMyDependency myDependency ) { _logger = logger; _positionOptions = options.Value; _colorOptions = colorOptions.Value; }
public List <CarSpecificationDto> CreateProductSpecs(string carModelName, int wheels, int doors, double engine) { var product = new List <CarSpecificationDto>(); var redProduct = new CarSpecificationDto { Doors = doors, Engine = engine, HasPowerWindows = true, Wheels = wheels, Color = ColorOptions.Red() }; product.Add(redProduct); var whiteProduct = new CarSpecificationDto { Doors = doors, Engine = engine, HasPowerWindows = true, Wheels = wheels, Color = ColorOptions.White() }; product.Add(whiteProduct); var blackProduct = new CarSpecificationDto { Doors = doors, Engine = engine, HasPowerWindows = true, Wheels = wheels, Color = ColorOptions.Black() }; product.Add(blackProduct); if (!GetModelName(carModelName)) { return(product); } var blueProduct = new CarSpecificationDto { Doors = doors, Engine = engine, HasPowerWindows = true, Wheels = wheels, Color = ColorOptions.Blue() }; product.Add(blueProduct); return(product); }
private void ItemPage() { GUILayout.BeginHorizontal(); GUILayout.Space(3f); GUILayout.BeginVertical(); GUILayout.Space(2f); GUILayout.Label(" Glow\n --------------------------------------"); ItemGlow = GUILayout.Toggle(ItemGlow, " Glow ESP"); GUILayout.Space(2f); GUILayout.Label(" Labels\n --------------------------------------"); ItemName = GUILayout.Toggle(ItemName, " Show Name"); ItemDistance = GUILayout.Toggle(ItemDistance, " Show Distance"); GUILayout.Space(2f); GUILayout.Label(" Other\n --------------------------------------"); ItemFilter = GUILayout.Toggle(ItemFilter, " Enable Item Filter"); GUILayout.EndVertical(); GUILayout.BeginVertical(); GUILayout.Space(2f); GUILayout.Label(" Item Colors\n --------------------------------------"); GUILayout.Space(2f); if (GUILayout.Button($" Items: {ItemColor.ToString().First().ToString().ToUpper() + ItemColor.ToString().Substring(1)}")) { ItemColorIndex++; if (ItemColorIndex > 12) { ItemColorIndex = 0; } ItemColor = (ColorOptions)ItemColorIndex; } GUILayout.Label(" Override Dist\n --------------------------------------"); GUILayout.Space(2f); ItemOverrideDistance = GUILayout.Toggle(ItemOverrideDistance, " Enable Override"); GUILayout.Space(1f); ItemInfDistance = GUILayout.Toggle(ItemInfDistance, " Infinite Item Dist"); GUILayout.Label($" Item Esp Distance: {ItemEspDistance}"); ItemEspDistance = (int)GUILayout.HorizontalSlider(ItemEspDistance, 50f, 10000f); GUILayout.EndVertical(); GUILayout.Space(3f); GUILayout.EndHorizontal(); }
private void ReloadEditor() { if (TransactionType == null) { Name = "New type"; Description = string.Empty; Color = null; Income = false; } else { Name = TransactionType.Name; Description = TransactionType.Description; Color = ColorOptions.Where(kvp => (kvp.Value == null ? null : kvp.Value.ToString()) == TransactionType.Color).Select(kvp => kvp.Value).FirstOrDefault(); Income = TransactionType.Income; } isColorBoxDirty = false; }
private void VehiclePage() { GUILayout.BeginHorizontal(); GUILayout.Space(3f); GUILayout.BeginVertical(); // GUILayout.Space(2f); // GUILayout.Label(" Glow\n --------------------------------------"); // VehicleGlow = GUILayout.Toggle(VehicleGlow, " Glow ESP"); GUILayout.Space(2f); GUILayout.Label(" Labels\n --------------------------------------"); VehicleName = GUILayout.Toggle(VehicleName, " Show Name"); VehicleDistance = GUILayout.Toggle(VehicleDistance, " Show Distance"); VehicleGas = GUILayout.Toggle(VehicleGas, " Show Gas"); VehicleHealth = GUILayout.Toggle(VehicleHealth, " Show Health"); GUILayout.Space(2f); GUILayout.Label(" Other\n --------------------------------------"); VehicleFilterLocked = GUILayout.Toggle(VehicleFilterLocked, " Show Only Unlocked"); GUILayout.EndVertical(); GUILayout.BeginVertical(); GUILayout.Space(2f); GUILayout.Label(" Vehicle Colors\n --------------------------------------"); GUILayout.Space(2f); if (GUILayout.Button($" Vehicles: {VehicleColor.ToString().First().ToString().ToUpper() + VehicleColor.ToString().Substring(1)}")) { VehicleColorIndex++; if (VehicleColorIndex > 12) { VehicleColorIndex = 0; } VehicleColor = (ColorOptions)VehicleColorIndex; } GUILayout.EndVertical(); GUILayout.Space(3f); GUILayout.EndHorizontal(); }
public ChartConfiguration(ChartData data, ChartAxis axis = null, SizeOptions size = null, PaddingOptions padding = null, ColorOptions color = null, InteractionOptions interaction = null, TransitionOptions transition = null, SubchartOptions subchart = null, ZoomOptions zoom = null) { Data = data; Axis = axis; Size = size; Padding = padding; Color = color; Interaction = interaction; Transition = transition; Subchart = subchart; Zoom = zoom; }
private void StoragePage() { GUILayout.BeginHorizontal(); GUILayout.Space(3f); GUILayout.BeginVertical(); GUILayout.Space(2f); GUILayout.Label(" Glow\n --------------------------------------"); StorageGlow = GUILayout.Toggle(StorageGlow, " Glow ESP"); GUILayout.Space(2f); GUILayout.Label(" Labels\n --------------------------------------"); StorageName = GUILayout.Toggle(StorageName, " Show Name"); StorageDistance = GUILayout.Toggle(StorageDistance, " Show Distance"); GUILayout.Space(2f); GUILayout.Label(" Other\n --------------------------------------"); StorageFilterLocked = GUILayout.Toggle(StorageFilterLocked, " Show Only Unlocked"); StorageFilterInUse = GUILayout.Toggle(StorageFilterInUse, " Show Only With Items"); GUILayout.EndVertical(); GUILayout.BeginVertical(); GUILayout.Space(2f); GUILayout.Label(" Storage Colors\n --------------------------------------"); GUILayout.Space(2f); if (GUILayout.Button($" Storages: {StorageColor.ToString().First().ToString().ToUpper() + StorageColor.ToString().Substring(1)}")) { StorageColorIndex++; if (StorageColorIndex > 12) { StorageColorIndex = 0; } StorageColor = (ColorOptions)StorageColorIndex; } GUILayout.EndVertical(); GUILayout.Space(3f); GUILayout.EndHorizontal(); }
public CheckoutClient(Uri orderBaseUri, string merchantId, string sharedSecret, bool allowSeparateShippingAddress = false, ColorOptions colorOptions = null, bool disableAutoFocus = false) { if (orderBaseUri == null) { throw new ArgumentNullException("orderBaseUri"); } if (merchantId == null) { throw new ArgumentNullException("merchantId"); } if (sharedSecret == null) { throw new ArgumentNullException("sharedSecret"); } OrderBaseUri = orderBaseUri; MerchantId = merchantId; SharedSecret = sharedSecret; AllowSeparateShippingAddress = allowSeparateShippingAddress; ColorOptions = colorOptions; DisableAutoFocus = disableAutoFocus; }
public virtual ImageInsightResponse GetImageInsights( string query = "", int height = 0, int width = 0, int count = 0, int offset = 0, string languageCode = "", AspectOptions aspect = AspectOptions.All, ColorOptions color = ColorOptions.All, FreshnessOptions freshness = FreshnessOptions.All, ImageContentOptions imageContent = ImageContentOptions.All, ImageTypeOptions imageType = ImageTypeOptions.All, LicenseOptions license = LicenseOptions.All, SizeOptions size = SizeOptions.All, SafeSearchOptions safeSearch = SafeSearchOptions.Off, List <ModulesRequestedOptions> modulesRequested = null, float cab = 0f, float cal = 0f, float car = 0f, float cat = 0f, int ct = 0, string cc = "", string id = "", string imgUrl = "", string insightsToken = "") { try { var result = ImageSearchRepository.GetImageInsights(query, height, width, count, offset, languageCode, aspect, color, freshness, imageContent, imageType, license, size, safeSearch, modulesRequested, cab, cal, car, cat, ct, cc, id, imgUrl, insightsToken); return(result); } catch (Exception ex) { Logger.Error("ImageSearchService.GetImageInsights failed", this, ex); } return(null); }
private void AnimalPage() { GUILayout.BeginHorizontal(); GUILayout.Space(3f); GUILayout.BeginVertical(); GUILayout.Space(2f); GUILayout.Label(" Glow\n --------------------------------------"); AnimalGlow = GUILayout.Toggle(AnimalGlow, " Glow ESP"); GUILayout.Space(2f); GUILayout.Label(" Labels\n --------------------------------------"); AnimalName = GUILayout.Toggle(AnimalName, " Show Name"); AnimalDistance = GUILayout.Toggle(AnimalDistance, " Show Distance"); GUILayout.EndVertical(); GUILayout.BeginVertical(); GUILayout.Space(2f); GUILayout.Label(" Animal Colors\n --------------------------------------"); GUILayout.Space(2f); if (GUILayout.Button($" Animals: {AnimalColor.ToString().First().ToString().ToUpper() + AnimalColor.ToString().Substring(1)}")) { AnimalColorIndex++; if (AnimalColorIndex > 12) { AnimalColorIndex = 0; } AnimalColor = (ColorOptions)AnimalColorIndex; } GUILayout.EndVertical(); GUILayout.Space(3f); GUILayout.EndHorizontal(); }
public virtual ImageInsightResponse GetImageInsights( string query = "", int height = 0, int width = 0, int count = 0, int offset = 0, string languageCode = "", AspectOptions aspect = AspectOptions.All, ColorOptions color = ColorOptions.All, FreshnessOptions freshness = FreshnessOptions.All, ImageContentOptions imageContent = ImageContentOptions.All, ImageTypeOptions imageType = ImageTypeOptions.All, LicenseOptions license = LicenseOptions.All, SizeOptions size = SizeOptions.All, SafeSearchOptions safeSearch = SafeSearchOptions.Off, List <ModulesRequestedOptions> modulesRequested = null, float cab = 0f, float cal = 0f, float car = 0f, float cat = 0f, int ct = 0, string cc = "", string id = "", string imgUrl = "", string insightsToken = "") { return(PolicyService.ExecuteRetryAndCapture400Errors( "ImageSearchService.GetImageInsights", ApiKeys.BingSearchRetryInSeconds, () => { var result = ImageSearchRepository.GetImageInsights(query, height, width, count, offset, languageCode, aspect, color, freshness, imageContent, imageType, license, size, safeSearch, modulesRequested, cab, cal, car, cat, ct, cc, id, imgUrl, insightsToken); return result; }, null)); }
protected virtual string GetImageInsightUrl( string query = "", int height = 0, int width = 0, int count = 0, int offset = 0, string languageCode = "", AspectOptions aspect = AspectOptions.All, ColorOptions color = ColorOptions.All, FreshnessOptions freshness = FreshnessOptions.All, ImageContentOptions imageContent = ImageContentOptions.All, ImageTypeOptions imageType = ImageTypeOptions.All, LicenseOptions license = LicenseOptions.All, SizeOptions size = SizeOptions.All, SafeSearchOptions safeSearch = SafeSearchOptions.Off, List <ModulesRequestedOptions> modulesRequested = null, float cab = 0f, float cal = 0f, float car = 0f, float cat = 0f, int ct = 0, string cc = "", string id = "", string imgUrl = "", string insightsToken = "") { StringBuilder sb = new StringBuilder(); sb.Append($"{imageSearchUrl}?q={query}"); if (height > 0) { sb.Append($"&height={height}"); } if (width > 0) { sb.Append($"&width={width}"); } if (count > 0) { sb.Append($"&count={count}"); } if (offset > 0) { sb.Append($"&offset={offset}"); } if (!string.IsNullOrEmpty(languageCode)) { sb.Append($"&mkt={languageCode}"); } var aspectName = Enum.GetName(typeof(AspectOptions), aspect); if (aspectName != null && !aspectName.Equals("All")) { sb.Append($"&aspect={aspectName}"); } var colorName = Enum.GetName(typeof(ColorOptions), color); if (colorName != null && !colorName.Equals("All")) { sb.Append($"&color={colorName}"); } var freshnessName = Enum.GetName(typeof(FreshnessOptions), freshness); if (freshnessName != null && !freshnessName.Equals("All")) { sb.Append($"&freshness={freshnessName}"); } var imageContentName = Enum.GetName(typeof(ImageContentOptions), imageContent); if (imageContentName != null && !imageContentName.Equals("All")) { sb.Append($"&imageContent={imageContentName}"); } var imageTypeName = Enum.GetName(typeof(ImageTypeOptions), imageType); if (imageTypeName != null && !imageTypeName.Equals("All")) { sb.Append($"&imageType={imageTypeName}"); } var licenseName = Enum.GetName(typeof(LicenseOptions), license); if (licenseName != null && !licenseName.Equals("All")) { sb.Append($"&license={licenseName}"); } var sizeName = Enum.GetName(typeof(SizeOptions), size); if (sizeName != null && !sizeName.Equals("All")) { sb.Append($"&size={sizeName}"); } var safeSearchName = Enum.GetName(typeof(SafeSearchOptions), safeSearch); if (safeSearchName != null && !safeSearchName.Equals("All")) { sb.Append($"&safeSearch={safeSearchName}"); } StringBuilder mod = new StringBuilder(); if (modulesRequested != null) { foreach (var m in modulesRequested) { if (mod.Length > 0) { mod.Append(","); } mod.Append(Enum.GetName(typeof(ModulesRequestedOptions), m)); } sb.Append($"&modulesRequested={mod}"); } if (cab > 0f) { sb.Append($"&cab={cab}"); } if (cal > 0f) { sb.Append($"&cal={cal}"); } if (car > 0f) { sb.Append($"&car={car}"); } if (cat > 0f) { sb.Append($"&cat={cat}"); } if (ct > 0) { sb.Append($"&ct={ct}"); } if (!string.IsNullOrEmpty(cc)) { sb.Append($"&cc={cc}"); } if (!string.IsNullOrEmpty(id)) { sb.Append($"&id={id}"); } if (!string.IsNullOrEmpty(imgUrl)) { sb.Append($"&imgUrl={HttpUtility.UrlEncode(imgUrl)}"); } if (!string.IsNullOrEmpty(insightsToken)) { sb.Append($"&insightsToken={insightsToken}"); } return(sb.ToString()); }
public Test25Model(IOptions <PositionOptions> options, IOptions <ColorOptions> colorOptions) { _options = options.Value; _color_options = colorOptions.Value; }
public static void Load() { StreamReader sr = new StreamReader("saveData.txt"); int progress = Int32.Parse(sr.ReadLine()); stage = progress / 11; wave = progress % 11; hard = sr.ReadLine() == "True" ? true : false; myColor = (ColorOptions)Byte.Parse(sr.ReadLine()); int[] loadedUpgradeIds = new int[4]; for (int i = 0; i < 4; i++) { loadedUpgradeIds[i] = Int32.Parse(sr.ReadLine()); } if (player != null) { ResetUpgradePool(); for (int i = 0; i < 4; i++) { switch (loadedUpgradeIds[i]) { case 0: player.upgrades[i] = new FirerateUp(); break; case 1: player.upgrades[i] = new Armor(); break; case 2: player.upgrades[i] = new TripleMiasma(); break; case 3: player.upgrades[i] = new MiasmaBlast(); break; case 4: player.upgrades[i] = new MiasmaGenerator(); break; case 5: player.upgrades[i] = new MiasmaRay(); break; case 6: player.upgrades[i] = new Speed(); break; case 7: player.upgrades[i] = new WaveGuns(); break; case 8: player.upgrades[i] = new Richoche(); break; case 9: player.upgrades[i] = new StableMiasma(); break; case 10: player.upgrades[i] = new Leech(); break; case 11: player.upgrades[i] = new Contagus(); break; case 12: player.upgrades[i] = new TurretUpgrade(); break; case 13: player.upgrades[i] = new Confuse(); break; } } for (int i = 0; i < 4; i++) { if (player.upgrades[i] != null) { RemoveUpgradeFromPool(player.upgrades[i].getId()); } } } Sounds.sfxVolume = byte.Parse(sr.ReadLine()); Sounds.musicVolume = byte.Parse(sr.ReadLine()); Controls.gamePadShoot = byte.Parse(sr.ReadLine()); Controls.gamePadMiasma = byte.Parse(sr.ReadLine()); Controls.keyboardShoot = int.Parse(sr.ReadLine()); Controls.keyboardMiasma = int.Parse(sr.ReadLine()); totalProgress = int.Parse(sr.ReadLine()); sr.Close(); }
public static T SetColor <T>(this T obj, ColorOptions colorOption) where T : IColorProperty { obj.BackgroundColor = colorOption; return(obj); }
public static string ConvertToCss(ColorOptions colorOption) { string colorStr = colorOption.ToString().ToLower(); return(ControlTypeAbbr + "-" + colorStr); }
public ColorData(ColorOptions options) => Options = options;
internal ColorData(ColorOptions options) { this.options = options; }
ColorOptions CommonRender(Graphics g) { ColorOptions colors = new ColorOptions(g, Control.ForeColor, Control.BackColor); colors.enabled = Control.Enabled; return colors; }
// used by the DataGridViewButtonCell static ColorOptions CommonRender(Graphics g, Color foreColor, Color backColor, bool enabled) { ColorOptions colors = new ColorOptions(g, foreColor, backColor); colors.enabled = enabled; return colors; }
public static Pix Translate(Pix pix, ColorOptions options) { return(Translate(pix, DefaultHorizontalShift, DefaultVerticalShift, options)); }
protected static SimPe.Packages.GeneratableFile ReColor(CloneSettings.BaseResourceType br, SimPe.Packages.GeneratableFile pkg, Interfaces.Files.IPackedFileDescriptor pfd, uint localgroup, ObjectWorkshopSettings settings, bool pkgcontainsonlybase) { SimPe.Packages.GeneratableFile package = pkg; // we need packages in the Gmaes and the Download Folder if (((!System.IO.File.Exists(ScenegraphHelper.GMND_PACKAGE)) || (!System.IO.File.Exists(ScenegraphHelper.MMAT_PACKAGE))) && (settings is OWCloneSettings)) { if (Message.Show(Localization.Manager.GetString("OW_Warning"), "Warning", MessageBoxButtons.YesNo) == DialogResult.No) { return(package); } } SaveFileDialog sfd = new SaveFileDialog(); sfd.Filter = ExtensionProvider.BuildFilterString( new SimPe.ExtensionType[] { SimPe.ExtensionType.Package, SimPe.ExtensionType.AllFiles } ); if (sfd.ShowDialog() != DialogResult.OK) { return(package); } //create a Cloned Object to get all needed Files for the Process WaitingScreen.Wait(); try { WaitingScreen.UpdateMessage("Collecting needed Files"); if ((package == null) && (pfd != null)) { package = RecolorClone(br, package, pfd, localgroup, settings, pkgcontainsonlybase); } } finally { WaitingScreen.Stop(); } /*if (settings is OWRecolorSettings) * { * ObjectRecolor or = new ObjectRecolor(package); * or.EnableColorOptions(); * or.LoadReferencedMATDs(); * * //load all Pending Textures * ObjectCloner oc = new ObjectCloner(package); * }*/ /*SimPe.Packages.GeneratableFile dn_pkg = null; * if (System.IO.File.Exists(ScenegraphHelper.GMND_PACKAGE)) dn_pkg = SimPe.Packages.GeneratableFile.LoadFromFile(ScenegraphHelper.GMND_PACKAGE); * else dn_pkg = SimPe.Packages.GeneratableFile.LoadFromStream((System.IO.BinaryReader)null); * * SimPe.Packages.GeneratableFile gm_pkg = null; * if (System.IO.File.Exists(ScenegraphHelper.MMAT_PACKAGE)) gm_pkg = SimPe.Packages.GeneratableFile.LoadFromFile(ScenegraphHelper.MMAT_PACKAGE); * else gm_pkg = SimPe.Packages.GeneratableFile.LoadFromStream((System.IO.BinaryReader)null);*/ SimPe.Packages.GeneratableFile npackage = SimPe.Packages.GeneratableFile.CreateNew(); //.LoadFromStream((System.IO.BinaryReader)null); //Create the Templae for an additional MMAT npackage.FileName = sfd.FileName; ColorOptions cs = new ColorOptions(package); cs.Create(npackage); npackage.Save(); package = npackage; WaitingScreen.Stop(); #if DEBUG #else if (package != npackage) { package = null; } #endif return(package); }
private void PlayerPage() { GUILayout.BeginHorizontal(); GUILayout.Space(3f); GUILayout.BeginVertical(); GUILayout.Space(2f); GUILayout.Label(" Box\n --------------------------------------"); Player2DBoxes = GUILayout.Toggle(Player2DBoxes, " 2D Boxes"); // Player3DBoxes = GUILayout.Toggle(Player3DBoxes, " 3D Boxes"); GUILayout.Label(" Glow\n --------------------------------------"); PlayerGlow = GUILayout.Toggle(PlayerGlow, " Glow ESP"); GUILayout.Space(2f); GUILayout.Label(" Labels\n --------------------------------------"); PlayerName = GUILayout.Toggle(PlayerName, " Show Name"); PlayerWeapon = GUILayout.Toggle(PlayerWeapon, " Show Weapon"); PlayerDistance = GUILayout.Toggle(PlayerDistance, " Show Distance"); GUILayout.Space(2f); GUILayout.Label(" Other\n --------------------------------------"); PlayerSkeleton = GUILayout.Toggle(PlayerSkeleton, " Skeleton ESP"); PlayerTracers = GUILayout.Toggle(PlayerTracers, " Tracers (Beta Only)"); AdminWarn = GUILayout.Toggle(AdminWarn, " Show Admin Warning"); // PlayerChamesque = GUILayout.Toggle(PlayerChamesque, " Box Chamesque"); GUILayout.EndVertical(); GUILayout.BeginVertical(); GUILayout.Space(2f); GUILayout.Label(" Player Colors\n --------------------------------------"); GUILayout.Space(2f); if (GUILayout.Button($" Friendly: {FriendlyPlayerColor.ToString().First().ToString().ToUpper() + FriendlyPlayerColor.ToString().Substring(1)}")) { FPlayerColorIndex++; if (FPlayerColorIndex > 12) { FPlayerColorIndex = 0; } FriendlyPlayerColor = (ColorOptions)FPlayerColorIndex; } if (GUILayout.Button($" Enemy: {EnemyPlayerColor.ToString().First().ToString().ToUpper() + EnemyPlayerColor.ToString().Substring(1)}")) { EPlayerColorIndex++; if (EPlayerColorIndex > 12) { EPlayerColorIndex = 0; } EnemyPlayerColor = (ColorOptions)EPlayerColorIndex; } GUILayout.Label(" Override Dist\n --------------------------------------"); GUILayout.Space(2f); PlayerOverrideDistance = GUILayout.Toggle(PlayerOverrideDistance, " Enable Override"); GUILayout.Space(1f); PlayerInfDistance = GUILayout.Toggle(PlayerInfDistance, " Infinite Player Dist"); GUILayout.Label($" Player Esp Distance: {PlayerEspDistance}"); PlayerEspDistance = (int)GUILayout.HorizontalSlider(PlayerEspDistance, 50f, 10000f); if (PlayerChamesque) { GUILayout.Label(" Chamesque Colors\n --------------------------------------"); GUILayout.Space(2f); if (GUILayout.Button($" Visible: {VisibleEnemyPlayerColor.ToString().First().ToString().ToUpper() + VisibleEnemyPlayerColor.ToString().Substring(1)}")) { VEPlayerColorIndex++; if (VEPlayerColorIndex > 12) { VEPlayerColorIndex = 0; } VisibleEnemyPlayerColor = (ColorOptions)VEPlayerColorIndex; } if (GUILayout.Button($" Hidden: {EnemyPlayerColor.ToString().First().ToString().ToUpper() + EnemyPlayerColor.ToString().Substring(1)}")) { EPlayerColorIndex++; if (EPlayerColorIndex > 12) { EPlayerColorIndex = 0; } EnemyPlayerColor = (ColorOptions)EPlayerColorIndex; } } GUILayout.EndVertical(); GUILayout.Space(3f); GUILayout.EndHorizontal(); }