コード例 #1
0
        /// <summary>
        /// Edit user nickname button
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_EditName_Click(object sender, RoutedEventArgs e)
        {
            SimpleTextPrompt prompt = new SimpleTextPrompt("Edit Name",
                                                           currentProfile.nickname);

            prompt.ReturnText += (name) => {
                ChangeNickname(currentProfile.id, name);
            };
            prompt.ShowDialog();
        }
コード例 #2
0
        private void Context_ChangeCallsign(object sender, RoutedEventArgs e)
        {
            Wing             wing   = (sender as MenuItem).DataContext as Wing;
            SimpleTextPrompt prompt = new SimpleTextPrompt(
                "Change Callsign", wing.callsign);

            prompt.ReturnText += (cs) => {
                MessageRouter.Instance.Send(
                    MessageRouter.Service.Ops,
                    new ANWI.Messaging.Ops.ModifyUnit()
                {
                    opUUID   = opUUID,
                    unitUUID = wing.uuid,
                    type     = ANWI.Messaging.Ops.ModifyUnit.ChangeType.ChangeCallsign,
                    str      = cs
                },
                    null);
            };
            prompt.ShowDialog();
        }