Exemplo n.º 1
0
        /// <summary>
        /// Saves The Company File
        /// </summary>
        public void SaveCompanyFile()
        {
            if (_saveFile == null)
            {
                SaveFileDialog sfd = new SaveFileDialog();
                sfd.Filter           = "All (*.*)|*.*|json (*.json)|*.json";
                sfd.FilterIndex      = 2;
                sfd.AddExtension     = true;
                sfd.RestoreDirectory = true;
                if (sfd.ShowDialog() == true)
                {
                    _saveFile = sfd.FileName;
                }
                else
                {
                    return;
                }
            }

            SaveSingletonObject(_cm.AllObjects(), _saveFile);
        }