Ejemplo n.º 1
0
        public UserList(Channel channel)
        {
            Channel         = channel;
            Size            = new Size(150, 100);
            tree            = new TreeView();
            tree.Style      = "userList";
            tree.Activated += HandleActivated;

            items            = new TreeItemCollection();
            items.Add(owners = new TreeItem {
                Text = "Room Owners", Expanded = true
            });
            items.Add(online = new TreeItem {
                Text = "Online", Expanded = true
            });
            items.Add(away = new TreeItem {
                Text = "Away", Expanded = true
            });
            if (Generator.IsMac)
            {
                foreach (var item in items.OfType <TreeItem>())
                {
                    item.Text = item.Text.ToUpperInvariant();
                }
            }
            tree.DataStore = items;

            Content = tree;
        }
Ejemplo n.º 2
0
        public PackageInspector()
        {
            XamlReader.Load(this);
            TreeItemCollection treeItems = new TreeItemCollection();

            treeItems.Add(this.treeBundleEntries = new TreeItem {
                Text = "File Entries"
            });
            treeItems.Add(this.treeReferenceEntries = new TreeItem {
                Text = "Footer Entries"
            });

            this.treeEntries.DataStore = treeItems;
        }
Ejemplo n.º 3
0
        public void Modify(object sender, EventArgs args)
        {
            data.Modify();

            tdata.Add(new TreeItem()
            {
                Text = "HI"
            });
            testTree.RefreshData();
        }
Ejemplo n.º 4
0
 void HandleServerAdded(object sender, ServerEventArgs e)
 {
     Application.Instance.Invoke(delegate
     {
         servers.Add(e.Server);
         Register(e.Server);
         Update(true);
         channelList.SelectedItem = e.Server;
         OnChannelChanged(EventArgs.Empty);
     });
 }
Ejemplo n.º 5
0
		public UserList (Channel channel)
		{
			this.Channel = channel;
			tree = new TreeView ();
			tree.Style = "userList";
			tree.Activated += HandleActivated;
			
			items = new TreeItemCollection ();
			items.Add (owners = new TreeItem { Text = "Room Owners", Expanded = true });
			items.Add (online = new TreeItem { Text = "Online", Expanded = true });
			items.Add (away = new TreeItem { Text = "Away", Expanded = true });
			if (Generator.ID == Generators.Mac) {
				foreach (var item in items.OfType<TreeItem>()) {
					item.Text = item.Text.ToUpperInvariant();
				}
			}
			tree.DataStore = items;
			
			this.AddDockedControl (tree);
		}
Ejemplo n.º 6
0
        private void resyncDatabases()
        {
            try
            {
                ignoreSelectionChanged = true;
                //SuspendLayout();

                if (openedDatabases == null)
                {
                    return;
                }

                //remove closed databases
                foreach (var child in tree.OfType <OpenedDatabaseTreeItem>()
                         .Where(child => !openedDatabases.Contains(child.Database))
                         .ToArray())
                {
                    tree.Remove(child);
                }

                //add newly opened databases
                var children = tree.OfType <OpenedDatabaseTreeItem>().ToArray();
                foreach (var item in openedDatabases
                         .Where(db => children.All(child => child.Database != db))
                         .Select(db => new OpenedDatabaseTreeItem(parentViewModel, this, db)
                {
                    Expanded = true
                }))
                {
                    tree.Add(item);
                    RefreshItem(item);
                }

                var selectedItem = parentViewModel.SelectedDatabase;

                SelectedItem = tree
                               .OfType <OpenedDatabaseTreeItem>()
                               .FirstOrDefault(item => string.Equals(item.Database.FilePath, selectedItem?.FilePath));
            }
            catch (Exception error)
            {
                parentViewModel.Log.Error(error);
                MessageBox.Show(error.Message, "Opened Database Resync Error", MessageBoxButtons.OK, MessageBoxType.Error);
            }
            finally
            {
                ignoreSelectionChanged = false;
                //ResumeLayout();
            }
        }
Ejemplo n.º 7
0
        public UserList(Channel channel)
        {
            Channel = channel;
            Size = new Size(150, 100);
            tree = new TreeView();
            tree.Style = "userList";
            tree.Activated += HandleActivated;

            items = new TreeItemCollection();
            items.Add(owners = new TreeItem { Text = "Room Owners", Expanded = true });
            items.Add(online = new TreeItem { Text = "Online", Expanded = true });
            items.Add(away = new TreeItem { Text = "Away", Expanded = true });
            if (Generator.IsMac)
            {
                foreach (var item in items.OfType<TreeItem>())
                {
                    item.Text = item.Text.ToUpperInvariant();
                }
            }
            tree.DataStore = items;
            
            Content = tree;
        }
Ejemplo n.º 8
0
        void Init()
        {
            EntityBlobPair         ebpair     = (EntityBlobPair)DataContext;
            List <TreeHierarchyDB> childBlobs = ebpair.Blob.ChildrenDBs;

            TreeItemCollection treeItemCollection = new TreeItemCollection();

            TreeItem treeitemroot = new TreeItem();

            treeitemroot.Text = ebpair.Entity.GetDataBlob <NameDB>().DefaultName;

            NewTreeItem(treeitemroot, ebpair);


            treeItemCollection.Add(treeitemroot);
            TreeViewcontrol.DataStore = treeItemCollection;
        }
        private void SetupTreeItems()
        {
            this.AssetsTree = new TreeItem()
            {
                Text  = "assets",
                Image = Definitions.FolderIcon["open"],
                Tag   = this.Browser.Root
            };

            //AssetsTree.Expanded = true;
            this.AssetsTree.Expanded = true;

            this.Browser.Root.AddToTree(this.AssetsTree, this._focused_package);

            TreeItemCollection treeItemColl = new TreeItemCollection();

            treeItemColl.Add(this.AssetsTree);

            this.treeMain.DataStore = treeItemColl;
        }
Ejemplo n.º 10
0
 protected virtual void OnDeviceAdded(object sender, DeviceRepositoryEventArgs args)
 {
     devices.Add(args.Device);
     args.Device.ApplicationsChanged += (_sender, e) => OnDeviceApplicationsChanged(_sender as Device);
     treeView.RefreshData();
 }