public BlockData(int NewBlockType) { DropIndex = NewBlockType; DropQuantity = 1; DropType = IconType.Item; Name = "Block" + NewBlockType; TextureId = NewBlockType; }
public virtual bool SendNotification(string caption, string message, IconType iconType, string iconFile, string address) { byte[] icon = new byte[0]; if (iconType != IconType.None) { icon = ResourceManager.GetRawLogo(iconFile); } byte[] payload = new byte[caption.Length + message.Length + 7 + icon.Length]; int offset = 0; for (int i = 0; i < caption.Length; i++) payload[offset++] = (byte)caption[i]; payload[offset++] = (byte)'\0'; for (int i = 0; i < message.Length; i++) payload[offset++] = (byte)message[i]; payload[offset++] = (byte)'\0'; payload[offset++] = (byte)iconType; for (int i = 0; i < 4; i++) payload[offset++] = (byte)0; Array.Copy(icon, 0, payload, caption.Length + message.Length + 7, icon.Length); return _udpProvider.Send(address, UdpProvider.PacketType.Notification, payload); }
public void Initialize(IconType iconType, int itemCost, string resourceLocation, bool isLocked, int itemID, GameObject rootObject) { _previewTexture.mainTexture = Resources.Load (resourceLocation) as Texture; // if (iconType != IconType.LOCKED) _itemCost.text = itemCost.ToString (); // else // _itemCost.text = "LV" + itemCost; _rootObject = rootObject; if (iconType == IconType.GOLD) { _itemCurrencyIcon.spriteName = "icon02"; } else if (iconType == IconType.PREMIUM) { _itemCurrencyIcon.spriteName = "icon03"; } // else if (iconType == IconType.LOCKED) { // _itemCurrencyIcon.spriteName = "UI_cos_lock"; // collider.enabled = false; // } if (isLocked) { _lockIcon.gameObject.SetActive (true); collider.enabled = false; } else { _lockIcon.gameObject.SetActive (false); } _itemID = itemID; }
public UserOption(IconType toolbarIconType, IconType menuIconType, string currentStyle, MouseOverAction mouseOverMenuScomparsa) { ToolbarIconType = toolbarIconType; MenuIconType = menuIconType; CurrentStyle = currentStyle; MouseOverMenuScomparsa = mouseOverMenuScomparsa; }
/// <summary> /// Initializes a new instance of the <see cref="IconButton" /> class. /// </summary> /// <param name="type">The icon type.</param> /// <param name="size">The size of the icon (number of pixels - 24 creates an icon 24x24px).</param> /// <param name="normalColor">Color to use when not hovered over.</param> /// <param name="hoverColor">Color to use when hovered over.</param> /// <param name="selectable">NOT YET IMPLEMENTED. If set to <c>true</c> the icon will be selectable using the keyboard (tab-key).</param> /// <param name="toolTip">The tool tip text to use. Leave as null to not use a tooltip.</param> public IconButton(IconType type, int size, Color normalColor, Color hoverColor, bool selectable, string toolTip) { IconFont = null; BackColor = Color.Transparent; // need more than this to make picturebox selectable if (selectable) { SetStyle(ControlStyles.Selectable, true); TabStop = true; } Width = size; Height = size; IconType = type; InActiveColor = normalColor; ActiveColor = hoverColor; ToolTipText = toolTip; MouseEnter += Icon_MouseEnter; MouseLeave += Icon_MouseLeave; }
public static MvcHtmlString UxNavLink(this HtmlHelper helper, string text, string url, IconType iconType = null, IconPosition iconPosition = null, bool active = false, bool disabled = false, bool iconPullRight = false, DataToggle dataToggle = DataToggle.None, string badgeText = null, bool badgePullRight = false, string clientId = null) { var navLink = new NavLink(text, url, iconType, iconPosition, active, disabled, iconPullRight, dataToggle, clientId); if (badgeText != null) navLink.SetBadge(new Badge(badgeText, badgePullRight)); return helper.RenderUxControl(navLink); }
public IconGenerator(IconType type, int width, int height, Color borderColor, float borderWidth) { Type = type; Padding = 5; Width = Math.Max(width, 1); Height = Math.Max(height, 1); BorderColor = borderColor; BorderWidth = borderWidth; }
/// <summary> /// Gets a standard icon</summary> /// <param name="type">Standard icon type</param> /// <returns>Standard icon</returns> public static Icon GetStandardIcon(IconType type) { IntPtr handle = User32.LoadIcon((IntPtr) null, (IntPtr) type); // Copy (clone) the returned icon to a new object, thus allowing us to clean-up properly Icon icon = (Icon)Icon.FromHandle(handle).Clone(); User32.DestroyIcon(handle); // Cleanup return icon; }
public EntityMarker(BankEntity entity, IconType iconType) { this.Entity = entity; this.MarkerOptions = new MarkerOptions (); this.MarkerOptions.SetTitle (entity.Description()); this.MarkerOptions.SetPosition (new LatLng(entity.Latitude, entity.Longitude)); this.Type = MarkerType.Regular; IconType = iconType; }
public FormInfo(string message, int retardoMS, IconType iconType) { if (retardoMS == 0) retardoMS = 1; this.retardoMS = retardoMS; this.iconType = iconType; this.message = message; InitializeComponent(); }
public Icon(Point p,int i,IconType t,int prio=1) { position = new VertexMarker(); position.Colour = Brushes.Green; position.setPosition(p); propertypanel = new IconProperty(this); type = t; Name = string.Format("Start Position {0}", i); setSelected(false); priority = prio; }
public static Icon GetIcon(IconType theIcon) { Icon micon = null; switch (theIcon) { case IconType.Yes: micon = GUIResource.Properties.Resources.ok; break; case IconType.No: micon = GUIResource.Properties.Resources.DELETE; break; } return micon; }
public static ExpressionDialog.StatusTypes Show(string Content, Window Parent, IconType icon = IconType.Warning, ExpressionDialog.DialogTypes type = ExpressionDialog.DialogTypes.Ok, params string[] ButtonNames) { //Create the dialog ExpressionDialog dialog = new ExpressionDialog(type, Parent, ButtonNames); //Fill the dialog Grid ContentGrid = new Grid(); ContentGrid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(0, GridUnitType.Auto) }); ContentGrid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Star) }); string ColorS = "_"; if (Application.Current.MainWindow is ExpressionWindow) ColorS += Enum.GetName(typeof(ExpressionWindow.ThemeColors), ((ExpressionWindow)Application.Current.MainWindow).ThemeColor); BitmapImage IconBmp = null; switch (icon) { case IconType.Warning: IconBmp = new BitmapImage(new Uri("pack://application:,,,/ExpressionWindow;component/icons/warning" + ColorS + ".png")); break; case IconType.Question: IconBmp = new BitmapImage(new Uri("pack://application:,,,/ExpressionWindow;component/Icons/Question" + ColorS + ".png")); break; } Image Icon = new Image() { Source = IconBmp, Stretch = System.Windows.Media.Stretch.None, Margin = new Thickness(10) }; Grid.SetColumn(Icon, 0); ContentGrid.Children.Add(Icon); Label lb = new Label() { Margin = new Thickness(10), VerticalAlignment = System.Windows.VerticalAlignment.Center, Content = Content }; Grid.SetColumn(lb, 1); ContentGrid.Children.Add(lb); dialog.Content = ContentGrid; //Show the dialog dialog.ShowDialog(); return dialog.Status; }
public static Icon GetIcon(IconType theIcon) { Icon micon = null; switch (theIcon) { case IconType.Yes: micon = meijing.ui.Properties.Resources.ok; break; case IconType.No: micon = meijing.ui.Properties.Resources.DELETE; break; case IconType.UserGuide: micon = meijing.ui.Properties.Resources.books; break; } return micon; }
public static MvcHtmlString UxButton(this HtmlHelper helper, string text, ButtonAppearanceType appearance = null, ButtonSize size = null, IconType iconType = null, IconPosition position = null, bool causesValidation = true, bool disabled = false, string loadingText = null, string clientId = null) { var button = new Button(text, ButtonCommand.None, appearance) .SetSize(size) .SetValidation(causesValidation) .SetDisabled(disabled) .SetLoadingText(loadingText); button.SetClientId(clientId); if (iconType!=null) button.SetIcon(new Icon(iconType), position); return UxButton(helper, button); }
public void ShowMessage(String title, String msg, IconType iconType = IconType.Information, int msTimeout = 10000) { CPP.Add("$q->showMessage($check(title)->qstring(), $check(msg)->qstring(), iconType, msTimeout);"); }
/// <summary> /// Initializes a new instance of the <see cref="Gravatar"/> class. /// </summary> /// <param name="email">The email.</param> /// <param name="size">The size.</param> /// <param name="rating">The rating.</param> /// <param name="iconType">Type of the icon.</param> /// <param name="imageExtension">The extension of the image.</param> public Gravatar(string email, int size, Rating rating, IconType iconType, string imageExtension) { Init(email, size, rating, iconType, imageExtension); }
private static void add(Zone zone, IconType icon, Zone requirement = null) { ZONES.Add(zone); ICONTYPES[zone] = icon; REQUIRED[zone] = requirement; }
/// <summary> /// Loads the icon. /// </summary> /// <param name="type">The type of icon.</param> /// <param name="size">The size.</param> /// <returns>The icon.</returns> /// <exception cref="System.PlatformNotSupportedException"></exception> public static Icon LoadIcon(IconType type, Size size) { IntPtr hIcon = GlobalNativeMethods.LoadImage(IntPtr.Zero, "#" + (int)type, 1, size.Width, size.Height, 0); return(hIcon == IntPtr.Zero ? null : Icon.FromHandle(hIcon)); }
public Icon(string mapName, Point point, IconType type) { Type = type; MapName = mapName; Coordinates = point; }
/// <summary> /// 弹窗提示 /// </summary> /// <param name="alertText">提示的文本</param> /// <param name="caption">标题</param> /// <param name="buttonType">按钮类型</param> /// <param name="iconType">图标类型</param> /// <param name="orientation">内容显示方向</param> /// <param name="yesBtnText">确定按键的文本</param> /// <param name="nobtnText">取消按键的文本</param> /// <returns></returns> public Result ShowBox(String alertText, string caption, ButtonType buttonType, IconType iconType, Orientation orientation = Orientation.Horizontal, string yesBtnText = null, String nobtnText = null) { Instance.ShowInTaskbar = true; Instance.Style = Instance.FindResource(MMRK.BoxStyle.ToString()) as Style; Instance.mShowType = ShowType.messageBox; Instance.mAlterText = alertText; Instance.mCapution = caption; Instance.MYesBtnText = yesBtnText; Instance.MNoBtnText = nobtnText; Instance.mButtonType = buttonType; Instance.mOrientation = orientation; Instance.mIconType = iconType; bool result = (bool)Instance.ShowDialog(); return(result == true ? Result.Yes : Result.No); }
public string this[IconType a] { get { switch (a) { case IconType.Home: return("\xE80F"); case IconType.Players: return("\xEBDA"); case IconType.Leaderboards: return("\xECA7"); case IconType.Achievements: return("\xEB95"); case IconType.Store: return("\xE719"); case IconType.Content: return("\xF571"); case IconType.KeyValue: return("\xF003"); case IconType.Setting: return("\xE713"); case IconType.Add: return("\xE710"); case IconType.Download: return("\xE896"); case IconType.Upload: return("\xE898"); case IconType.Export: return("\xEDE1"); case IconType.Import: return("\xE8B5"); case IconType.Left: return("\xE96F"); case IconType.Right: return("\xE970"); case IconType.GridView: return("\xF0E2"); case IconType.ListView: return("\xF168"); default: { return("\xE82F"); } } } }
public async Task <ContentManageResult> AddMylist(string name, string description, bool is_public, MylistDefaultSort default_sort, IconType iconType) { return(await ContextActionAsync(async context => { return await context.User.CreateMylistGroupAsync(name, description, is_public, default_sort, iconType); })); }
public static string GetText(IconType type) { return(char.ConvertFromUtf32((int)type)); }
public static Image GetImage(IconType type, int size) { return(FontAwesome.Instance.GetImage((int)type, size)); }
private static void ShowInternal(string title, string content, bool hasLinks, IconType iconType) { var window = new UserPromptWindow(); window.Title = title; window.GenerateContent(content, hasLinks); var iconMap = new Dictionary <IconType, Icon> { [IconType.Error] = SystemIcons.Error, [IconType.Warning] = SystemIcons.Warning, [IconType.Information] = SystemIcons.Information, }; window.icon.Source = GetIcon(iconMap[iconType]); window.button.Click += (s, e) => { window.Close(); }; window.Owner = App.Current.MainWindow; window.ShowDialog(); }
public static void ShowWithLinks(string title, string source, IconType iconType) { ShowInternal(title, source, true, iconType); }
public DisplayedIcon(IconType type) { this.type = type; }
/************************************************************************/ /* SendNotification - Payload format */ /* %s - caption */ /* %s - message */ /* %c - icontype ( 0=>NOICON, 1=>JPEG , 2=>PNG , 3=>GIF ) */ /* %d - reserved ( 0 ) */ /* XX - imagedata ( can span multiple packets ) */ /************************************************************************/ public bool SendNotification(string caption, string message, IconType iconType, string iconFile) { if (!Connected) return false; if (message == null || caption == null) return false; var icon = new byte[0]; if (iconType != IconType.IconNone) icon = File.ReadAllBytes(iconFile); var payload = new byte[caption.Length + message.Length + 7 + icon.Length]; var offset = 0; foreach (var t in caption) payload[offset++] = (byte)t; payload[offset++] = (byte)'\0'; foreach (var t in message) payload[offset++] = (byte)t; payload[offset++] = (byte)'\0'; payload[offset++] = (byte)iconType; for (var i = 0; i < 4; i++) payload[offset++] = 0; Array.Copy(icon, 0, payload, caption.Length + message.Length + 7, icon.Length); return Send(PacketType.PtNotification, payload); }
public bool SendHelo(string DevName, string IconResourceName, IconType IconType) { byte[] icon = Resources.ResourceManager.GetRawLogo(IconResourceName); if (IconType != IconType.ICON_NONE && icon!=null && icon.Length>0) { return SendHelo(DevName, IconType, icon); } return SendHelo(DevName); }
public MessageBox(string Title, string Message, ButtonType type = ButtonType.OK, IconType IconType = IconType.None, List <string> _buttons = null) { this.ButtonType = type; this.Buttons = _buttons; this.IconType = IconType; SetTitle(Title); this.Message = Message; if (IconType != IconType.None) { Icon = new PictureBox(this); Icon.Sprite.Bitmap = new Bitmap("mbox_icons"); Icon.Sprite.SrcRect.Width = 32; Icon.Sprite.SrcRect.X = 32 * ((int)IconType - 1); } label = new MultilineLabel(this); label.SetText(Message); switch (ButtonType) { case ButtonType.OK: Buttons = new List <string>() { "OK" }; break; case ButtonType.OKCancel: Buttons = new List <string>() { "OK", "Cancel" }; break; case ButtonType.YesNo: Buttons = new List <string>() { "Yes", "No" }; break; case ButtonType.YesNoCancel: Buttons = new List <string>() { "Yes", "No", "Cancel" }; break; case ButtonType.Custom: break; default: throw new Exception("Invalid ButtonType"); } if (Buttons.Count == 1) { Button3 = new Button(this); Button3.SetText(Buttons[0]); Button3.OnClicked += delegate(BaseEventArgs e) { Result = 0; this.OnButtonPressed?.Invoke(new BaseEventArgs()); Close(); }; } else if (Buttons.Count == 2) { Button2 = new Button(this); Button2.SetText(Buttons[0]); Button2.OnClicked += delegate(BaseEventArgs e) { Result = 0; this.OnButtonPressed?.Invoke(new BaseEventArgs()); Close(); }; Button3 = new Button(this); Button3.SetText(Buttons[1]); Button3.OnClicked += delegate(BaseEventArgs e) { Result = 1; this.OnButtonPressed?.Invoke(new BaseEventArgs()); Close(); }; } else if (Buttons.Count == 3) { Button1 = new Button(this); Button1.SetText(Buttons[0]); Button1.OnClicked += delegate(BaseEventArgs e) { Result = 0; this.OnButtonPressed?.Invoke(new BaseEventArgs()); Close(); }; Button2 = new Button(this); Button2.SetText(Buttons[1]); Button2.OnClicked += delegate(BaseEventArgs e) { Result = 1; this.OnButtonPressed?.Invoke(new BaseEventArgs()); Close(); }; Button3 = new Button(this); Button3.SetText(Buttons[2]); Button3.OnClicked += delegate(BaseEventArgs e) { Result = 2; this.OnButtonPressed?.Invoke(new BaseEventArgs()); Close(); }; } MinimumSize = MaximumSize = new Size(300, 150); SetSize(MaximumSize); }
/************************************************************************/ /* SendHelo - Payload format */ /* %s - device name (max 128 chars) */ /* %c - icontype ( 0=>NOICON, 1=>JPEG , 2=>PNG , 3=>GIF ) */ /* %s - my port ( 0=>not listening ) */ /* %d - reserved1 ( 0 ) */ /* %d - reserved2 ( 0 ) */ /* XX - imagedata ( can span multiple packets ) */ /************************************************************************/ public bool SendHelo(string DevName, IconType IconType, byte[] icon) { byte[] payload = new byte[DevName.Length + 12 + icon.Length]; int offset = 0; for (int i = 0; i < DevName.Length; i++) payload[offset++] = (byte)DevName[i]; payload[offset++] = (byte)'\0'; payload[offset++] = (byte)IconType; payload[offset++] = (byte)0; payload[offset++] = (byte)'\0'; for (int i = 0; i < 8; i++) payload[offset++] = (byte)0; Array.Copy(icon, 0, payload, DevName.Length + 12, icon.Length); return Send(PacketType.PT_HELO, payload); }
public static Sprite Get(IconType type) => Get($"icon_{type.ToString().ToLower()}");
public abstract byte[] GetIcon(IconType iconType);
public static bool MessageBox(string title, string message, DialogType dialogType, IconType iconType, bool okDefault) { string dialog = dialogType.ToString( ).ToLower( ); string icon = iconType.ToString( ).ToLower( ); return(tinyfd_messageBox(title, message, dialog, icon, okDefault ? 1 : 0) == 1); }
public async Task <ContentManageResult> AddMylist(string name, string description, bool is_public, MylistDefaultSort default_sort, IconType iconType) { var result = await HohoemaApp.NiconicoContext.User.CreateMylistGroupAsync(name, description, is_public, default_sort, iconType); if (result == ContentManageResult.Success) { await SyncMylistGroups(); } return(result); }
static public ExpressionDialog.StatusTypes Show(string Content, Window Parent, IconType icon = IconType.Warning, ExpressionDialog.DialogTypes type = ExpressionDialog.DialogTypes.Ok, params string[] ButtonNames) { //Create the dialog ExpressionDialog dialog = new ExpressionDialog(type, Parent, ButtonNames); //Fill the dialog Grid ContentGrid = new Grid(); ContentGrid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(0, GridUnitType.Auto) }); ContentGrid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Star) }); string ColorS = "_"; if (Application.Current.MainWindow is ExpressionWindow) { ColorS += Enum.GetName(typeof(ExpressionWindow.ThemeColors), ((ExpressionWindow)Application.Current.MainWindow).ThemeColor); } BitmapImage IconBmp = null; switch (icon) { case IconType.Warning: IconBmp = new BitmapImage(new Uri("pack://application:,,,/ExpressionWindow;component/icons/warning" + ColorS + ".png")); break; case IconType.Question: IconBmp = new BitmapImage(new Uri("pack://application:,,,/ExpressionWindow;component/Icons/Question" + ColorS + ".png")); break; } Image Icon = new Image() { Source = IconBmp, Stretch = System.Windows.Media.Stretch.None, Margin = new Thickness(10) }; Grid.SetColumn(Icon, 0); ContentGrid.Children.Add(Icon); Label lb = new Label() { Margin = new Thickness(10), VerticalAlignment = System.Windows.VerticalAlignment.Center, Content = Content }; Grid.SetColumn(lb, 1); ContentGrid.Children.Add(lb); dialog.Content = ContentGrid; //Show the dialog dialog.ShowDialog(); return(dialog.Status); }
public static MvcHtmlString UxLinkButton(this HtmlHelper helper, string text, string url, string target = null, ButtonAppearanceType appearance = null, ButtonSize size = null, IconType icon = null, IconPosition iconPosition = null, Popover popover = null, string clientId = null) { var link = new LinkButton(text, url, target, appearance, size, icon, iconPosition, popover,clientId); return helper.RenderUxControl(link); }
public static string ToCssClass(this IconType type) { return("glyphicon glyphicon-" + type.ToString().Replace('_', '-').ToLowerInvariant()); }
public static string GetText(IconType type) { return char.ConvertFromUtf32((int)type); }
public abstract ImageIcon GetImage(IconType type);
public IconInfo(IconType iconType, IconAccess iconAccess) : this(iconType) { this.IconAccess = iconAccess; }
public MessageDialog(IconType icontype, String title, String msg) : base(QSharpDerived.derived) { CPP.Add("$q = new QMessageBox(icontype, $check(title)->qstring(), $check(msg)->qstring());"); CPP.Add("Dialog::$base($q);"); }
public static void Show(string title, string text, IconType iconType) { ShowInternal(title, text, false, iconType); }
public bool SendHelo(string DevName, IconType IconType, string IconFile) { byte[] icon = new byte[0]; if (IconType != IconType.ICON_NONE) { using (System.IO.FileStream stm = File.Open(IconFile, FileMode.Open)) { stm.Read(icon, 0, (int)stm.Length); } } return SendHelo(DevName, IconType, icon); }
public override byte[] GetIcon(IconType iconType) { //TODO: throw new NotImplementedException(); }
/************************************************************************/ /* SendNotification - Payload format */ /* %s - caption */ /* %s - message */ /* %c - icontype ( 0=>NOICON, 1=>JPEG , 2=>PNG , 3=>GIF ) */ /* %d - reserved ( 0 ) */ /* XX - imagedata ( can span multiple packets ) */ /************************************************************************/ public bool SendNotification(string Caption, string Message, IconType IconType, string IconFile) { byte[] icon = new byte[0]; if (IconType != IconType.ICON_NONE) { icon = Resources.ResourceManager.GetRawLogo(IconFile); } byte[] payload = new byte[Caption.Length + Message.Length + 7 + icon.Length]; int offset = 0; for (int i = 0; i < Caption.Length; i++) payload[offset++] = (byte)Caption[i]; payload[offset++] = (byte)'\0'; for (int i = 0; i < Message.Length; i++) payload[offset++] = (byte)Message[i]; payload[offset++] = (byte)'\0'; payload[offset++] = (byte)IconType; for (int i = 0; i < 4; i++) payload[offset++] = (byte)0; Array.Copy(icon, 0, payload, Caption.Length + Message.Length + 7, icon.Length); return Send(PacketType.PT_NOTIFICATION, payload); }
public BitmapSource GetIcon(IconType type) { return(_icons[type]); }
public static byte[] GetIcon(IconType iconType) { return PlatformImplementation.GetIcon(iconType); }
public BaseIcon(IconType type) { this.Type = type; }
public static MvcHtmlString UxBulletListItem(this HtmlHelper helper, string text, IconType iconType = null, string clientId = null) { BulletListItem bullet = new BulletListItem(text, iconType, clientId); return helper.RenderUxControl(bullet); }
public IWriter2 <DropdownMenuItemLink, AnyContent> Link(IconType iconType, object content) { return(Context.CreateWriter <DropdownMenuItemLink, AnyContent>().Content(Context.CreateWriter <Icon>().Type(iconType), content)); }
public static Image GetImage(IconType type, int size) { return Foundation.Instance.GetImage((int)type, size); }
public static void DialogResult(System.Web.UI.Page page, TipoTitulo Titulo, TiposMensajes Mensaje, IconType iconType) { string TituloDescripcion = Titulo.GetDescription(); string MensajeDescripcion = Mensaje.GetDescription(); string iconTypeDescripcion = iconType.ToString(); ScriptManager.RegisterStartupScript(page, page.GetType(), "alert", $"DialogConfirm('{TituloDescripcion}','{MensajeDescripcion}','{iconTypeDescripcion}')", true); }
public IconInfo(IconType iconType) { this.IconType = iconType; }
public static void SweetAlert(dynamic ViewBag, TipoTitulo Titulo, TiposMensajes Mensaje, IconType iconType) { string TituloDescripcion = Titulo.GetDescription(); string MensajeDescripcion = Mensaje.GetDescription(); string iconTypeDescripcion = iconType.ToString(); ViewBag.JSF = $"sweetalert('{TituloDescripcion}','{MensajeDescripcion}','{iconTypeDescripcion}');"; }
/************************************************************************/ /* SendHelo - Payload format */ /* %s - device name (max 128 chars) */ /* %c - icontype ( 0=>NOICON, 1=>JPEG , 2=>PNG , 3=>GIF ) */ /* %s - my port ( 0=>not listening ) */ /* %d - reserved1 ( 0 ) */ /* %d - reserved2 ( 0 ) */ /* XX - imagedata ( can span multiple packets ) */ /************************************************************************/ public bool SendHelo(string devName, IconType iconType, string iconFile) { if (!Connected) return false; if (devName == null) return false; var icon = new byte[0]; if (iconType != IconType.IconNone) { if (File.Exists(iconFile)) icon = File.ReadAllBytes(iconFile); } var payload = new byte[devName.Length + 12 + icon.Length]; var offset = 0; foreach (var t in devName) payload[offset++] = (byte)t; payload[offset++] = (byte)'\0'; payload[offset++] = (byte)iconType; payload[offset++] = 0; payload[offset++] = (byte)'\0'; for (var i = 0; i < 8; i++) payload[offset++] = 0; Array.Copy(icon, 0, payload, devName.Length + 12, icon.Length); return Send(PacketType.PtHelo, payload); }
public MessageBox(string Title, string Message, List <string> Buttons, IconType IconType = IconType.None) : this(Title, Message, ButtonType.Custom, IconType, Buttons) { }
public UIImage IconFor(BankEntity.Type entityType, IconType iconType) { return Icons[entityType][iconType]; }
public MessageBox(string Title, string Message, IconType IconType) : this(Title, Message, ButtonType.OK, IconType) { }