public MenuItem(PackIconKind PackIconKind, string Title, string Description, ICommand Command) { this.PackIconKind = PackIconKind; this.Title = Title; this.Description = Description; this.Command = Command; }
public ItemMenu(string header, List <SubItem> subItems, PackIconKind icon, bool enabled) { Header = header; SubItems = subItems; Icon = icon; Enabled = enabled; }
public ColumnTypeItem(ColumnType type, string name, string description, PackIconKind icon) { Type = type; Icon = icon; DisplayName = name; Description = description; }
public static PackIcon CreateIcon(PackIconKind kind) { PackIcon pi = new PackIcon(); pi.Kind = kind; return(pi); }
public AlertDialog(string title, string message = "", PackIconKind icon = PackIconKind.Alert) { InitializeComponent(); Title.Text = title; Message.Text = message; Icon.Kind = icon; }
protected override Task OnLoaded() { this.StatisticNameTextBlock.Text = this.dataTracker.Name; if (this.dataTracker.IsPackIcon) { this.PackIcon.Kind = this.icon = EnumHelper.GetEnumValueFromString <PackIconKind>(this.dataTracker.IconName); } Task.Run(async() => { try { while (true) { await this.Dispatcher.BeginInvoke(new Action(() => { try { this.RefreshOverview(); } catch (Exception ex) { Logger.Log(ex); } })); await Task.Delay(60000); } } catch (Exception ex) { Logger.Log(ex); } }); return(Task.FromResult(0)); }
/// <summary> /// Creates a new <see cref="ChangedFile"/> object which has been added, changed or removed.<para></para> /// /// If a file has been renamed, use ChangedFile(<see cref="string"/> name, <see cref="string"/> oldName) instead! /// </summary> /// <param name="name">The name of the changed file</param> /// <param name="changeType">The type of change which has been made to the file (see <see cref="FileChangeType"/>)</param> public ChangedFile(string name, FileChangeType changeType) { this.name = name; this.changeType = changeType; switch (changeType) { case FileChangeType.Added: icon = PackIconKind.Plus; break; case FileChangeType.Changed: icon = PackIconKind.Pencil; break; case FileChangeType.Deleted: icon = PackIconKind.Minus; isDeleted = true; break; case FileChangeType.Renamed: icon = PackIconKind.CursorText; break; default: icon = PackIconKind.Help; break; } }
public static ImageSource FindPackIconImage(PackIconKind value, Brush foregroundBrush, double penThickness) { if (IconImageDictionary.ContainsKey(value)) { return(IconImageDictionary[value]); } var packIcon = new PackIcon { Kind = value }; var geometryDrawing = new GeometryDrawing { Geometry = Geometry.Parse(packIcon.Data), Brush = foregroundBrush, Pen = new Pen(foregroundBrush, penThickness) }; var drawingGroup = new DrawingGroup { Children = { geometryDrawing }, Transform = new ScaleTransform(1, -1) }; return(new DrawingImage { Drawing = drawingGroup }); }
public ItemMenu(string header, List <SubItem> subItems, PackIconKind icon) { Header = header; SubItems = subItems; Icon = icon; Screen = null; }
//used to create a snackbar message public static UIElement NewSnackbarMessage(PackIconKind iconkind, string message) { //create the stackpanel var sp_parent = new StackPanel() { Orientation = Orientation.Horizontal }; //create the icon var icon = new PackIcon() { Kind = iconkind, Width = 25, Height = 25, Foreground = new SolidColorBrush(Colors.White), RenderTransformOrigin = new Point(0.5, 0.5), }; //create textblock var label = new TextBlock() { Text = message, Margin = new Thickness(10, 0, 0, 0), VerticalAlignment = VerticalAlignment.Center, Foreground = new SolidColorBrush(Colors.White) }; //add to the stackpanel sp_parent.Children.Add(icon); sp_parent.Children.Add(label); return(sp_parent); }
//Snackbar Message that blinks public static UIElement NewSnackbarMessage(PackIconKind iconkind, string message, Color blinkColor, double speed = 1) { //create the color animation var ca = new ColorAnimation() { From = Colors.White, To = blinkColor, Duration = new Duration(TimeSpan.FromSeconds(speed)), AutoReverse = true, RepeatBehavior = RepeatBehavior.Forever, EasingFunction = new SineEase() { EasingMode = EasingMode.EaseInOut } }; //new snakcbar message var SnackbarMessage = UIHelper.NewSnackbarMessage(iconkind, message) as StackPanel; //get elements var icon = SnackbarMessage.Children.OfType <PackIcon>().First(); var label = SnackbarMessage.Children.OfType <TextBlock>().First(); //animate elements icon.Foreground.BeginAnimation(SolidColorBrush.ColorProperty, ca); label.Foreground.BeginAnimation(SolidColorBrush.ColorProperty, ca); return(SnackbarMessage); }
public ControlPopUpRowItemModel(string title, PackIconKind kind, TitleBarButtons button, GeneralRoutingEnum route = GeneralRoutingEnum.None) { Title = title; Kind = kind; Button = button; Route = route; }
public NetworkModelViewClass(Brush brush, PackIconKind packIconKind, string name, string info) { BrushColor = brush; Kind = packIconKind; Name = name; Info = info; }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { DisplayMode mode = (DisplayMode)value; PackIconKind kind = PackIconKind.Numeric1BoxMultipleOutline; switch (mode) { case DisplayMode.One: kind = PackIconKind.Numeric1BoxMultipleOutline; break; case DisplayMode.Two: kind = PackIconKind.Numeric2BoxMultipleOutline; break; case DisplayMode.Four: kind = PackIconKind.Numeric4BoxMultipleOutline; break; case DisplayMode.Six: kind = PackIconKind.Numeric6BoxMultipleOutline; break; case DisplayMode.Nine: kind = PackIconKind.Numeric9BoxMultipleOutline; break; default: break; } return(kind); }
public ItemMenu(string header, string id, UserControl screen, PackIconKind icon) { Header = header; Screen = screen; Icon = icon; APID = id; }
public StatisticsOverviewControl(StatisticDataTrackerBase dataTracker) { this.dataTracker = dataTracker; this.icon = EnumHelper.GetEnumValueFromString <PackIconKind>(this.dataTracker.IconName); InitializeComponent(); }
public ItemMenu(string header, string id, Cashier cashier, PackIconKind icon) { Header = header; _Cashier = cashier; Icon = icon; APID = id; }
public ItemMenu(ePAGE header, PackIconKind icon, Visibility visibility, SubItem[] subitems) { Header = header; Icon = icon; Visibility = visibility.ToString(); SubItems = subitems; }
//https://gist.github.com/Phyxion/160a6f04e6083016d4b2a3aed3c4fe71 public static Image GetImage( PackIconKind iconKind, Brush brush, Pen pen) { var icon = new PackIcon { Kind = iconKind }; var geometryDrawing = new GeometryDrawing { Geometry = Geometry.Parse(icon.Data), Brush = brush, Pen = pen }; var drawingGroup = new DrawingGroup { Children = { geometryDrawing } }; var img = new DrawingImage { Drawing = drawingGroup }; var stream = DrawingImageToStream(img); return(Image.FromStream(stream)); }
public SubItem(string text, CmdLogType logtype, PackIconKind icon, UserControl screen = null) { Text = text; LogType = logtype; Icon = icon; Screen = screen; }
protected void SetMenuImage(PackIconKind packIconKind) { PackIconImage.Height = 30; PackIconImage.Width = 30; PackIconImage.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("White")); PackIconImage.Kind = packIconKind; }
/// <inheritdoc /> public void ShowNotification(string title, string message, PackIconKind icon) { Execute.OnUIThread(() => { // Convert the PackIcon to an icon by drawing it on a visual DrawingVisual drawingVisual = new(); DrawingContext drawingContext = drawingVisual.RenderOpen(); PackIcon packIcon = new() { Kind = icon }; Geometry geometry = Geometry.Parse(packIcon.Data); // Scale the icon up to fit a 256x256 image and draw it geometry = Geometry.Combine(geometry, Geometry.Empty, GeometryCombineMode.Union, new ScaleTransform(256 / geometry.Bounds.Right, 256 / geometry.Bounds.Bottom)); drawingContext.DrawGeometry(new SolidColorBrush(Colors.White), null, geometry); drawingContext.Close(); // Render the visual and add it to a PNG encoder (we want opacity in our icon) RenderTargetBitmap renderTargetBitmap = new(256, 256, 96, 96, PixelFormats.Pbgra32); renderTargetBitmap.Render(drawingVisual); PngBitmapEncoder encoder = new(); encoder.Frames.Add(BitmapFrame.Create(renderTargetBitmap)); // Save the PNG and get an icon handle using MemoryStream stream = new(); encoder.Save(stream); Icon convertedIcon = Icon.FromHandle(new Bitmap(stream).GetHicon()); // Show the 'balloon' _taskBarIcon.ShowBalloonTip(title, message, convertedIcon, true); }); }
public LootQueueEntry(string lootName, Rarity lootRarity, PackIconKind lootIconKind, int quantity) { LootName = lootName; LootRarity = lootRarity; LootIconKind = lootIconKind; Quantity = quantity; }
public ItemMenu(string header, List <SubItem> subItems, PackIconKind icon, UserControl screen = null) { Header = header; SubItems = subItems; Icon = icon; Screen = screen; }
public MenuItem(string xName = "", PackIconKind icon = PackIconKind.None, string data = "", UserControl usc = null) { this.xName = xName; this.icon = icon; this.data = data; this.usc = usc; }
public void GetStatus() { int good = 0; int bad = 0; int total = BachupDestinationStatus.Count; foreach (bool status in BachupDestinationStatus.Values) { good = status ? good += 1 : good; bad = status ? bad : bad += 1; } if (good == total) { Icon = PackIconKind.Check; Type = BachupHistoryType.fullBachup; return; } if (bad == total) { Icon = PackIconKind.CloseOctagonOutline; Type = BachupHistoryType.failedBachup; return; } Icon = PackIconKind.WarningOutline; Type = BachupHistoryType.partialBachup; }
//public SubItem(string name, UserControl screen = null) //public SubItem(string name, UserControl screen) public SubItem(string name, string tip, PackIconKind icon, UserControl user) { Name = name; Screen = user; this.tip = tip; Icono = icon; }
public ItemMenu(string header, List <SubItem> subItems, PackIconKind icon) { Header = header; SubItems = subItems; Icon = icon; APID = ""; }
public StatisticsOverviewControl(StatisticDataTrackerBase dataTracker, PackIconKind icon) { this.dataTracker = dataTracker; this.icon = icon; InitializeComponent(); }
public ItemMenu(string itemName, PackIconKind icon, List <SubItem> subItems) { /* MoveToMenuPageCommand = new CommandViewModel(Execute);*/ this.ItemName = itemName; this.Icon = icon; this.SubItems = subItems; }