From 16bf65502e4735ca5bb2f636333289abb20da5cf Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1s=C3=A1ry=20D=C3=A1niel?= Date: Mon, 27 Nov 2017 16:10:21 +0000 Subject: [PATCH] git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30771 --- client/AudioRecorder/AudioDevicesDetector.cs | 9 +- client/AudioRecorder/AudioRecorder.csproj | 3 +- client/AudioRecorder/AudioRecorderSettings.cs | 10 +- client/AudioRecorder/IAudioDevicesDetector.cs | 13 - client/AudioRecorder/MainForm.Designer.cs | 16 +- client/AudioRecorder/MainForm.cs | 16 +- client/AudioRecorder/WavRecorder.cs | 61 ++-- client/DxPlay/DxPlayer.cs | 37 ++- client/DxPlay/PlayerForm.Designer.cs | 4 +- client/DxPlay/PlayerForm.cs | 29 +- .../Configuration/configuration-nle.json | 5 +- .../configuration-playout-ingest.json | 2 +- .../Configuration/configuration-sxs.json | 2 +- .../installforge-installer-project.ifp | Bin 4079 -> 4079 bytes client/Maestro/MaestroForm.Designer.cs | 302 +++++++++--------- client/Maestro/MaestroForm.Source.cs | 18 +- client/Maestro/MaestroForm.Target.cs | 5 + client/Maestro/MaestroForm.cs | 7 +- client/Maestro/MaestroForm.resx | 11 +- client/Maestro/Properties/AssemblyInfo.cs | 4 +- client/Maestro/Sources/FileSystemSource.cs | 13 +- client/Maestro/Sources/NexioRESTSource.cs | 2 +- client/MaestroShared/Commons/MsgBox.cs | 8 +- .../Configuration/ConfigurationInfo.cs | 4 +- ...nConverter.cs => KeysPasswordConverter.cs} | 3 + client/MaestroShared/MaestroShared.csproj | 2 +- .../Targets/FTPTargetProcessor.cs | 22 +- .../Targets/FXPTargetProcessor.cs | 29 +- .../Targets/TargetProcessorParameter.cs | 1 + .../Targets/UNCTargetProcessor.cs | 15 +- server/-modules/pom.xml | 4 +- 31 files changed, 375 insertions(+), 282 deletions(-) delete mode 100644 client/AudioRecorder/IAudioDevicesDetector.cs rename client/MaestroShared/Configuration/{KeysJsonConverter.cs => KeysPasswordConverter.cs} (81%) diff --git a/client/AudioRecorder/AudioDevicesDetector.cs b/client/AudioRecorder/AudioDevicesDetector.cs index a2e69b02..5cda1c39 100644 --- a/client/AudioRecorder/AudioDevicesDetector.cs +++ b/client/AudioRecorder/AudioDevicesDetector.cs @@ -2,10 +2,9 @@ using System.Collections.Generic; using System.Management; using NAudio.CoreAudioApi; -using System.Diagnostics; namespace AudioRecorder { - public class AudioDevicesDetector : IAudioDevicesDetector { + public class AudioDevicesDetector { private List deviceNames; private List devices; @@ -13,13 +12,13 @@ namespace AudioRecorder { public AudioDevicesDetector() { deviceNames = new List(); devices = new List(); + findDevices(); } - public void findDevices() { + private void findDevices() { var deviceEnum = new MMDeviceEnumerator(); MMDeviceCollection d = deviceEnum.EnumerateAudioEndPoints(DataFlow.Capture, DeviceState.Active); - foreach (MMDevice actualDevice in d) - { + foreach (MMDevice actualDevice in d) { deviceNames.Add(actualDevice.FriendlyName); devices.Add(actualDevice); } diff --git a/client/AudioRecorder/AudioRecorder.csproj b/client/AudioRecorder/AudioRecorder.csproj index 737fd17c..13438689 100644 --- a/client/AudioRecorder/AudioRecorder.csproj +++ b/client/AudioRecorder/AudioRecorder.csproj @@ -143,7 +143,6 @@ MainForm.cs - @@ -201,7 +200,7 @@ True - Always + PreserveNewest diff --git a/client/AudioRecorder/AudioRecorderSettings.cs b/client/AudioRecorder/AudioRecorderSettings.cs index 70fb8924..de6c3b85 100644 --- a/client/AudioRecorder/AudioRecorderSettings.cs +++ b/client/AudioRecorder/AudioRecorderSettings.cs @@ -3,6 +3,7 @@ using Newtonsoft.Json; using System.IO; using MaestroShared.Configuration; using MaestroShared.Commons; +using Newtonsoft.Json.Serialization; namespace AudioRecorder { public class AudioRecorderSettings { @@ -14,7 +15,14 @@ namespace AudioRecorder { public void Save(string fileName) { try { - File.WriteAllText(fileName, JsonConvert.SerializeObject(this, Formatting.Indented)); + JsonSerializerSettings settings = new JsonSerializerSettings { + Formatting = Formatting.Indented, + ContractResolver = new CamelCasePropertyNamesContractResolver(), + NullValueHandling = NullValueHandling.Ignore, + DefaultValueHandling = DefaultValueHandling.Ignore + }; + + File.WriteAllText(fileName, JsonConvert.SerializeObject(this, settings)); } catch (Exception e) { MsgBox.Error(e.Message); diff --git a/client/AudioRecorder/IAudioDevicesDetector.cs b/client/AudioRecorder/IAudioDevicesDetector.cs deleted file mode 100644 index caf83c2b..00000000 --- a/client/AudioRecorder/IAudioDevicesDetector.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using NAudio.CoreAudioApi; - -namespace AudioRecorder -{ - public interface IAudioDevicesDetector - { - void findDevices(); - List getDeviceNames(); - List getDevices(); - } -} diff --git a/client/AudioRecorder/MainForm.Designer.cs b/client/AudioRecorder/MainForm.Designer.cs index 06a2b73b..74292bb1 100644 --- a/client/AudioRecorder/MainForm.Designer.cs +++ b/client/AudioRecorder/MainForm.Designer.cs @@ -38,7 +38,6 @@ namespace AudioRecorder { this.playButton = new System.Windows.Forms.Button(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.txtRecordFilePath = new System.Windows.Forms.TextBox(); - this.pbUpload = new System.Windows.Forms.ProgressBar(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.tbVolume)).BeginInit(); @@ -190,13 +189,12 @@ namespace AudioRecorder { // // groupBox3 // - this.groupBox3.Controls.Add(this.pbUpload); this.groupBox3.Controls.Add(this.txtRecordFilePath); this.groupBox3.Controls.Add(this.btnSelectAudio); this.groupBox3.Controls.Add(this.playButton); this.groupBox3.Location = new System.Drawing.Point(15, 258); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(332, 97); + this.groupBox3.Size = new System.Drawing.Size(332, 80); this.groupBox3.TabIndex = 10; this.groupBox3.TabStop = false; // @@ -208,19 +206,12 @@ namespace AudioRecorder { this.txtRecordFilePath.Size = new System.Drawing.Size(233, 23); this.txtRecordFilePath.TabIndex = 10; // - // pbUpload - // - this.pbUpload.Location = new System.Drawing.Point(9, 75); - this.pbUpload.Name = "pbUpload"; - this.pbUpload.Size = new System.Drawing.Size(312, 9); - this.pbUpload.TabIndex = 11; - // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(363, 370); + this.ClientSize = new System.Drawing.Size(363, 352); this.Controls.Add(this.groupBox3); this.Controls.Add(this.groupBox2); this.Controls.Add(this.groupBox1); @@ -230,7 +221,7 @@ namespace AudioRecorder { this.MinimizeBox = false; this.Name = "MainForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; - this.Text = "AudioRecorder"; + this.Text = "Audio Recorder"; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); this.Shown += new System.EventHandler(this.OnMainShown); this.groupBox1.ResumeLayout(false); @@ -257,7 +248,6 @@ namespace AudioRecorder { private Ernzo.WinForms.Controls.PeakMeterCtrl pmVolume; private System.Windows.Forms.TrackBar tbVolume; private System.Windows.Forms.TextBox txtRecordFilePath; - private System.Windows.Forms.ProgressBar pbUpload; } } diff --git a/client/AudioRecorder/MainForm.cs b/client/AudioRecorder/MainForm.cs index 8b013eaf..447dd96e 100644 --- a/client/AudioRecorder/MainForm.cs +++ b/client/AudioRecorder/MainForm.cs @@ -20,7 +20,7 @@ namespace AudioRecorder { private const String CONFIG_FILE = "Configuration/audiorecorder.json"; private const string WAV_EXT = ".WAV"; - private IAudioDevicesDetector devicesDetector; + private AudioDevicesDetector devicesDetector; private List audioDevicesNames; private int selectedDeviceIndex = -1; private WavRecorder recorder; @@ -77,7 +77,6 @@ namespace AudioRecorder { try { parameters = Loader.Get(CONFIG_FILE); processor = TargetProcessor.Create(parameters.Target.Processor); - pbUpload.DataBindings.Add(new Binding("Value", processor, "Progress")); UpdateGUI(); timeCodeWorker = new TimeCodeWorker(timecodeLabel); @@ -85,7 +84,6 @@ namespace AudioRecorder { countDownTimer.Interval = 1000; countDownTimer.Tick += new EventHandler(OnCountDownTick); devicesDetector = new AudioDevicesDetector(); - devicesDetector.findDevices(); audioDevicesNames = devicesDetector.getDeviceNames(); if (!String.IsNullOrEmpty(parameters.DeviceName) && audioDevicesNames != null) SelectedDeviceIndex = audioDevicesNames.IndexOf(parameters.DeviceName); @@ -145,11 +143,11 @@ namespace AudioRecorder { } public void Initialize() { - currentDevice.AudioEndpointVolume.OnVolumeNotification += OnAudioEndpointVolumeChanged; try { //if (!Directory.Exists(parameters.WorkingDirectory.LocalPath)) Directory.CreateDirectory(parameters.WorkingDirectory.LocalPath); recorder = new WavRecorder(SelectedDeviceIndex, CurrentDevice); + currentDevice.AudioEndpointVolume.OnVolumeNotification += OnAudioEndpointVolumeChanged; } catch (Exception ex) { MsgBox.Error(ex.Message); @@ -176,7 +174,7 @@ namespace AudioRecorder { private void OnCountDownTick(object sender, EventArgs e) { recordButton.Text = countDown.ToString(); - if (countDown-- < 0) { + if (countDown-- == 0) { countDownTimer.Stop(); recordButton.Text = StringResources.RECORD; StartRecord(); @@ -259,7 +257,6 @@ namespace AudioRecorder { private void ShowAudioDeviceSelectorForm(bool refreshDevices = false) { if (refreshDevices) { devicesDetector = new AudioDevicesDetector(); - devicesDetector.findDevices(); audioDevicesNames = devicesDetector.getDeviceNames(); } AudioDeviceSelectorForm deviceSelectorForm = new AudioDeviceSelectorForm(); @@ -297,8 +294,11 @@ namespace AudioRecorder { processor.Initialize(null, processorParameter); processor.Execute(); - if (TargetProcessor.READY.Equals(processor.Status)) - MsgBox.Info(String.Format($"Sikeres betöltés: {processor.Output}")); + if (TargetProcessor.READY.Equals(processor.Status)) { + string path = Path.GetDirectoryName(processor.Output); + string name = Path.GetFileName(processor.Output); + MsgBox.Info(String.Format($"Sikeres betöltés a '{path}' mappába, '{name}' néven.")); + } else MsgBox.Error(processor.Message); } diff --git a/client/AudioRecorder/WavRecorder.cs b/client/AudioRecorder/WavRecorder.cs index f5b215ba..806c9825 100644 --- a/client/AudioRecorder/WavRecorder.cs +++ b/client/AudioRecorder/WavRecorder.cs @@ -21,35 +21,45 @@ namespace AudioRecorder { this.inputDeviceIndex = inputDeviceIndex; recordedFiles = new List(); this.device = device; + Start(true); } - public void StartRecording(String filePath) { - this.filePath = filePath; + private void Start(bool preview) { sourceStream = new WasapiCapture(device); - //sourceStream = newWaveIn(); - - sourceStream.DataAvailable += newEventHandler(); - waveWriter = newWavFileWriter(); + if (!preview && !String.IsNullOrEmpty(filePath)) { + waveWriter = new WaveFileWriter(filePath, sourceStream.WaveFormat); + sourceStream.DataAvailable += SourceStreamDataAvailable; + } sourceStream.StartRecording(); - recordedFiles.Add(filePath); } - protected virtual EventHandler newEventHandler() { - return new EventHandler(SourceStreamDataAvailable); + private void Stop() { + if (sourceStream != null) { + sourceStream.StopRecording(); + sourceStream.Dispose(); + sourceStream = null; + } + if (waveWriter != null) { + waveWriter.Close(); + waveWriter.Dispose(); + waveWriter = null; + } } - protected virtual WaveFileWriter newWavFileWriter() { - return new WaveFileWriter(filePath, sourceStream.WaveFormat); + public void StartRecording(String filePath) { + this.filePath = filePath; + Stop(); + Start(false); } - protected virtual WaveIn newWaveIn() { - return new WaveIn { - DeviceNumber = inputDeviceIndex, - WaveFormat = - WaveFormat.CreateIeeeFloatWaveFormat(device.AudioClient.MixFormat.SampleRate, MONO_CHANEL) - //new WaveFormat(device.AudioClient.MixFormat.SampleRate, device.AudioClient.MixFormat.BitsPerSample, MONO_CHANEL) - }; - } + //protected virtual WaveIn newWaveIn() { + // return new WaveIn { + // DeviceNumber = inputDeviceIndex, + // WaveFormat = + // WaveFormat.CreateIeeeFloatWaveFormat(device.AudioClient.MixFormat.SampleRate, MONO_CHANEL) + // //new WaveFormat(device.AudioClient.MixFormat.SampleRate, device.AudioClient.MixFormat.BitsPerSample, MONO_CHANEL) + // }; + //} public void SourceStreamDataAvailable(object sender, WaveInEventArgs e) { if (waveWriter == null) return; @@ -60,6 +70,7 @@ namespace AudioRecorder { } public void Dispose() { + Stop(); foreach (String file in recordedFiles) { if (File.Exists(file)) { try { @@ -73,16 +84,8 @@ namespace AudioRecorder { } public void StopRecord() { - if (sourceStream != null) { - sourceStream.StopRecording(); - sourceStream.Dispose(); - sourceStream = null; - } - if (waveWriter == null) { - return; - } - waveWriter.Dispose(); - waveWriter = null; + Stop(); + Start(true); } public void pauseRecording(bool pausing) { diff --git a/client/DxPlay/DxPlayer.cs b/client/DxPlay/DxPlayer.cs index 4f9b80dd..200bb5e9 100644 --- a/client/DxPlay/DxPlayer.cs +++ b/client/DxPlay/DxPlayer.cs @@ -75,6 +75,7 @@ namespace DxPlay { } Control playerWindow; + private object ppUnk; // Play an avi file into a window. Allow for snapshots. // (Control to show video in, Avi file to play @@ -143,8 +144,8 @@ namespace DxPlay { // start playing public void Play() { // If we aren't already playing (or shutting down) - //if (State == GraphState.Completed) - // Stop(); + if (State == GraphState.Completed) + Stop(); if (State == GraphState.Stopped || State == GraphState.Paused) { int hr = m_mediaCtrl.Run(); DsError.ThrowExceptionForHR(hr); @@ -168,7 +169,7 @@ namespace DxPlay { // Pause the capture graph. public void Stop() { // Can only Stop when playing or paused - if (State == GraphState.Playing || State == GraphState.Paused) { + if (State == GraphState.Playing || State == GraphState.Paused || State == GraphState.Completed) { int hr = m_mediaCtrl.Stop(); DsError.ThrowExceptionForHR(hr); State = GraphState.Stopped; @@ -257,6 +258,34 @@ namespace DxPlay { FilterGraphTools.ConnectFilters(graphBuilder, sourceFilter, "Output", splitter, "Input", true); + //IAMStreamSelect amStreamSelect = (IAMStreamSelect)splitter; + //if (amStreamSelect != null) { + // int count = 0; + // amStreamSelect.Count(out count); + // int audioCount = 0; + // for (int i = 0; i < count; i++) { + // AMMediaType ppmt; + // AMStreamSelectInfoFlags pdwFlags; + // int plcid; + // int pdwGroup; + // string ppszName; + // object ppObject; + // amStreamSelect.Info(i, out ppmt, out pdwFlags, out plcid, out pdwGroup, out ppszName, out ppObject, out ppUnk); + + // if (ppmt.majorType == MediaType.Audio) { + // Debug.WriteLine("Found audio channel"); + // audioCount++; + // } + + // DsUtils.FreeAMMediaType(ppmt); + // //Marshal.FreeCoTaskMem(ppszName); + // if (ppObject != null) + // DsUtils.ReleaseComObject(ppUnk); + + // } + // Debug.WriteLine("Audio count: " + audioCount); + //} + IBaseFilter videoDecoder = LoadVideoDecoder(graphBuilder); if (videoDecoder == null) @@ -604,7 +633,7 @@ namespace DxPlay { // If the clip is finished playing if (ec == EventCode.Complete) { - //State = GraphState.Completed; + State = GraphState.Completed; } // Release any resources the message allocated diff --git a/client/DxPlay/PlayerForm.Designer.cs b/client/DxPlay/PlayerForm.Designer.cs index 92fe9631..355089a5 100644 --- a/client/DxPlay/PlayerForm.Designer.cs +++ b/client/DxPlay/PlayerForm.Designer.cs @@ -46,7 +46,7 @@ namespace DxPlay { this.lbEndTC = new System.Windows.Forms.TextBox(); this.panel3 = new System.Windows.Forms.Panel(); this.lbStatus = new System.Windows.Forms.Label(); - this.trackBar1 = new ColorSlider(); + this.trackBar1 = new MaestroShared.Controls.ColorSlider(); this.lbDuration = new System.Windows.Forms.Label(); this.lbStart = new System.Windows.Forms.Label(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); @@ -166,6 +166,7 @@ namespace DxPlay { this.trackBar1.BarOuterColor = System.Drawing.Color.Black; this.trackBar1.BarPenColor = System.Drawing.Color.Black; this.trackBar1.BorderRoundRectSize = new System.Drawing.Size(8, 8); + this.trackBar1.Cursor = System.Windows.Forms.Cursors.Hand; this.trackBar1.Dock = System.Windows.Forms.DockStyle.Bottom; this.trackBar1.ElapsedInnerColor = System.Drawing.Color.Black; this.trackBar1.ElapsedOuterColor = System.Drawing.Color.DarkGray; @@ -324,6 +325,7 @@ namespace DxPlay { this.dgSegments.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgSegments.Size = new System.Drawing.Size(257, 521); this.dgSegments.TabIndex = 1; + this.dgSegments.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgSegments_CellContentClick); this.dgSegments.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgSegments_CellMouseDoubleClick); this.dgSegments.ColumnAdded += new System.Windows.Forms.DataGridViewColumnEventHandler(this.dgSegments_ColumnAdded); // diff --git a/client/DxPlay/PlayerForm.cs b/client/DxPlay/PlayerForm.cs index 89ea8de4..9bcc9c79 100644 --- a/client/DxPlay/PlayerForm.cs +++ b/client/DxPlay/PlayerForm.cs @@ -141,9 +141,9 @@ namespace DxPlay { lastClick = currentClick; } - if (e.Button == MouseButtons.Right) { - FlexibleMessageBox.Show(m_play.MediaDescription.Description); - } + //if (e.Button == MouseButtons.Right) { + // FlexibleMessageBox.Show(m_play.MediaDescription.Description); + //} } private void panel1_SizeChanged(object sender, EventArgs e) { @@ -255,6 +255,12 @@ namespace DxPlay { Debug.WriteLine("Handling " + keyCode); bool result = false; switch (keyCode) { + case Keys.Return: + if (ModifierKeys.HasFlag(Keys.Shift)) { + m_play.ToggleFullscreen(); + result = true; + } + break; case Keys.Escape: if (m_play.IsFullscreen()) m_play.ToggleFullscreen(); @@ -311,12 +317,6 @@ namespace DxPlay { } private void PlayerForm_FormClosing(object sender, FormClosingEventArgs e) { - //foreach (MovieSegment segment in segments) - // if (segment.TCOut == null) { - // e.Cancel = true; - // return; - // } - if (m_play != null) { m_play.Stop(); m_play.Dispose(); @@ -355,7 +355,7 @@ namespace DxPlay { MovieSegment lastSegment = segments[segments.Count - 1]; Timecode tcEnd = new Timecode(m_mediaDescription.FirstFrame, m_mediaDescription.Duration); if (lastSegment.TCOut.Frames == tcEnd.Frames) { - MessageBox.Show("Az utolsó szegmen az anyag végéig tart, így nem hozható létre új szegmens."); + MessageBox.Show("Az utolsó szegmens az anyag végéig tart, így nem hozható létre új szegmens."); return; } segment = new MovieSegment() { @@ -464,7 +464,9 @@ namespace DxPlay { e.Column.HeaderText = StringResource.KILEPO; e.Column.ReadOnly = true; break; - case 2: e.Column.HeaderText = StringResource.ELHAGYHATO; break; + case 2: + e.Column.HeaderText = StringResource.ELHAGYHATO; + break; case 3: e.Column.HeaderText = StringResource.MEGJEGYZES; break; } } @@ -492,5 +494,10 @@ namespace DxPlay { } } + + private void dgSegments_CellContentClick(object sender, DataGridViewCellEventArgs e) { + if (e.ColumnIndex == 2) + dgSegments.EndEdit(); + } } } diff --git a/client/Maestro/Configuration/configuration-nle.json b/client/Maestro/Configuration/configuration-nle.json index dcc5e6db..5f050d3d 100644 --- a/client/Maestro/Configuration/configuration-nle.json +++ b/client/Maestro/Configuration/configuration-nle.json @@ -5,6 +5,7 @@ "enableCustomMetadataId": true, "defaultWindowColor": "#E1BEE7", "partialWindowColor": "#F3E5F5", + "metadataOnly": false, "player": { "enabled": true, "autoStart": false, @@ -15,7 +16,7 @@ "filter": "avi,wav,mxf", "foldersAutoExpand": true, "local": { - "address": "file://c:/x" + "address": "file://10.10.1.100/BRAAVOS/OCTOPUS" } }, "metadatas": [ @@ -41,7 +42,7 @@ "subFolderFormat": "%IDROOT%-%TEXT%/PROJECT", "disableFileVersioning": true, "remote": { - "address": "file://10.10.1.100/BRAAVOS/.MAESTRO", + "address": "file://10.10.1.100/BRAAVOS/OCTOPUS", "userName": "mediacube", "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", "timeout": 1000 diff --git a/client/Maestro/Configuration/configuration-playout-ingest.json b/client/Maestro/Configuration/configuration-playout-ingest.json index ddd13040..aa818ef7 100644 --- a/client/Maestro/Configuration/configuration-playout-ingest.json +++ b/client/Maestro/Configuration/configuration-playout-ingest.json @@ -1,6 +1,6 @@ { "title": "Lebony betöltő", - "active": false, + "active": true, "startInTray": false, "enableCustomMetadataId": true, "player": { diff --git a/client/Maestro/Configuration/configuration-sxs.json b/client/Maestro/Configuration/configuration-sxs.json index c8fcc10a..94b8ea63 100644 --- a/client/Maestro/Configuration/configuration-sxs.json +++ b/client/Maestro/Configuration/configuration-sxs.json @@ -12,7 +12,7 @@ "$type": "UNCSource", "filter": "avi,wav,mxf", "local": { - "address": "file://c:/x" + "address": "file://c:/" } }, "metadatas": [ diff --git a/client/Maestro/Installer/installforge-installer-project.ifp b/client/Maestro/Installer/installforge-installer-project.ifp index c2a054040f950c4598b0f3993c15f5507fdc2e64..cee5052759c2526c0d2b899787a84fc08e5d3d86 100644 GIT binary patch delta 19 bcmaDa|6YDVHlxYLoEt2RCYxPZS8)LVQC private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MaestroForm)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); this.groupSource = new System.Windows.Forms.GroupBox(); this.dgSource = new System.Windows.Forms.DataGridView(); this.bindingSource = new System.Windows.Forms.BindingSource(this.components); @@ -49,7 +49,7 @@ namespace Maestro { this.tsSource = new System.Windows.Forms.ToolStrip(); this.btnShowFolders = new System.Windows.Forms.ToolStripButton(); this.textSelectedSource = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); + this.lSelectedSource = new System.Windows.Forms.Label(); this.btnLookupBySource = new System.Windows.Forms.Button(); this.scOperations = new System.Windows.Forms.SplitContainer(); this.scRightOperations = new System.Windows.Forms.SplitContainer(); @@ -75,6 +75,13 @@ namespace Maestro { this.tabSystem = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.dgJobs = new System.Windows.Forms.DataGridView(); + this.bindingSourceJobs = new System.Windows.Forms.BindingSource(this.components); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.dgMessages = new System.Windows.Forms.DataGridView(); + this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.systemMessageBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.metadataInfoBindingSource = new System.Windows.Forms.BindingSource(this.components); this.columnLabel = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.columnID = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Progress = new Maestro.Commons.DataGridViewProgressColumn(); @@ -84,13 +91,7 @@ namespace Maestro { this.columnInput = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.columnOutput = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.columnKillDate = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.bindingSourceJobs = new System.Windows.Forms.BindingSource(this.components); - this.tabPage2 = new System.Windows.Forms.TabPage(); - this.dgMessages = new System.Windows.Forms.DataGridView(); - this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.systemMessageBindingSource = new System.Windows.Forms.BindingSource(this.components); - this.metadataInfoBindingSource = new System.Windows.Forms.BindingSource(this.components); + this.Message = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.groupSource.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dgSource)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource)).BeginInit(); @@ -159,32 +160,32 @@ namespace Maestro { this.dgSource.BackgroundColor = System.Drawing.Color.White; this.dgSource.BorderStyle = System.Windows.Forms.BorderStyle.None; this.dgSource.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.Raised; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgSource.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgSource.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.dgSource.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgSource.DataSource = this.bindingSource; - dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle12.SelectionBackColor = System.Drawing.Color.Gainsboro; - dataGridViewCellStyle12.SelectionForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgSource.DefaultCellStyle = dataGridViewCellStyle12; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.Gainsboro; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgSource.DefaultCellStyle = dataGridViewCellStyle2; this.dgSource.Dock = System.Windows.Forms.DockStyle.Fill; this.dgSource.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.dgSource.EnableHeadersVisualStyles = false; this.dgSource.Location = new System.Drawing.Point(10, 47); this.dgSource.Name = "dgSource"; this.dgSource.RowHeadersVisible = false; - dataGridViewCellStyle13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.dgSource.RowsDefaultCellStyle = dataGridViewCellStyle13; + dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.dgSource.RowsDefaultCellStyle = dataGridViewCellStyle3; this.dgSource.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.dgSource.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgSource.Size = new System.Drawing.Size(330, 159); @@ -272,7 +273,7 @@ namespace Maestro { this.pSourceDisplay.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); this.pSourceDisplay.Controls.Add(this.tsSource, 0, 0); this.pSourceDisplay.Controls.Add(this.textSelectedSource, 0, 2); - this.pSourceDisplay.Controls.Add(this.label1, 0, 1); + this.pSourceDisplay.Controls.Add(this.lSelectedSource, 0, 1); this.pSourceDisplay.Controls.Add(this.btnLookupBySource, 1, 2); this.pSourceDisplay.Dock = System.Windows.Forms.DockStyle.Bottom; this.pSourceDisplay.Location = new System.Drawing.Point(10, 367); @@ -326,18 +327,18 @@ namespace Maestro { this.textSelectedSource.TabIndex = 10; this.textSelectedSource.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textSelectedSource_KeyDown); // - // label1 + // lSelectedSource // - this.label1.AutoSize = true; - this.pSourceDisplay.SetColumnSpan(this.label1, 2); - this.label1.Dock = System.Windows.Forms.DockStyle.Fill; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.label1.Location = new System.Drawing.Point(3, 30); - this.label1.Name = "label1"; - this.label1.Padding = new System.Windows.Forms.Padding(0, 5, 0, 5); - this.label1.Size = new System.Drawing.Size(324, 30); - this.label1.TabIndex = 13; - this.label1.Text = "Selected source"; + this.lSelectedSource.AutoSize = true; + this.pSourceDisplay.SetColumnSpan(this.lSelectedSource, 2); + this.lSelectedSource.Dock = System.Windows.Forms.DockStyle.Fill; + this.lSelectedSource.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.lSelectedSource.Location = new System.Drawing.Point(3, 30); + this.lSelectedSource.Name = "lSelectedSource"; + this.lSelectedSource.Padding = new System.Windows.Forms.Padding(0, 5, 0, 5); + this.lSelectedSource.Size = new System.Drawing.Size(324, 30); + this.lSelectedSource.TabIndex = 13; + this.lSelectedSource.Text = "Selected source"; // // btnLookupBySource // @@ -704,17 +705,18 @@ namespace Maestro { this.columnFinished, this.columnInput, this.columnOutput, - this.columnKillDate}); + this.columnKillDate, + this.Message}); this.dgJobs.DataSource = this.bindingSourceJobs; - dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle16.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle16.NullValue = null; - dataGridViewCellStyle16.SelectionBackColor = System.Drawing.Color.Gainsboro; - dataGridViewCellStyle16.SelectionForeColor = System.Drawing.Color.Black; - dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgJobs.DefaultCellStyle = dataGridViewCellStyle16; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle6.NullValue = null; + dataGridViewCellStyle6.SelectionBackColor = System.Drawing.Color.Gainsboro; + dataGridViewCellStyle6.SelectionForeColor = System.Drawing.Color.Black; + dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgJobs.DefaultCellStyle = dataGridViewCellStyle6; this.dgJobs.Dock = System.Windows.Forms.DockStyle.Fill; this.dgJobs.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.dgJobs.EnableHeadersVisualStyles = false; @@ -722,8 +724,8 @@ namespace Maestro { this.dgJobs.Location = new System.Drawing.Point(3, 3); this.dgJobs.Name = "dgJobs"; this.dgJobs.RowHeadersVisible = false; - dataGridViewCellStyle17.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.dgJobs.RowsDefaultCellStyle = dataGridViewCellStyle17; + dataGridViewCellStyle7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.dgJobs.RowsDefaultCellStyle = dataGridViewCellStyle7; this.dgJobs.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.dgJobs.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgJobs.Size = new System.Drawing.Size(988, 90); @@ -732,6 +734,80 @@ namespace Maestro { this.dgJobs.CellPainting += new System.Windows.Forms.DataGridViewCellPaintingEventHandler(this.OnJobsCellPainting); this.dgJobs.MouseClick += new System.Windows.Forms.MouseEventHandler(this.dataGridJobs_MouseClick); // + // tabPage2 + // + this.tabPage2.Controls.Add(this.dgMessages); + this.tabPage2.Location = new System.Drawing.Point(4, 24); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(994, 96); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = global::Maestro.StringResources.UZENETEK; + this.tabPage2.UseVisualStyleBackColor = true; + // + // dgMessages + // + this.dgMessages.AllowUserToAddRows = false; + this.dgMessages.AllowUserToResizeRows = false; + this.dgMessages.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells; + this.dgMessages.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCells; + this.dgMessages.BackgroundColor = System.Drawing.Color.White; + this.dgMessages.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.dgMessages.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dgMessages.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.dataGridViewTextBoxColumn1, + this.dataGridViewTextBoxColumn2}); + dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + dataGridViewCellStyle9.ForeColor = System.Drawing.Color.Red; + dataGridViewCellStyle9.NullValue = null; + dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.Gainsboro; + dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.Red; + dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgMessages.DefaultCellStyle = dataGridViewCellStyle9; + this.dgMessages.Dock = System.Windows.Forms.DockStyle.Fill; + this.dgMessages.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; + this.dgMessages.EnableHeadersVisualStyles = false; + this.dgMessages.GridColor = System.Drawing.Color.White; + this.dgMessages.Location = new System.Drawing.Point(3, 3); + this.dgMessages.Name = "dgMessages"; + this.dgMessages.ReadOnly = true; + this.dgMessages.RowHeadersVisible = false; + dataGridViewCellStyle10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.dgMessages.RowsDefaultCellStyle = dataGridViewCellStyle10; + this.dgMessages.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.dgMessages.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dgMessages.Size = new System.Drawing.Size(988, 90); + this.dgMessages.TabIndex = 1; + // + // dataGridViewTextBoxColumn1 + // + this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; + this.dataGridViewTextBoxColumn1.DataPropertyName = "Time"; + this.dataGridViewTextBoxColumn1.HeaderText = "Időpont"; + this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; + this.dataGridViewTextBoxColumn1.ReadOnly = true; + this.dataGridViewTextBoxColumn1.Width = 73; + // + // dataGridViewTextBoxColumn2 + // + this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + this.dataGridViewTextBoxColumn2.DataPropertyName = "Message"; + dataGridViewCellStyle8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.dataGridViewTextBoxColumn2.DefaultCellStyle = dataGridViewCellStyle8; + this.dataGridViewTextBoxColumn2.HeaderText = "Üzenet"; + this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; + this.dataGridViewTextBoxColumn2.ReadOnly = true; + // + // systemMessageBindingSource + // + this.systemMessageBindingSource.DataSource = typeof(Maestro.SystemMessage); + // + // metadataInfoBindingSource + // + this.metadataInfoBindingSource.DataSource = typeof(Maestro.Metadata.MetadataInfo); + // // columnLabel // this.columnLabel.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; @@ -744,8 +820,8 @@ namespace Maestro { // this.columnID.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; this.columnID.DataPropertyName = "ID"; - dataGridViewCellStyle14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.columnID.DefaultCellStyle = dataGridViewCellStyle14; + dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.columnID.DefaultCellStyle = dataGridViewCellStyle4; this.columnID.HeaderText = "ID"; this.columnID.Name = "columnID"; this.columnID.Width = 44; @@ -762,8 +838,8 @@ namespace Maestro { // this.columnStatus.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; this.columnStatus.DataPropertyName = "Status"; - dataGridViewCellStyle15.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.columnStatus.DefaultCellStyle = dataGridViewCellStyle15; + dataGridViewCellStyle5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.columnStatus.DefaultCellStyle = dataGridViewCellStyle5; this.columnStatus.HeaderText = "Status"; this.columnStatus.Name = "columnStatus"; this.columnStatus.Width = 66; @@ -808,79 +884,12 @@ namespace Maestro { this.columnKillDate.Name = "columnKillDate"; this.columnKillDate.Width = 75; // - // tabPage2 - // - this.tabPage2.Controls.Add(this.dgMessages); - this.tabPage2.Location = new System.Drawing.Point(4, 24); - this.tabPage2.Name = "tabPage2"; - this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(994, 96); - this.tabPage2.TabIndex = 1; - this.tabPage2.Text = global::Maestro.StringResources.UZENETEK; - this.tabPage2.UseVisualStyleBackColor = true; - // - // dgMessages - // - this.dgMessages.AllowUserToAddRows = false; - this.dgMessages.AllowUserToResizeRows = false; - this.dgMessages.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.DisplayedCells; - this.dgMessages.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.DisplayedCells; - this.dgMessages.BackgroundColor = System.Drawing.Color.White; - this.dgMessages.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.dgMessages.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.dgMessages.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.dataGridViewTextBoxColumn1, - this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle19.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - dataGridViewCellStyle19.ForeColor = System.Drawing.Color.Red; - dataGridViewCellStyle19.NullValue = null; - dataGridViewCellStyle19.SelectionBackColor = System.Drawing.Color.Gainsboro; - dataGridViewCellStyle19.SelectionForeColor = System.Drawing.Color.Red; - dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dgMessages.DefaultCellStyle = dataGridViewCellStyle19; - this.dgMessages.Dock = System.Windows.Forms.DockStyle.Fill; - this.dgMessages.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; - this.dgMessages.EnableHeadersVisualStyles = false; - this.dgMessages.GridColor = System.Drawing.Color.White; - this.dgMessages.Location = new System.Drawing.Point(3, 3); - this.dgMessages.Name = "dgMessages"; - this.dgMessages.ReadOnly = true; - this.dgMessages.RowHeadersVisible = false; - dataGridViewCellStyle20.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.dgMessages.RowsDefaultCellStyle = dataGridViewCellStyle20; - this.dgMessages.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.dgMessages.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dgMessages.Size = new System.Drawing.Size(988, 90); - this.dgMessages.TabIndex = 1; - // - // dataGridViewTextBoxColumn1 - // - this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells; - this.dataGridViewTextBoxColumn1.DataPropertyName = "Time"; - this.dataGridViewTextBoxColumn1.HeaderText = "Időpont"; - this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; - this.dataGridViewTextBoxColumn1.ReadOnly = true; - this.dataGridViewTextBoxColumn1.Width = 73; - // - // dataGridViewTextBoxColumn2 - // - this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - this.dataGridViewTextBoxColumn2.DataPropertyName = "Message"; - dataGridViewCellStyle18.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.dataGridViewTextBoxColumn2.DefaultCellStyle = dataGridViewCellStyle18; - this.dataGridViewTextBoxColumn2.HeaderText = "Üzenet"; - this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; - this.dataGridViewTextBoxColumn2.ReadOnly = true; - // - // systemMessageBindingSource - // - this.systemMessageBindingSource.DataSource = typeof(Maestro.SystemMessage); - // - // metadataInfoBindingSource + // Message // - this.metadataInfoBindingSource.DataSource = typeof(Maestro.Metadata.MetadataInfo); + this.Message.DataPropertyName = "Message"; + this.Message.HeaderText = "Üzenet"; + this.Message.Name = "Message"; + this.Message.Width = 71; // // MaestroForm // @@ -968,7 +977,7 @@ namespace Maestro { private System.Windows.Forms.BindingSource metadataInfoBindingSource; private System.Windows.Forms.Panel pExecute; private System.Windows.Forms.TableLayoutPanel pSourceDisplay; - private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label lSelectedSource; private System.Windows.Forms.TableLayoutPanel pMetadataDisplay; private TrafficClient.TrafficIDSelector trafficIDSelector; private System.Windows.Forms.Button btnLookupBySource; @@ -977,15 +986,6 @@ namespace Maestro { private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.BindingSource systemMessageBindingSource; private System.Windows.Forms.DataGridView dgMessages; - private System.Windows.Forms.DataGridViewTextBoxColumn columnLabel; - private System.Windows.Forms.DataGridViewTextBoxColumn columnID; - private Commons.DataGridViewProgressColumn Progress; - private System.Windows.Forms.DataGridViewTextBoxColumn columnStatus; - private System.Windows.Forms.DataGridViewTextBoxColumn columnStarted; - private System.Windows.Forms.DataGridViewTextBoxColumn columnFinished; - private System.Windows.Forms.DataGridViewTextBoxColumn columnInput; - private System.Windows.Forms.DataGridViewTextBoxColumn columnOutput; - private System.Windows.Forms.DataGridViewTextBoxColumn columnKillDate; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2; private System.Windows.Forms.TableLayoutPanel pSourceFilter; @@ -999,6 +999,16 @@ namespace Maestro { private System.Windows.Forms.ToolStripButton btnShowFolders; private System.Windows.Forms.TreeView treeFolders; private System.Windows.Forms.ImageList ilFolders; + private System.Windows.Forms.DataGridViewTextBoxColumn columnLabel; + private System.Windows.Forms.DataGridViewTextBoxColumn columnID; + private Commons.DataGridViewProgressColumn Progress; + private System.Windows.Forms.DataGridViewTextBoxColumn columnStatus; + private System.Windows.Forms.DataGridViewTextBoxColumn columnStarted; + private System.Windows.Forms.DataGridViewTextBoxColumn columnFinished; + private System.Windows.Forms.DataGridViewTextBoxColumn columnInput; + private System.Windows.Forms.DataGridViewTextBoxColumn columnOutput; + private System.Windows.Forms.DataGridViewTextBoxColumn columnKillDate; + private System.Windows.Forms.DataGridViewTextBoxColumn Message; } } diff --git a/client/Maestro/MaestroForm.Source.cs b/client/Maestro/MaestroForm.Source.cs index 16ff98b1..ee8b6138 100644 --- a/client/Maestro/MaestroForm.Source.cs +++ b/client/Maestro/MaestroForm.Source.cs @@ -43,11 +43,12 @@ namespace Maestro { } private void InitializeSource() { - + if (Configuration.MetadataOnly) + return; if (Configuration.DefaultWindowColor != null) - defaultColor = (Color) Configuration.DefaultWindowColor; + defaultColor = (Color)Configuration.DefaultWindowColor; if (Configuration.PartialWindowColor != null) - partialColor = (Color) Configuration.PartialWindowColor; + partialColor = (Color)Configuration.PartialWindowColor; Uri localAddress = Configuration?.Source?.Local?.Address; Uri remoteAddress = Configuration?.Source?.Remote?.Address; @@ -77,7 +78,7 @@ namespace Maestro { private string GetLastSegment(string path) { Uri uri = new Uri(path); - return uri.Segments[uri.Segments.Length - 1]; + return Uri.UnescapeDataString(uri.Segments[uri.Segments.Length - 1]); } private void ShowFolders() { @@ -90,6 +91,8 @@ namespace Maestro { btnShowFolders.CheckState = CheckState.Unchecked; } Uri address = Configuration.Source.Local.Address; + if (!Directory.Exists(address.LocalPath)) + return; string[] folders = Directory.GetDirectories(address.LocalPath); TreeNode rootNode = treeFolders.Nodes.Add(GetLastSegment(Configuration.Source.Local.Address.ToString())); foreach (var folder in folders) { @@ -139,7 +142,7 @@ namespace Maestro { if (e.Node.Level == 0) address = Configuration.Source.Local.Address; else - address = new Uri(Path.Combine(Configuration.Source.Local.Address.LocalPath, GetPath(e.Node))); + address = new Uri(Uri.UnescapeDataString(Path.Combine(Configuration.Source.Local.Address.LocalPath, GetPath(e.Node)))); if (!String.IsNullOrEmpty(address.LocalPath)) formTooltip.SetToolTip(groupSource, address.LocalPath); source.Reset(address.LocalPath); @@ -326,12 +329,13 @@ namespace Maestro { } private FileInfo GetSelectedSourceFileInfo() { - if (Configuration.Source.GetType() == typeof(NEXIOSource)) + FileSystemSource source = bindingSource.DataSource as FileSystemSource; + if (source == null) return null; if (selectedSourceItems.Count != 1) return null; string name = selectedSourceItems[0].Name; - Uri inputUri = new Uri(String.Format("{0}/{1}", Configuration.Source.Local.Address.LocalPath, name)); + Uri inputUri = new Uri(Uri.UnescapeDataString(Path.Combine(source.Path, name))); return new FileInfo(inputUri.LocalPath); } diff --git a/client/Maestro/MaestroForm.Target.cs b/client/Maestro/MaestroForm.Target.cs index 88cf649f..665014c1 100644 --- a/client/Maestro/MaestroForm.Target.cs +++ b/client/Maestro/MaestroForm.Target.cs @@ -14,6 +14,8 @@ namespace Maestro { public partial class MaestroForm { private void InitializeTarget() { + if (Configuration.MetadataOnly) + return; btnExecute.Enabled = false; if (Configuration.Targets == null) return; @@ -142,7 +144,10 @@ namespace Maestro { } private TargetProcessorParameter CreateProcessorParameter(Target target, ISourceItem sourceItem) { + FileSystemSource source = bindingSource.DataSource as FileSystemSource; + return new TargetProcessorParameter() { + SourcePathOverride = (source == null || source.Path.Equals(Configuration.Source.Local.Address.LocalPath)) ? null : source.Path, MediaCubeApi = mediaCubeApi, SourceConfig = Configuration.Source, TargetConfig = target, diff --git a/client/Maestro/MaestroForm.cs b/client/Maestro/MaestroForm.cs index 15aa8906..9c721752 100644 --- a/client/Maestro/MaestroForm.cs +++ b/client/Maestro/MaestroForm.cs @@ -61,7 +61,7 @@ namespace Maestro { groupSource.Text = StringResources.FORRAS_FAJL; groupMetadata.Text = StringResources.METAADAT; groupTarget.Text = StringResources.CEL_AKCIO; - label1.Text = StringResources.KIVALASZTOTT_FORRAS; + lSelectedSource.Text = StringResources.KIVALASZTOTT_FORRAS; labelSelectedMetadata.Text = StringResources.KIVALASZTOTT_METAADAT; btnExecute.Text = StringResources.VEGREHAJT; groupActions.Text = StringResources.AKCIOK; @@ -83,6 +83,11 @@ namespace Maestro { errorMessageBus.Subscribe(OnMessage); errorMessageBus.Subscribe(OnMessage); + if (Configuration.MetadataOnly) { + scOperations.Panel1Collapsed = true; + scRightOperations.Panel2Collapsed = true; + } + InitializeMetadata(); InitializeTarget(); InitializeJobs(); diff --git a/client/Maestro/MaestroForm.resx b/client/Maestro/MaestroForm.resx index 401351b8..5167bfdf 100644 --- a/client/Maestro/MaestroForm.resx +++ b/client/Maestro/MaestroForm.resx @@ -128,7 +128,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACU - BwAAAk1TRnQBSQFMAwEBAAGYAQABmAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA + BwAAAk1TRnQBSQFMAwEBAAGwAQABsAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA AUADAAEQAwABAQEAAQgGAAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm @@ -163,9 +163,6 @@ AUADAAEQAwABAQEAAQEFAAGAFwAD/4EACw== - - 951, 17 - @@ -181,9 +178,6 @@ 846, 17 - - 846, 17 - True @@ -211,6 +205,9 @@ True + + True + 154, 17 diff --git a/client/Maestro/Properties/AssemblyInfo.cs b/client/Maestro/Properties/AssemblyInfo.cs index 6acc4e72..f9d37067 100644 --- a/client/Maestro/Properties/AssemblyInfo.cs +++ b/client/Maestro/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.5.0")] -[assembly: AssemblyFileVersion("2.0.5.0")] +[assembly: AssemblyVersion("2.0.5.4")] +[assembly: AssemblyFileVersion("2.0.5.4")] diff --git a/client/Maestro/Sources/FileSystemSource.cs b/client/Maestro/Sources/FileSystemSource.cs index ec49526b..22408aa4 100644 --- a/client/Maestro/Sources/FileSystemSource.cs +++ b/client/Maestro/Sources/FileSystemSource.cs @@ -93,6 +93,7 @@ namespace Maestro.Sources { } public bool PlayerEnabled { get; private set; } + public string Path { get; private set; } private void Refresh() { if (cache == null) @@ -136,7 +137,7 @@ namespace Maestro.Sources { public void Reset(string path) { if (path != null) - this.path = path; + this.Path = path; Clear(); cache = null; Shutdown(); @@ -156,7 +157,7 @@ namespace Maestro.Sources { private void pathWatcherWorker_watchPath(object sender, DoWorkEventArgs e) { while (true) { - if (!Directory.Exists(path)) { + if (!Directory.Exists(Path)) { if (watcher != null) Shutdown(); } else { @@ -180,14 +181,14 @@ namespace Maestro.Sources { } public void Startup(Uri address) { - path = address.LocalPath; - rootPath = path; + Path = address.LocalPath; + rootPath = Path; pathWatcherWorker.RunWorkerAsync(); } private void InnerStartUp() { - createWatch(path); - initializeList(path); + createWatch(Path); + initializeList(Path); } private FileSourceItem CreateItem(FileInfo fi, bool highlight) { diff --git a/client/Maestro/Sources/NexioRESTSource.cs b/client/Maestro/Sources/NexioRESTSource.cs index 2a74a9a1..dbd5b7de 100644 --- a/client/Maestro/Sources/NexioRESTSource.cs +++ b/client/Maestro/Sources/NexioRESTSource.cs @@ -58,7 +58,7 @@ namespace Maestro.Sources { DataPropertyName = "Created", HeaderText = StringResources.FELVETEL_DATUMA, AutoSizeMode = DataGridViewAutoSizeColumnMode.None, - Width = 100 + Width = 120 }, new DataGridViewTextBoxColumn() { DataPropertyName = "Modified", diff --git a/client/MaestroShared/Commons/MsgBox.cs b/client/MaestroShared/Commons/MsgBox.cs index 044df304..024107e0 100644 --- a/client/MaestroShared/Commons/MsgBox.cs +++ b/client/MaestroShared/Commons/MsgBox.cs @@ -3,19 +3,19 @@ namespace MaestroShared.Commons { public class MsgBox { public static void Info(string text) { - MessageBox.Show(text, null, MessageBoxButtons.OK, MessageBoxIcon.Information); + MessageBox.Show(text, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Information); } public static void Error(string text) { - MessageBox.Show(text, null, MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show(text, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error); } public static void Warning(string text) { - MessageBox.Show(text, null, MessageBoxButtons.OK, MessageBoxIcon.Warning); + MessageBox.Show(text, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Warning); } public static void Exclamation(string text) { - MessageBox.Show(text, null, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); + MessageBox.Show(text, string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } } diff --git a/client/MaestroShared/Configuration/ConfigurationInfo.cs b/client/MaestroShared/Configuration/ConfigurationInfo.cs index d0567ba3..bb84ab4f 100644 --- a/client/MaestroShared/Configuration/ConfigurationInfo.cs +++ b/client/MaestroShared/Configuration/ConfigurationInfo.cs @@ -42,6 +42,8 @@ namespace MaestroShared.Configuration { public bool EnableCustomMetadataId { get; set; } public MetadataProvider[] Metadatas { get; set; } public Target[] Targets { get; set; } + public bool MetadataOnly { get; set; } + public Point Size { get; set; } public T GetMetadataProvider() { MetadataProvider provider = Metadatas?.Where(m => { return m is T; }).FirstOrDefault(); @@ -74,7 +76,7 @@ namespace MaestroShared.Configuration { public string DeviceIDMorpheus { get; set; } public string PathMorpheusMetadata { get; set; } public bool DisableFileVersioning { get; set; } - public bool DisableOverride { get; set; } + public bool EnableOverride { get; set; } public bool SendEmailOnError { get; set; } public string ErrorEmailRecipient { get; set; } public string ErrorEmailPattern { get; set; } diff --git a/client/MaestroShared/Configuration/KeysJsonConverter.cs b/client/MaestroShared/Configuration/KeysPasswordConverter.cs similarity index 81% rename from client/MaestroShared/Configuration/KeysJsonConverter.cs rename to client/MaestroShared/Configuration/KeysPasswordConverter.cs index 210dfc7a..12bf7eca 100644 --- a/client/MaestroShared/Configuration/KeysJsonConverter.cs +++ b/client/MaestroShared/Configuration/KeysPasswordConverter.cs @@ -1,10 +1,13 @@ using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using PasswordEncrypter; using System; namespace MaestroShared.Configuration { public class KeysPasswordConverter : JsonConverter { public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { + JToken t = JToken.FromObject(StringCipher.Encrypt(value as string)); + t.WriteTo(writer); } public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { diff --git a/client/MaestroShared/MaestroShared.csproj b/client/MaestroShared/MaestroShared.csproj index 002a9c55..0de39cbd 100644 --- a/client/MaestroShared/MaestroShared.csproj +++ b/client/MaestroShared/MaestroShared.csproj @@ -88,7 +88,7 @@ - + Component diff --git a/client/MaestroShared/Targets/FTPTargetProcessor.cs b/client/MaestroShared/Targets/FTPTargetProcessor.cs index cc539220..b6ead38c 100644 --- a/client/MaestroShared/Targets/FTPTargetProcessor.cs +++ b/client/MaestroShared/Targets/FTPTargetProcessor.cs @@ -22,12 +22,22 @@ namespace MaestroShared.Targets { FtpTrace.LogFunctions = false; string address = parameters?.SourceConfig?.Remote?.Address.ToString(); if (address == null) - return; + throw new Exception("Nem található a 'source.remote.address' beállítás."); inputFile = null; + + if (!String.IsNullOrEmpty(parameters.SourcePathOverride)) { + string relativePath = parameters.SourcePathOverride.Replace(parameters.SourceConfig.Local.Address.LocalPath, "").Replace(BACKSLASH, SLASH); + if (relativePath.StartsWith(SLASH)) + relativePath = relativePath.Substring(1); + Input = new Uri(Path.Combine(address, relativePath, parameters.InputFileName)).LocalPath; + } + else + Input = new Uri(Path.Combine(address, parameters.InputFileName)).LocalPath; + //if (address == null) // throw new Exception("Missing 'source.remote' parameter."); - Uri inputUri = new Uri(Path.Combine(address, parameters.InputFileName)); - Input = inputUri.ToString(); + //Uri inputUri = new Uri(Path.Combine(address, parameters.InputFileName)); + //Input = inputUri.ToString(); } protected override void BeforeExecute() { @@ -141,5 +151,11 @@ namespace MaestroShared.Targets { } } + + protected override void CreateOutput(string workingDir) { + base.CreateOutput(workingDir); + Output = Output.Replace(BACKSLASH, SLASH); + } + } } diff --git a/client/MaestroShared/Targets/FXPTargetProcessor.cs b/client/MaestroShared/Targets/FXPTargetProcessor.cs index 0517ed54..09513ee2 100644 --- a/client/MaestroShared/Targets/FXPTargetProcessor.cs +++ b/client/MaestroShared/Targets/FXPTargetProcessor.cs @@ -3,6 +3,7 @@ using MaestroShared.Configuration; using MaestroShared.Target; using NLog; using System; +using System.Diagnostics; using System.IO; using System.Text.RegularExpressions; using System.Threading; @@ -20,8 +21,21 @@ namespace MaestroShared.Targets { public override void Initialize(Control parent, TargetProcessorParameter parameters) { base.Initialize(parent, parameters); sourceConfig = parameters.SourceConfig; - inputUri = new Uri(Path.Combine(parameters.SourceConfig.Remote.Address.ToString(), parameters.InputFileName)); - Input = inputUri.ToString(); + //inputUri = new Uri(Path.Combine(parameters.SourceConfig.Remote.Address.ToString(), parameters.InputFileName)); + //Input = inputUri.ToString(); + + string address = parameters?.SourceConfig?.Remote?.Address.ToString(); + if (address == null) + throw new Exception("Nem található a 'source.remote.address' beállítás."); + + if (!String.IsNullOrEmpty(parameters.SourcePathOverride)) { + string relativePath = parameters.SourcePathOverride.Replace(parameters.SourceConfig.Local.Address.LocalPath, "").Replace(BACKSLASH, SLASH); + if (relativePath.StartsWith(SLASH)) + relativePath = relativePath.Substring(1); + inputUri = new Uri(Path.Combine(address, relativePath, parameters.InputFileName)); + } else + inputUri = new Uri(Path.Combine(address, parameters.InputFileName)); + Input = inputUri.LocalPath; } protected override void UploadFile() { @@ -31,7 +45,7 @@ namespace MaestroShared.Targets { try { sourceFTP = CreateClient(sourceConfig.Remote); - string input = inputUri.AbsolutePath.Replace(LITERAL_SPACE, SPACE); + string input = Uri.UnescapeDataString(inputUri.AbsolutePath); long ilength = sourceFTP.GetFileSize(input); if (Parameters.TargetConfig.NexioServer) ilength = ilength / 2; @@ -88,7 +102,13 @@ namespace MaestroShared.Targets { long lastSize = 0; while (overall != ilength) { overall = monitorFTP.GetFileSize(OutputName); - if (overall == lastSize) { + FtpReply statRETR = sourceFTP.Execute("STAT"); + if (!statRETR.Success) + Debug.WriteLine($"Overall {overall}, last {lastSize}"); + else + Debug.WriteLine($"Overall {overall}, last {lastSize} site {statRETR.Message}"); + + if (overall == lastSize && overall > 0) { Progress = 100; break; } else { @@ -111,5 +131,6 @@ namespace MaestroShared.Targets { //logger.Debug("Done"); } + } } diff --git a/client/MaestroShared/Targets/TargetProcessorParameter.cs b/client/MaestroShared/Targets/TargetProcessorParameter.cs index e60d1ff2..2bd01184 100644 --- a/client/MaestroShared/Targets/TargetProcessorParameter.cs +++ b/client/MaestroShared/Targets/TargetProcessorParameter.cs @@ -6,6 +6,7 @@ using LinkDotNet.MessageHandling.Contracts; namespace MaestroShared.Target { public class TargetProcessorParameter { + public string SourcePathOverride { get; set; } public Source SourceConfig { get; set; } public Configuration.Target TargetConfig { get; set; } public string InputFileName { get; set; } diff --git a/client/MaestroShared/Targets/UNCTargetProcessor.cs b/client/MaestroShared/Targets/UNCTargetProcessor.cs index db0e27fc..2c0cdae0 100644 --- a/client/MaestroShared/Targets/UNCTargetProcessor.cs +++ b/client/MaestroShared/Targets/UNCTargetProcessor.cs @@ -46,7 +46,10 @@ namespace MaestroShared.Targets { public override void Initialize(Control parent, TargetProcessorParameter parameters) { base.Initialize(parent, parameters); InputName = parameters.InputFileName; - Input = Path.Combine(parameters.SourceConfig.Local.Address.LocalPath, parameters.InputFileName); + if (!String.IsNullOrEmpty(parameters.SourcePathOverride)) + Input = Path.Combine(parameters.SourcePathOverride, parameters.InputFileName); + else + Input = Path.Combine(parameters.SourceConfig.Local.Address.LocalPath, parameters.InputFileName); inputFile = new FileInfo(Input); ID = parameters.ID; workFlowAction = new WorkflowAction() { @@ -100,22 +103,22 @@ namespace MaestroShared.Targets { return result; } - private void CreateOutput(string workingDir) { + protected virtual void CreateOutput(string workingDir) { Output = SLASH.Equals(workingDir) ? OutputName : Path.Combine(workingDir, OutputName); } private bool DeleteExisting(string currentFile) { bool result = true; - if (FileExists(currentFile) && (Parameters.TargetConfig.DisableFileVersioning || Parameters.TargetConfig.DisableOverride)) { + if (FileExists(currentFile) && (Parameters.TargetConfig.DisableFileVersioning || Parameters.TargetConfig.EnableOverride)) { if (Parameters.TargetConfig.NexioServer) { Status = REVOKED; ShowNexioFileExistsMessage(); result = false; } else { - if (Parameters.TargetConfig.DisableOverride) - result = false; - else + if (Parameters.TargetConfig.EnableOverride) DeleteFile(currentFile); + else + result = false; } } return result; diff --git a/server/-modules/pom.xml b/server/-modules/pom.xml index e9cb460d..309864f6 100644 --- a/server/-modules/pom.xml +++ b/server/-modules/pom.xml @@ -26,8 +26,8 @@ UTF-8 scp://root:password@10.10.1.27 - - ssh-ed25519 256 ea:58:1c:d3:b8:d5:7a:92:4c:a3:a5:8d:e2:7b:07:fd + ssh-ed25519 256 ea:ab:67:70:79:63:2f:6a:34:81:48:e2:b9:dd:ca:d4 + -- 2.54.0