private void positionForm(string comment) { //Split by a space. string[] split = comment.Split((char)32); if (split.Length < 2) { return; } ScreenPosition position = ScreenPositionHelper.GetFromString(split[1]); ScreenPositionHelper.DockForm(this, this._screen, position); CommentSetting.Position = position.ToString(); }
private void Comments_Load(object sender, EventArgs e) { //Position textbox this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; _screenPosition = ScreenPositionHelper.GetFromString(CommentSetting.Position); if (Screen.AllScreens.Length == 1) { _screen = Screen.PrimaryScreen; } else { _screen = Screen.AllScreens[CommentSetting.Screen]; } ScreenPositionHelper.UpdateScreenPosition(this, _screen); txtComments.Text = default(string); this.Opacity = CommentSetting.Opacity; }