private void Styler_Tick(object sender, System.EventArgs e) { try { x += 20; var workingArea = Screen.GetWorkingArea(this); Location = new Point(workingArea.Right - x, workingArea.Bottom - Size.Height - 10); if (Location.X == workingArea.Right - Size.Width || Location.X < workingArea.Right - Size.Width) { Styler.Stop(); } } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); } }
private void Styler_Tick(object sender, EventArgs e) { try { _startPosY -= 5; if (_startPosY <= Screen.PrimaryScreen.WorkingArea.Height - Height) { Styler?.Stop(); } else { SetDesktopLocation(_startPosX, _startPosY); } } catch (Exception ex) { WebErrorLog.ErrorInstence.StartErrorLog(ex); } }