Example #1
0
        private void SetEventTemplatesColumns()
        {
            this.clEventTemplates.dgObjects.Dock = DockStyle.Fill;
            OlvColumn column = new OlvColumn
            {
                AspectName      = @"Subject",
                Text            = LocalizibleStrings.ColumnSubject,
                FillsFreeSpace  = false,
                Groupable       = false,
                Hideable        = false,
                DataType        = typeof(string),
                HeaderTextAlign = HorizontalAlignment.Center,
                TextAlign       = HorizontalAlignment.Left,
                IsEditable      = false,
                Width           = 200,
                DisplayIndex    = 0/*,
                                    * AspectGetter = o =>
                                    * {
                                    * CalendarEvent ev = o as CalendarEvent;
                                    * return ev == null ? null : ev.Details.Subject;
                                    * }*/
            };

            this.clEventTemplates.dgObjects.PrimarySortColumn = column;

            this.clEventTemplates.dgObjects.AllColumns.Add(column);

            this.clEventTemplates.dgObjects.RebuildColumns();
            this.clEventTemplates.dgObjects.Sorting = SortOrder.Ascending;
            this.clEventTemplates.dgObjects.Sort();
        }
Example #2
0
        private void SetEwsContactsColumns()
        {
            this.clEwsContacts.dgObjects.Dock = DockStyle.Fill;
            List <OlvColumn> columns = new List <OlvColumn>();

            OlvColumn column = new OlvColumn
            {
                AspectName      = @"DisplayName",
                Text            = LocalizibleStrings.ColumnName,
                FillsFreeSpace  = false,
                Groupable       = true,
                Hideable        = false,
                CheckBoxes      = false,
                DataType        = typeof(string),
                HeaderTextAlign = HorizontalAlignment.Center,
                TextAlign       = HorizontalAlignment.Center,
                Width           = 200,
                DisplayIndex    = 0,
                IsEditable      = false
            };

            columns.Add(column);

            this.clEwsContacts.dgObjects.PrimarySortColumn = column;

            column = new OlvColumn
            {
                Text            = @"email",
                FillsFreeSpace  = false,
                Groupable       = false,
                Hideable        = false,
                DataType        = typeof(string),
                HeaderTextAlign = HorizontalAlignment.Center,
                TextAlign       = HorizontalAlignment.Left,
                IsEditable      = false,
                Width           = 200,
                DisplayIndex    = 1,
                AspectGetter    = o =>
                {
                    Contact contact = o as Contact;
                    if (contact == null)
                    {
                        return(null);
                    }
                    EmailAddress adress;
                    return(contact.EmailAddresses.TryGetValue(EmailAddressKey.EmailAddress1, out adress)
                        ? adress.Address : null);
                }
            };
            columns.Add(column);

            this.clEwsContacts.dgObjects.AllColumns.AddRange(columns);
            this.clEwsContacts.dgObjects.RebuildColumns();
            this.clEwsContacts.dgObjects.Sorting = SortOrder.Ascending;
            this.clEwsContacts.dgObjects.Sort();
        }
Example #3
0
        private void SetMailTemplatesColumns()
        {
            this.clMailTemplates.dgObjects.Dock = DockStyle.Fill;
            OlvColumn column = new OlvColumn
            {
                AspectName      = @"Subject",
                Text            = LocalizibleStrings.ColumnSubject,
                FillsFreeSpace  = false,
                Groupable       = false,
                Hideable        = false,
                DataType        = typeof(string),
                HeaderTextAlign = HorizontalAlignment.Center,
                TextAlign       = HorizontalAlignment.Left,
                IsEditable      = false,
                Width           = 200,
                DisplayIndex    = 0
            };

            this.clMailTemplates.dgObjects.PrimarySortColumn = column;

            /*OlvColumn column = new OlvColumn
             * {
             *  AspectName = @"Subject",
             *  Text = LocalizibleStrings.ColumnSubject,
             *  FillsFreeSpace = false,
             *  Groupable = false,
             *  Hideable = false,
             *  DataType = typeof(string),
             *  HeaderTextAlign = HorizontalAlignment.Center,
             *  TextAlign = HorizontalAlignment.Left,
             *  IsEditable = true,
             *  Width = 200,
             *  DisplayIndex = 0
             * };
             * this.clMailTemplates.dgObjects.PrimarySortColumn = column;*/

            this.clMailTemplates.dgObjects.AllColumns.Add(column);
            this.clMailTemplates.dgObjects.RebuildColumns();
            this.clMailTemplates.dgObjects.Sorting = SortOrder.Ascending;
            this.clMailTemplates.dgObjects.Sort();
        }
Example #4
0
        private void SetTargetContactsColumns()
        {
            this.clTargetContacts.dgObjects.Dock = DockStyle.Fill;
            List <OlvColumn> columns = new List <OlvColumn>();

            OlvColumn column = new OlvColumn
            {
                AspectName      = @"Email",
                Text            = @"email",
                FillsFreeSpace  = false,
                Groupable       = false,
                Hideable        = false,
                DataType        = typeof(string),
                HeaderTextAlign = HorizontalAlignment.Center,
                TextAlign       = HorizontalAlignment.Left,
                IsEditable      = true,
                Width           = 200,
                DisplayIndex    = 0
            };

            columns.Add(column);
            this.clTargetContacts.dgObjects.PrimarySortColumn = column;

            column = new OlvColumn
            {
                AspectName         = @"CanBeSender",
                Text               = LocalizibleStrings.ColumnCanSend,
                FillsFreeSpace     = false,
                Groupable          = true,
                Hideable           = true,
                CheckBoxes         = true,
                DataType           = typeof(bool),
                HeaderTextAlign    = HorizontalAlignment.Center,
                TextAlign          = HorizontalAlignment.Center,
                TriStateCheckBoxes = false,
                Width              = 100,
                IsEditable         = true
            };
            columns.Add(column);

            column = new OlvColumn
            {
                AspectName         = @"CanBeRecipient",
                Text               = LocalizibleStrings.ColumnCanReceive,
                FillsFreeSpace     = false,
                Groupable          = true,
                Hideable           = true,
                CheckBoxes         = true,
                DataType           = typeof(bool),
                HeaderTextAlign    = HorizontalAlignment.Center,
                TextAlign          = HorizontalAlignment.Center,
                Width              = 100,
                TriStateCheckBoxes = false,
                IsEditable         = true,
                AspectPutter       = (obj, boolValue) =>
                {
                    StoredContact contact = obj as StoredContact;
                    if (contact == null)
                    {
                        return;
                    }
                    if (!contact.IsEwsContact)
                    {
                        return;
                    }
                    contact.CanBeRecipient = (bool)boolValue;
                }
            };
            columns.Add(column);

            this.clTargetContacts.dgObjects.AllColumns.AddRange(columns);
            this.clTargetContacts.dgObjects.RebuildColumns();
            this.clTargetContacts.dgObjects.Sorting = SortOrder.Ascending;
            this.clTargetContacts.dgObjects.Sort();
        }
Example #5
0
        private void SetTargetContactsColumns()
        {
            this.clTargetContacts.dgObjects.Dock = DockStyle.Fill;
            List<OlvColumn> columns = new List<OlvColumn>();

            OlvColumn column = new OlvColumn
            {
                AspectName = @"Email",
                Text = @"email",
                FillsFreeSpace = false,
                Groupable = false,
                Hideable = false,
                DataType = typeof(string),
                HeaderTextAlign = HorizontalAlignment.Center,
                TextAlign = HorizontalAlignment.Left,
                IsEditable = true,
                Width = 200,
                DisplayIndex = 0
            };
            columns.Add(column);
            this.clTargetContacts.dgObjects.PrimarySortColumn = column;

            column = new OlvColumn
            {
                AspectName = @"CanBeSender",
                Text = LocalizibleStrings.ColumnCanSend,
                FillsFreeSpace = false,
                Groupable = true,
                Hideable = true,
                CheckBoxes = true,
                DataType = typeof(bool),
                HeaderTextAlign = HorizontalAlignment.Center,
                TextAlign = HorizontalAlignment.Center,
                TriStateCheckBoxes = false,
                Width = 100,
                IsEditable = true
            };
            columns.Add(column);

            column = new OlvColumn
            {
                AspectName = @"CanBeRecipient",
                Text = LocalizibleStrings.ColumnCanReceive,
                FillsFreeSpace = false,
                Groupable = true,
                Hideable = true,
                CheckBoxes = true,
                DataType = typeof(bool),
                HeaderTextAlign = HorizontalAlignment.Center,
                TextAlign = HorizontalAlignment.Center,
                Width = 100,
                TriStateCheckBoxes = false,
                IsEditable = true,
                AspectPutter = (obj, boolValue) =>
                {
                    StoredContact contact = obj as StoredContact;
                    if (contact == null)
                        return;
                    if (!contact.IsEwsContact)
                        return;
                    contact.CanBeRecipient = (bool)boolValue;
                }
            };
            columns.Add(column);

            this.clTargetContacts.dgObjects.AllColumns.AddRange(columns);
            this.clTargetContacts.dgObjects.RebuildColumns();
            this.clTargetContacts.dgObjects.Sorting = SortOrder.Ascending;
            this.clTargetContacts.dgObjects.Sort();
        }
Example #6
0
        private void SetMailTemplatesColumns()
        {
            this.clMailTemplates.dgObjects.Dock = DockStyle.Fill;
            OlvColumn column = new OlvColumn
            {
                AspectName = @"Subject",
                Text = LocalizibleStrings.ColumnSubject,
                FillsFreeSpace = false,
                Groupable = false,
                Hideable = false,
                DataType = typeof(string),
                HeaderTextAlign = HorizontalAlignment.Center,
                TextAlign = HorizontalAlignment.Left,
                IsEditable = false,
                Width = 200,
                DisplayIndex = 0
            };
            this.clMailTemplates.dgObjects.PrimarySortColumn = column;

            /*OlvColumn column = new OlvColumn
            {
                AspectName = @"Subject",
                Text = LocalizibleStrings.ColumnSubject,
                FillsFreeSpace = false,
                Groupable = false,
                Hideable = false,
                DataType = typeof(string),
                HeaderTextAlign = HorizontalAlignment.Center,
                TextAlign = HorizontalAlignment.Left,
                IsEditable = true,
                Width = 200,
                DisplayIndex = 0
            };
            this.clMailTemplates.dgObjects.PrimarySortColumn = column;*/

            this.clMailTemplates.dgObjects.AllColumns.Add(column);
            this.clMailTemplates.dgObjects.RebuildColumns();
            this.clMailTemplates.dgObjects.Sorting = SortOrder.Ascending;
            this.clMailTemplates.dgObjects.Sort();
        }
Example #7
0
        private void SetEwsContactsColumns()
        {
            this.clEwsContacts.dgObjects.Dock = DockStyle.Fill;
            List<OlvColumn> columns = new List<OlvColumn>();

            OlvColumn column = new OlvColumn
            {
                AspectName = @"DisplayName",
                Text = LocalizibleStrings.ColumnName,
                FillsFreeSpace = false,
                Groupable = true,
                Hideable = false,
                CheckBoxes = false,
                DataType = typeof(string),
                HeaderTextAlign = HorizontalAlignment.Center,
                TextAlign = HorizontalAlignment.Center,
                Width = 200,
                DisplayIndex = 0,
                IsEditable = false
            };
            columns.Add(column);

            this.clEwsContacts.dgObjects.PrimarySortColumn = column;

            column = new OlvColumn
            {
                Text = @"email",
                FillsFreeSpace = false,
                Groupable = false,
                Hideable = false,
                DataType = typeof(string),
                HeaderTextAlign = HorizontalAlignment.Center,
                TextAlign = HorizontalAlignment.Left,
                IsEditable = false,
                Width = 200,
                DisplayIndex = 1,
                AspectGetter = o =>
                {
                    Contact contact = o as Contact;
                    if (contact == null)
                        return null;
                    EmailAddress adress;
                    return contact.EmailAddresses.TryGetValue(EmailAddressKey.EmailAddress1, out adress)
                        ? adress.Address : null;
                }
            };
            columns.Add(column);

            this.clEwsContacts.dgObjects.AllColumns.AddRange(columns);
            this.clEwsContacts.dgObjects.RebuildColumns();
            this.clEwsContacts.dgObjects.Sorting = SortOrder.Ascending;
            this.clEwsContacts.dgObjects.Sort();
        }
Example #8
0
        private void SetEventTemplatesColumns()
        {
            this.clEventTemplates.dgObjects.Dock = DockStyle.Fill;
            OlvColumn column = new OlvColumn
            {
                AspectName = @"Subject",
                Text = LocalizibleStrings.ColumnSubject,
                FillsFreeSpace = false,
                Groupable = false,
                Hideable = false,
                DataType = typeof(string),
                HeaderTextAlign = HorizontalAlignment.Center,
                TextAlign = HorizontalAlignment.Left,
                IsEditable = false,
                Width = 200,
                DisplayIndex = 0/*,
                AspectGetter = o =>
                {
                    CalendarEvent ev = o as CalendarEvent;
                    return ev == null ? null : ev.Details.Subject;
                }*/
            };
            this.clEventTemplates.dgObjects.PrimarySortColumn = column;

            this.clEventTemplates.dgObjects.AllColumns.Add(column);

            this.clEventTemplates.dgObjects.RebuildColumns();
            this.clEventTemplates.dgObjects.Sorting = SortOrder.Ascending;
            this.clEventTemplates.dgObjects.Sort();
        }