Beispiel #1
0
        public async Task Show(PackIconFontAwesomeKind icon, double progress = -1)
        {
            this.Area.Visibility = Visibility.Visible;
            this.Icon.Kind       = icon;

            if (progress < 0)
            {
                this.Progress.IsIndeterminate = true;
            }
            else
            {
                this.Progress.IsIndeterminate = false;
                this.Progress.Value           = progress * 100;
            }

            if (!this.isOpen)
            {
                this.isOpen = true;
                Storyboard storyboard = this.Resources["FadeIn"] as Storyboard;
                storyboard.Begin();

                bool complete = false;
                storyboard.Completed += (s, e) => { complete = true; };

                while (!complete)
                {
                    await Task.Delay(32);
                }
            }
        }
Beispiel #2
0
        public HamburgerMenuItemViewModel(PackIconFontAwesomeKind kind, string text, string navigationPanelName)
        {
            this.IconKind = new ReactivePropertySlim <PackIconFontAwesomeKind>(kind)
                            .AddTo(this.disposable);
            this.MenuText = new ReactivePropertySlim <string>(text)
                            .AddTo(this.disposable);

            this.NavigationPanel = navigationPanelName;
        }
Beispiel #3
0
        public MenuItemViewModel(
            ITranslationEngine translationEngine,
            string label,
            PackIconFontAwesomeKind icon,
            Action navigate)
        {
            this.translationEngine = translationEngine;
            this.navigate          = navigate;
            this.label             = label;
            Icon = icon;

            translationEngine.LanguageChanged += LanguageChanged;

            LanguageChanged();
        }
 public static IconoMenuEstatico Crear(PackIconFontAwesomeKind clase) => new IconoMenuEstatico(new PackIconFontAwesome {
     Kind = clase
 });
 public FontAwesomeImageExtension(PackIconFontAwesomeKind kind)
 {
     this.Kind = kind;
 }
Beispiel #6
0
        public static void AddToNotificationList(string applicationName, string applicationPath, CustomNotification.ActionType actionType, DateTime time, bool notActivated)
        {
            string title = actionType == ActionType.BlockAllow ? "First connection: " :
                           actionType == ActionType.UnblockAllow ? "Blocked connection: " :
                           actionType == ActionType.SuspendWhitelist ? "High CPU load: " :
                           actionType == ActionType.TerminateWhitelist ? "Suspended: " :
                           "";

            string content = actionType == ActionType.BlockAllow ?
                             "Application at the following path initiated a network connection:\n" :
                             actionType == ActionType.UnblockAllow ?
                             "Application at the following path was blocked from connecting to the network:\n" :
                             actionType == ActionType.SuspendWhitelist ?
                             "Application at the following path is using a high percentage of processor time:\n" :
                             actionType == ActionType.TerminateWhitelist ?
                             "Application at the following path was suspended for using a high percentage of processor time:\n" :
                             null;

            string buttonLabel = actionType == ActionType.BlockAllow ? "Block" :
                                 actionType == ActionType.UnblockAllow ? "Unblock" :
                                 actionType == ActionType.SuspendWhitelist ? "Whitelist" :
                                 actionType == ActionType.TerminateWhitelist ? "Whitelist" :
                                 null;

            SolidColorBrush iconColor = actionType == ActionType.BlockAllow ?
                                        new SolidColorBrush(Color.FromArgb(255, 0, 182, 0)) :
                                        actionType == ActionType.UnblockAllow ?
                                        new SolidColorBrush(Color.FromArgb(255, 182, 0, 0)) :
                                        actionType == ActionType.SuspendWhitelist ?
                                        new SolidColorBrush(Color.FromArgb(255, 0, 150, 182)) :
                                        actionType == ActionType.TerminateWhitelist ?
                                        new SolidColorBrush(Color.FromArgb(255, 204, 80, 0)) :
                                        new SolidColorBrush(Color.FromArgb(255, 255, 255, 255));

            iconColor.Freeze();

            PackIconFontAwesomeKind iconKind = actionType == ActionType.BlockAllow ?
                                               PackIconFontAwesomeKind.InfoCircleSolid :
                                               actionType == ActionType.UnblockAllow ?
                                               PackIconFontAwesomeKind.TimesCircleSolid :
                                               actionType == ActionType.SuspendWhitelist ?
                                               PackIconFontAwesomeKind.InfoCircleSolid :
                                               actionType == ActionType.TerminateWhitelist ?
                                               PackIconFontAwesomeKind.MoonSolid :
                                               PackIconFontAwesomeKind.CircleSolid;

            var n = new NotificationItem
            {
                ApplicationName = applicationName,
                ApplicationPath = applicationPath,
                Title           = title + applicationName,
                Content         = content + applicationPath,
                IconKind        = iconKind,
                IconColor       = iconColor,
                ButtonLabel     = buttonLabel,
                Type            = (int)actionType,
                NotActivated    = notActivated,
                Time            = time
            };

            NotificationList.Add(n);
        }
Beispiel #7
0
 protected ClientListBase(string name, PackIconFontAwesomeKind icon)
 {
     Name = name;
     Icon = icon;
 }
Beispiel #8
0
 public OverviewTabBase(string title, PackIconFontAwesomeKind icon)
 {
     Title = title;
     Icon  = icon;
 }