public void OpenFile(String fileName)
 {
     Module.Scenes.Clear();
     Module = Softrope.Load(Module, fileName);
     SyncUi();
     Properties.Settings.Default.LastSavePath = System.IO.Path.GetDirectoryName(fileName);
 }
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     Properties.Settings.Default.Save();
     Softrope.UnloadBass();
     foreach (Window window in Application.Current.Windows)
     {
         if (window != sender)
         {
             window.Close();
         }
     }
 }
 public SoftropeMainUi()
 {
     this.InitializeComponent();
     Softrope.InitialiseBass();
     Softrope.SetBuffer();
     Module = new Module();
     System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly(GetType());
     Status.Text = String.Format("{0}. Version {1}.",
                                 assembly.GetName().Name,
                                 assembly.GetName().Version
                                 );
 }
        private void Test_Click(object sender, RoutedEventArgs e)
        {
            Properties.Settings.Default.Save();

            Microsoft.Win32.SaveFileDialog saveFd = new Microsoft.Win32.SaveFileDialog();
            saveFd.InitialDirectory = Properties.Settings.Default.LastSavePath;
            saveFd.Filter           = "Softrope Module (*.softrope)|*.softrope";

            if ((bool)saveFd.ShowDialog())
            {
                Softrope.Save(Module, saveFd.FileName);
                MessageBox.Show("Saved");
                Module.IsDirty = false;
                Properties.Settings.Default.LastSavePath = System.IO.Path.GetDirectoryName(saveFd.FileName);
            }
        }
Ejemplo n.º 5
0
 private void ExportZipItem_Click(object sender, RoutedEventArgs e)
 {
     Softrope.SaveSceneZip(this.Scene, "d:\\test.zip");
     MessageBox.Show("Exported");
 }