Пример #1
0
        private async void OnAddUserButtonClick(object sender, RoutedEventArgs e)
        {
            AddUserDialog Dialog = new AddUserDialog();
            await Dialog.ShowAsync();

            if (!Dialog.Cancelled)
            {
                string FailReason = await NetworkManager.AddUserViewPermission(Dialog.Username);

                if (FailReason != null)
                {
                    MessageDialog Message = new MessageDialog(FailReason, "Error");
                    await Message.ShowAsync();
                }
                else
                {
                    await UpdateList();
                }
            }
        }