Exemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            //



            lblProcessElement.Text = String.Empty;
            lblProcessFolder.Text  = String.Empty;
            lblProcessFile.Text    = String.Empty;
            lblProgessTitle.Text   = String.Empty;
            ApplicationDataClass dataObject = getDataObject();

            if (dataObject == null)
            {
                MessageBox.Show(this, "No configration data found.\r\nPlease contact Health Diagnostics IT support team", "Configuration missing", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.Close();
            }
            else
            {
                if (process.Equals("backup"))
                {
                    lblProgessTitle.Text = "Health Options binary backup";

                    Backup.Run(dataObject, new CallBackDelegate(CallBack), new StatusDelegate(Status));
                }
                else
                {
                    Recover.Run(dataObject, new CallBackDelegate(CallBack), new StatusDelegate(Status));
                } //END if (process.Equals("backup"))
            }     //END if(dataObject==null)
        }
        public static void Run(ApplicationDataClass appData, CallBackDelegate callBack, StatusDelegate status)
        {
            Recover process = new Recover();

            process.Status   = status;
            process.CallBack = callBack;
            process.AppData  = appData;
            Thread th = new Thread(new ThreadStart(process.RunProcess));

            th.Name         = "Click Once Recovery";
            th.IsBackground = true;
            th.Start();
        }
Exemplo n.º 3
0
        public static void Run(ApplicationDataClass appData, CallBackDelegate callBack, StatusDelegate status)
        {
            Backup process = new Backup();

            process.Status   = status;
            process.CallBack = callBack;
            process.AppData  = appData;

            Thread th = new Thread(new ThreadStart(process.RunProcess));

            th.Name         = "Health Options backup";
            th.IsBackground = true;
            th.Start();
        }