removing dependency on windows all around
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1e48c041b1
commit
7808363a07
10 changed files with 59 additions and 70 deletions
|
@ -11,16 +11,13 @@ namespace Sledgemapper.UI
|
|||
public partial class NoteList
|
||||
{
|
||||
private readonly CommunicationManager CommunicationManager;
|
||||
private readonly Window Window;
|
||||
private readonly TinyMessengerHub Messenger;
|
||||
|
||||
|
||||
public NoteList(CommunicationManager communicationManager, TinyMessengerHub messenger, Window window)
|
||||
public NoteList(CommunicationManager communicationManager, TinyMessengerHub messenger)
|
||||
{
|
||||
BuildUI();
|
||||
CommunicationManager = communicationManager;
|
||||
Messenger = messenger;
|
||||
Window = window;
|
||||
for (var i = 0; i < CommunicationManager.SessionData.Notes.Values.Count; i++)
|
||||
{
|
||||
var note = CommunicationManager.SessionData.Notes.Values.ElementAt(i);
|
||||
|
@ -33,10 +30,11 @@ namespace Sledgemapper.UI
|
|||
Messenger.Publish(new CenterOnTileMessage(this) { X = note.X, Y = note.Y });
|
||||
};
|
||||
|
||||
item.BtnNoteView.Click += (s, e) => { EditNote(note); window.Close(); };
|
||||
item.BtnNoteView.Click += (s, e) => { EditNote(note); this.GetContainingWindow().Close(); };
|
||||
StackNotesList.AddChild(item);
|
||||
}
|
||||
}
|
||||
|
||||
private void EditNote(Note note)
|
||||
{
|
||||
State.Instance.SelectedNote = new Note { X = note.X, Y = note.Y, Text = note.Text };
|
||||
|
@ -44,11 +42,10 @@ namespace Sledgemapper.UI
|
|||
{
|
||||
Title = $" Note on {note.X}:{note.Y}"
|
||||
};
|
||||
var noteWindow = new NoteWindow(CommunicationManager, window, note);
|
||||
var noteWindow = new NoteWindow(CommunicationManager, note);
|
||||
|
||||
window.Content = noteWindow;
|
||||
window.ShowModal(Window.Desktop);
|
||||
|
||||
window.ShowModal(Desktop);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue