Esempio n. 1
0
 /// <summary>
 /// Saves the configuration to file and sends a request for conf reload to the service via <see cref="IpcClient"/>.
 /// </summary>
 private static void SaveConfig()
 {
     Config.Save();
     try {
         IpcClient.GetService().ReloadConfig();
     } catch {
         MessageBox.Show(Lang.Get("UnableToConnectService"), Lang.Get("Error"), MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Esempio n. 2
0
        /// <summary>
        /// <see cref="runTaskToolStripButton.Click"/> event handler. Sends a request for immediate backup start to the service via <see cref="IpcClient"/>.
        /// </summary>
        private void RunTaskToolStripButton_Click(object sender, EventArgs e)
        {
            string guid = (string)taskListView.SelectedItems[0].Tag;

            try {
                IpcClient.GetService().RunTask(guid);
                MessageBox.Show(Lang.Get("BackupStarted"), Lang.Get("Information"), MessageBoxButtons.OK, MessageBoxIcon.Information);
            } catch {
                MessageBox.Show(Lang.Get("UnableToConnectService"), Lang.Get("Error"), MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }