Exemplo n.º 1
0
        public void Default(bool setHotKeys = false)
        {
            AlwaysStartSpotify       = true;
            DontPromptToStartSpotify = false;
            CloseSpotifyWithToastify = true;
            ChangeSpotifyVolumeOnly  = false;

            FadeOutTime   = 4000;
            GlobalHotKeys = true;
            DisableToast  = false;

            ToastColorTop    = "#FF000000";
            ToastColorBottom = "#FF000000";
            ToastBorderColor = "#FF000000";

            ToastBorderThickness = 1.0;

            ToastWidth  = 300;
            ToastHeight = 75;

            ToastBorderCornerRadiusTopLeft     = 0;
            ToastBorderCornerRadiusTopRight    = 0;
            ToastBorderCornerRadiusBottomRight = 0;
            ToastBorderCornerRadiusBottomLeft  = 0;

            var position = ScreenHelper.GetDefaultToastPosition(ToastWidth, ToastHeight);

            PositionLeft = position.X;
            PositionTop  = position.Y;

            ClipboardTemplate = "I'm currently listening to {0}";

            SaveTrackToFile          = false;
            PreventAnalytics         = false;
            PreventSleepWhilePlaying = false;

            Hotkey.ClearAll();

            // only set hotkeys when it's requested (we don't set hotkeys when
            // loading from XML since it will create duplicates)
            if (setHotKeys)
            {
                HotKeys = _defaultHotKeys;
            }

            Plugins = new List <PluginDetails>();

            // there are a few settings that we don't really want to override when
            // clearing settings (in fact these are more properties that we store
            // alongside settings for convenience), so don't reset them if they have
            // values
            if (_theOne != null)
            {
                FirstRun        = _theOne.FirstRun;
                PreviousVersion = _theOne.PreviousVersion;
                PreviousOS      = _theOne.PreviousOS;
            }
        }
Exemplo n.º 2
0
        private void ResetPositionIfOffScreen(System.Drawing.Rectangle workingArea)
        {
            var rect = new System.Drawing.Rectangle((int)this.Left, (int)this.Top, (int)this.Width, (int)this.Height);

            if (!System.Windows.Forms.Screen.AllScreens.Any(s => s.WorkingArea.Contains(rect)))
            {
                // get the defaults, but don't save them (this allows the user to reconnect their screen and get their
                // desired settings back)
                var position = ScreenHelper.GetDefaultToastPosition(this.Width, this.Height);

                this.Left = position.X;
                this.Top  = position.Y;
            }
        }
Exemplo n.º 3
0
        public void Default(bool setHotKeys = false)
        {
            AlwaysStartSpotify       = true;
            DontPromptToStartSpotify = false;
            CloseSpotifyWithToastify = true;
            ChangeSpotifyVolumeOnly  = false;

            FadeOutTime   = 4000;
            GlobalHotKeys = true;
            DisableToast  = false;

            ToastColorTop    = "#FF000000";
            ToastColorBottom = "#FF000000";
            ToastBorderColor = "#FF000000";

            ToastBorderThickness = 1.0;

            ToastWidth  = 300;
            ToastHeight = 75;

            ToastBorderCornerRadiusTopLeft     = 0;
            ToastBorderCornerRadiusTopRight    = 0;
            ToastBorderCornerRadiusBottomRight = 0;
            ToastBorderCornerRadiusBottomLeft  = 0;

            var position = ScreenHelper.GetDefaultToastPosition(ToastWidth, ToastHeight);

            PositionLeft = position.X;
            PositionTop  = position.Y;

            ClipboardTemplate = "I'm currently listening to {0}";

            SaveTrackToFile = false;

            Hotkey.ClearAll();

            // only set hotkeys when it's requested (we don't set hotkeys when
            // loading from XML since it will create duplicates)
            if (setHotKeys)
            {
                HotKeys = _defaultHotKeys;
            }

            Plugins = new List <PluginDetails>();
        }
Exemplo n.º 4
0
        public void Default()
        {
            AlwaysStartSpotify       = true;
            DontPromptToStartSpotify = false;
            CloseSpotifyWithToastify = true;
            ChangeSpotifyVolumeOnly  = false;

            FadeOutTime   = 4000;
            GlobalHotKeys = true;
            DisableToast  = false;

            ToastColorTop    = "#FF000000";
            ToastColorBottom = "#FF000000";
            ToastBorderColor = "#FF000000";

            ToastBorderThickness = 1.0;

            ToastWidth  = 300;
            ToastHeight = 75;

            ToastBorderCornerRadiusTopLeft     = 0;
            ToastBorderCornerRadiusTopRight    = 0;
            ToastBorderCornerRadiusBottomRight = 0;
            ToastBorderCornerRadiusBottomLeft  = 0;

            var position = ScreenHelper.GetDefaultToastPosition(ToastWidth, ToastHeight);

            PositionLeft = position.X;
            PositionTop  = position.Y;

            ClipboardTemplate = "I'm currently listening to {0}";

            UseSpotifyBeta = false;

            Hotkey.ClearAll();

            HotKeys = _defaultHotKeys;

            Plugins = new List <PluginDetails>();
        }