Esempio n. 1
0
        private void DataListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListBox listbox = (ListBox)sender;

            ListViewTemplate view = (ListViewTemplate)listbox.SelectedItem;

            if (view == null)
            {
                return;
            }

            if (oldview != null)
            {
                string name = GetNpcName(oldview.Data.NpcId);

                _listview
                .Where(v => v.Data.NpcId == oldview.Data.NpcId)
                .First()
                .Name = name;

                listbox.Items.Refresh();
            }

            oldview = view;
            propertyGrid.SelectedObject = view.Data;
        }
Esempio n. 2
0
 private void AddButton_Click(object sender, RoutedEventArgs e)
 {
     ListViewTemplate view = new ListViewTemplate();
     view.Name = "N/A";
     view.Data = new SpawnTemplate();
     _listview.Add(view);
     RefreshListBox();
 }
Esempio n. 3
0
        private void AddButton_Click(object sender, RoutedEventArgs e)
        {
            ListViewTemplate view = new ListViewTemplate();

            view.Name = "N/A";
            view.Data = new SpawnTemplate();
            _listview.Add(view);
            RefreshListBox();
        }
Esempio n. 4
0
        private void DataListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ListBox listbox = (ListBox)sender;

            ListViewTemplate view = (ListViewTemplate)listbox.SelectedItem;

            if (view == null)
                return;

            if (oldview != null)
            {
                string name = GetNpcName(oldview.Data.NpcId);

                _listview
                    .Where(v => v.Data.NpcId == oldview.Data.NpcId)
                    .First()
                    .Name = name;

                listbox.Items.Refresh();
            }

            oldview = view;
            propertyGrid.SelectedObject = view.Data;
        }