Exemple #1
0
        private void btnDownloadItemData_Copy_Click(object sender, RoutedEventArgs e)
        {
            popup1.IsOpen = false;
            var fileDialog = new OpenFileDialog();

            fileDialog.Multiselect = false;
            bool?ftoload = fileDialog.ShowDialog(this);

            if (ftoload.Value)
            {
                ItemAttributes         = new ItemAttributes(fileDialog.FileName);
                lbItemAttr.ItemsSource = ItemAttributes.Attributes;
                UpdateAllAttributeList();
            }
        }
Exemple #2
0
        private void button1_Click_1(object sender, RoutedEventArgs e)
        {
            string filetoload = "";

            if (File.Exists("Data\\get-items"))
            {
                filetoload = "Data\\get-items";
            }
            else if (File.Exists("Data\\get-items.txt"))
            {
                filetoload = "Data\\get-items.txt";
            }
            else
            {
                popup1.IsOpen = true;
                return;
            }


            ItemAttributes         = new ItemAttributes(filetoload);
            lbItemAttr.ItemsSource = ItemAttributes.Attributes;
            UpdateAllAttributeList();
        }