예제 #1
0
        public static void CreateEthlargementNotEnabledInfo()
        {
            var notification = new Notification(NotificationsType.Info, NotificationsGroup.EthlargementNotEnabled, Tr("EthLargement-Pill not enabled"), Tr("EthLargement-Pill is not enabled. is not running. Enable it for 50% higher hashrates. Run NiceHash Miner as an Administrator and enable Run Ethlargement in advanced settings."));

            notification.Action = new NotificationAction
            {
                Info   = Tr("Run As Administrator"),
                Action = () => { RunAsAdmin.SelfElevate(); }
            };
            NotificationsManager.Instance.AddNotificationToList(notification);
        }
예제 #2
0
        public static void CreateEthlargementElevateInfo()
        {
            var notification = new Notification(NotificationsType.Info, NotificationsGroup.EthlargementElevate, Tr("Ethlargement-Pill Settings Insufficient Permissions"), Tr("Can't run Ethlargement-Pill due to insufficient permissions. If you want to use this feature you need to run as Administrator."));

            notification.Action = new NotificationAction
            {
                Info   = Tr("Run As Administrator"),
                Action = () => { RunAsAdmin.SelfElevate(); }
            };
            NotificationsManager.Instance.AddNotificationToList(notification);
        }
예제 #3
0
        public static void CreateDeviceMonitoringNvidiaElevateInfo()
        {
            var notification = new Notification(NotificationsType.Info, NotificationsGroup.MonitoringNvidiaElevate, Tr("NVIDIA TDP Settings Insufficient Permissions"), Tr("Disabled NVIDIA power mode settings due to insufficient permissions. If you want to use this feature you need to run as Administrator."));

            notification.Action = new NotificationAction
            {
                Info   = Tr("Run As Administrator"),
                Action = () => { RunAsAdmin.SelfElevate(); }
            };
            NotificationsManager.Instance.AddNotificationToList(notification);
        }
        public static void CreateOptimizationProfileNotEnabledInfo()
        {
            var notification = new Notification(NotificationsType.Info, NotificationsGroup.OptimizationWithProfilesDisabled, Tr("Optimization profiles not enabled"), Tr("Optimization profiles are not enabled. Enable for optimization of some GPUs for a bigger hash rate. Run NiceHash Miner as an Administrator and enable Optimization profiles in advanced settings."));

            notification.Action = new NotificationAction
            {
                Info   = Tr("Run As Administrator"),
                Action = () => { RunAsAdmin.SelfElevate(); }
            };
            NotificationsManager.Instance.AddNotificationToList(notification);
        }
        public static void CreateOptimizationProfileElevateInfo()
        {
            var notification = new Notification(NotificationsType.Info, NotificationsGroup.OptimizationProfilesElevate, Tr("Optimization profiles Insufficient Permissions"), Tr("Can't run optimization profiles due to insufficient permissions. If you want to use this feature you need to run as Administrator."));

            notification.Action = new NotificationAction
            {
                Info   = Tr("Run As Administrator"),
                Action = () => { RunAsAdmin.SelfElevate(); }
            };
            NotificationsManager.Instance.AddNotificationToList(notification);
        }
예제 #6
0
        protected void OnBidClick(object sender, EventArgs e)
        {
            try
            {
                var config  = SPContext.Current.Web.Lists[Constants.ConfigListName].Items[0];
                var endDate = DateTime.Parse(config["EndDate"].ToString());
                if (TimeHelper.AuctionHasEnded(endDate))
                {
                    AuctionEndedPanel.Visible = true;
                    HomeLink.NavigateUrl      = Page.Request.Path;
                }
                else
                {
                    AuctionEndedPanel.Visible = false;

                    var bidder = SPContext.Current.Web.CurrentUser;

                    RunAsAdmin.Run((site, web) =>
                    {
                        var itemList = web.Lists[Constants.ItemsListName];
                        var item     = itemList.GetItemById(_itemId);
                        NotifyOldBidder(web, item);
                        UpdateCurrentBidPrice(item);
                        IncrementBidCount(item);
                        AddBidder(web, item, bidder);
                        NotifyBidder(web, item, bidder);
                        item.Update();
                    });

                    Page.Response.Redirect(string.Format("{0}?uicontrol=ItemDetails&ItemId={1}", Page.Request.Path, _itemId));
                }
            }
            catch
            {
                throw;
            }
        }