Esempio n. 1
0
 //=============== UI Interactives ===============//
 // Funktion som start övervakning på de båda programmen.
 // Kräver att användaren angett de mappar som ska övervakas.
 private void BTNStartIntegration_Click(object sender, System.EventArgs e)
 {
     if (BTNStartIntegration.Text == "Start Integration")
     {
         if (
             TextBoxInputDirMediaShop.Text != "" && TextBoxOutputDirMediaShop.Text != "" &&
             TextBoxInputDirSimpleMedia.Text != "" && TextBoxOutputDirSimpleMedia.Text != ""
             )
         {
             DirectoryWatcher.SetInputDirectoryMediaShop(TextBoxInputDirMediaShop.Text);
             DirectoryWatcher.OUTPUT_DIR_MEDIASHOP = TextBoxOutputDirMediaShop.Text;
             DirectoryWatcher.SetInputDirectorySimpleMedia(TextBoxInputDirSimpleMedia.Text);
             DirectoryWatcher.OUTPUT_DIR_SIMPLEMEDIA = TextBoxOutputDirSimpleMedia.Text;
             DirectoryWatcher.StartFileWatcher();
             BTNStartIntegration.Text = "Stop Integration";
             LabelStatus.Text         = "Running...";
         }
         else
         {
             MessageBox.Show("Please select input and output directories.");
         }
     }
     else
     {
         DirectoryWatcher.StopFileWatcher();
         BTNStartIntegration.Text = "Start Integration";
         LabelStatus.Text         = "";
     }
 }
Esempio n. 2
0
        private void BTNSelectInputDirSimpleMedia_Click(object sender, System.EventArgs e)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();

            if (fbd.ShowDialog() == DialogResult.OK)
            {
                TextBoxInputDirSimpleMedia.Text = fbd.SelectedPath;
                DirectoryWatcher.SetInputDirectorySimpleMedia(TextBoxInputDirSimpleMedia.Text);
            }
        }