Exemplo n.º 1
0
        protected override void OnShown(EventArgs e)
        {
            ScaledScreen windowScreen = ScaledScreen.AllScaledScreens[0];

            // if mode = top-right
            // Left = windowScreen.UnscaledBounds.Width - Width; //Size.Width;
            // Top = 0;

            // if mode = bottom-right
            //Left = windowScreen.UnscaledWorkingArea.Width - Width; //Size.Width;
            //Top = windowScreen.UnscaledWorkingArea.Height - Height;

            // position this window to legenda position
            Rectangle legendaRect = Wallpaper.GetLegendaRect(_photoDesktop.GetMainScreenName());

            this.Left = legendaRect.Left + offset.X;
            this.Top  = legendaRect.Top - this.Height + offset.Y;


            base.OnShown(e);

            //Width = 400;
            //Height = 100;
            //Left = windowScreen.UnscaledWorkingArea.Width - Width; //Size.Width;
            //Top = windowScreen.UnscaledWorkingArea.Height - Height;

            // if debug mode; show settings
#if DEBUG
            SettingsForm settingsForm = new SettingsForm(_photoDesktop);
            if (settingsForm.ShowDialog() == DialogResult.OK)
            {
                LoadSettings(settingsForm.RefreshImageList);
            }
#endif
        }
Exemplo n.º 2
0
        protected override void OnShown(EventArgs e)
        {
            // JS: make 0 flexivle

            ScaledScreen windowScreen = ScaledScreen.AllScaledScreens[0];

            // if mode = top-right
            // Left = windowScreen.UnscaledBounds.Width - Width; //Size.Width;
            // Top = 0;

            // if mode = bottom-right
            Left = windowScreen.UnscaledBounds.Width - Width; //Size.Width;
            Top  = windowScreen.UnscaledBounds.Height - Height;


            base.OnShown(e);
        }