Esempio n. 1
0
        private void BTNSAVE_Click(object sender, EventArgs e)
        {
            if (!txtSource.Text.ISNullOrWhiteSpace())
            {
                XMLTools.CreateStoreProcedureInfoXml(txtSource.Text, nudTime.Value.ToString() + ":" + nudMinutTime.Value.ToString());
                MessageBox.Show("PROCESS COMPLETE");

                ///Reopen from
                SoftwareBackupSystem.ActiveForm.Dispose();
                SoftwareBackupSystem SSystem = new SoftwareBackupSystem();
                SSystem.ShowDialog();
            }
            else
            {
                MessageBox.Show("PLEASE BROWSE YOUR LOCATION");
            }
        }
Esempio n. 2
0
        private void btnTimeSheduleBackup_Click(object sender, EventArgs e)
        {
            nudTime.Enabled = true;
            string BACKUPSOURCE = XMLTools.ReadXmlElementString(Application.StartupPath + "\\StoreProcedureInfo.xml", "BACKUPSOURCE");
            string BACKUPTIME   = XMLTools.ReadXmlElementString(Application.StartupPath + "\\StoreProcedureInfo.xml", "BACKUPTIME");

            if (!BACKUPSOURCE.ISNullOrWhiteSpace() && !BACKUPTIME.ISNullOrWhiteSpace())
            {
                Backup_RestoreTools brt = new Backup_RestoreTools();
                brt.BAT_FILE_CREATE_AND_RUN_CMD(BACKUPSOURCE, BACKUPTIME);
            }
            else
            {
                MessageBox.Show("At first go to Update Your Setting --->");
                btnSetting_Click(null, null);
            }
        }
Esempio n. 3
0
        private void btnAutoBackup_Click(object sender, EventArgs e)
        {
            nudTime.Enabled = false;
            string BACKUPSOURCE = XMLTools.ReadXmlElementString(Application.StartupPath + "\\StoreProcedureInfo.xml", "BACKUPSOURCE");

            if (!BACKUPSOURCE.ISNullOrWhiteSpace())
            {
                FolderCreate.TEMPFolderCreate();//at first create temp folder Its must be importent

                Backup_RestoreTools.ComputerStartedBackup(BACKUPSOURCE);
                string APPPath = Application.StartupPath + "\\TEMP";
                CreateShortcutTools.CreateStartupShortcut(APPPath, APPPath + "\\DATABASE_BACKUP.bat");
                MessageBox.Show("PROCESS COMPLETE");
            }
            else
            {
                MessageBox.Show("Click 'OK' and go to Update Your Setting --->");
                btnSetting_Click(null, null);
            }
        }
Esempio n. 4
0
        private void btnSetting_Click(object sender, EventArgs e)
        {
            pnSettingWindow.Visible = true;
            pnSettingWindow.BringToFront();

            nudTime.Enabled = true;
            //sHOW TIME AND LOCATION
            try
            {
                txtSource.Text = XMLTools.ReadXmlElementString(Application.StartupPath + "\\StoreProcedureInfo.xml", "BACKUPSOURCE");


                string   source = XMLTools.ReadXmlElementString(Application.StartupPath + "\\StoreProcedureInfo.xml", "BACKUPTIME").Trim();
                string[] split  = new string[] { ":" };
                string[] result = source.Split(split, StringSplitOptions.None);
                nudTime.Value      = int.Parse(result[0]);
                nudMinutTime.Value = int.Parse(result[1]);
            }
            catch (Exception exx)
            {
            }
        }