diff --git a/Annotator/EventAnnotation.cs b/Annotator/EventAnnotation.cs index 385cd8b..622341d 100644 --- a/Annotator/EventAnnotation.cs +++ b/Annotator/EventAnnotation.cs @@ -307,6 +307,7 @@ private void saveEventAnnotation() textAnnotation.Text = ev.text; ev.save(); main.unselectAnnotations(); + main.disableAnnotationText(); main.selectedEvent = null; main.clearRightBottomPanel(); selected = false; diff --git a/Annotator/Main.Designer.cs b/Annotator/Main.Designer.cs index 0796544..dc2fb81 100644 --- a/Annotator/Main.Designer.cs +++ b/Annotator/Main.Designer.cs @@ -49,6 +49,7 @@ private void InitializeComponent() this.middleTopPanel = new System.Windows.Forms.Panel(); this.middleTopTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); this.videoPanel = new System.Windows.Forms.Panel(); + this.pictureBoard = new Annotator.MyPictureBox(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.playbackFileComboBox = new System.Windows.Forms.ComboBox(); this.startInSecondLbl = new System.Windows.Forms.Label(); @@ -56,6 +57,7 @@ private void InitializeComponent() this.endInSecondTextBox = new System.Windows.Forms.TextBox(); this.startInSecondTextBox = new System.Windows.Forms.TextBox(); this.frameNumberLbl = new System.Windows.Forms.Label(); + this.frameTrackBar = new Annotator.CustomizedTrackBar(); this.playBtn = new System.Windows.Forms.Button(); this.imageList2 = new System.Windows.Forms.ImageList(this.components); this.middleCenterPanel = new System.Windows.Forms.Panel(); @@ -136,6 +138,7 @@ private void InitializeComponent() this.sessionRightClickPanel = new System.Windows.Forms.ContextMenuStrip(this.components); this.editSessionMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.saveSessionMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.exitWithoutSavingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.deleteSessionMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.addFileToSessionMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.refreshSessionMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -164,8 +167,6 @@ private void InitializeComponent() this.workspaceRightClickPanel = new System.Windows.Forms.ContextMenuStrip(this.components); this.newProjectToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.refreshWorkspaceMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.pictureBoard = new Annotator.MyPictureBox(); - this.frameTrackBar = new Annotator.CustomizedTrackBar(); this.trainingPanel1 = new Annotator.TrainingPanel(); this.annotateTableLayoutPanel.SuspendLayout(); this.leftMostPanel.SuspendLayout(); @@ -177,7 +178,9 @@ private void InitializeComponent() this.middleTopPanel.SuspendLayout(); this.middleTopTableLayoutPanel.SuspendLayout(); this.videoPanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoard)).BeginInit(); this.tableLayoutPanel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.frameTrackBar)).BeginInit(); this.middleCenterPanel.SuspendLayout(); this.middleBottomPanel.SuspendLayout(); this.middleBottomTableLayoutPanel.SuspendLayout(); @@ -202,8 +205,6 @@ private void InitializeComponent() this.sessionRightClickPanel.SuspendLayout(); this.fileRightClickPanel.SuspendLayout(); this.workspaceRightClickPanel.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoard)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.frameTrackBar)).BeginInit(); this.SuspendLayout(); // // annotateTableLayoutPanel @@ -212,7 +213,7 @@ private void InitializeComponent() this.annotateTableLayoutPanel.ColumnCount = 3; this.annotateTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 170F)); this.annotateTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.annotateTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 423F)); + this.annotateTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 428F)); this.annotateTableLayoutPanel.Controls.Add(this.leftMostPanel, 0, 0); this.annotateTableLayoutPanel.Controls.Add(this.middleTopPanel, 1, 0); this.annotateTableLayoutPanel.Controls.Add(this.middleCenterPanel, 1, 2); @@ -352,7 +353,7 @@ private void InitializeComponent() this.middleTopPanel.Location = new System.Drawing.Point(175, 4); this.middleTopPanel.Name = "middleTopPanel"; this.annotateTableLayoutPanel.SetRowSpan(this.middleTopPanel, 2); - this.middleTopPanel.Size = new System.Drawing.Size(832, 657); + this.middleTopPanel.Size = new System.Drawing.Size(827, 657); this.middleTopPanel.TabIndex = 1; // // middleTopTableLayoutPanel @@ -370,7 +371,7 @@ private void InitializeComponent() this.middleTopTableLayoutPanel.RowCount = 2; this.middleTopTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.middleTopTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F)); - this.middleTopTableLayoutPanel.Size = new System.Drawing.Size(830, 655); + this.middleTopTableLayoutPanel.Size = new System.Drawing.Size(825, 655); this.middleTopTableLayoutPanel.TabIndex = 8; // // videoPanel @@ -382,9 +383,25 @@ private void InitializeComponent() this.videoPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.videoPanel.Location = new System.Drawing.Point(123, 3); this.videoPanel.Name = "videoPanel"; - this.videoPanel.Size = new System.Drawing.Size(704, 599); + this.videoPanel.Size = new System.Drawing.Size(699, 599); this.videoPanel.TabIndex = 1; // + // pictureBoard + // + this.pictureBoard.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pictureBoard.Dock = System.Windows.Forms.DockStyle.Fill; + this.pictureBoard.Location = new System.Drawing.Point(0, 0); + this.pictureBoard.mat = null; + this.pictureBoard.Name = "pictureBoard"; + this.pictureBoard.Size = new System.Drawing.Size(699, 599); + this.pictureBoard.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBoard.TabIndex = 0; + this.pictureBoard.TabStop = false; + this.pictureBoard.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBoard_Paint); + this.pictureBoard.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoard_MouseDown); + this.pictureBoard.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBoard_MouseMove); + this.pictureBoard.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pictureBoard_MouseUp); + // // tableLayoutPanel2 // this.tableLayoutPanel2.ColumnCount = 1; @@ -469,6 +486,24 @@ private void InitializeComponent() this.frameNumberLbl.TabIndex = 2; this.frameNumberLbl.Text = "Frame:"; // + // frameTrackBar + // + this.frameTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; + this.frameTrackBar.Enabled = false; + this.frameTrackBar.LargeChange = 1; + this.frameTrackBar.Location = new System.Drawing.Point(121, 606); + this.frameTrackBar.Margin = new System.Windows.Forms.Padding(1, 1, 15, 1); + this.frameTrackBar.MaxDragVal = 100; + this.frameTrackBar.Maximum = 100; + this.frameTrackBar.MinDragVal = 1; + this.frameTrackBar.Minimum = 1; + this.frameTrackBar.Name = "frameTrackBar"; + this.frameTrackBar.Size = new System.Drawing.Size(689, 48); + this.frameTrackBar.TabIndex = 3; + this.frameTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; + this.frameTrackBar.Value = 1; + this.frameTrackBar.ValueChanged += new System.EventHandler(this.frameTrackBar_ValueChanged); + // // playBtn // this.playBtn.Dock = System.Windows.Forms.DockStyle.Fill; @@ -498,7 +533,7 @@ private void InitializeComponent() this.middleCenterPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.middleCenterPanel.Location = new System.Drawing.Point(175, 668); this.middleCenterPanel.Name = "middleCenterPanel"; - this.middleCenterPanel.Size = new System.Drawing.Size(832, 94); + this.middleCenterPanel.Size = new System.Drawing.Size(827, 94); this.middleCenterPanel.TabIndex = 3; this.middleCenterPanel.Paint += new System.Windows.Forms.PaintEventHandler(this.middleCenterPanel_Paint); // @@ -510,7 +545,7 @@ private void InitializeComponent() this.middleCenterTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Top; this.middleCenterTableLayoutPanel.Location = new System.Drawing.Point(0, 0); this.middleCenterTableLayoutPanel.Name = "middleCenterTableLayoutPanel"; - this.middleCenterTableLayoutPanel.Size = new System.Drawing.Size(830, 0); + this.middleCenterTableLayoutPanel.Size = new System.Drawing.Size(825, 0); this.middleCenterTableLayoutPanel.TabIndex = 0; // // middleBottomPanel @@ -521,7 +556,7 @@ private void InitializeComponent() this.middleBottomPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.middleBottomPanel.Location = new System.Drawing.Point(175, 769); this.middleBottomPanel.Name = "middleBottomPanel"; - this.middleBottomPanel.Size = new System.Drawing.Size(832, 94); + this.middleBottomPanel.Size = new System.Drawing.Size(827, 94); this.middleBottomPanel.TabIndex = 2; // // middleBottomTableLayoutPanel @@ -535,7 +570,7 @@ private void InitializeComponent() this.middleBottomTableLayoutPanel.Name = "middleBottomTableLayoutPanel"; this.middleBottomTableLayoutPanel.RowCount = 1; this.middleBottomTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 60F)); - this.middleBottomTableLayoutPanel.Size = new System.Drawing.Size(830, 60); + this.middleBottomTableLayoutPanel.Size = new System.Drawing.Size(825, 60); this.middleBottomTableLayoutPanel.TabIndex = 1; // // addEventAnnotationBtn @@ -560,7 +595,7 @@ private void InitializeComponent() this.rightColumnLayoutPanel.Controls.Add(this.rightCenterPanel, 0, 1); this.rightColumnLayoutPanel.Controls.Add(this.panel1, 0, 2); this.rightColumnLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; - this.rightColumnLayoutPanel.Location = new System.Drawing.Point(1014, 4); + this.rightColumnLayoutPanel.Location = new System.Drawing.Point(1009, 4); this.rightColumnLayoutPanel.Name = "rightColumnLayoutPanel"; this.rightColumnLayoutPanel.RowCount = 5; this.annotateTableLayoutPanel.SetRowSpan(this.rightColumnLayoutPanel, 4); @@ -569,7 +604,7 @@ private void InitializeComponent() this.rightColumnLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40F)); this.rightColumnLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 100F)); this.rightColumnLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 100F)); - this.rightColumnLayoutPanel.Size = new System.Drawing.Size(417, 859); + this.rightColumnLayoutPanel.Size = new System.Drawing.Size(422, 859); this.rightColumnLayoutPanel.TabIndex = 5; // // annoRefView @@ -596,10 +631,10 @@ private void InitializeComponent() this.annoRefView.Margin = new System.Windows.Forms.Padding(1); this.annoRefView.Name = "annoRefView"; this.annoRefView.RowHeadersVisible = false; - this.annoRefView.Size = new System.Drawing.Size(415, 99); + this.annoRefView.Size = new System.Drawing.Size(420, 99); this.annoRefView.TabIndex = 24; this.annoRefView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.annoRefView_CellClick); - this.annoRefView.UserDeletedRow += new System.Windows.Forms.DataGridViewRowEventHandler(this.annoRefView_UserDeletedRow); + this.annoRefView.UserDeletingRow += new System.Windows.Forms.DataGridViewRowCancelEventHandler(this.annoRefView_UserDeletingRow); // // StartAnno // @@ -633,9 +668,10 @@ private void InitializeComponent() // this.annotationText.ContextMenuStrip = this.cm3; this.annotationText.Dock = System.Windows.Forms.DockStyle.Fill; + this.annotationText.Enabled = false; this.annotationText.Location = new System.Drawing.Point(3, 661); this.annotationText.Name = "annotationText"; - this.annotationText.Size = new System.Drawing.Size(411, 94); + this.annotationText.Size = new System.Drawing.Size(416, 94); this.annotationText.TabIndex = 23; this.annotationText.Text = ""; this.annotationText.MouseDown += new System.Windows.Forms.MouseEventHandler(this.annotationText_MouseDown); @@ -674,7 +710,7 @@ private void InitializeComponent() this.rightTopPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.rightTopPanel.Location = new System.Drawing.Point(3, 3); this.rightTopPanel.Name = "rightTopPanel"; - this.rightTopPanel.Size = new System.Drawing.Size(411, 164); + this.rightTopPanel.Size = new System.Drawing.Size(416, 164); this.rightTopPanel.TabIndex = 3; // // selectObjContextPanel @@ -972,7 +1008,7 @@ private void InitializeComponent() this.rightCenterPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.rightCenterPanel.Location = new System.Drawing.Point(3, 173); this.rightCenterPanel.Name = "rightCenterPanel"; - this.rightCenterPanel.Size = new System.Drawing.Size(411, 287); + this.rightCenterPanel.Size = new System.Drawing.Size(416, 287); this.rightCenterPanel.TabIndex = 4; // // objectProperties @@ -989,7 +1025,7 @@ private void InitializeComponent() this.objectProperties.Location = new System.Drawing.Point(0, 0); this.objectProperties.Name = "objectProperties"; this.objectProperties.RowHeadersVisible = false; - this.objectProperties.Size = new System.Drawing.Size(409, 285); + this.objectProperties.Size = new System.Drawing.Size(414, 285); this.objectProperties.TabIndex = 0; this.objectProperties.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.objectProperties_CellContentClick); this.objectProperties.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.objectProperties_CellValueChanged); @@ -1010,7 +1046,7 @@ private void InitializeComponent() this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Location = new System.Drawing.Point(3, 466); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(411, 189); + this.panel1.Size = new System.Drawing.Size(416, 189); this.panel1.TabIndex = 25; // // tableLayoutPanel1 @@ -1026,7 +1062,7 @@ private void InitializeComponent() this.tableLayoutPanel1.RowCount = 2; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); - this.tableLayoutPanel1.Size = new System.Drawing.Size(411, 189); + this.tableLayoutPanel1.Size = new System.Drawing.Size(416, 189); this.tableLayoutPanel1.TabIndex = 0; // // predicateView @@ -1044,7 +1080,7 @@ private void InitializeComponent() this.predicateView.Location = new System.Drawing.Point(3, 28); this.predicateView.Name = "predicateView"; this.predicateView.RowHeadersVisible = false; - this.predicateView.Size = new System.Drawing.Size(405, 158); + this.predicateView.Size = new System.Drawing.Size(410, 158); this.predicateView.TabIndex = 1; // // dataGridViewTextBoxColumn1 @@ -1305,6 +1341,7 @@ private void InitializeComponent() this.sessionRightClickPanel.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.editSessionMenuItem, this.saveSessionMenuItem, + this.exitWithoutSavingToolStripMenuItem, this.deleteSessionMenuItem, this.addFileToSessionMenuItem, this.refreshSessionMenuItem, @@ -1313,7 +1350,7 @@ private void InitializeComponent() this.sessionDetectToolStripMenuItem, this.sessionGenerateToolStripMenuItem}); this.sessionRightClickPanel.Name = "cm2"; - this.sessionRightClickPanel.Size = new System.Drawing.Size(139, 202); + this.sessionRightClickPanel.Size = new System.Drawing.Size(174, 224); // // editSessionMenuItem // @@ -1321,7 +1358,7 @@ private void InitializeComponent() this.editSessionMenuItem.Image = global::Annotator.Properties.Resources.edit_64; this.editSessionMenuItem.Name = "editSessionMenuItem"; this.editSessionMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.E))); - this.editSessionMenuItem.Size = new System.Drawing.Size(138, 22); + this.editSessionMenuItem.Size = new System.Drawing.Size(173, 22); this.editSessionMenuItem.Text = "Edit"; this.editSessionMenuItem.Click += new System.EventHandler(this.editSessionMenuItem_Click); // @@ -1331,15 +1368,23 @@ private void InitializeComponent() this.saveSessionMenuItem.Image = global::Annotator.Properties.Resources.save_64; this.saveSessionMenuItem.Name = "saveSessionMenuItem"; this.saveSessionMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S))); - this.saveSessionMenuItem.Size = new System.Drawing.Size(138, 22); + this.saveSessionMenuItem.Size = new System.Drawing.Size(173, 22); this.saveSessionMenuItem.Text = "Save"; this.saveSessionMenuItem.Click += new System.EventHandler(this.saveSessionMenuItem_Click); // + // exitWithoutSavingToolStripMenuItem + // + this.exitWithoutSavingToolStripMenuItem.Enabled = false; + this.exitWithoutSavingToolStripMenuItem.Name = "exitWithoutSavingToolStripMenuItem"; + this.exitWithoutSavingToolStripMenuItem.Size = new System.Drawing.Size(173, 22); + this.exitWithoutSavingToolStripMenuItem.Text = "Exit without saving"; + this.exitWithoutSavingToolStripMenuItem.Click += new System.EventHandler(this.exitWithoutSavingToolStripMenuItem_Click); + // // deleteSessionMenuItem // this.deleteSessionMenuItem.Enabled = false; this.deleteSessionMenuItem.Name = "deleteSessionMenuItem"; - this.deleteSessionMenuItem.Size = new System.Drawing.Size(138, 22); + this.deleteSessionMenuItem.Size = new System.Drawing.Size(173, 22); this.deleteSessionMenuItem.Text = "Delete"; this.deleteSessionMenuItem.Click += new System.EventHandler(this.deleteSessionMenuItem_Click); // @@ -1347,14 +1392,14 @@ private void InitializeComponent() // this.addFileToSessionMenuItem.Enabled = false; this.addFileToSessionMenuItem.Name = "addFileToSessionMenuItem"; - this.addFileToSessionMenuItem.Size = new System.Drawing.Size(138, 22); + this.addFileToSessionMenuItem.Size = new System.Drawing.Size(173, 22); this.addFileToSessionMenuItem.Text = "Add"; this.addFileToSessionMenuItem.Click += new System.EventHandler(this.addFileToSessionMenuItem_Click); // // refreshSessionMenuItem // this.refreshSessionMenuItem.Name = "refreshSessionMenuItem"; - this.refreshSessionMenuItem.Size = new System.Drawing.Size(138, 22); + this.refreshSessionMenuItem.Size = new System.Drawing.Size(173, 22); this.refreshSessionMenuItem.Text = "Refresh"; this.refreshSessionMenuItem.Click += new System.EventHandler(this.refreshSessionMenuItem_Click); // @@ -1362,7 +1407,7 @@ private void InitializeComponent() // this.resetToolStripMenuItem.Enabled = false; this.resetToolStripMenuItem.Name = "resetToolStripMenuItem"; - this.resetToolStripMenuItem.Size = new System.Drawing.Size(138, 22); + this.resetToolStripMenuItem.Size = new System.Drawing.Size(173, 22); this.resetToolStripMenuItem.Text = "Reset"; this.resetToolStripMenuItem.Click += new System.EventHandler(this.resetToolStripMenuItem_Click); // @@ -1370,7 +1415,7 @@ private void InitializeComponent() // this.reloadToolStripMenuItem.Enabled = false; this.reloadToolStripMenuItem.Name = "reloadToolStripMenuItem"; - this.reloadToolStripMenuItem.Size = new System.Drawing.Size(138, 22); + this.reloadToolStripMenuItem.Size = new System.Drawing.Size(173, 22); this.reloadToolStripMenuItem.Text = "Reload"; this.reloadToolStripMenuItem.Click += new System.EventHandler(this.reloadToolStripMenuItem_Click); // @@ -1380,7 +1425,7 @@ private void InitializeComponent() this.glyphboxToolStripMenuItem}); this.sessionDetectToolStripMenuItem.Enabled = false; this.sessionDetectToolStripMenuItem.Name = "sessionDetectToolStripMenuItem"; - this.sessionDetectToolStripMenuItem.Size = new System.Drawing.Size(138, 22); + this.sessionDetectToolStripMenuItem.Size = new System.Drawing.Size(173, 22); this.sessionDetectToolStripMenuItem.Text = "Detect"; // // glyphboxToolStripMenuItem @@ -1415,7 +1460,7 @@ private void InitializeComponent() this.copyObjectsFromPreviousSessionToolStripMenuItem}); this.sessionGenerateToolStripMenuItem.Enabled = false; this.sessionGenerateToolStripMenuItem.Name = "sessionGenerateToolStripMenuItem"; - this.sessionGenerateToolStripMenuItem.Size = new System.Drawing.Size(138, 22); + this.sessionGenerateToolStripMenuItem.Size = new System.Drawing.Size(173, 22); this.sessionGenerateToolStripMenuItem.Text = "Generate"; // // sessionEventTemplateToolStripMenuItem @@ -1542,40 +1587,6 @@ private void InitializeComponent() this.refreshWorkspaceMenuItem.Size = new System.Drawing.Size(138, 22); this.refreshWorkspaceMenuItem.Text = "Refresh"; // - // pictureBoard - // - this.pictureBoard.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.pictureBoard.Dock = System.Windows.Forms.DockStyle.Fill; - this.pictureBoard.Location = new System.Drawing.Point(0, 0); - this.pictureBoard.mat = null; - this.pictureBoard.Name = "pictureBoard"; - this.pictureBoard.Size = new System.Drawing.Size(704, 599); - this.pictureBoard.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pictureBoard.TabIndex = 0; - this.pictureBoard.TabStop = false; - this.pictureBoard.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBoard_Paint); - this.pictureBoard.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pictureBoard_MouseDown); - this.pictureBoard.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBoard_MouseMove); - this.pictureBoard.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pictureBoard_MouseUp); - // - // frameTrackBar - // - this.frameTrackBar.Dock = System.Windows.Forms.DockStyle.Fill; - this.frameTrackBar.Enabled = false; - this.frameTrackBar.LargeChange = 1; - this.frameTrackBar.Location = new System.Drawing.Point(121, 606); - this.frameTrackBar.Margin = new System.Windows.Forms.Padding(1, 1, 15, 1); - this.frameTrackBar.MaxDragVal = 100; - this.frameTrackBar.Maximum = 100; - this.frameTrackBar.MinDragVal = 1; - this.frameTrackBar.Minimum = 1; - this.frameTrackBar.Name = "frameTrackBar"; - this.frameTrackBar.Size = new System.Drawing.Size(694, 48); - this.frameTrackBar.TabIndex = 3; - this.frameTrackBar.TickStyle = System.Windows.Forms.TickStyle.Both; - this.frameTrackBar.Value = 1; - this.frameTrackBar.ValueChanged += new System.EventHandler(this.frameTrackBar_ValueChanged); - // // trainingPanel1 // this.trainingPanel1.Location = new System.Drawing.Point(6, 6); @@ -1613,8 +1624,10 @@ private void InitializeComponent() this.middleTopTableLayoutPanel.ResumeLayout(false); this.middleTopTableLayoutPanel.PerformLayout(); this.videoPanel.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pictureBoard)).EndInit(); this.tableLayoutPanel2.ResumeLayout(false); this.tableLayoutPanel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.frameTrackBar)).EndInit(); this.middleCenterPanel.ResumeLayout(false); this.middleBottomPanel.ResumeLayout(false); this.middleBottomTableLayoutPanel.ResumeLayout(false); @@ -1642,8 +1655,6 @@ private void InitializeComponent() this.sessionRightClickPanel.ResumeLayout(false); this.fileRightClickPanel.ResumeLayout(false); this.workspaceRightClickPanel.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pictureBoard)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.frameTrackBar)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -1787,6 +1798,7 @@ private void InitializeComponent() private DataGridViewTextBoxColumn EndAnno; private DataGridViewTextBoxColumn TextAnno; private DataGridViewTextBoxColumn NoteAnno; + private ToolStripMenuItem exitWithoutSavingToolStripMenuItem; } } diff --git a/Annotator/Main.Event.cs b/Annotator/Main.Event.cs index c666409..cb5b721 100644 --- a/Annotator/Main.Event.cs +++ b/Annotator/Main.Event.cs @@ -207,7 +207,7 @@ private void annoRefView_CellClick(object sender, DataGridViewCellEventArgs e) } } - private void annoRefView_UserDeletedRow(object sender, DataGridViewRowEventArgs e) + private void annoRefView_UserDeletingRow(object sender, DataGridViewRowCancelEventArgs e) { Console.WriteLine("annoRefView_UserDeletedRow"); diff --git a/Annotator/Main.File.cs b/Annotator/Main.File.cs index 719c581..86e6b35 100644 --- a/Annotator/Main.File.cs +++ b/Annotator/Main.File.cs @@ -11,6 +11,18 @@ namespace Annotator { public partial class Main { + private void rightClickOnFileTreeNode(MouseEventArgs e) + { + if (treeView.SelectedNode == null) + return; + + TreeNode selectedNode = treeView.SelectedNode; + Point location = this.Location; + location.X += e.Location.X + leftMostPanel.Location.X + 15; + location.Y += e.Location.Y + leftMostPanel.Location.Y + 80; + fileRightClickPanel.Show(location); + } + private void removeFileToolStripMenuItem_Click(object sender, EventArgs e) { // Double guard diff --git a/Annotator/Main.Project.cs b/Annotator/Main.Project.cs index 88061f6..6175c74 100644 --- a/Annotator/Main.Project.cs +++ b/Annotator/Main.Project.cs @@ -21,6 +21,51 @@ private void showNewSessionPopup() sessionInfo.ShowDialog(); } + private void rightClickOnProjectTreeNode(MouseEventArgs e) + { + if (treeView.SelectedNode == null) + return; + + if (currentProject != null && treeView.SelectedNode.Text.Equals(currentProject.name)) + { + selectToolStripMenuItem.Enabled = false; + closeToolStripMenuItem.Enabled = true; + statisticsToolStripMenuItem.Enabled = true; + newSessionToolStripMenuItem.Enabled = true; + refreshProjectMenuItem.Enabled = true; + recordSessionToolStripMenuItem.Enabled = true; + projectDetectToolStripMenuItem.Enabled = true; + projectGenerateToolStripMenuItem.Enabled = true; + } + else if (currentProject != null && !(treeView.SelectedNode.Text.Equals(currentProject.name))) + { + selectToolStripMenuItem.Enabled = true; + closeToolStripMenuItem.Enabled = false; + statisticsToolStripMenuItem.Enabled = false; + newSessionToolStripMenuItem.Enabled = false; + refreshProjectMenuItem.Enabled = false; + recordSessionToolStripMenuItem.Enabled = false; + projectDetectToolStripMenuItem.Enabled = false; + projectGenerateToolStripMenuItem.Enabled = false; + } + + if (currentProject == null) + { + selectToolStripMenuItem.Enabled = true; + closeToolStripMenuItem.Enabled = false; + statisticsToolStripMenuItem.Enabled = false; + newSessionToolStripMenuItem.Enabled = false; + refreshProjectMenuItem.Enabled = false; + recordSessionToolStripMenuItem.Enabled = false; + projectDetectToolStripMenuItem.Enabled = false; + projectGenerateToolStripMenuItem.Enabled = false; + } + Point location = this.Location; + location.X += e.Location.X + leftMostPanel.Location.X + 15; + location.Y += e.Location.Y + leftMostPanel.Location.Y + 80; + projectRightClickPanel.Show(location); + } + /// /// Select project from available projects in workspace /// diff --git a/Annotator/Main.Session.cs b/Annotator/Main.Session.cs index 0d6dd83..6d55d9e 100644 --- a/Annotator/Main.Session.cs +++ b/Annotator/Main.Session.cs @@ -380,6 +380,79 @@ internal void populateMiddleBottomPanel() } } + private void rightClickOnSessionTreeNode(MouseEventArgs e) + { + if (treeView.SelectedNode == null) + return; + + TreeNode selectedNode = treeView.SelectedNode; + Session choosenSession = null; + + // Check if session node is inside currently open project + if (selectedNode != null && currentProject != null && selectedNode.Parent.Text.Equals(currentProject.name)) + { + //Check if session is editing: + choosenSession = currentProject.getSession(selectedNode.Text); + if (choosenSession == null) + choosenSession = currentProject.getSession(selectedNode.Text.Substring(1)); + + if (choosenSession != null) + { + if (choosenSession.edited) + { + editSessionMenuItem.Enabled = false; + exitWithoutSavingToolStripMenuItem.Enabled = true; + reloadToolStripMenuItem.Enabled = true; + resetToolStripMenuItem.Enabled = true; + saveSessionMenuItem.Enabled = true; + deleteSessionMenuItem.Enabled = true; + addFileToSessionMenuItem.Enabled = true; + refreshSessionMenuItem.Enabled = true; + sessionDetectToolStripMenuItem.Enabled = true; + sessionGenerateToolStripMenuItem.Enabled = true; + } + else + { + editSessionMenuItem.Enabled = true; + exitWithoutSavingToolStripMenuItem.Enabled = false; + reloadToolStripMenuItem.Enabled = false; + resetToolStripMenuItem.Enabled = false; + saveSessionMenuItem.Enabled = false; + deleteSessionMenuItem.Enabled = true; + addFileToSessionMenuItem.Enabled = false; + refreshSessionMenuItem.Enabled = false; + sessionDetectToolStripMenuItem.Enabled = false; + sessionGenerateToolStripMenuItem.Enabled = false; + } + } + } + else + { + editSessionMenuItem.Enabled = false; + exitWithoutSavingToolStripMenuItem.Enabled = false; + reloadToolStripMenuItem.Enabled = false; + resetToolStripMenuItem.Enabled = false; + saveSessionMenuItem.Enabled = false; + deleteSessionMenuItem.Enabled = true; + addFileToSessionMenuItem.Enabled = false; + refreshSessionMenuItem.Enabled = false; + sessionDetectToolStripMenuItem.Enabled = false; + sessionGenerateToolStripMenuItem.Enabled = false; + } + + Point location = this.Location; + location.X += e.Location.X + leftMostPanel.Location.X + 15; + location.Y += e.Location.Y + leftMostPanel.Location.Y + 80; + sessionRightClickPanel.Show(location); + } + + + private void exitWithoutSavingToolStripMenuItem_Click(object sender, EventArgs e) + { + closeSessionNode(); + closeWithoutSaveCurrentSession(); + } + /// /// /// diff --git a/Annotator/Main.Workspace.cs b/Annotator/Main.Workspace.cs index 31ffc63..e2007b2 100644 --- a/Annotator/Main.Workspace.cs +++ b/Annotator/Main.Workspace.cs @@ -357,126 +357,7 @@ private void rightClickOut(MouseEventArgs e) workspaceRightClickPanel.Show(location); } - private void rightClickOnFileTreeNode(MouseEventArgs e) - { - if (treeView.SelectedNode == null) - return; - - TreeNode selectedNode = treeView.SelectedNode; - Point location = this.Location; - location.X += e.Location.X + leftMostPanel.Location.X + 15; - location.Y += e.Location.Y + leftMostPanel.Location.Y + 80; - fileRightClickPanel.Show(location); - } - - private void rightClickOnSessionTreeNode(MouseEventArgs e) - { - if (treeView.SelectedNode == null) - return; - - TreeNode selectedNode = treeView.SelectedNode; - Session choosenSession = null; - - // Check if session node is inside currently open project - if (selectedNode != null && currentProject != null && selectedNode.Parent.Text.Equals(currentProject.name)) - { - //Check if session is editing: - choosenSession = currentProject.getSession(selectedNode.Text); - if (choosenSession == null) - choosenSession = currentProject.getSession(selectedNode.Text.Substring(1)); - - if (choosenSession != null) - { - if (choosenSession.edited) - { - editSessionMenuItem.Enabled = false; - reloadToolStripMenuItem.Enabled = true; - resetToolStripMenuItem.Enabled = true; - saveSessionMenuItem.Enabled = true; - deleteSessionMenuItem.Enabled = true; - addFileToSessionMenuItem.Enabled = true; - refreshSessionMenuItem.Enabled = true; - sessionDetectToolStripMenuItem.Enabled = true; - sessionGenerateToolStripMenuItem.Enabled = true; - } - else - { - editSessionMenuItem.Enabled = true; - reloadToolStripMenuItem.Enabled = false; - resetToolStripMenuItem.Enabled = false; - saveSessionMenuItem.Enabled = false; - deleteSessionMenuItem.Enabled = true; - addFileToSessionMenuItem.Enabled = false; - refreshSessionMenuItem.Enabled = false; - sessionDetectToolStripMenuItem.Enabled = false; - sessionGenerateToolStripMenuItem.Enabled = false; - } - } - } - else - { - editSessionMenuItem.Enabled = false; - reloadToolStripMenuItem.Enabled = false; - resetToolStripMenuItem.Enabled = false; - saveSessionMenuItem.Enabled = false; - deleteSessionMenuItem.Enabled = true; - addFileToSessionMenuItem.Enabled = false; - refreshSessionMenuItem.Enabled = false; - sessionDetectToolStripMenuItem.Enabled = false; - sessionGenerateToolStripMenuItem.Enabled = false; - } - - Point location = this.Location; - location.X += e.Location.X + leftMostPanel.Location.X + 15; - location.Y += e.Location.Y + leftMostPanel.Location.Y + 80; - sessionRightClickPanel.Show(location); - } - - private void rightClickOnProjectTreeNode(MouseEventArgs e) - { - if (treeView.SelectedNode == null) - return; - - if (currentProject != null && treeView.SelectedNode.Text.Equals(currentProject.name)) - { - selectToolStripMenuItem.Enabled = false; - closeToolStripMenuItem.Enabled = true; - statisticsToolStripMenuItem.Enabled = true; - newSessionToolStripMenuItem.Enabled = true; - refreshProjectMenuItem.Enabled = true; - recordSessionToolStripMenuItem.Enabled = true; - projectDetectToolStripMenuItem.Enabled = true; - projectGenerateToolStripMenuItem.Enabled = true; - } - else if (currentProject != null && !(treeView.SelectedNode.Text.Equals(currentProject.name))) - { - selectToolStripMenuItem.Enabled = true; - closeToolStripMenuItem.Enabled = false; - statisticsToolStripMenuItem.Enabled = false; - newSessionToolStripMenuItem.Enabled = false; - refreshProjectMenuItem.Enabled = false; - recordSessionToolStripMenuItem.Enabled = false; - projectDetectToolStripMenuItem.Enabled = false; - projectGenerateToolStripMenuItem.Enabled = false; - } - - if (currentProject == null) - { - selectToolStripMenuItem.Enabled = true; - closeToolStripMenuItem.Enabled = false; - statisticsToolStripMenuItem.Enabled = false; - newSessionToolStripMenuItem.Enabled = false; - refreshProjectMenuItem.Enabled = false; - recordSessionToolStripMenuItem.Enabled = false; - projectDetectToolStripMenuItem.Enabled = false; - projectGenerateToolStripMenuItem.Enabled = false; - } - Point location = this.Location; - location.X += e.Location.X + leftMostPanel.Location.X + 15; - location.Y += e.Location.Y + leftMostPanel.Location.Y + 80; - projectRightClickPanel.Show(location); - } - + private void treeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { //Select node with right click also diff --git a/Annotator/Main.cs b/Annotator/Main.cs index dac2946..7065637 100644 --- a/Annotator/Main.cs +++ b/Annotator/Main.cs @@ -418,5 +418,6 @@ private void label1_Click(object sender, EventArgs e) { otherWorkspaceToolStripMenuItem_Click(sender, e); } + } } diff --git a/Annotator/Main.resx b/Annotator/Main.resx index cd8b62a..67e4973 100644 --- a/Annotator/Main.resx +++ b/Annotator/Main.resx @@ -125,7 +125,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACi - CAAAAk1TRnQBSQFMAgEBAwEAAYABCAGAAQgBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + CAAAAk1TRnQBSQFMAgEBAwEAAagBCAGoAQgBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA @@ -177,72 +177,72 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 - ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdH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EwAB8gFGAekBaQH0EwAB8gJJAXEB9BMAAfICiwG0AfQJAAFC + AU0BPgcAAT4DAAEoAwABYAMAATADAAEBAQABAQUAAUABAhYAA///ACIAAf4BAAE/Af4BAAE/Af4BAAE/ + Af4BAAE/AfwBHAEfAfwBHAEfAfwBHAEfAfwBHAEfAfAB/wGHAfAB/wGHAfAB/wGHAfAB/wGHBOMB/wHj + AeIBfwLjAT4BYwHHAQABcwHHAf8B8wHEAR8B8wHGARgBMwHOAQABOQHOAQABeQHMAQcB+QHOAQgBOQGM + AQABGAGMAQABOAGMAQEB+AGOAQgBOAGYAQABDAGcAQABHAGcAQAB/AGeAQgBPAGYAQABDAGcAQABHAGc + AQABPAGeAQgBPAEwAQABDAE8AQABHAE8AQABBAE+AQgBPAEwAQABBgE8AQABHgE8AQABAgE+AQgBPgEw + AQABBgE8AQABHgE8AQABAgE+AQgBPgEwAQABBgE8AQABHgE8AQABAgE+AQgBPgEwAQABDAE8AQABHAE8 + AQABBAE+AQgBPAGYAQABDAGcAQABHAGcAQABHAGeAQgBPAGYAQABDAGcAQABHAGcAQABfAGeAQgBPAGM + AQABGAGMAQABGAGMAQEB+AGOAQgBOAHOAQABOQHOAQABOQHMAQcB+QHOAQgBOQHHAQABcwHHAf8B8wHE + AR8B8wHGAQgBMwHjAcEC4wH/AeMB4gF/AuMBHAFjAfEB/wGHAfEB/wGHAfEB/wGHAfEB/wGHAfgBPgEP + AfgBPgEPAfgBPgEPAfgBPgEPAf4BAAE/Af4BAAE/Af4BAAE/Af4BAAE/Af8BwQL/AcEC/wHBAv8BwQH/ + Cw== diff --git a/Annotator/recordPanel/RecordPanel.Control.RecordRgb.cs b/Annotator/recordPanel/RecordPanel.Control.RecordRgb.cs index 0b92abb..b339031 100644 --- a/Annotator/recordPanel/RecordPanel.Control.RecordRgb.cs +++ b/Annotator/recordPanel/RecordPanel.Control.RecordRgb.cs @@ -99,12 +99,8 @@ private void startRecordRgb() try { - //rgbWriter = new VideoWriter(tempRgbFileName, -1, FRAME_PER_SECOND, new Size(colorFrameDescription.Width / scaleVideo, colorFrameDescription.Height / scaleVideo), true); - //Console.WriteLine("Finish create writer"); - writer = new VideoFileWriter(); writer.Open(tempRgbFileName, colorFrameDescription.Width / scaleVideo, colorFrameDescription.Height / scaleVideo, fps, VideoCodec.MPEG4, quality); - //writer.Open(tempRgbFileName, colorFrameDescription.Width / scaleVideo, colorFrameDescription.Height / scaleVideo); } catch (Exception e) { diff --git a/Annotator/recordPanel/RecordPanel.Control.cs b/Annotator/recordPanel/RecordPanel.Control.cs index 1f5e39a..38487f7 100644 --- a/Annotator/recordPanel/RecordPanel.Control.cs +++ b/Annotator/recordPanel/RecordPanel.Control.cs @@ -339,6 +339,7 @@ public void releaseKinectViewers() private void Sensor_IsAvailableChanged(object sender, IsAvailableChangedEventArgs e) { + this.recordButton.Enabled = this.kinectSensor.IsAvailable; this.cameraStatusLabel.Text = this.kinectSensor.IsAvailable ? Properties.Resources.RunningStatusText : Properties.Resources.NoSensorStatusText; } @@ -371,7 +372,12 @@ private void playButton_MouseDown(object sender, MouseEventArgs e) } } - + /// + /// Select/Deselect a button from a button group + /// + /// + /// + /// private void selectButtonDrawing(Button b, List