new note window

This commit is contained in:
Michele 2020-11-29 23:54:48 +00:00 committed by Michele Scandura
parent da302af8bf
commit ec98d53f48
5 changed files with 167 additions and 0 deletions

View file

@ -197,6 +197,55 @@ namespace Sledgemapper
}
}
if (mouseState.RightButton == ButtonState.Released && mouseState.RightButton != oldMouseState.RightButton)
{
var contextMenu = new TextButton { Text = "New Note" };
contextMenu.Click += (s, e) =>
{
_desktop.HideContextMenu();
var noteWindow = new NoteWindow();
Window window = new()
{
Title = "Note"
};
// var content = new LoginRegisterWindow();
// content.RdoLogin.IsPressed = true;
// content.RdoLogin.Click += (s, e) =>
// {
// content.TxtFirstname.Visible = false;
// content.TxtLastname.Visible = false;
// content.TxtInitials.Visible = false;
// content.LblFirstname.Visible = false;
// content.LblLastname.Visible = false;
// content.LblInitials.Visible = false;
// content.BtnLogin.Visible = true;
// content.BtnRegister.Visible = false;
// window.Title = "Login";
// };
// content.RdoRegister.Click += (s, e) =>
// {
// content.TxtFirstname.Visible = true;
// content.TxtLastname.Visible = true;
// content.TxtInitials.Visible = true;
// content.LblFirstname.Visible = true;
// content.LblLastname.Visible = true;
// content.LblInitials.Visible = true;
// content.BtnLogin.Visible = false;
// content.BtnRegister.Visible = true;
// window.Title = "Register";
// };
// content.BtnRegister.Click += OnButtonRegisterClick;
// content.BtnLogin.Click += OnButtonLoginClick;
window.Content = noteWindow;
window.ShowModal(_desktop);
};
_desktop.ShowContextMenu(contextMenu, mouseState.Position);
}
if (newState.IsKeyDown(Keys.LeftControl)
&& mouseState.LeftButton == ButtonState.Pressed
&& ((mouseState.LeftButton != oldMouseState.LeftButton) || (_state.SelectedTile.X != _state.HoveredTile.X && _state.SelectedTile.Y != _state.HoveredTile.Y)))