private void SubscribeMenuEvent(object sender, PWMessage <MenuCommands> msg) { if (!IsActive) { return; } Update(msg.Content); }
private void Update(object sender, PWMessage <MenuCommands> msg) { IRequestAction action = null; _actions.TryGetValue(msg.Content, out action); if (action != null) { LoginAction loginAction = action as LoginAction; if (loginAction != null) { loginAction.IsCancel = msg.Content == MenuCommands.CancelConnect; } action.Perform(); } }
private void OnAddShape(object sender, PWMessage <ShapeType> msg) { AddLayer(msg.Content, ShapeAddMode.Menu); }