Ejemplo n.º 1
0
 private CertificateFile()
 {
     SubItems.Add(new ListViewSubItem()
     {
         Name = "Info"
     });
 }
Ejemplo n.º 2
0
 public VideoListViewItem(VideoInfo V)
 {
     this.V = V;
     Name   = V.D;
     Text   = V.D;
     SubItems.Add(V.N);
 }
Ejemplo n.º 3
0
        async Task ExecuteLoadSubItemsCommand(int catId)
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                SubItems.Clear();
                var items = await GetSubCategories(catId);

                foreach (var item in items)
                {
                    SubItems.Add(item);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Ejemplo n.º 4
0
        public void UpdateListViewItem()
        {
            this.Text       = Name;
            this.ImageIndex = IconId;

            while (SubItems.Count > 1)
            {
                SubItems.RemoveAt(1);
            }

            if (Price > 0)
            {
                double rounded = Math.Round(Price, 2);
                this.SubItems.Add(String.Format("{0} €", rounded));
            }
            else
            {
                this.SubItems.Add("");
            }

            this.SubItems.Add(NumberOfDiscs.ToString());

            if (BoughtOn.Year > 1980)
            {
                this.SubItems.Add(BoughtOn.ToShortDateString());
            }
            else
            {
                this.SubItems.Add("");
            }

            this.SubItems.Add(Errors());
        }
Ejemplo n.º 5
0
        internal KeyListViewItem(string txt, GnuKey key) : base(txt)
        {
            Key = key;

            SubItems.Add(new ListViewItem.ListViewSubItem(this, key.Expiry));
            SubItems.Add(new ListViewItem.ListViewSubItem(this, key.KeyId));
        }
Ejemplo n.º 6
0
 public ExtensionListViewItem(FileExtensionsItem item, RequestFilteringPage page)
     : base(item.Extension)
 {
     Item  = item;
     _page = page;
     SubItems.Add(new ListViewSubItem(this, item.Allowed ? "True" : "False"));
 }
Ejemplo n.º 7
0
            public WordPair(string americanWord, string britishWord, XElement documentNode)
                : base(americanWord)
            {
                _usWord    = americanWord.Trim().ToLowerInvariant();
                _gbWord    = britishWord.Trim().ToLowerInvariant();
                _sortIndex = _sortIndexCounter++;
                _node      = documentNode;
                _isOk      = _usWord.Length > 1 && _gbWord.Length > 1 && _usWord != _gbWord && _usWord == americanWord && _gbWord == britishWord;

                LinkedList <WordPair> list;

                if (!PairsByUs.TryGetValue(_usWord, out list))
                {
                    list = new LinkedList <WordPair>();
                    PairsByUs.Add(_usWord, list);
                }
                if (list.Count > 0 || !_isOk)
                {
                    if (list.Count == 1)
                    {
                        list.First.Value.BackColor = HighlightColor;
                    }
                    BackColor = HighlightColor;
                }
                _pairNode = list.AddLast(this);
                SubItems.Add(britishWord);
            }
 public CustomShortcutListViewItem(CustomShortcut customShortcut)
 {
     CustomShortcut = customShortcut;
     Text           = CustomShortcut.ShortcutName;
     SubItems.Add(CustomShortcut.ShortcutType.ToString());
     SubItems.Add(CustomShortcut.ShortcutItem.ShortcutUser.ToString());
 }
Ejemplo n.º 9
0
 public DefaultDocumentListViewItem(DocumentItem item, DefaultDocumentPage page)
     : base(item.Name)
 {
     Item  = item;
     _page = page;
     SubItems.Add(new ListViewSubItem(this, item.Flag));
 }
Ejemplo n.º 10
0
        public UndoRedoDropDown(Designer designer, ButtonItem parent)
        {
            FDesigner = designer;
            FParent   = parent;

            LayoutOrientation = eOrientation.Vertical;
            parent.PopupType  = ePopupType.ToolBar;
            parent.SubItems.Add(this);
            parent.PopupOpen += new DotNetBarManager.PopupOpenEventHandler(parent_PopupOpen);

            lbxActions               = new ListBox();
            lbxActions.Size          = new Size(150, 200);
            lbxActions.BorderStyle   = BorderStyle.None;
            lbxActions.SelectionMode = SelectionMode.MultiSimple;
            lbxActions.MouseMove    += new MouseEventHandler(lbxActions_MouseMove);
            lbxActions.MouseDown    += new MouseEventHandler(lbxActions_MouseDown);

            FActionsHost         = new ControlContainerItem();
            FActionsHost.Control = lbxActions;

            SubItems.Add(FActionsHost);

            lblUndoRedo           = new Label();
            lblUndoRedo.AutoSize  = false;
            lblUndoRedo.Size      = new Size(150, 30);
            lblUndoRedo.TextAlign = ContentAlignment.MiddleCenter;
            lblUndoRedo.BackColor = Color.Transparent;

            FLabelHost         = new ControlContainerItem();
            FLabelHost.Control = lblUndoRedo;

            SubItems.Add(FLabelHost);
        }
Ejemplo n.º 11
0
            public IpMappingListViewItem(IpMappingItem item, HttpApiPage page)
                : base(item.Address)
            {
                Item  = item;
                _page = page;
                SubItems.Add(new ListViewSubItem(this, item.Port));
                SubItems.Add(new ListViewSubItem(this, BindingUtility.GetAppName(item.AppId)));
                SubItems.Add(new ListViewSubItem(this, item.AppId));
                SubItems.Add(new ListViewSubItem(this, item.Hash));
                SubItems.Add(new ListViewSubItem(this, item.Store));

                string flag = "Broken";

                using X509Store personal = new X509Store(item.Store, StoreLocation.LocalMachine);
                try
                {
                    personal.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly);
                    var found = personal.Certificates.Find(X509FindType.FindByThumbprint, item.Hash, false);
                    if (found.Count > 0)
                    {
                        flag = "Healthy";
                    }

                    personal.Close();
                }
                catch (CryptographicException)
                {
                    flag = "Unknown";
                }

                SubItems.Add(new ListViewSubItem(this, flag));
            }
Ejemplo n.º 12
0
        internal KeyListViewItem(string txt, KeyItem keyItem) : base(txt)
        {
            KeyItem = keyItem;

            SubItems.Add(new ListViewItem.ListViewSubItem(this, keyItem.Expiry));
            SubItems.Add(new ListViewItem.ListViewSubItem(this, keyItem.KeyId));
        }
Ejemplo n.º 13
0
        public PageViewItem(Page page)
        {
            Page = page;

            Text = page.FileName;
            SubItems.Add(page.Type.ToString());
        }
Ejemplo n.º 14
0
 public InternalItem(UserMenuEntry entry)
     : base()
 {
     internalData = entry;
     Text         = internalData.Text;
     SubItems.Add(internalData.CommandText);
 }
Ejemplo n.º 15
0
 public HeaderListViewItem(HeadersItem item, RequestFilteringPage page)
     : base(item.Header)
 {
     Item  = item;
     _page = page;
     SubItems.Add(new ListViewSubItem(this, item.SizeLimit.ToString()));
 }
Ejemplo n.º 16
0
            public SvnListViewItem(SvnListEventArgs result)
            {
                Result = result;
                Text   = result.Name;
                SubItems.Add(result.Path);
                SubItems.Add(result.Entry.Revision.ToString());
                SubItems.Add(result.Entry.Author);

                var sizeUnit = "bytes";
                var size     = (decimal)result.Entry.FileSize;

                if (size > 1024)
                {
                    size /= 1024; sizeUnit = "KB";
                }
                if (size > 1024)
                {
                    size /= 1024; sizeUnit = "MB";
                }
                if (size > 1024)
                {
                    size /= 1024; sizeUnit = "GB";
                }
                size = Math.Round(size, 2);
                SubItems.Add((size > 0) ? size.ToString() + sizeUnit : string.Empty);

                SubItems.Add(result.Entry.Time.ToString("dd/MM/yyyy HH:mm:ss"));
            }
Ejemplo n.º 17
0
 public QueryListViewItem(QueryStringsItem item, RequestFilteringPage page)
     : base(item.QueryString)
 {
     Item  = item;
     _page = page;
     SubItems.Add(new ListViewSubItem(this, item.Allowed ? "Always allow" : "Deny"));
 }
 public void RefreshText()
 {
     SubItems.Clear();
     this.Text = (encoding.DisplayName);
     SubItems.Add(encoding.Name);
     SubItems.Add(encoding.CodePage.ToString());
 }
Ejemplo n.º 19
0
        public void FilterData(StringBuilder res = null)
        {
            if (DisableBaseFilterData)
            {
                return;
            }
            if (res == null)
            {
                res = GetAutoPropertyFilterString();
            }
            if (res.Length == 0 && vloader.NavigationExpression.Count != 0)
            {
                res.Append("&& All");
            }
            if (res.Length > 0)
            {
                vloader.FilterExpression = res.ToString().Trim().Substring(2).Trim();
            }
            else
            {
                if (vloader.FilterExpression != "All")
                {
                    vloader.FilterExpression = null;
                }
            }

            SubItems.Refresh();
            NotifyPropertyChanged(x => this.SubItems);
        }
Ejemplo n.º 20
0
        public override void Refresh()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("(").Append(DHelper.Int2HexString((int)(0x0000FFFF & Tag)));
            sb.Append(",").Append(DHelper.Int2HexString((int)(Tag >> 16))).Append(")");
            string strTag = sb.ToString();

            if (SubItems.Count < 2)
            {
                SubItems.Add(strTag);
            }
            else
            {
                SubItems[1].Text = strTag;
            }

            string strDescription = DHelper.GetTagName(Tag);

            if (SubItems.Count < 3)
            {
                SubItems.Add(strDescription);
            }
            else
            {
                SubItems[2].Text = strDescription;
            }

            base.Refresh();
        }
Ejemplo n.º 21
0
 public InternalListViewItem(NT_FILE_STREAM_INFORMATION data)
 {
     InternalData = data;
     Text         = data.StreamName;
     SubItems.Add(string.Format("{0:N0}", data.StreamSize));
     SubItems.Add(string.Format("{0:N0}", data.StreamAllocationSize));
 }
Ejemplo n.º 22
0
        public Viwer(int id, int sn)
        {
            var db       = new Model.TransportManagementEntities();
            var billitem = db.tripitems.Find(id);

            for (int i = 0; i <= 11; i++)
            {
                SubItems.Add(new ListViewSubItem());
            }
            id                    = billitem.id;
            sendername            = billitem.sender_name;
            senderphone           = billitem.sender_phone;
            receivername          = billitem.receivername;
            receiverphone         = billitem.receiverphone;
            itemname              = (billitem.orderitemlist as Model.orderitemlist).itemname;
            itemtype_id           = (int)billitem.orderitemtype_id;
            from_id               = (billitem.location as Model.location).id;
            to_id                 = (int)billitem.location_too;
            quantity              = (decimal)billitem.quantity;
            weight                = (decimal)billitem.weight;
            date                  = (int)billitem.date;
            unit                  = billitem.unit;
            deliver_place         = billitem.deliver_place;
            chargeamount          = (decimal)billitem.amount;
            this.SubItems[0].Text = sn.ToString();
        }
Ejemplo n.º 23
0
        public void Update()
        {
            SubItems.Clear();

            Text      = (PhotoInstance.Marked ? "*" : "") + PhotoInstance.Title;
            ForeColor = PhotoInstance.Marked ? Color.DarkGreen : SystemColors.ControlText;
        }
Ejemplo n.º 24
0
 private async Task SaveSubItem(SubItems s)
 {
     using (var ctx = new SubItemsService())
     {
         await ctx.UpdateSubItems(s).ConfigureAwait(false);
     }
 }
Ejemplo n.º 25
0
 public PHPSettingItem(PHPIniSetting setting)
 {
     _setting = setting;
     Text     = _setting.Name;
     SubItems.Add(_setting.Value);
     SubItems.Add(_setting.Section);
 }
Ejemplo n.º 26
0
 public UrlListViewItem(UrlsItem item, RequestFilteringPage page)
     : base(item.Url)
 {
     Item  = item;
     _page = page;
     SubItems.Add(new ListViewSubItem(this, item.Allowed ? "always allow" : "Deny"));
 }
Ejemplo n.º 27
0
        public virtual object Clone()
        {
            liteTile tile = new liteTile();

            tile.Type               = Type;
            tile.AutoNavigateUrl    = AutoNavigateUrl;
            tile.NavigateUrl        = NavigateUrl;
            tile.ImageUrl           = ImageUrl;
            tile.Status             = Status;
            tile.ImageCssClass      = ImageCssClass;
            tile.IdModifiedBy       = IdModifiedBy;
            tile.CommunityTypes     = CommunityTypes;
            tile.DefaultTranslation = (lm.Comol.Core.DomainModel.Languages.TitleDescriptionObjectTranslation)DefaultTranslation.Clone();
            tile.Id      = Id;
            tile.Deleted = Deleted;
            if (Translations != null)
            {
                tile.Translations = Translations.Where(t => t.Deleted == BaseStatusDeleted.None).Select(t => (liteTileTranslation)t.Clone()).ToList();
            }
            if (Assignments != null)
            {
                tile.Assignments = Assignments.Where(a => a.Deleted == BaseStatusDeleted.None).Select(a => (liteTileAssignment)a.Clone()).ToList();
            }
            if (Tags != null)
            {
                tile.Tags = Tags.Where(a => a.Deleted == BaseStatusDeleted.None).Select(a => (liteTileTagAssociation)a.Clone()).ToList();
            }
            if (SubItems != null)
            {
                tile.SubItems = SubItems.Where(a => a.Deleted == BaseStatusDeleted.None).Select(a => (liteTileItem)a.Clone()).ToList();
            }

            return(tile);
        }
Ejemplo n.º 28
0
 public VerbListViewItem(VerbsItem item, RequestFilteringPage page)
     : base(item.Verb)
 {
     Item  = item;
     _page = page;
     SubItems.Add(new ListViewSubItem(this, item.Allowed ? "True" : "False"));
 }
Ejemplo n.º 29
0
 public ReservedUrlListViewItem(ReservedUrlsItem item, HttpApiPage page)
     : base(item.UrlPrefix)
 {
     Item  = item;
     _page = page;
     SubItems.Add(new ListViewSubItem(this, item.SecurityDescriptor));
 }
Ejemplo n.º 30
0
        public LinkViewItem(LinkEntry entry)
        {
            Link = entry;

            Text = Link.SteamID.ToString();
            SubItems.Add(Link.Name);
        }