Exemplo n.º 1
0
        void ScenesListItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
        {
            if (scenesList.SelectedItems.Count == 0)
            {
                return;
            }

            scene.Scene s = scene.Scene.GetScene(scenesList.SelectedItems[0].Text);
            if (s != null && !s.UI.Opened)
            {
                s.UI.Open();
                this.BringToFront();

                s.UI.Activate();
            }
        }
Exemplo n.º 2
0
        public static void Save(scene.Scene scene, bool open = false)
        {
            if (generic.Oriole.CurrentPath == Environment.CurrentDirectory)
            {
                Error("Empty path!", "Export source is not defined!");
            }
            else
            {
                File.WriteAllLines(generic.Oriole.CurrentPath + scene.Name + ".scene", scene.EXData);

                if (open)
                {
                    System.Diagnostics.Process.Start(generic.Oriole.CurrentPath + scene.Name + ".scene");
                }
            }
        }
Exemplo n.º 3
0
        public static string[] Load(scene.Scene scene)
        {
            if (generic.Oriole.CurrentPath == Environment.CurrentDirectory)
            {
                Error("Empty path!", "Export source is not defined!");

                return(new string[] { });
            }
            else
            {
                if (File.Exists(generic.Oriole.CurrentPath + scene.Name + ".scene"))
                {
                    return(File.ReadAllLines(generic.Oriole.CurrentPath + scene.Name + ".scene"));
                }
                else
                {
                    Error("File not saved later!");

                    return(new string[] { });
                }
            }
        }