Exemplo n.º 1
0
        private void InvalidateRow()
        {
            if (_wordInfo == null)
            {
                return;
            }

            _entry = _wordInfo.Entries[EntryIndex];
            SubItems.Clear();

            Text = _entry.ActualWord;
            SubItems.Add(_entry.Label);

            var definitionBlock = _entry.Definitions[DefinitionIndex];

            if (definitionBlock.Examples == null)
            {
                SubItems.Add("No examples.");
            }
            else
            {
                SubItems.Add(definitionBlock.Examples.Count.ToString());
            }
            SubItems.Add(definitionBlock.Definition);
        }
Exemplo n.º 2
0
        public void Update()
        {
            SubItems.Clear();

            Text      = (PhotoInstance.Marked ? "*" : "") + PhotoInstance.Title;
            ForeColor = PhotoInstance.Marked ? Color.DarkGreen : SystemColors.ControlText;
        }
Exemplo n.º 3
0
 public void updateModStatus()
 {
     SubItems.Clear();
     Checked = !mod.isDisabled();
     Text    = mod.getModName();
     SubItems.Add(mod.getModType().getName());
 }
 public void RefreshText()
 {
     SubItems.Clear();
     this.Text = (encoding.DisplayName);
     SubItems.Add(encoding.Name);
     SubItems.Add(encoding.CodePage.ToString());
 }
Exemplo n.º 5
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;
            }
        }
Exemplo n.º 6
0
        public void UpdateColumns()
        {
            SubItems.Clear();
            Text = Path.GetFileNameWithoutExtension(ShortcutItem.ShortcutFileInfo.Name);
            SubItems.Add(ShortcutItem.IsIconified ? "✔" : "✘");
            var shortcutPinnedString = ShortcutItem.IsPinned == null ? "?" : ShortcutItem.IsPinned == true ? "✔" : "✘";

            SubItems.Add(shortcutPinnedString);
        }
Exemplo n.º 7
0
 public void Odśwież()
 {
     SubItems.Clear();
     SubItems[0].Text = Folder;
     SubItems.Add(Typ);
     SubItems.Add(Metoda);
     SubItems.Add(Pliki);
     SubItems.Add(Strony);
     SubItems.Add(StronyA4);
     SubItems.Add(Data);
 }
Exemplo n.º 8
0
        private void UpdateInfo()
        {
            BeginInvoke(() =>
            {
                SubItems.Clear();

                Text = Description.Name;
                SubItems.Add(Description.Directories.Length.ToString());
                SubItems.Add(state.ToString());
                ImageIndex = (int)state;
            });
        }
        public void SetValues(params string[] values)
        {
            if (values == null)
            {
                throw new ArgumentNullException("values");
            }

            _values = values;

            if (ListView.AllColumns.Count > 0)
            {
                IEnumerator <SmartColumn>      cols = ListView.AllColumns.GetEnumerator();
                System.Collections.IEnumerator vals = values.GetEnumerator();

                while (cols.MoveNext() && vals.MoveNext())
                {
                    int n = cols.Current.Index;

                    if (n < 0)
                    {
                        continue;
                    }

                    while (n >= SubItems.Count)
                    {
                        SubItems.Add("");
                    }

                    SubItems[n].Text = (string)vals.Current;
                }
            }
            else
            {
                SubItems.Clear();

                int n = 0;
                foreach (string v in values)
                {
                    if (n < SubItems.Count)
                    {
                        SubItems[n++].Text = v;
                    }
                    else
                    {
                        SubItems.Add(v);
                        n++;
                    }
                }
            }

            UpdateGroup();
        }
        public void UpdateItem(IFrame frame)
        {
            SubItems.Clear();
            Text = "IL_" + Instruction.Offset.ToString("X4");
            SubItems.AddRange(new string[]
            {
                string.Join(" ", Bytes.Select(x => x.ToString("X2"))),
                Instruction.OpCode.Name,
                Instruction.OperandToString()
            });

            BackColor = GetBackgroundColor(frame);
        }
Exemplo n.º 11
0
        private void SetItems()
        {
            SubItems.Clear();

            if (_url != null)
            {
                Text = _url;
            }

            if (_acl != null)
            {
                SubItems.Add(_acl.FriendlyString);
            }
        }
Exemplo n.º 12
0
            public void Refresh()
            {
                // Forward
                m_Info.Refresh();

                // Clear sub-items
                SubItems.Clear();

                // Load
                Text = Settings.ServerName;
                SubItems.Add(Settings.ServerPort.ToString());
                SubItems.Add(Settings.RefreshInterval.ToString());
                SubItems.Add(Settings.SubNetAddress.ToString());
            }
Exemplo n.º 13
0
        public void UpdateItem(IFrame frame)
        {
            SubItems.Clear();
            Text = Instruction.Offset.ToString("X8");

            SubItems.AddRange(new string[]
            {
                string.Join(" ", Bytes.Select(x => x.ToString("X2"))),
                Formatter.FormatMnemonic(Instruction.Mnemonic),
                Formatter.FormatOperand(Instruction.Operand1),
                Formatter.FormatOperand(Instruction.Operand2),
            });

            BackColor = GetBackgroundColor(frame);
        }
Exemplo n.º 14
0
 public TaskViewItem(string taskName, string tiptext)
 {
     SubItems.Clear();
     Text        = taskName;
     ToolTipText = tiptext;
     SubItems.Add(new ListViewItem.ListViewSubItem(this, "0"));
     SubItems.Add(new ListViewItem.ListViewSubItem(this, "0"));
     SubItems.Add(new ListViewItem.ListViewSubItem(this, "0"));
     SubItems.Add(new ListViewItem.ListViewSubItem(this, "0"));
     SubItems.Add(new ListViewItem.ListViewSubItem(this, "0"));
     SubItems.Add(new ListViewItem.ListViewSubItem(this, "0"));
     SubItems.Add(new ListViewItem.ListViewSubItem(this, "0"));
     SubItems.Add(new ListViewItem.ListViewSubItem(this, "0"));
     SubItems.Add(new ListViewItem.ListViewSubItem(this, "0"));
     SubItems.Add(new ListViewItem.ListViewSubItem(this, "0"));
     SubItems.Add(new ListViewItem.ListViewSubItem(this, "0"));
 }
Exemplo n.º 15
0
        private void SetItems()
        {
            SubItems.Clear();

            Text = Key;

            string storeName = _certStoreName == null ? "MY" : _certStoreName;

            string certName = "";

            if ((_hash != null) && (_hash.Length > 0))
            {
                certName = CertUtil.GetCertNameFromStoreAndHash(storeName, _hash);
            }

            SubItems.Add(certName);

            SubItems.Add(storeName);
        }
Exemplo n.º 16
0
        public void Update()
        {
            SubItems.Clear();

            Text = Provider.Title;
            if (Provider.Enabled)
            {
                ImageKey = "on";
            }
            else
            {
                ImageKey = "off";
            }

            SubItems.Add(Provider.DefinitionTitle);
            SubItems.Add(Provider.DefinitionSubTitle);
            SubItems.Add(Provider.DefinitionHref);
            if (Provider is Core.Providers.OpenVPN)
            {
                SubItems.Add((Provider as Core.Providers.OpenVPN).Path);
            }
        }
Exemplo n.º 17
0
        private void Init(MatchRule rule)
        {
            _matchRule = rule;

            SubItems.Clear();

            //first row is actual item, all others are "sub-items"
            Text = rule.StartTagRegexValue;
            SubItems.Add(rule.EndTagRegexValue);

            string tagType = rule.TagType == MatchRule.TagTypeOption.TagPair
                ? "Tag Pair"
                : "Placeholder";

            SubItems.Add(tagType);

            string isTranslatable = rule.IsContentTranslatable
                ? "Translatable"
                : "Not translatable";

            SubItems.Add(isTranslatable);
        }
Exemplo n.º 18
0
        private void Init(MatchRule rule)
        {
            _matchRule = rule;

            SubItems.Clear();

            //first row is actual item, all others are "sub-items"
            Text = rule.StartTagRegexValue;
            SubItems.Add(rule.EndTagRegexValue);

            string tagType = rule.TagType == MatchRule.TagTypeOption.TagPair
                ? PluginResources.Tag_Pair
                : PluginResources.Placeholder;

            SubItems.Add(tagType);

            string isTranslatable = rule.IsContentTranslatable
                ? PluginResources.Translatable
                : PluginResources.Not_Translatable;

            SubItems.Add(isTranslatable);
        }
Exemplo n.º 19
0
        /// <summary>
        /// Reads all the sub-directories below the current folder
        /// </summary>
        public void ReadSubItemsForFolder()
        {
            if (SubItems.Count == 1 && SubItems[0] == null)
            {
                // Clear the dummy item out
                SubItems.Clear();

                try
                {
                    // Read the directories below
                    foreach (string dir in Directory.GetDirectories(Path, "*", SearchOption.TopDirectoryOnly))
                    {
                        SubItems.Add(new Folder(dir, this));
                    }

                    // Get any links in the directory
                    foreach (string file in Directory.GetFiles(Path, "*.lnk", SearchOption.TopDirectoryOnly))
                    {
                        SubItems.Add(new Folder(LinkConverter.GetLnkTarget(file), this));
                    }

                    // Remove any inaccessible folders
                    for (int i = SubItems.Count - 1; i >= 0; i--)
                    {
                        if (SubItems[i].IsInaccessible)
                        {
                            SubItems.RemoveAt(i);
                        }
                    }
                }
                catch (UnauthorizedAccessException)
                {
                    // This means we don't have access, don't worry about it
                }
            }
        }
Exemplo n.º 20
0
        public void RepopulateSubItems()
        {
            SubItems.Clear();
            SubItems[0].Name = SubItems[0].Text = Identifier.Name;
            SubItems.Add(new ListViewSubItem(this, Utils.NullableDateTimeToString(Updated))
            {
                Tag = Updated
            });                                                                                                 // Add Tag so ListViewItemSorter will sort DateTime correctly
            SubItems.Add(ChangedBy);
            SubItems.Add(new ListViewSubItem(this, Utils.ExpirationToString(Expires))
            {
                Tag = Expires
            });                                                                                           // Add Tag so ListViewItemSorter will sort TimeSpan correctly
            // Add tag value for all the custom columns
            for (int i = ListViewSecrets.FirstCustomColumnIndex; i < Session.ListViewSecrets.Columns.Count; i++)
            {
                string key = Session.ListViewSecrets.Columns[i].Name;
                SubItems.Add((null == Tags) || (Tags.Count == 0) || !Tags.ContainsKey(key) ? "" : string.IsNullOrWhiteSpace(Tags[key]) ? "(none)" : Tags[key]);
            }

            ForeColor = AboutToExpire ? ForeColor : Settings.Default.AboutToExpireItemColor;
            ForeColor = Active ? ForeColor : Settings.Default.ExpiredItemColor;
            ForeColor = Enabled ? ForeColor : Settings.Default.DisabledItemColor;
        }
Exemplo n.º 21
0
 private void OnPathRuleChanged()
 {
     SubItems.Clear();
     Text = PathRule.SourcePathPattern;
     SubItems.Add(PathRule.IsBilingual ? PathRule.TargetPathPattern : PluginResources.SameAsSource);
 }