Exemplo n.º 1
0
        public MainWindow()
        {
            readConfigFromEnvOrSettings();

            InitializeComponent();
            ForgeObjects.View = ForgeObjects.FindResource("tileView") as ViewBase;
            DataContext       = this;

            var values = Enum.GetValues(typeof(Region));

            foreach (var value in values)
            {
                ForgeRegion.Items.Add(value.ToString());
            }
            ForgeRegion.SelectedItem = Region.US.ToString();
        }
Exemplo n.º 2
0
        // In debug, Drag'nDrop will not work if you run Developer Studio as administrator
        private async void ForgeScenes_Drop(object sender, DragEventArgs e)
        {
            Handled(e);
            try {
                //State =StateEnum.Idle ;
                if (e.Data.GetDataPresent(DataFormats.FileDrop))
                {
                    ObservableCollection <ForgeObjectInfo> items = ItemsSource;
                    string [] files = (string [])e.Data.GetData(DataFormats.FileDrop);
                    await Task.WhenAll(files.Select(filename => UploadExecute(items, System.IO.Path.GetFileName(filename), filename)));

                    ItemsSource = items;
                    ForgeObjects.SelectAll();
                }
            } finally {
                //State =StateEnum.Idle ;
            }
        }