예제 #1
0
        public static bool SaveCollection(RsReportCollection aCollection)
        {
            if (aCollection.FileName == "")
            {
                bool lNoSave = false;

                while (RsViewEngine._dlgSaveCollection.ShowDialog() != DialogResult.OK)
                {
                    if (CRSMessageBox.ShowBox(
                            RsViewEngine.Locale.GetMessage("collectionmustsave"),
                            RsViewEngine.Locale.GetMessageTitle("collectionmustsave"),
                            MessageBoxButtons.OKCancel,
                            MessageBoxIcon.Asterisk
                            ) == DialogResult.Cancel)
                    {
                        lNoSave = true;
                        break;
                    }
                }

                if (!lNoSave)
                {
                    aCollection.SaveToXML(RsViewEngine._dlgSaveCollection.FileName);
                }
                else
                {
                    RsViewEngine.CloseCollection(aCollection);
                    return(false);
                }
            }
            else
            {
                aCollection.QuickSave();
            }

            return(true);
        }