Ejemplo n.º 1
0
        private void durationSecondChanged(object sender, EventArgs e)
        {
            if (eventsList.SelectedIndex == -1)
            {
                return;
            }
            CalendarEventType calEvent = (CalendarEventType)this.eventsList.SelectedItem;

            calEvent.duration.seconds = (ushort)secondsDuration.Value;
            // Refresh widget
            this.eventsList.RefreshItem(eventsList.SelectedIndex);
            this.alwaysAvailableCheckBox.Checked = calEvent.isAlwaysAvailable();

            this.saveConfig.Enabled = true;
        }
Ejemplo n.º 2
0
        private void internalCopyEventsList()
        {
            if (this.eventsList.Items.Count == 0)
            {
                return;
            }
            List <CalendarEventType> list = new List <CalendarEventType>();

            foreach (object item in this.eventsList.Items)
            {
                CalendarEventType evt = (CalendarEventType)item;
                if (evt.isAlwaysAvailable())
                {
                    evt.config.portRange = null;
                }
                list.Add((CalendarEventType)item);
            }
            this.configuration.events = list.ToArray();
        }