Пример #1
0
 public TimersChoiceForm(IEnumerable <TimerDefinition> availableTypes, TimersForm parent)
     : this()
 {
     parentForm = parent;
     foreach (var type in availableTypes)
     {
         checkedListBox1.Items.Add(type);
     }
 }
        public GlobalTimerSettingsForm(TimersForm timersView)
        {
            this.timersView = timersView;
            InitializeComponent();

            checkBoxWidgetView.Checked         = timersView.WidgetModeEnabled;
            textBoxWidgetSample.BackColor      = timersView.WidgetBgColor;
            textBoxWidgetSample.ForeColor      = timersView.WidgetForeColor;
            checkBoxShowEndDate.Checked        = timersView.ShowEndDate;
            checkBoxShowEndDateInstead.Checked = timersView.ShowEndDateInsteadOfTimeRemaining;
            UpdateControls();
        }
Пример #3
0
        public void Initialize()
        {
            timerDefinitions.CustomTimerRemoved += TimerDefinitionsRemovedCustomTimer;
            timersForm = new TimersForm(this, logger, wurmApi, timerDefinitions);
            foreach (Guid groupId in currentGroupsIds)
            {
                try
                {
                    RestoreGroup(groupId);
                }
                catch (Exception exception)
                {
                    logger.Error(exception, "Error during initialization of server group id " + groupId);
                }
            }

            updateTimer.Start();
        }