Example #1
0
        void SaveOptionsEvent(string name, int index)
        {
            Storage s = Engine.Instance.Storage;

            TableAdvancedEventsControllerItem i = TableAdvancedEventsController.Items [index];

            s.Set("event." + name + ".filename", i.Filename);
            s.Set("event." + name + ".arguments", i.Arguments);
            s.SetBool("event." + name + ".waitend", i.WaitEnd);
        }
Example #2
0
        public override NSObject GetObjectValue(NSTableView tableView,
                                                NSTableColumn tableColumn,
                                                int row)
        {
            TableAdvancedEventsControllerItem i = Items [row];

            if (tableColumn.Identifier == "Event")
            {
                return(new NSString(i.Title));
            }
            else if (tableColumn.Identifier == "FileName")
            {
                return(new NSString(i.Filename));
            }
            else if (tableColumn.Identifier == "Arguments")
            {
                return(new NSString(i.Arguments));
            }
            else if (tableColumn.Identifier == "WaitEnd")
            {
                if ((i.Filename.Trim() != "") || (i.Arguments.Trim() != ""))
                {
                    if (i.WaitEnd)
                    {
                        return(NSImage.ImageNamed("status_green_16.png"));
                    }
                    else
                    {
                        return(NSImage.ImageNamed("status_red_16.png"));
                    }
                }
                else
                {
                    return(NSImage.ImageNamed("status_unknown.png"));
                }
            }

            else
            {
                throw new NotImplementedException(string.Format("{0} is not recognized", tableColumn.Identifier));
            }
        }