コード例 #1
0
 //Save to existing file
 private void SaveToExistingFile()
 {
     if (StaticValues.staticFilename != null)
     {
         SaveToXML save = new SaveToXML(products, clients, this);
         save.Save();
         StaticValues.isSaved = true;
     }
     else
     {
         SaveByDialog();
     }
 }
コード例 #2
0
        //------------------------------------------------------


        //-----------------------SAVE & OPEN--------------------
        //Save by FileDialog
        private void SaveByDialog()
        {
            SaveFileDialog saveAsDialog = new SaveFileDialog();

            saveAsDialog.Filter = "dls файл | *.dls";
            if (saveAsDialog.ShowDialog() == true)
            {
                SaveToXML save = new SaveToXML(products, clients, this);
                StaticValues.staticFilename = saveAsDialog.FileName;
                save.Save();
                StaticValues.isSaved = true;
            }
        }