Exemplo n.º 1
0
            public void RefreshSelf()
            {
                var actionItems = new List <ToolStripItem>();

                if (!Action.IsCompleted && Action.CanCancel)
                {
                    actionItems.Add(cancelItem);
                }

                if (Action.IsCompleted)
                {
                    actionItems.Add(dismissItem);
                }

                var obj = Action.GetRelevantXenObject();

                if (obj != null)
                {
                    actionItems.Add(goToItem);
                }

                if (actionItems.Count > 0)
                {
                    actionItems.Add(separatorItem);
                }

                actionItems.Add(copyItem);

                actionCell.RefreshItems(actionItems.ToArray());

                statusCell.Value = Action.GetImage();

                if (Expanded)
                {
                    expanderCell.Value = Properties.Resources.expanded_triangle;
                    messageCell.Value  = Action.GetDetails();
                }
                else
                {
                    expanderCell.Value = Properties.Resources.contracted_triangle;
                    messageCell.Value  = Action.GetTitle();
                }
                locationCell.Value = Action.GetLocation();
                dateCell.Value     = HelpersGUI.DateTimeToString(Action.Started.ToLocalTime(), Messages.DATEFORMAT_DMY_HM, true);
            }
Exemplo n.º 2
0
            public void RefreshSelf()
            {
                var actionItems = GetActionItems(Action);

                actionCell.RefreshItems(actionItems.ToArray());

                statusCell.Value = Action.GetImage();

                if (Expanded)
                {
                    expanderCell.Value = Properties.Resources.expanded_triangle;
                    messageCell.Value  = Action.GetDetails();
                }
                else
                {
                    expanderCell.Value = Properties.Resources.contracted_triangle;
                    messageCell.Value  = Action.GetTitle();
                }
                locationCell.Value = Action.GetLocation();
                dateCell.Value     = HelpersGUI.DateTimeToString(Action.Started.ToLocalTime(), Messages.DATEFORMAT_DMY_HM, true);
            }