示例#1
0
        public FMain(FMain mainForm)
            : base(null)
        {
            InitializeComponent();

            this.Database = new Database();

            string checkResult = Paths.CheckPaths(true);

            if (!checkResult.Equals(string.Empty))
            {
                MessageBox.Show(checkResult, "Missing files or folders ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
            }

            checkResult = this.Database.LoadDatabase(Paths.DatabaseFile);
            if (!checkResult.Equals(string.Empty))
            {
                MessageBox.Show(checkResult, "Database load ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Application.Exit();
            }
        }
示例#2
0
 public FWork(FMain mainForm, WorkType workType)
     : base(mainForm)
 {
     InitializeComponent();
     this.workType = workType;
 }