Example #1
0
        public bool Save()
        {
            if (FileName.Length == 0)
            {
                SaveFileDialog dialog = new SaveFileDialog()
                {
                    Filter = "(*.age)|*.age"
                };

                if (dialog.ShowDialog() == true)
                {
                    FileName = dialog.FileName;
                    return(autosarApp.SaveToFile(dialog.FileName));
                }
            }
            else
            {
                return(autosarApp.SaveToFile(FileName));
            }
            return(false);
        }
Example #2
0
 private void SaveProject_Click(object sender, RoutedEventArgs e)
 {
     if (autosarApp.FileName != null)
     {
         if (autosarApp.FileName.Length != 0)
         {
             autosarApp.SaveToFile(autosarApp.FileName);
         }
         else
         {
             openSaveController.SaveAs();
         }
     }
     else
     {
         openSaveController.SaveAs();
     }
 }