예제 #1
0
        public void Initialize()
        {
            int row = 0;

//            var panel = new StyledFixtureLabel(@event.FixtureClass, FontWeights.Bold, false, @event.ManuallyClassified, @event.FirstCycle, @event.FirstCycleManuallyClassified, true, false, false);
            var panel = new StyledFixtureLabel(@event, true, false);

            panel.Margin = new Thickness(3, 3, 3, 6);

            Grid.SetRow(panel, row++);
            Grid.SetColumn(panel, 0);
            Grid.SetColumnSpan(panel, 2);
            grid.Children.Add(panel);

            WriteEventProperty(row++, "Vol", Math.Round(@event.Volume, 2).ToString("0.00"));
            WriteEventProperty(row++, "Peak", @event.Peak.ToString("0.00"));
            WriteEventProperty(row++, "Mode", @event.Mode.ToString("0.00"));
            WriteEventProperty(row++, "Dur", (new TwHelper.DurationConverter()).Convert(@event.Duration, null, null, null).ToString());

            WriteHorizontalSeparator(row++, 8);

            if (Properties.Settings.Default.ShowSimilarCountInEventToolTips)
            {
                ShowSimilarCounts(@event, ref row, PerformUpdate);
            }

            WriteEventPropertySmall(row++, "Start", @event.StartTime.DayOfWeek.ToString());
            WriteEventPropertySmall(row++, string.Empty, @event.StartTime.ToShortDateString().ToString());
            WriteEventPropertySmall(row++, string.Empty, @event.StartTime.ToLongTimeString().ToString());

            if (@event.EndTime.DayOfYear != @event.StartTime.DayOfYear)
            {
                WriteEventPropertySmall(row++, "End", @event.EndTime.DayOfWeek.ToString());
                WriteEventPropertySmall(row++, string.Empty, @event.EndTime.ToShortDateString().ToString());
                WriteEventPropertySmall(row++, string.Empty, @event.EndTime.ToLongTimeString().ToString());
            }
            else
            {
                WriteEventPropertySmall(row++, "End", @event.EndTime.ToLongTimeString().ToString());
            }

            if (!string.IsNullOrEmpty(@event.UserNotes))
            {
                WriteHorizontalSeparator(row++);
                WriteEventPropertySmall(row++, "Notes", @event.UserNotes, FontWeights.Bold, 200);
            }

            if (Properties.Settings.Default.ShowDetailedEventToolTips)
            {
                ShowDetailProperties(@event, ref row, mousePosition, widthMultiplier, heightMultiplier);
            }

            if (Properties.Settings.Default.ShowDiagnosticEventToolTips)
            {
                ShowDiagnosticProperties(@event, ref row);
            }
        }
예제 #2
0
        void UpdateEvent(Event @event)
        {
            if (@event == null)
            {
                return;
            }

            var fixtureLabel = new StyledFixtureLabel(@event, true, true);

            labelFixtureClassImage.Content = fixtureLabel;

            labelVolume.Content   = Math.Round(@event.Volume, 2).ToString("0.00");
            labelPeak.Content     = @event.Peak.ToString("0.00");
            labelMode.Content     = @event.Mode.ToString("0.00");
            labelDuration.Content = (new TwHelper.DurationConverter()).Convert(@event.Duration, null, null, null).ToString();
            labelDuration.ToolTip = "Duration of Selected Event: " + (new TwHelper.FriendlierDurationConverter()).Convert(@event.Duration, null, null, null).ToString();

            labelStartTime.Content = @event.StartTime.ToLongTimeString().ToString();
            labelStartDate.Content = @event.StartTime.ToShortDateString().ToString();

            labelEndTime.Content = @event.EndTime.ToLongTimeString().ToString();

            labelEndTime.ToolTip = "End Time of Selected Event (End Date is " + (new TwHelper.ShortDateConverter().Convert(@event.EndTime, null, null, null).ToString()) + ")";

            if (@event.EndTime.DayOfYear != @event.StartTime.DayOfYear)
            {
                labelEndDate.Content = @event.EndTime.ToShortDateString().ToString();
            }
            else
            {
                labelEndDate.Content = string.Empty;
            }

            labelSimilar.Content = @event.SimilarBackwardCount.ToString("0") + @" + " + @event.SimilarForwardCount.ToString("0") + @" = " + @event.SimilarCount.ToString("0");
            labelSimilar.ToolTip = "Number of Previous + Next Events Similar to Selected Event = Total Events Similar to Selected Event";

            labelNotes.Content = @event.UserNotes;
            labelNotes.ToolTip = "User Notes of Selected Event: " + @event.UserNotes;
        }