Пример #1
0
        private async void GroupEditButton_Click(object sender, RoutedEventArgs e)
        {
            if (this.GroupNameComboBox.SelectedIndex >= 0)
            {
                RemoteBoardGroupModel group = (RemoteBoardGroupModel)this.GroupNameComboBox.SelectedItem;
                await this.Window.RunAsyncOperation(async() =>
                {
                    string name = await MessageBoxHelper.ShowTextEntryDialog("Group Name", group.Name);
                    if (!string.IsNullOrEmpty(name))
                    {
                        group.Name = name;
                        await ChannelSession.SaveSettings();

                        this.RefreshBoardsView();
                    }
                });
            }
        }
Пример #2
0
        private async void GroupDeleteButton_Click(object sender, RoutedEventArgs e)
        {
            if (this.GroupNameComboBox.SelectedIndex >= 0)
            {
                await this.Window.RunAsyncOperation(async() =>
                {
                    if (this.groups.Count > 1)
                    {
                        if (await MessageBoxHelper.ShowConfirmationDialog("Are you sure you wish to delete this group?"))
                        {
                            RemoteBoardGroupModel group = (RemoteBoardGroupModel)this.GroupNameComboBox.SelectedItem;
                            this.CurrentBoard.Groups.Remove(group);
                            await ChannelSession.SaveSettings();

                            this.RefreshBoardsView();
                        }
                    }
                    else
                    {
                        await MessageBoxHelper.ShowMessageDialog("All boards must have at least 1 group");
                    }
                });
            }
        }