Beispiel #1
0
        private void UpdateListViewColumns(ResourceListView2 listView, ColumnDescriptor[] columns,
                                           ResourceListDataProvider dataProvider, bool setGroupProviders)
        {
            foreach (JetListViewColumn col in listView.Columns)
            {
                ConversationStructureColumn convStructureColumn = col as ConversationStructureColumn;
                if (convStructureColumn != null)
                {
                    convStructureColumn.DataProvider = dataProvider as ConversationDataProvider;
                }

                ResourcePropsColumn propsCol = col as ResourcePropsColumn;
                if (propsCol != null)
                {
                    foreach (ColumnDescriptor colDesc in columns)
                    {
                        int[] propIds = PropNamesToIDs(colDesc.PropNames, true);
                        if (propsCol.PropIdsEqual(propIds))
                        {
                            UpdateGroupProvider(setGroupProviders, colDesc, propsCol);
                            break;
                        }
                    }
                }

                ResourceListView2Column rlvCol = col as ResourceListView2Column;
                if (rlvCol != null)
                {
                    rlvCol.OwnerList = dataProvider.ResourceList;
                }
            }
        }
Beispiel #2
0
        private void  InitializeListColumns()
        {
            _favoritesListView.AllowColumnReorder = false;
            _favoritesListView.Columns.Add(new ResourceIconColumn());
            ResourceListView2Column nameCol = _favoritesListView.AddColumn(Core.Props.Name);

            nameCol.AutoSize = true;
        }
Beispiel #3
0
 private void SetPropertyToTextCallbacks(ResourceListView2Column column)
 {
     for (int i = 0; i < column.PropIds.Length; i++)
     {
         column.SetPropToTextConverter(column.PropIds [i],
                                       (PropertyToTextConverter)_propToTextConverters [column.PropIds [i]]);
     }
 }
Beispiel #4
0
        private void ShowThreadedEmails(IResourceList resourceList)
        {
            _dataProvider = new ConversationDataProvider(resourceList, _threadingHandler);
            _dataProvider.SetInitialSort(new SortSettings(_propDate, true));

            _listView   = _resourceListView.JetListView;
            _dateColumn = new ResourceListView2Column(new int[] { _propDate });
            _listView.Columns.Add(_dateColumn);

            _resourceListView.DataProvider = _dataProvider;
        }
Beispiel #5
0
        private void InitListWithAttachments(IResource task)
        {
            _targetList.AllowColumnReorder = false;
            _targetList.Columns.Add(new ResourceIconColumn());
            ResourceListView2Column nameCol = _targetList.AddColumn(ResourceProps.DisplayName);

            nameCol.AutoSize = true;

            IResourceList attaches = task.GetLinksTo(null, TasksPlugin._linkTarget);

            foreach (IResource res in attaches)
            {
                _targetList.JetListView.Nodes.Add(res);
            }
        }
Beispiel #6
0
 internal SetFoldersForm()
 {
     InitializeComponent();
     _initialStatuses       = new HashMap();
     _folderColumn          = new ResourceListView2Column(new int[] { Core.Props.Name });
     _folderColumn.Text     = "Folder";
     _folderColumn.Width    = 180;
     _folderColumn.AutoSize = true;
     _folderList.Columns.Add(_folderColumn);
     _statusColumn       = new ResourceListView2Column(new int[] { FileProxy._propStatus });
     _statusColumn.Text  = "Indexed";
     _statusColumn.Width = 90;
     _statusColumn.SetPropToTextConverter(_statusColumn.PropIds[0],
                                          new PropertyToTextConverter(new PropertyToTextCallback(StatusToText)));
     _folderList.Columns.Add(_statusColumn);
     _folderList.SelectAddedItems = true;
     _folderList.ShowContextMenu  = false;
 }
        public OutlookOptionsPane_InfoStores()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();
            _allStores = Core.ResourceStore.GetAllResources(STR.MAPIInfoStore);
            IResourceList supportedStores   = Core.ResourceStore.FindResourcesWithProp(STR.MAPIInfoStore, PROP.StoreSupported);
            IResourceList unsupportedStores = Core.ResourceStore.GetAllResources(STR.MAPIInfoStore).Minus(supportedStores);

            if (unsupportedStores.Count > 0)
            {
                label1.Text += " Please note that Omea does not support IMAP message stores.";
            }

            _checkBoxColumn = _lvInfoStores.AddCheckBoxColumn();
            _lvInfoStores.AllowColumnReorder = false;
            _lvInfoStores.DataProvider       = new DProvider(_allStores);
            _lvInfoStores.Columns.Add(new ResourceIconColumn());
            ResourceListView2Column nameCol = _lvInfoStores.AddColumn(Core.Props.Name);

            nameCol.AutoSize            = true;
            _checkBoxColumn.AfterCheck += HandleAfterCheck;
        }
Beispiel #8
0
        [Test] public void SortChildren()
        {
            DateTime  now    = DateTime.Now;
            IResource email0 = CreateEmail("Email0", now.AddSeconds(-10), null, true);
            IResource email1 = CreateEmail("Email1", now.AddSeconds(-7), email0, true);
            IResource email2 = CreateEmail("Email2", now.AddSeconds(-5), email0, true);
            IResource email3 = CreateEmail("Email3", now.AddSeconds(-6), email0, true);

            IResourceList resourceList = Core.ResourceStore.GetAllResourcesLive("Email");

            resourceList.Sort(new int[] { _propDate }, false);
            _dataProvider = new ConversationDataProvider(resourceList, _threadingHandler);

            _listView   = _resourceListView.JetListView;
            _dateColumn = new ResourceListView2Column(new int[] { _propDate });
            _listView.Columns.Add(_dateColumn);

            _resourceListView.DataProvider = _dataProvider;

            _listView.Nodes [0].Expanded = true;
            Assert.AreEqual(email1, _listView.Nodes [0].Nodes [0].Data);
            Assert.AreEqual(email3, _listView.Nodes [0].Nodes [1].Data);
            Assert.AreEqual(email2, _listView.Nodes [0].Nodes [2].Data);
        }
Beispiel #9
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.labelChooseConditions = new System.Windows.Forms.Label();
            this.treeConditions        = new ResourceListView2();
            this.buttonOK     = new System.Windows.Forms.Button();
            this.buttonCancel = new System.Windows.Forms.Button();
            this.buttonHelp   = new System.Windows.Forms.Button();
            this.SuspendLayout();
            //
            // labelChooseConditions
            //
            this.labelChooseConditions.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.labelChooseConditions.Location  = new System.Drawing.Point(4, 4);
            this.labelChooseConditions.Name      = "labelChooseConditions";
            this.labelChooseConditions.Size      = new System.Drawing.Size(112, 16);
            this.labelChooseConditions.TabIndex  = 0;
            this.labelChooseConditions.Text      = "Available Conditions:";
            //
            // treeConditions
            //
            this.treeConditions.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                                | System.Windows.Forms.AnchorStyles.Left)
                                                                               | System.Windows.Forms.AnchorStyles.Right)));
            this.treeConditions.Location     = new System.Drawing.Point(0, 24);
            this.treeConditions.Name         = "treeConditions";
            this.treeConditions.Size         = new System.Drawing.Size(282, 360);
            this.treeConditions.TabIndex     = 1;
            this.treeConditions.DoubleClick += new HandledEventHandler(this.treeConditions_DoubleClick);
            this.treeConditions.JetListView.SelectionStateChanged += new StateChangeEventHandler(Selection_SelectionStateChanged);
            this.treeConditions.OpenProperty      = Core.Props.Open;
            this.treeConditions.AllowSameViewDrag = false;

            this.treeConditions.AddTreeStructureColumn();
            this.treeConditions.AddIconColumn();
            ResourceListView2Column column = this.treeConditions.AddColumn(ResourceProps.DisplayName);

            column.SizeToContent = true;
            column.Text          = "Conditions";
            //
            // buttonOK
            //
            this.buttonOK.Anchor    = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.buttonOK.FlatStyle = System.Windows.Forms.FlatStyle.System;
            this.buttonOK.Location  = new System.Drawing.Point(32, 392);
            this.buttonOK.Name      = "buttonOK";
            this.buttonOK.TabIndex  = 2;
            this.buttonOK.Text      = "OK";
            this.buttonOK.Click    += new System.EventHandler(this.buttonOK_Click);
            //
            // buttonCancel
            //
            this.buttonCancel.Anchor       = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.buttonCancel.FlatStyle    = System.Windows.Forms.FlatStyle.System;
            this.buttonCancel.Location     = new System.Drawing.Point(116, 392);
            this.buttonCancel.Name         = "buttonCancel";
            this.buttonCancel.TabIndex     = 3;
            this.buttonCancel.Text         = "Cancel";
            //
            // buttonHelp
            //
            this.buttonHelp.Anchor       = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.buttonHelp.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.buttonHelp.FlatStyle    = System.Windows.Forms.FlatStyle.System;
            this.buttonHelp.Location     = new System.Drawing.Point(200, 392);
            this.buttonHelp.Name         = "buttonHelp";
            this.buttonHelp.TabIndex     = 4;
            this.buttonHelp.Text         = "Help";
            this.buttonHelp.Click       += new System.EventHandler(this.HelpButton_Click);
            //
            // ChooseConditionForm
            //
            this.AcceptButton      = this.buttonOK;
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
            this.CancelButton      = this.buttonCancel;
            this.ClientSize        = new System.Drawing.Size(280, 421);
            this.Controls.Add(this.buttonCancel);
            this.Controls.Add(this.buttonOK);
            this.Controls.Add(this.treeConditions);
            this.Controls.Add(this.labelChooseConditions);
            this.Controls.Add(this.buttonHelp);
            this.Name = "ChooseConditionForm";
            this.Text = "Select Condition(s)";
            this.ResumeLayout(false);
        }