Exemplo n.º 1
0
 public TweenLink(GameObject target, LinkBehaviour behaviour)
 {
     this.target    = target;
     this.behaviour = behaviour;
     lastSeenActive = target.activeInHierarchy;
 }
Exemplo n.º 2
0
        public static void Init()
        {
            _masterDatabase = new SitecoreDatabase("master");
              using (new SecurityDisabler())
              {
             try
             {
                _database = new SitecoreDatabase(DatabaseName);
             }
             catch (NullReferenceException)
             {
                _database = _masterDatabase;
             }
             finally
             {
                if (_database == null)
                {
                   _database = _masterDatabase;
                }
             }

             _calendarTemplate = Database.GetItem("/sitecore/templates/calendar/calendar.calendar");

             _eventTemplate = Database.GetItem("/sitecore/templates/calendar/calendar.event");

             _dayTemplate = Database.GetItem("/sitecore/templates/calendar/calendar.day");

             _scheduleTemplate = Database.GetItem("/sitecore/templates/calendar/calendar.schedule");

             _eventMaster = Database.GetItem("/sitecore/masters/calendar.event");

             CalendarsListRootItem = Database.GetItem(CalendarsListRoot);

             _defaultDot = CalendarsListRootItem.Fields[DefaultDotField].Value;
             _currentMonthDot = CalendarsListRootItem.Fields[CurrentMonthDotField].Value;
             _otherMonthDot = CalendarsListRootItem.Fields[OtherMonthDotField].Value;
             _themeName = CalendarsListRootItem.Fields[ThemeField].Value;
             _readOnly = CalendarsListRootItem.Fields[ReadOnlyField].Value == "1";

             _highlightWeekends = CalendarsListRootItem.Fields[HighlightWeekendsField].Value == "1";
             _renderEventInBlock = CalendarsListRootItem.Fields[RenderEventInBlockField].Value == "1";
             _showAsDropDownList = CalendarsListRootItem.Fields[ShowAsDropDownListField].Value == "1";
             _agendaTitle = CalendarsListRootItem.Fields[AgendaTitleField].Value;

             _showDots = CalendarsListRootItem.Fields[ShowDotsField].Value == "1";

             _agendaStartDate = CalendarsListRootItem.Fields[AgendaStartDateField].Value;

             if( String.IsNullOrEmpty( CalendarsListRootItem.Fields[EventsOverflowField].Value)!= true)
             {
                _eventsOverflow = (EventsListOverflow) Enum.Parse( typeof( EventsListOverflow),
                                                                   CalendarsListRootItem.Fields[EventsOverflowField].Value);
             }

             _showOtherMonth = CalendarsListRootItem.Fields[ ShowOtherMonthField ].Value == "1";

             _showHeader = CalendarsListRootItem.Fields[ShowHeaderField].Value == "1";

             _showTime = CalendarsListRootItem.Fields[ShowTimeField].Value == "1";

             _selectorTitle = CalendarsListRootItem.Fields[SelectorTitleField].Value;

             _selectorLinkText = CalendarsListRootItem.Fields[SelectorLinkTextField].Value;

             _quickDatePickerTitle = CalendarsListRootItem.Fields[QuickDatePickerTitleField].Value;

             _quickDatePickerLinkText = CalendarsListRootItem.Fields[QuickDatePickerLinkTextField].Value;

             _quickDatePickerTodayLinkText = CalendarsListRootItem.Fields[QuickDatePickerTodayLinkTextField].Value;

             _linkBehaviourDatePicker =
                (CalendarsListRootItem.Fields[LinkBehaviourField].Value == string.Empty)
                   ? LinkBehaviour.None
                   : (LinkBehaviour) Enum.Parse(
                                        typeof (LinkBehaviour),
                                        CalendarsListRootItem.Fields[LinkBehaviourField].Value);

             if (String.IsNullOrEmpty(CalendarsListRootItem.Fields[DateFormatField].Value) != true)
             {
                _dateFormat = (DateFormat)Enum.Parse(typeof(DateFormat),
                                                     CalendarsListRootItem.Fields[DateFormatField].Value);
             }
              }
        }