Esempio n. 1
0
        private void ContextMenu_OnAddClicked(object sender, RoutedEventArgs e)
        {
            Dialogs.AddEditUsernameDialog aeu = new Dialogs.AddEditUsernameDialog();
            var result = aeu.ShowDialog();

            if (result != null && result == true)
            {
                ReturnedChannelConfig.SuperMods.Add(aeu.ReturnedUsername);
                ListBox_SuperMods.Items.Refresh();
            }
        }
Esempio n. 2
0
        private void ContextMenu_OnEditClicked(object sender, RoutedEventArgs e)
        {
            if (ListBox_SuperMods.SelectedItem != null)
            {
                var id = ListBox_SuperMods.SelectedIndex;

                Dialogs.AddEditUsernameDialog aeu = new Dialogs.AddEditUsernameDialog(ReturnedChannelConfig.SuperMods[id]);
                var result = aeu.ShowDialog();
                if (result != null && result == true)
                {
                    ReturnedChannelConfig.SuperMods[id] = aeu.ReturnedUsername;
                    ListBox_SuperMods.Items.Refresh();
                }
            }
        }