From: Vásáry Dániel Date: Thu, 23 Nov 2017 09:06:42 +0000 (+0000) Subject: git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube... X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=4f39081279d6018cf186ce3893df1a6808efaac4;p=mediacube.git git-tfs-id: [tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30755 --- diff --git a/client/DxPlay/DxPlayer.cs b/client/DxPlay/DxPlayer.cs index 50b5c352..1c46e150 100644 --- a/client/DxPlay/DxPlayer.cs +++ b/client/DxPlay/DxPlayer.cs @@ -16,7 +16,7 @@ using Myriadbits.MXF; using MaestroShared.Metadata; namespace DxPlay { - + internal class DxPlayer : ISampleGrabberCB, IDisposable { [DllImport("Kernel32.dll", EntryPoint = "RtlMoveMemory")] @@ -73,6 +73,8 @@ namespace DxPlay { CloseInterfaces(); } + Control playerWindow; + // Play an avi file into a window. Allow for snapshots. // (Control to show video in, Avi file to play public DxPlayer(Control hWin, ref MediaDescription mediaDesc) { @@ -84,7 +86,9 @@ namespace DxPlay { MediaDescription = mediaDesc; Debug.WriteLine("SetupGraph"); // Set up the graph - SetupGraph(hWin); + playerWindow = hWin; + + SetupGraph(); hWin.Hide(); hWin.Show(); @@ -217,16 +221,9 @@ namespace DxPlay { return (int)Math.Abs((double)refTime / AvgTimePerFrame); } - // Build the capture graph for grabber and renderer. - // (Control to show video in, Filename to play) - private void SetupGraph(Control hWin) { + private void SetupGraph() { int hr; - //if (MediaDescription != null) { - // m_videoWidth = MediaDescription.Resolution.Width; - // m_videoHeight = MediaDescription.Resolution.Height; - //} - try { IsError = false; m_FilterGraph = new FilterGraph() as IFilterGraph2; @@ -245,20 +242,19 @@ namespace DxPlay { hr = m_FilterGraph.AddSourceFilter(MediaDescription.FileName, MediaDescription.FileName, out sourceFilter); DsError.ThrowExceptionForHR(hr); - IBaseFilter splitter = null; //Type typeFromClsid = Type.GetTypeFromCLSID(new Guid("CCE7BD95-3BC4-4cfb-9664-0BF83201BE09")); //splitter = (IBaseFilter)Activator.CreateInstance(typeFromClsid); //m_FilterGraph.AddFilter(splitter, "MXF Splitter"); //splitter = FilterGraphTools.AddFilterByName(graphBuilder, FilterCategory.LegacyAmFilterCategory, "Sony MXF Splitter"); - - splitter = FilterGraphTools.AddFilterByName(graphBuilder, FilterCategory.LegacyAmFilterCategory, "LAV Splitter"); + IBaseFilter splitter = LoadSplitter(graphBuilder); if (splitter == null) throw new Exception("No splitter!"); FilterGraphTools.ConnectFilters(graphBuilder, sourceFilter, "Output", splitter, "Input", true); - IBaseFilter videoDecoder = FilterGraphTools.AddFilterByName(graphBuilder, FilterCategory.LegacyAmFilterCategory, "LAV Video Decoder"); + IBaseFilter videoDecoder = LoadVideoDecoder(graphBuilder); + if (videoDecoder == null) throw new Exception("No video decoder!"); @@ -282,7 +278,8 @@ namespace DxPlay { FilterGraphTools.ConnectFilters(graphBuilder, sampGrabber, "Output", m_videoRenderer, "VMR Input0", true); if (DsFindPin.ByName(splitter, "Audio") != null) { - IBaseFilter audioDecoder = FilterGraphTools.AddFilterByName(graphBuilder, FilterCategory.LegacyAmFilterCategory, "LAV Audio Decoder"); + IBaseFilter audioDecoder = null; + audioDecoder = LoadAudioDecoder(graphBuilder); if (audioDecoder == null) throw new Exception("No audio decoder!"); @@ -292,9 +289,9 @@ namespace DxPlay { SaveSizeInfo(sampGrabber as ISampleGrabber); SetTimeCodes(); - ConfigureVideoWindow(hWin); + ConfigureVideoWindow(); - ILAVVideoSettings settings = (ILAVVideoSettings) videoDecoder; + ILAVVideoSettings settings = (ILAVVideoSettings)videoDecoder; //settings.SetSWDeintMode(LAVSWDeintModes.SWDeintMode_None); settings.SetSWDeintMode(LAVSWDeintModes.SWDeintMode_YADIF); settings.SetSWDeintOutput(LAVDeintOutput.DeintOutput_FramePer2Field); @@ -313,6 +310,40 @@ namespace DxPlay { #endif } + private static IBaseFilter LoadVideoDecoder(IGraphBuilder graphBuilder) { + IBaseFilter videoDecoder = null; + ILAVVideoSettings lavVideoSettings; + videoDecoder = FilterProvider.GetVideoFilter(out lavVideoSettings); + if (videoDecoder == null) + videoDecoder = FilterGraphTools.AddFilterByName(graphBuilder, FilterCategory.LegacyAmFilterCategory, "LAV Video Decoder"); + else + graphBuilder.AddFilter(videoDecoder, "LAV Video Decoder"); + return videoDecoder; + } + + private static IBaseFilter LoadAudioDecoder(IGraphBuilder graphBuilder) { + IBaseFilter audioDecoder = null; + ILAVAudioSettings lavAudioSettings; + ILAVAudioStatus lavAudioStatus; + audioDecoder = FilterProvider.GetAudioFilter(out lavAudioSettings, out lavAudioStatus); + if (audioDecoder == null) + audioDecoder = FilterGraphTools.AddFilterByName(graphBuilder, FilterCategory.LegacyAmFilterCategory, "LAV Audio Decoder"); + else + graphBuilder.AddFilter(audioDecoder, "LAV Audio Decoder"); + return audioDecoder; + } + + private static IBaseFilter LoadSplitter(IGraphBuilder graphBuilder) { + IBaseFilter splitter = null; + ILAVSplitterSettings lavSplitterSettings; + splitter = FilterProvider.GetSplitter(out lavSplitterSettings); + if (splitter == null) + splitter = FilterGraphTools.AddFilterByName(graphBuilder, FilterCategory.LegacyAmFilterCategory, "LAV Splitter"); + else + graphBuilder.AddFilter(splitter, "LAV Splitter"); + return splitter; + } + private void SetTimeCodes() { int hr; long duration; @@ -331,14 +362,14 @@ namespace DxPlay { // Configure the video window - private void ConfigureVideoWindow(Control hWin) { + private void ConfigureVideoWindow() { int hr; // Set the output window - hr = m_videoWindow.put_Owner(hWin.Handle); + hr = m_videoWindow.put_Owner(playerWindow.Handle); DsError.ThrowExceptionForHR(hr); - hr = m_videoWindow.put_MessageDrain(hWin.Handle); + hr = m_videoWindow.put_MessageDrain(playerWindow.Handle); DsError.ThrowExceptionForHR(hr); // Set the window style @@ -349,16 +380,16 @@ namespace DxPlay { hr = m_videoWindow.put_Visible(OABool.True); DsError.ThrowExceptionForHR(hr); - UpdateVideoWindow(hWin); + UpdateVideoWindow(); } - public void UpdateVideoWindow(Control hWin) { + public void UpdateVideoWindow() { Size resolution = MediaDescription.Resolution; if (resolution.Width == 0 || resolution.Height == 0) return; int hr; // Position the playing location - Rectangle rc = hWin.ClientRectangle; + Rectangle rc = playerWindow.ClientRectangle; double x = (double)resolution.Width / resolution.Height; double y = (double)rc.Right / rc.Bottom; int playerWidth = 0; diff --git a/client/DxPlay/FilterGraphTools.cs b/client/DxPlay/FilterGraphTools.cs index f3a47197..13e6a84a 100644 --- a/client/DxPlay/FilterGraphTools.cs +++ b/client/DxPlay/FilterGraphTools.cs @@ -117,7 +117,7 @@ namespace DirectShowLib.Utils { DsDevice[] devices = DsDevice.GetDevicesOfCat(deviceCategory); for (int i = 0; i < devices.Length; i++) { - Debug.WriteLine("Found " + devices[i].Name); + //Debug.WriteLine("Found " + devices[i].Name); if (string.IsNullOrEmpty(devices[i].Name)) //if the name is empty ignore the filter continue; else { diff --git a/client/DxPlay/InterceptKeys.cs b/client/DxPlay/InterceptKeys.cs index ab633d1f..2873f27b 100644 --- a/client/DxPlay/InterceptKeys.cs +++ b/client/DxPlay/InterceptKeys.cs @@ -18,10 +18,10 @@ namespace DxPlay { } private static IntPtr SetHook(LowLevelKeyboardProc proc) { - using (Process curProcess = Process.GetCurrentProcess()) - using (ProcessModule curModule = curProcess.MainModule) { - return SetWindowsHookEx(WH_KEYBOARD_LL, proc, - GetModuleHandle(curModule.ModuleName), 0); + using (Process curProcess = Process.GetCurrentProcess()) { + using (ProcessModule curModule = curProcess.MainModule) { + return SetWindowsHookEx(WH_KEYBOARD_LL, proc, GetModuleHandle(curModule.ModuleName), 0); + } } } @@ -34,13 +34,8 @@ namespace DxPlay { private static IntPtr HookCallback(int nCode, IntPtr wParam, IntPtr lParam) { if (nCode >= 0 && wParam == (IntPtr)WM_KEYDOWN) { int vkCode = Marshal.ReadInt32(lParam); - //Debug.WriteLine((Keys)vkCode); - //if (GlobalKeyEvent != null) { - // if (GlobalKeyEvent.Invoke((Keys)vkCode)) - // return (IntPtr)1; - //} GlobalKeyEvent?.Invoke((Keys)vkCode); - + //Application.DoEvents(); } return CallNextHookEx(_hookID, nCode, wParam, lParam); diff --git a/client/DxPlay/LAVInterfaces.cs b/client/DxPlay/LAVInterfaces.cs index 0608fc89..17362656 100644 --- a/client/DxPlay/LAVInterfaces.cs +++ b/client/DxPlay/LAVInterfaces.cs @@ -4,6 +4,7 @@ using System.IO; using System.Reflection; using System.Runtime.InteropServices; using System.Security; +using System.Windows.Forms; namespace DxPlay { #region "LAV COM classes" @@ -781,8 +782,6 @@ namespace DxPlay { if (oSettings != null) Marshal.FinalReleaseComObject(oSettings); - - throw; } finally { // even if nothing bad happens we need to clenup and give back to the original path @@ -882,8 +881,6 @@ namespace DxPlay { if (oSettings != null) Marshal.FinalReleaseComObject(oSettings); - - throw; } finally { // even if nothing bad happens we need to clenup and give back to the original path @@ -915,7 +912,7 @@ namespace DxPlay { string currentDir = Directory.GetCurrentDirectory(); // we have the filters in the subdirectory 'codecs' of the running app string path = Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), subDir); - + MessageBox.Show(path); try { // we need to be in the filter directory since it will load a bunch // of other dlls that are there, and they won't resolve otherwise @@ -1054,8 +1051,6 @@ namespace DxPlay { if (oSettings != null) Marshal.FinalReleaseComObject(oSettings); - - throw; } finally { // even if nothing bad happens we need to clenup and give back to the original path diff --git a/client/DxPlay/PlayerForm.cs b/client/DxPlay/PlayerForm.cs index c5f403db..d90e7f91 100644 --- a/client/DxPlay/PlayerForm.cs +++ b/client/DxPlay/PlayerForm.cs @@ -147,7 +147,7 @@ namespace DxPlay { private void panel1_SizeChanged(object sender, EventArgs e) { if (m_play != null) - m_play.UpdateVideoWindow(pVideo); + m_play.UpdateVideoWindow(); } private void trackBar1_MouseDown(object sender, MouseEventArgs e) { @@ -248,6 +248,7 @@ namespace DxPlay { result = true; break; case Keys.Left: + Debug.WriteLine("Seeking..."); if (ModifierKeys.HasFlag(Keys.Control)) { if (m_play.CurrentTC.ZeroBasedFrames > 4) { m_play.Pause(); diff --git a/client/DxPlay/Program.cs b/client/DxPlay/Program.cs index 4e91da20..15a345d3 100644 --- a/client/DxPlay/Program.cs +++ b/client/DxPlay/Program.cs @@ -1,6 +1,7 @@ using DxPlay; using System; using System.Diagnostics; +using System.IO; using System.Windows.Forms; namespace Maestro { @@ -13,7 +14,19 @@ namespace Maestro { AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(MyHandler); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new PlayerForm()); + PlayerForm playerForm = new PlayerForm(); + + String[] arguments = Environment.GetCommandLineArgs(); + if (arguments.Length > 1) { + FileInfo fi = new FileInfo(arguments[1]); + if (fi.Exists) { + playerForm.AutoStart = true; + playerForm.Open(fi); + if (playerForm.IsDisposed) + return; + } + } + Application.Run(playerForm); } private static void MyHandler(object sender, UnhandledExceptionEventArgs e) { diff --git a/client/Maestro/ArchiveMetadataForm.Designer.cs b/client/Maestro/ArchiveMetadataForm.Designer.cs index cb23d552..abc40b02 100644 --- a/client/Maestro/ArchiveMetadataForm.Designer.cs +++ b/client/Maestro/ArchiveMetadataForm.Designer.cs @@ -104,61 +104,63 @@ // this.textBox_itemID.Dock = System.Windows.Forms.DockStyle.Fill; this.textBox_itemID.Location = new System.Drawing.Point(11, 27); - this.textBox_itemID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.textBox_itemID.Margin = new System.Windows.Forms.Padding(4); this.textBox_itemID.Name = "textBox_itemID"; this.textBox_itemID.ReadOnly = true; this.textBox_itemID.Size = new System.Drawing.Size(660, 23); this.textBox_itemID.TabIndex = 6; + this.textBox_itemID.TabStop = false; // // textBox_itemTitle // this.textBox_itemTitle.Dock = System.Windows.Forms.DockStyle.Fill; this.textBox_itemTitle.Location = new System.Drawing.Point(11, 75); - this.textBox_itemTitle.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.textBox_itemTitle.Margin = new System.Windows.Forms.Padding(4); this.textBox_itemTitle.Name = "textBox_itemTitle"; this.textBox_itemTitle.Size = new System.Drawing.Size(660, 23); - this.textBox_itemTitle.TabIndex = 7; + this.textBox_itemTitle.TabIndex = 1; // // textBox_itemDescription // this.textBox_itemDescription.Dock = System.Windows.Forms.DockStyle.Fill; this.textBox_itemDescription.Location = new System.Drawing.Point(11, 123); - this.textBox_itemDescription.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.textBox_itemDescription.Margin = new System.Windows.Forms.Padding(4); this.textBox_itemDescription.Multiline = true; this.textBox_itemDescription.Name = "textBox_itemDescription"; this.textBox_itemDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.textBox_itemDescription.Size = new System.Drawing.Size(660, 126); - this.textBox_itemDescription.TabIndex = 8; + this.textBox_itemDescription.TabIndex = 2; // // textBox_mediaID // this.textBox_mediaID.Dock = System.Windows.Forms.DockStyle.Fill; this.textBox_mediaID.Location = new System.Drawing.Point(11, 274); - this.textBox_mediaID.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.textBox_mediaID.Margin = new System.Windows.Forms.Padding(4); this.textBox_mediaID.Name = "textBox_mediaID"; this.textBox_mediaID.ReadOnly = true; this.textBox_mediaID.Size = new System.Drawing.Size(660, 23); this.textBox_mediaID.TabIndex = 9; + this.textBox_mediaID.TabStop = false; // // textBox_mediaTitle // this.textBox_mediaTitle.Dock = System.Windows.Forms.DockStyle.Fill; this.textBox_mediaTitle.Location = new System.Drawing.Point(11, 322); - this.textBox_mediaTitle.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.textBox_mediaTitle.Margin = new System.Windows.Forms.Padding(4); this.textBox_mediaTitle.Name = "textBox_mediaTitle"; this.textBox_mediaTitle.Size = new System.Drawing.Size(660, 23); - this.textBox_mediaTitle.TabIndex = 10; + this.textBox_mediaTitle.TabIndex = 3; // // textBox_mediaDescription // this.textBox_mediaDescription.Dock = System.Windows.Forms.DockStyle.Fill; this.textBox_mediaDescription.Location = new System.Drawing.Point(11, 370); - this.textBox_mediaDescription.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.textBox_mediaDescription.Margin = new System.Windows.Forms.Padding(4); this.textBox_mediaDescription.Multiline = true; this.textBox_mediaDescription.Name = "textBox_mediaDescription"; this.textBox_mediaDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.textBox_mediaDescription.Size = new System.Drawing.Size(660, 113); - this.textBox_mediaDescription.TabIndex = 11; + this.textBox_mediaDescription.TabIndex = 4; // // label_stuffTitle // @@ -178,9 +180,9 @@ this.groupBox1.Controls.Add(this.btnCancel); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Bottom; this.groupBox1.Location = new System.Drawing.Point(0, 486); - this.groupBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox1.Margin = new System.Windows.Forms.Padding(4); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.groupBox1.Padding = new System.Windows.Forms.Padding(4); this.groupBox1.Size = new System.Drawing.Size(682, 59); this.groupBox1.TabIndex = 1; this.groupBox1.TabStop = false; @@ -189,10 +191,10 @@ // this.btnOk.Anchor = System.Windows.Forms.AnchorStyles.Right; this.btnOk.Location = new System.Drawing.Point(574, 20); - this.btnOk.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnOk.Margin = new System.Windows.Forms.Padding(4); this.btnOk.Name = "btnOk"; this.btnOk.Size = new System.Drawing.Size(100, 28); - this.btnOk.TabIndex = 1; + this.btnOk.TabIndex = 5; this.btnOk.Text = "Rendben"; this.btnOk.UseVisualStyleBackColor = true; this.btnOk.Click += new System.EventHandler(this.OnOkClick); @@ -202,10 +204,10 @@ this.btnCancel.Anchor = System.Windows.Forms.AnchorStyles.Right; this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.btnCancel.Location = new System.Drawing.Point(468, 20); - this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.btnCancel.Margin = new System.Windows.Forms.Padding(4); this.btnCancel.Name = "btnCancel"; this.btnCancel.Size = new System.Drawing.Size(100, 28); - this.btnCancel.TabIndex = 0; + this.btnCancel.TabIndex = 6; this.btnCancel.Text = "Mégsem"; this.btnCancel.UseVisualStyleBackColor = true; this.btnCancel.Click += new System.EventHandler(this.OnCancelClick); @@ -228,7 +230,7 @@ this.tableLayoutPanel1.Controls.Add(this.label_stuffTitle, 0, 2); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); - this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(4); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(7, 6, 7, 6); this.tableLayoutPanel1.RowCount = 12; @@ -257,7 +259,7 @@ this.Controls.Add(this.groupBox1); this.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); this.Icon = global::Maestro.Properties.Resources.AppIcon; - this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4); + this.Margin = new System.Windows.Forms.Padding(4); this.Name = "ArchiveMetadataForm"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Archiv adatok"; diff --git a/client/Maestro/Configuration/configuration-nle.json b/client/Maestro/Configuration/configuration-nle.json index e6d8a88e..448d676b 100644 --- a/client/Maestro/Configuration/configuration-nle.json +++ b/client/Maestro/Configuration/configuration-nle.json @@ -19,9 +19,29 @@ "metadatas": [ { "$type": "OctopusMetadata", + "disableStoryCheck": true, "server": { "address": "http://10.10.1.27/services/rest/octopus/", "timeout": 1000 + }, + "project": { + "templateRoot": { + "address": "file://10.10.1.100/BRAVOOS/.MAESTRO/PROJECT", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + }, + "projectRoot": { + "address": "file://10.10.1.100/BRAVOOS/OCTOPUS", + "userName": "mediacube", + "password": "Dn8t4gfHcK98o8hyPgLDhr5SgSji4JCxsfpMJsODikUp3nXgrM0UNCi45lLAK8ZOnmEneO44P9qpJ4QDqhctN6MxZodjJgdZTyoZKmSa+ECzEzLr/wPYNgxVaXrVotEy", + "timeout": 1000 + }, + "templateName": "ALAPTIMELINE.ezp", + "projectName": "%ID%-%TEXT%.ezp", + "destinationFormat": "%IDROOT%-%TEXT%/PROJECT", + "disableProject": false, + "disableSourceOpen": false } }, { @@ -69,9 +89,9 @@ { "label": "Octopus mappába küldés", "processor": "FTPTargetProcessor", - "outputFormat": "%ID%-%SOURCENAME%", "tag": "Betöltés", - "subFolderFormat": "%IDROOT%", + "outputFormat": "%ID%", + "subFolderFormat": "%IDROOT%-%TEXT%", "killDateDays": 7, "saveArchiveMetadata": false, "remote": { diff --git a/client/Maestro/Configuration/configuration-playout-ingest.json b/client/Maestro/Configuration/configuration-playout-ingest.json index aa818ef7..ddd13040 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": true, + "active": false, "startInTray": false, "enableCustomMetadataId": true, "player": { diff --git a/client/Maestro/Configuration/global.json b/client/Maestro/Configuration/global.json index 6c7a8f4d..c2fc6118 100644 --- a/client/Maestro/Configuration/global.json +++ b/client/Maestro/Configuration/global.json @@ -1,4 +1,5 @@ { + "minimizeToTray": true, "userDomain": { "address": "intra.echotv.hu", "userName": "echotest", diff --git a/client/Maestro/Maestro.csproj b/client/Maestro/Maestro.csproj index d1554c33..3d557d72 100644 --- a/client/Maestro/Maestro.csproj +++ b/client/Maestro/Maestro.csproj @@ -246,19 +246,19 @@ Form - PreserveNewest + Always - PreserveNewest + Always - PreserveNewest + Always - PreserveNewest + Always - PreserveNewest + Always @@ -288,16 +288,16 @@ PreserveNewest - PreserveNewest + Always PreserveNewest - PreserveNewest + Always - PreserveNewest + Always @@ -351,6 +351,8 @@ + + diff --git a/client/Maestro/MaestroForm.Designer.cs b/client/Maestro/MaestroForm.Designer.cs index 4b77ea25..1adb1e04 100644 --- a/client/Maestro/MaestroForm.Designer.cs +++ b/client/Maestro/MaestroForm.Designer.cs @@ -26,17 +26,17 @@ namespace Maestro { /// 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 dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = 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(); this.groupSource = new System.Windows.Forms.GroupBox(); this.dgSource = new System.Windows.Forms.DataGridView(); this.bindingSource = new System.Windows.Forms.BindingSource(this.components); @@ -159,32 +159,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); @@ -706,15 +706,15 @@ namespace Maestro { this.columnOutput, this.columnKillDate}); 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 +722,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); @@ -744,8 +744,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 +762,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; @@ -831,15 +831,15 @@ namespace Maestro { 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; + 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; @@ -848,8 +848,8 @@ namespace Maestro { 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; + 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); @@ -868,8 +868,8 @@ namespace Maestro { // 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; + 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; diff --git a/client/Maestro/MaestroForm.Metadata.cs b/client/Maestro/MaestroForm.Metadata.cs index 48e4cacd..18a10c9e 100644 --- a/client/Maestro/MaestroForm.Metadata.cs +++ b/client/Maestro/MaestroForm.Metadata.cs @@ -253,7 +253,9 @@ namespace Maestro { return null; ArchiveMetadata result = new ArchiveMetadata(); result.itemHouseId = ARCHIVEID_PREFIX + masterId.id.ToString(); + result.itemTitle = result.itemHouseId; result.mediaHouseId = result.itemHouseId; + result.mediaTitle = result.mediaHouseId; return result; } diff --git a/client/Maestro/MaestroForm.Source.cs b/client/Maestro/MaestroForm.Source.cs index 12b915ac..05abdfcb 100644 --- a/client/Maestro/MaestroForm.Source.cs +++ b/client/Maestro/MaestroForm.Source.cs @@ -28,8 +28,10 @@ namespace Maestro { } set { selectedSource = value; - if (selectedSource == null) + if (selectedSource == null) { + selectedSourceItems.ForEach(i => i.IsChecked = false); selectedSourceItems.Clear(); + } textSelectedSource.Text = selectedSource?.Name; archiveMetadata = null; segments = null; @@ -291,27 +293,21 @@ namespace Maestro { if (t != MetadataType.MediaCube && t != MetadataType.None) return nameWithoutExtension; - if (nameWithoutExtension.Contains("-")) { + if (nameWithoutExtension.Contains("-") || nameWithoutExtension.Contains("_")) { int start = nameWithoutExtension.Length; while (true) { int p = nameWithoutExtension.LastIndexOf("-", start); - if (p < 1) - break; - start = p - 1; - string x = nameWithoutExtension.Substring(0, p); - var z = GuessMetadataType(x); - if (z != MetadataType.MediaCube && z != MetadataType.None) - return x; - } - } - if (nameWithoutExtension.Contains("_")) { - int start = nameWithoutExtension.Length; - while (true) { - int p = nameWithoutExtension.LastIndexOf("_", start); - if (p < 1) + int o = nameWithoutExtension.LastIndexOf("_", start); + if (p < 1 && o < 1) break; - start = p - 1; - string x = nameWithoutExtension.Substring(0, p); + string x = null; + if (p > o) { + start = p - 1; + x = nameWithoutExtension.Substring(0, p); + } else { + start = o - 1; + x = nameWithoutExtension.Substring(0, o); + } var z = GuessMetadataType(x); if (z != MetadataType.MediaCube && z != MetadataType.None) return x; diff --git a/client/Maestro/MaestroForm.Target.cs b/client/Maestro/MaestroForm.Target.cs index c78a12e3..427a108b 100644 --- a/client/Maestro/MaestroForm.Target.cs +++ b/client/Maestro/MaestroForm.Target.cs @@ -238,6 +238,7 @@ namespace Maestro { if (processorWorker == null) CreateJobsQueueWorker(); ActivateTab(0); + SelectedSource = null; } diff --git a/client/Maestro/MaestroForm.cs b/client/Maestro/MaestroForm.cs index a2a0e145..40bfd264 100644 --- a/client/Maestro/MaestroForm.cs +++ b/client/Maestro/MaestroForm.cs @@ -91,7 +91,8 @@ namespace Maestro { SetColor(groupMetadata, defaultColor); SetColor(groupTarget, defaultColor); SetColor(groupActions, defaultColor); - + ShowInTaskbar = !TrayApplicationContext.GlobalConfig.MinimizeToTray; + } private void OnMessage(IMessage message) { @@ -113,12 +114,16 @@ namespace Maestro { private void MaestroForm_Resize(object sender, EventArgs e) { if (WindowState == FormWindowState.Minimized) { - Visible = false; + if (TrayApplicationContext.GlobalConfig.MinimizeToTray) + Visible = false; } } private void MaestroForm_FormClosing(object sender, FormClosingEventArgs e) { - Visible = false; + if (TrayApplicationContext.GlobalConfig.MinimizeToTray) + Visible = false; + else + WindowState = FormWindowState.Minimized; e.Cancel = true; } @@ -236,12 +241,19 @@ namespace Maestro { switch (item.Status) { case TargetProcessor.ERROR: row.DefaultCellStyle.BackColor = MaestroColors.Red200; + row.DefaultCellStyle.SelectionBackColor = MaestroColors.Red200; break; case TargetProcessor.REVOKED: row.DefaultCellStyle.BackColor = MaestroColors.Orange200; + row.DefaultCellStyle.SelectionBackColor = MaestroColors.Orange200; break; case TargetProcessor.READY: row.DefaultCellStyle.BackColor = MaestroColors.BlueGray200; + row.DefaultCellStyle.SelectionBackColor = MaestroColors.BlueGray200; + break; + default: + row.DefaultCellStyle.BackColor = Color.White; + row.DefaultCellStyle.SelectionBackColor = Color.White; break; } } diff --git a/client/Maestro/MaestroForm.resx b/client/Maestro/MaestroForm.resx index ffe86623..14f8d31f 100644 --- a/client/Maestro/MaestroForm.resx +++ b/client/Maestro/MaestroForm.resx @@ -128,7 +128,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACU - BwAAAk1TRnQBSQFMAwEBAAFgAQABYAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA + BwAAAk1TRnQBSQFMAwEBAAGQAQABkAEAARABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA AUADAAEQAwABAQEAAQgGAAEEGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm @@ -163,9 +163,6 @@ AUADAAEQAwABAQEAAQEFAAGAFwAD/4EACw== - - 951, 17 - @@ -175,8 +172,8 @@ 3/jmkprcKEuYE8aOir3NRGolzAnzVFoPuyGPLs5GSj/4XULq1sxx1wAAAABJRU5ErkJggg== - - 846, 17 + + 951, 17 846, 17 diff --git a/client/Maestro/Program.cs b/client/Maestro/Program.cs index 37e2f74f..8e677d04 100644 --- a/client/Maestro/Program.cs +++ b/client/Maestro/Program.cs @@ -14,6 +14,7 @@ using System.Reflection; using System.Runtime.InteropServices; using System.Security.AccessControl; using System.Security.Principal; +using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; @@ -87,8 +88,11 @@ namespace Maestro { private IMessageBus messageBus = new MessageBus(); public static string UserName { get; set; } + public static GlobalInfo GlobalConfig { get; internal set; } public TrayApplicationContext() { + //string x = Regex.Replace("xxx/yyy/1234-00_aaa", "_*$", "*"); + //Debug.WriteLine(x); } private bool HasCommandlineParameter(string parameter) { @@ -107,7 +111,7 @@ namespace Maestro { if (configFiles.Length == 0) throw new Exception(CONFIG_ERROR); - CheckGlobalConfig(configFiles); + GlobalConfig = LoadGlobalConfig(configFiles); if (!HasCommandlineParameter(NOLOGIN)) CheckUser(); CreateForms(configFiles); @@ -128,10 +132,11 @@ namespace Maestro { throw new Exception(CONFIG_ERROR); } - private void CheckGlobalConfig(string[] files) { + private GlobalInfo LoadGlobalConfig(string[] files) { string globalFile = Path.Combine(CONFIGURATION_FOLDER, GLOBAL_JSON); if (!files.Contains(globalFile)) throw new Exception(SYSCONFIG_ERROR); + return Loader.Get(globalFile); } private bool IsDomainUser(string userName, string domainName) { @@ -149,16 +154,15 @@ namespace Maestro { private void CheckUser() { string globalFile = Path.Combine(CONFIGURATION_FOLDER, GLOBAL_JSON); - GlobalInfo global = Loader.Get(globalFile); - string domainName = global.UserDomain.Address.ToString(); + string domainName = GlobalConfig.UserDomain.Address.ToString(); if (String.IsNullOrEmpty(domainName)) throw new Exception(SYSCONFIG_ERROR); else { string userName = WindowsIdentity.GetCurrent().Name; if (IsDomainUser(userName, domainName)) return; - userName = global.UserDomain.UserName; - string password = global.UserDomain.Password; + userName = GlobalConfig.UserDomain.UserName; + string password = GlobalConfig.UserDomain.Password; LoginForm loginForm = null; try { using (PrincipalContext pc = new PrincipalContext(ContextType.Domain, domainName)) { diff --git a/client/Maestro/Properties/AssemblyInfo.cs b/client/Maestro/Properties/AssemblyInfo.cs index 9da19dff..c0bb94b1 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.4.2")] -[assembly: AssemblyFileVersion("2.0.4.2")] +[assembly: AssemblyVersion("2.0.4.5")] +[assembly: AssemblyFileVersion("2.0.4.5")] diff --git a/client/Maestro/Properties/Resources.Designer.cs b/client/Maestro/Properties/Resources.Designer.cs index 027760f0..382c721c 100644 --- a/client/Maestro/Properties/Resources.Designer.cs +++ b/client/Maestro/Properties/Resources.Designer.cs @@ -150,6 +150,16 @@ namespace Maestro.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ic_refresh_black_24dp_1x { + get { + object obj = ResourceManager.GetObject("ic_refresh_black_24dp_1x", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/client/Maestro/Properties/Resources.resx b/client/Maestro/Properties/Resources.resx index 75f430b0..9ba30307 100644 --- a/client/Maestro/Properties/Resources.resx +++ b/client/Maestro/Properties/Resources.resx @@ -169,4 +169,7 @@ ..\Resources\ic_view_headline_black_24dp_1x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\ic_refresh_black_24dp_1x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/client/Maestro/Resources/ic_refresh_black_24dp_1x.jpg b/client/Maestro/Resources/ic_refresh_black_24dp_1x.jpg new file mode 100644 index 00000000..30f31217 Binary files /dev/null and b/client/Maestro/Resources/ic_refresh_black_24dp_1x.jpg differ diff --git a/client/Maestro/Resources/ic_refresh_black_24dp_1x.png b/client/Maestro/Resources/ic_refresh_black_24dp_1x.png new file mode 100644 index 00000000..c82efd5f Binary files /dev/null and b/client/Maestro/Resources/ic_refresh_black_24dp_1x.png differ diff --git a/client/MaestroShared/Configuration/ConfigurationInfo.cs b/client/MaestroShared/Configuration/ConfigurationInfo.cs index 978f87b8..1c5daf79 100644 --- a/client/MaestroShared/Configuration/ConfigurationInfo.cs +++ b/client/MaestroShared/Configuration/ConfigurationInfo.cs @@ -24,6 +24,7 @@ namespace MaestroShared.Configuration { public class GlobalInfo { public Connection UserDomain { get; set; } + public bool MinimizeToTray { get; set; } } public class ConfigurationInfo { @@ -106,6 +107,16 @@ namespace MaestroShared.Configuration { public Connection Server { get; set; } } + public class Project { + public Connection TemplateRoot { get; set; } + public Connection ProjectRoot { get; set; } + public string TemplateName { get; set; } + public string ProjectName { get; set; } + public string DestinationFormat { get; set; } + public bool DisableProject { get; set; } + public bool DisableSourceOpen { get; set; } + } + public class OctopusMetadata : MetadataProvider { public bool DisablePlaceHolderCheck { get; set; } public bool DisableStoryCheck { get; set; } diff --git a/server/user.jobengine.executors/src/user/jobengine/server/steps/ArchiveListBuilderStep.java b/server/user.jobengine.executors/src/user/jobengine/server/steps/ArchiveListBuilderStep.java index 0e9ee5c4..7b78de79 100644 --- a/server/user.jobengine.executors/src/user/jobengine/server/steps/ArchiveListBuilderStep.java +++ b/server/user.jobengine.executors/src/user/jobengine/server/steps/ArchiveListBuilderStep.java @@ -82,7 +82,8 @@ public class ArchiveListBuilderStep extends JobStep { try { Files.newDirectoryStream(Paths.get(sourcePath)).forEach(p -> processPathItem(p, archiveList)); } catch (Exception e) { - logger.error("", e); + logger.catching(e); + logger.error(getMarker(), "Az '{}' mappa elérése sikertelen. A rendszer hibaüzenete: {}", e.getMessage()); } finally { if (directoryStream != null) { try {