Esempio n. 1
0
        public ModelDialog(MetroWindow window, String path) : base(window)
        {
            InitializeComponent();

            ExternResource res = this.Resources["res"] as ExternResource;

            res.Master = this;
            res.Load(path, ToolWindows.FileBrowser.View.Instance.logic.CurrentDirectory.Path);
        }
Esempio n. 2
0
        public void OnRemove(FoundResource A_0)
        {
            ExternResource res = this.Resources["res"] as ExternResource;

            if (A_0.Parent == null)
            {
                res.Resources.Remove(A_0);
            }
            else
            {
                A_0.Parent.Content.Remove(A_0);
            }
        }
Esempio n. 3
0
        public async void OnDelete(FoundResource A_0)
        {
            var result = await MainWindow.Instance.ShowMessageAsync("Delete Item", "This will delete the selected item, so it will not be loaded in the engine.", MessageDialogStyle.AffirmativeAndNegative);

            if (result == MessageDialogResult.Affirmative)
            {
                ExternResource res = this.Resources["res"] as ExternResource;
                if (A_0.Parent == null)
                {
                    res.Resources.Remove(A_0);
                }
                else
                {
                    A_0.Parent.Content.Remove(A_0);
                }
            }
        }
Esempio n. 4
0
        private void Button_Mesh(object sender, RoutedEventArgs e)
        {
            ExternResource res = this.Resources["res"] as ExternResource;

            res.Resources.Add(new FoundResource("New Mesh", "Path", ResourceType.Mesh, res, false));
        }