示例#1
0
        public static bool save(string tmpfile)
        {
            SaveFileDialog sav = new SaveFileDialog()
            {
                Filter = "MEGA test file|*.mgt",
                Title  = "Select test file"
            };

            if (sav.ShowDialog() == DialogResult.OK)
            {
                if (sav.FileName != "")
                {
                    Crpyt.encrypt(tmpfile, sav.FileName);
                    otherFunctions.DeleteTmpFile(tmpfile);
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }
示例#2
0
        public static bool saveFile()
        {
            SaveFileDialog save = new SaveFileDialog()
            {
                Filter = "MEGA questions|*.mgq",
                Title  = "Save Question File"
            };

            save.ShowDialog();
            if (save.FileName != "")
            {
                string temp = TmpFile();
                WriteQuestions(temp);
                Crpyt.encrypt(temp, save.FileName);
                DeleteTmpFile(temp);
                savefile = save.FileName;
                return(true);
            }
            else
            {
                return(false);
            }
        }