From 9b5987c4d541da32a4b8ae48657e566fb3b57a45 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1s=C3=A1ry=20D=C3=A1niel?= Date: Thu, 23 Nov 2017 12:35:54 +0000 Subject: [PATCH] git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C30760 --- client/AudioRecorder/AudioRecorder.csproj | 4 + client/AudioRecorder/FileNameForm.cs | 15 +- client/DxPlay/InterceptKeys.cs | 3 +- client/DxPlay/PlayerForm.Designer.cs | 2 +- client/DxPlay/PlayerForm.cs | 235 +++++++----------- .../configuration-playout-ingest.json | 2 +- .../Configuration/configuration-sxs.json | 2 +- client/Maestro/MaestroForm.Metadata.cs | 9 +- client/Maestro/Sources/FileSourceItem.cs | 2 +- client/MaestroShared/Metadata/MovieSegment.cs | 54 +++- client/MaestroShared/Metadata/Timecode.cs | 4 +- client/OctopusClient/OctopusClient.csproj | 6 + client/OctopusClient/OctopusConfiguration.cs | 9 +- client/OctopusClient/OctopusIDSelector.cs | 23 +- 14 files changed, 179 insertions(+), 191 deletions(-) diff --git a/client/AudioRecorder/AudioRecorder.csproj b/client/AudioRecorder/AudioRecorder.csproj index 21120b51..399ee87e 100644 --- a/client/AudioRecorder/AudioRecorder.csproj +++ b/client/AudioRecorder/AudioRecorder.csproj @@ -217,6 +217,10 @@ + + {d4417174-f21e-4ce2-ae5c-8eb30c9a9625} + MaestroShared + {8cc7c930-9dbf-487b-aed5-776937a649d5} OctopusClient diff --git a/client/AudioRecorder/FileNameForm.cs b/client/AudioRecorder/FileNameForm.cs index b9f2f603..7f16074c 100644 --- a/client/AudioRecorder/FileNameForm.cs +++ b/client/AudioRecorder/FileNameForm.cs @@ -1,6 +1,7 @@ using System; using System.Windows.Forms; using OctopusClient; +using MaestroShared.Configuration; namespace AudioRecorder { public partial class FileNameForm : Form { @@ -15,11 +16,15 @@ namespace AudioRecorder { this.settings = settings; this.mainForm = mainForm; octopusIDSelector1.IDChangedEvent = IdChangedEvent; - octopusIDSelector1.Configuration = new OctopusConfiguration() { - Address = settings.getAddress(), - Password = settings.getPassword(), - UserName = settings.getUserName(), - Timeout = settings.getTimeout() + octopusIDSelector1.Properties = new OctopusConfiguration() { + Configuration = new OctopusMetadata() { + Server = new Connection() { + Address = settings.getAddress(), + Password = settings.getPassword(), + UserName = settings.getUserName(), + Timeout = settings.getTimeout() + } + } }; } diff --git a/client/DxPlay/InterceptKeys.cs b/client/DxPlay/InterceptKeys.cs index 2873f27b..27790aed 100644 --- a/client/DxPlay/InterceptKeys.cs +++ b/client/DxPlay/InterceptKeys.cs @@ -6,6 +6,8 @@ using System.Runtime.InteropServices; namespace DxPlay { class InterceptKeys { private const int WH_KEYBOARD_LL = 13; + private const int WH_CALLWNDPROC = 4; + private const int WM_KEYDOWN = 0x0100; private static LowLevelKeyboardProc _proc = HookCallback; private static IntPtr _hookID = IntPtr.Zero; @@ -35,7 +37,6 @@ namespace DxPlay { if (nCode >= 0 && wParam == (IntPtr)WM_KEYDOWN) { int vkCode = Marshal.ReadInt32(lParam); GlobalKeyEvent?.Invoke((Keys)vkCode); - //Application.DoEvents(); } return CallNextHookEx(_hookID, nCode, wParam, lParam); diff --git a/client/DxPlay/PlayerForm.Designer.cs b/client/DxPlay/PlayerForm.Designer.cs index 13915987..bba3516c 100644 --- a/client/DxPlay/PlayerForm.Designer.cs +++ b/client/DxPlay/PlayerForm.Designer.cs @@ -320,8 +320,8 @@ 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.CellMouseDoubleClick += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgSegments_CellMouseDoubleClick); this.dgSegments.ColumnAdded += new System.Windows.Forms.DataGridViewColumnEventHandler(this.dgSegments_ColumnAdded); - this.dgSegments.RowsAdded += new System.Windows.Forms.DataGridViewRowsAddedEventHandler(this.dgSegments_RowsAdded); // // menuButtonSegmentActions // diff --git a/client/DxPlay/PlayerForm.cs b/client/DxPlay/PlayerForm.cs index d90e7f91..ba0ab37d 100644 --- a/client/DxPlay/PlayerForm.cs +++ b/client/DxPlay/PlayerForm.cs @@ -12,7 +12,7 @@ namespace DxPlay { public partial class PlayerForm : Form { - private BindingList segments = new BindingList(); + private BindingList segments; private DateTime lastClick = DateTime.Now; private string selectedFile; private volatile bool trackBarAtUser; @@ -288,11 +288,11 @@ namespace DxPlay { } private void PlayerForm_FormClosing(object sender, FormClosingEventArgs e) { - foreach (MovieSegment segment in segments) - if (segment.TCOut == null) { - e.Cancel = true; - return; - } + //foreach (MovieSegment segment in segments) + // if (segment.TCOut == null) { + // e.Cancel = true; + // return; + // } if (m_play != null) { m_play.Stop(); @@ -322,177 +322,114 @@ namespace DxPlay { } private void OnDefineOneSegmentClick(object sender, EventArgs e) { - MovieSegment segment = new MovieSegment() { - TCIn = new Timecode(), - TCOut = new Timecode(m_mediaDescription.FirstFrame, m_mediaDescription.Duration) - }; - segment.TCIn.Set(m_mediaDescription.FirstFrame.Frames); - segments.Add(segment); - } - - private void OnDeleteSegmentClick(object sender, EventArgs e) { - if (dgSegments.SelectedRows.Count == 0) - return; - DataGridViewRow selectedRow = dgSegments.SelectedRows[0]; - for (int i = 0; i < dgSegments.Rows.Count; i++) { - DataGridViewRow actual = dgSegments.Rows[i]; - if (selectedRow.Equals(actual)) { - segments.Remove(segments[i]); + MovieSegment segment = null; + if (segments.Count == 0) { + segment = new MovieSegment() { + TCIn = new Timecode(m_mediaDescription.FirstFrame.Frames), + TCOut = new Timecode(m_mediaDescription.FirstFrame, m_mediaDescription.Duration) + }; + } else { + 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."); return; } + segment = new MovieSegment() { + TCIn = new Timecode(lastSegment.TCOut.Frames), + TCOut = tcEnd + }; } + segments.Add(segment); + } + private void OnDeleteSegmentClick(object sender, EventArgs e) { + if (bsSegments.Current != null) + segments.Remove(bsSegments.Current as MovieSegment); } - //todo stringetket resources file-ba private void OnActualPositionToTCInToolStripMenuItem1Click(object sender, EventArgs e) { - MovieSegment currentSegment = GetCurrentSegment(); - if (currentSegment != null) { - - if (currentSegment.TCIn != null) { - DialogResult dialogResult = MessageBox.Show("Biztos felül akarja írni az belépõt?", "Belépõ felülírása", MessageBoxButtons.YesNo); - if (dialogResult == DialogResult.Yes) { - if (IsTCInBeforeTCOut(m_play.CurrentTC, currentSegment.TCOut)) { - Timecode actual = new Timecode(); - actual.Set(m_play.CurrentTC.Frames); - currentSegment.TCIn = actual; - } else { - MessageBox.Show("A kilépõ a belépõ elõtt van!", "Hiba"); - currentSegment.TCIn = new Timecode(); - } - } - } else { - Timecode actual = new Timecode(m_play.CurrentTC); - currentSegment.TCIn = actual; - } - } else { - MovieSegment segment = new MovieSegment() { - TCIn = new Timecode(m_mediaDescription.FirstFrame), - //ez kell-e? - //TCOut = new Timecode(m_mediaDescription.FirstFrame, m_mediaDescription.Duration) - }; - segments.Add(segment); + MovieSegment currentSegment = bsSegments.Current as MovieSegment; + if (currentSegment == null) + return; + if (currentSegment.TCOut.Frames <= m_play.CurrentTC.Frames) { + MessageBox.Show("A belépõ nem lehet a kilépõ után."); + return; } - UpdateDataChanged(); - } - - private void UpdateDataChanged() { - dgSegments.DataSource = null; - dgSegments.DataSource = bsSegments; - } + //if (MessageBox.Show("Biztos felül akarja írni az belépõt?", "Belépõ felülírása", MessageBoxButtons.YesNo) == DialogResult.No) + // return; + MovieSegment collisionSegment = segments.Where(s => s.TCIn.Frames < m_play.CurrentTC.Frames && m_play.CurrentTC.Frames < s.TCOut.Frames).SingleOrDefault(); - private void OnActualPositionToTCOutToolStripMenuItem1Click(object sender, EventArgs e) { - MovieSegment currentSegment = GetCurrentSegment(); - if (currentSegment != null) { - if (currentSegment.TCOut != null) { - DialogResult dialogResult = MessageBox.Show("Biztos felül akarja írni a kilépõt?", "Kilépõ felülírása", MessageBoxButtons.YesNo); - if (dialogResult == DialogResult.Yes) { - if (IsTCInBeforeTCOut(currentSegment.TCIn, m_play.CurrentTC)) { - Timecode actual = new Timecode(); - actual.Set(m_play.CurrentTC.Frames); - currentSegment.TCOut = actual; - } else { - MessageBox.Show("A kilépõ a belépõ elõtt van!", "Hiba"); - currentSegment.TCIn = new Timecode(); - } - } - } else { - Timecode actual = new Timecode(m_play.CurrentTC); - currentSegment.TCOut = actual; - } - } else { - MovieSegment segment = new MovieSegment() { - //ez kell-e? - //TCIn = new Timecode(m_mediaDescription.FirstFrame), - TCOut = new Timecode(m_mediaDescription.FirstFrame, m_mediaDescription.Duration) - }; - segments.Add(segment); + if (collisionSegment != null && !currentSegment.Equals(collisionSegment)) { + MessageBox.Show("A szegmensek között nem lehet átfedés."); + return; } - UpdateDataChanged(); - } - private bool IsTCInBeforeTCOut(Timecode tcIn, Timecode tcOut) { - if (tcIn == null || tcOut == null) - return true; - string tcInString = tcIn.ToString(); - string tcOutString = tcOut.ToString(); - string inHour = tcInString.Substring(0, 2); - string outHour = tcOutString.Substring(0, 2); - if (Int32.Parse(outHour) < Int32.Parse(inHour)) - return false; - else if (Int32.Parse(outHour) > Int32.Parse(inHour)) - return true; - string inMinute = tcInString.Substring(3, 2); - string outMinute = tcOutString.Substring(3, 2); - if (Int32.Parse(outMinute) < Int32.Parse(inMinute)) - return false; - else if (Int32.Parse(outMinute) > Int32.Parse(inMinute)) - return true; - string inSec = tcInString.Substring(6, 2); - string outSec = tcOutString.Substring(6, 2); - if (Int32.Parse(outSec) < Int32.Parse(inSec)) - return false; - else if (Int32.Parse(outSec) > Int32.Parse(inSec)) - return true; - string inFrame = tcInString.Substring(9, 2); - string outFrame = tcOutString.Substring(9, 2); - if (Int32.Parse(outFrame) <= Int32.Parse(inFrame)) - return false; - - return true; + currentSegment.TCIn = new Timecode(m_play.CurrentTC.Frames); } - private MovieSegment GetCurrentSegment() { - if (dgSegments.SelectedRows.Count > 0) { - DataGridViewRow selectedRow = dgSegments.SelectedRows[0]; - for (int i = 0; i < dgSegments.Rows.Count; i++) { - DataGridViewRow actual = dgSegments.Rows[i]; - if (selectedRow.Equals(actual)) { - return segments[i]; - } + private void OnActualPositionToTCOutToolStripMenuItem1Click(object sender, EventArgs e) { + MovieSegment currentSegment = bsSegments.Current as MovieSegment; + if (currentSegment == null) + return; + if (currentSegment.TCIn.Frames >= m_play.CurrentTC.Frames) + MessageBox.Show("A kilépõ nem lehet a belépõ elõtt."); - } + MovieSegment collisionSegment = segments.Where(s => s.TCIn.Frames < m_play.CurrentTC.Frames && m_play.CurrentTC.Frames < s.TCOut.Frames).SingleOrDefault(); + + if (collisionSegment != null && !currentSegment.Equals(collisionSegment)) { + MessageBox.Show("A szegmensek között nem lehet átfedés."); + return; } - return null; + + //if (MessageBox.Show("Biztos felül akarja írni az kilépõt?", "Kilépõ felülírása", MessageBoxButtons.YesNo) == DialogResult.No) + // return; + currentSegment.TCOut = new Timecode(m_play.CurrentTC.Frames); } private void OnSplitSegmentAtCurrentPositionClick(object sender, EventArgs e) { - - MovieSegment segment = segments.Where(s => m_play.CurrentTC.Frames > s.TCIn.Frames && m_play.CurrentTC.Frames < s.TCOut.Frames).FirstOrDefault(); - if (segment == null) + MovieSegment currentSegment = segments.Where(s => s.TCIn.Frames < m_play.CurrentTC.Frames && s.TCOut.Frames > m_play.CurrentTC.Frames).SingleOrDefault(); + if (currentSegment == null) return; - segments.Remove(segment); - MovieSegment lSegment = new MovieSegment() { - TCIn = segment.TCIn, - TCOut = new Timecode(m_play.CurrentTC) + int position = segments.IndexOf(currentSegment); + MovieSegment newSegment = new MovieSegment() { + TCIn = new Timecode(currentSegment.TCIn.Frames), + TCOut = new Timecode(m_play.CurrentTC.Frames) }; - lSegment.TCOut.Set(m_play.CurrentTC.ZeroBasedFrames); - segments.Add(lSegment); - - MovieSegment hSegment = new MovieSegment() { - TCIn = new Timecode(m_play.CurrentTC), - TCOut = segment.TCOut - }; - hSegment.TCIn.Set(m_play.CurrentTC.ZeroBasedFrames + 1); - segments.Add(hSegment); - } - - private void dgSegments_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e) { - DataGridViewColumnCollection cols = dgSegments.Columns; - if (cols.Count >= 2) { - cols[0].ReadOnly = true; - cols[1].ReadOnly = true; - } + currentSegment.TCIn = new Timecode(m_play.CurrentTC.Frames); + segments.Insert(position, newSegment); } private void dgSegments_ColumnAdded(object sender, DataGridViewColumnEventArgs e) { int index = e.Column.Index; switch (index) { - case 0: e.Column.HeaderText = StringResource.BELEPO; break; - case 1: e.Column.HeaderText = StringResource.KILEPO; break; + case 0: + e.Column.HeaderText = StringResource.BELEPO; + e.Column.ReadOnly = true; + break; + case 1: + e.Column.HeaderText = StringResource.KILEPO; + e.Column.ReadOnly = true; + break; case 2: e.Column.HeaderText = StringResource.ELHAGYHATO; break; case 3: e.Column.HeaderText = StringResource.MEGJEGYZES; break; } } + + + private void dgSegments_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e) { + //MovieSegment actualSegment = bsSegments.Current as MovieSegment; + //if (actualSegment == null) + // return; + //if (e.ColumnIndex == 0) { + // m_play.Pause(); + // m_play.Seek(actualSegment.TCIn.ZeroBasedFrames); + //} + //if (e.ColumnIndex == 1) { + // m_play.Pause(); + // m_play.Seek(actualSegment.TCOut.ZeroBasedFrames); + //} + + } } } 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..d5a2187b 100644 --- a/client/Maestro/Configuration/configuration-sxs.json +++ b/client/Maestro/Configuration/configuration-sxs.json @@ -1,6 +1,6 @@ { "title": "SxS", - "active": false, + "active": true, "startInTray": false, "enableCustomMetadataId": true, "player": { diff --git a/client/Maestro/MaestroForm.Metadata.cs b/client/Maestro/MaestroForm.Metadata.cs index 0065614b..ec03942d 100644 --- a/client/Maestro/MaestroForm.Metadata.cs +++ b/client/Maestro/MaestroForm.Metadata.cs @@ -80,13 +80,8 @@ namespace Maestro { tabMetadata.TabPages.Remove(tpOctopus); return; } - octopusIDSelector.Configuration = new OctopusConfiguration() { - Address = octopusConfiguration.Server.Address, - UserName = octopusConfiguration.Server.UserName, - Password = octopusConfiguration.Server.Password, - Timeout = octopusConfiguration.Server.Timeout, - DisablePlaceHolderCheck = octopusConfiguration.DisablePlaceHolderCheck, - DisableStoryCheck = octopusConfiguration.DisableStoryCheck, + octopusIDSelector.Properties = new OctopusConfiguration() { + Configuration = octopusConfiguration, MessageBus = errorMessageBus }; octopusIDSelector.IDChangedEvent += OnOctopusIDSelected; diff --git a/client/Maestro/Sources/FileSourceItem.cs b/client/Maestro/Sources/FileSourceItem.cs index 2ade20d0..faa013cc 100644 --- a/client/Maestro/Sources/FileSourceItem.cs +++ b/client/Maestro/Sources/FileSourceItem.cs @@ -16,7 +16,7 @@ namespace Maestro.Sources { public event PropertyChangedEventHandler PropertyChanged; - protected void NotifyPropertyChanged([CallerMemberName] String propertyName = "") { + protected void NotifyPropertyChanged([CallerMemberName] string propertyName = "") { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } diff --git a/client/MaestroShared/Metadata/MovieSegment.cs b/client/MaestroShared/Metadata/MovieSegment.cs index 92827c0d..0904fcb7 100644 --- a/client/MaestroShared/Metadata/MovieSegment.cs +++ b/client/MaestroShared/Metadata/MovieSegment.cs @@ -1,8 +1,50 @@ -namespace MaestroShared.Metadata { - public class MovieSegment { - public Timecode TCIn { get; set; } - public Timecode TCOut { get; set; } - public bool Optional { get; set; } - public string Comment { get; set; } +using System.ComponentModel; +using System.Runtime.CompilerServices; + +namespace MaestroShared.Metadata { + public class MovieSegment : INotifyPropertyChanged { + public event PropertyChangedEventHandler PropertyChanged; + + protected void NotifyPropertyChanged([CallerMemberName] string propertyName = "") { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + private Timecode tcIn; + private Timecode tcOut; + private bool optional; + private string comment; + + public Timecode TCIn { + get => tcIn; + set { + tcIn = value; + NotifyPropertyChanged(); + } + } + + public Timecode TCOut { + get => tcOut; + set { + tcOut = value; + NotifyPropertyChanged(); + } + } + + public bool Optional { + get => optional; + set { + optional = value; + NotifyPropertyChanged(); + } + } + + public string Comment { + get => comment; + set { + comment = value; + NotifyPropertyChanged(); + } + } + + } } diff --git a/client/MaestroShared/Metadata/Timecode.cs b/client/MaestroShared/Metadata/Timecode.cs index 506ca690..bf29d379 100644 --- a/client/MaestroShared/Metadata/Timecode.cs +++ b/client/MaestroShared/Metadata/Timecode.cs @@ -11,7 +11,7 @@ namespace MaestroShared.Metadata { } - public Timecode(long frames) : this() { + public Timecode(int frames) : this() { Set(frames); } @@ -80,7 +80,7 @@ namespace MaestroShared.Metadata { return changed; } - public bool Set(long mediaTime) { + public bool SetMediaTime(long mediaTime) { int frames = (int)Math.Ceiling(mediaTime * frameRate / MEDIATIME_REFERENCE); return Set(frames); } diff --git a/client/OctopusClient/OctopusClient.csproj b/client/OctopusClient/OctopusClient.csproj index 0e3ed536..77eb85b9 100644 --- a/client/OctopusClient/OctopusClient.csproj +++ b/client/OctopusClient/OctopusClient.csproj @@ -133,5 +133,11 @@ OctopusLookupResultSelector.cs + + + {d4417174-f21e-4ce2-ae5c-8eb30c9a9625} + MaestroShared + + \ No newline at end of file diff --git a/client/OctopusClient/OctopusConfiguration.cs b/client/OctopusClient/OctopusConfiguration.cs index ea8a9f0b..d212548f 100644 --- a/client/OctopusClient/OctopusConfiguration.cs +++ b/client/OctopusClient/OctopusConfiguration.cs @@ -1,14 +1,9 @@ using LinkDotNet.MessageHandling.Contracts; -using System; +using MaestroShared.Configuration; namespace OctopusClient { public class OctopusConfiguration { - public Uri Address { get; set; } - public string UserName { get; set; } - public string Password { get; set; } - public int Timeout; - public bool DisablePlaceHolderCheck { get; set; } - public bool DisableStoryCheck { get; set; } + public OctopusMetadata Configuration { get; set; } public IMessageBus MessageBus { get; set; } } } diff --git a/client/OctopusClient/OctopusIDSelector.cs b/client/OctopusClient/OctopusIDSelector.cs index 77f6cafc..1aad376f 100644 --- a/client/OctopusClient/OctopusIDSelector.cs +++ b/client/OctopusClient/OctopusIDSelector.cs @@ -18,13 +18,13 @@ namespace OctopusClient { private TreeNode selectedNode; private OctopusAPI client; public OnSelectedIDChanged IDChangedEvent { get; set; } - private OctopusConfiguration configuration; + private OctopusConfiguration properties; private bool refreshDisabled; - public OctopusConfiguration Configuration { + public OctopusConfiguration Properties { set { - configuration = value; - client = new OctopusAPI(value.Address.OriginalString, value.UserName, value.Password, value.Timeout, value.MessageBus); + properties = value; + client = new OctopusAPI(value.Configuration.Server.Address.OriginalString, value.Configuration.Server.UserName, value.Configuration.Server.Password, value.Configuration.Server.Timeout, value.MessageBus); rbRundown.Checked = true; RefreshFolders(); } @@ -136,7 +136,7 @@ namespace OctopusClient { TreeNode storyNode = treeOctopus.Nodes.Add(ID, label); storyNode.Tag = story; - if (configuration.DisableStoryCheck) + if (properties.Configuration.DisableStoryCheck) HideCheckBox(treeOctopus, storyNode); else { if (lookupStoryId != null && lookupStoryId.Equals(story.ID)) @@ -149,7 +149,7 @@ namespace OctopusClient { foreach (MosObject mosObject in mosObjects) { TreeNode placeHolderNode = storyNode.Nodes.Add(mosObject.ObjID, String.Format($"{mosObject.ObjID}")); placeHolderNode.Tag = story; - if (configuration.DisablePlaceHolderCheck) + if (properties.Configuration.DisablePlaceHolderCheck) HideCheckBox(treeOctopus, placeHolderNode); else { if (lookupPlaceHolderId != null && lookupPlaceHolderId.Equals(mosObject.ObjID)) { @@ -165,7 +165,7 @@ namespace OctopusClient { private void OnTreeAfterCheck(object sender, TreeViewEventArgs e) { //logger.Debug("Handling {0} {1} {2}", e.Node.Name, e.Node.Text, e.Node.Checked); - if (configuration.DisableStoryCheck && e.Node.Level == 0) { + if (properties.Configuration.DisableStoryCheck && e.Node.Level == 0) { if (e.Node.Checked) { e.Node.Checked = false; HideCheckBox(treeOctopus, e.Node); @@ -173,7 +173,7 @@ namespace OctopusClient { return; } - if (configuration.DisablePlaceHolderCheck && e.Node.Level == 1) { + if (properties.Configuration.DisablePlaceHolderCheck && e.Node.Level == 1) { if (e.Node.Checked) { e.Node.Checked = false; HideCheckBox(treeOctopus, e.Node); @@ -390,8 +390,11 @@ namespace OctopusClient { } private void treeOctopus_MouseDown(object sender, MouseEventArgs e) { - if (e.Button == MouseButtons.Right) - treeOctopus.SelectedNode = treeOctopus.GetNodeAt(e.X, e.Y); + treeOctopus.SelectedNode = treeOctopus.GetNodeAt(e.X, e.Y); + if (e.Button != MouseButtons.Left) + return; + + } } -- 2.54.0