Пример #1
0
        private void exportButton_Click(object sender, EventArgs e)
        {
            try {
                string path = HKSaveFileDialog.saveTo(HKDialogFilter.Library);
                FileSerializeStorage <AttandanceLibrary> .save(libraryRef, path);

                HKConfirmForm.showConfirmForm("导出成功");
            }catch (HKSaveFileDialog.CancelSaveFileException) {
            }catch (FileSerializeStorage <AttandanceLibrary> .FileSaveException ex) {
                HKConfirmForm.showConfirmForm(ex.Message);
            }
        }
Пример #2
0
        private void exportButton_Click(object sender, EventArgs e)
        {
            try {
                string path = HKSaveFileDialog.saveTo(HKDialogFilter.Course);
                FileSerializeStorage <Model.Course> .save(libHall.libraryRef[courseId], path);

                HKConfirmForm.showConfirmForm("导出成功");
            }catch (FileSerializeStorage <Model.Course> .FileSaveException ex) {
                HKConfirmForm.showConfirmForm(ex.Message);
            }catch (HKSaveFileDialog.CancelSaveFileException ex) {
                Console.WriteLine(ex.Message);
            }
        }