public static Action RemoveCard(this QuizEditor quizEditor, QuizEditorCard card) { return(() => { quizEditor.flp_cards.Controls.Remove(card); quizEditor.CheckFixEmptyCards(); }); }
public static Action AddCard(this QuizEditor quizEditor, QuizEditorCard card, int index) { return(() => { quizEditor.flp_cards.Controls.Add(card); quizEditor.flp_cards.Controls.SetChildIndex(card, index); quizEditor.CheckFixEmptyCards(); }); }
public MainWindowViewModel() { // get current IP and show it Networking.Networking.GetLocalIPAddressAsync().ContinueWith(t => CurrentIP = t.Result); StartGameCommand = new RelayCommand(StartGameMethod, o => CurrentIP != null); // replace with method OpenEditorCommand = new RelayCommand(o => { var editor = new QuizEditor(); editor.Show(); }, o => true); }
static void Init() { QuizEditor window = EditorWindow.GetWindow <QuizEditor>(); window.Show(); }