Exemple #1
0
        List <FlatCatalogListItem> _catList = null;  //List of registered VS 11 catlogs

        private void RunVSHlpViewerElevatedBtn_DropDownOpening(object sender, EventArgs e)
        {
            RunVSHlpViewerElevatedBtn.DropDownItems.Clear();
            _catList = FlatCatalogList.GetAll();
            for (int i = 0; i < _catList.Count; i++)
            {
                ToolStripItem item = RunVSHlpViewerElevatedBtn.DropDownItems.Add(_catList[i].CatalogName + " | " + _catList[i].Locale);
                item.Tag = i;
            }
        }
Exemple #2
0
        private void RunVSHlpViewerElevatedBtn_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)  //fill catalog drop down list
        {
            int i = (int)e.ClickedItem.Tag;

            _catList = FlatCatalogList.GetAll();
            if (i >= 0 && i < _catList.Count)
            {
                HlpViewer.StartReturn sRet = HlpViewer.RunAsAdmin("/catalogName", _catList[i].CatalogID, "/locale", _catList[i].Locale);
                if (sRet != HlpViewer.StartReturn.ok)
                {
                    MessageBox.Show("Error running HlpViewer.exe: " + sRet.ToString() + "\n" + HlpViewer.path);
                }
            }
        }
Exemple #3
0
 private void RunVSHlpViewerElevatedBtn_ButtonClick(object sender, EventArgs e)
 {
     _catList = FlatCatalogList.GetAll();
     if (_catList.Count > 0)
     {
         HlpViewer.StartReturn sRet = HlpViewer.RunAsAdmin("/catalogName", _catList[0].CatalogID, "/locale", _catList[0].Locale);
         if (sRet != HlpViewer.StartReturn.ok)
         {
             MessageBox.Show("Error running HlpViewer.exe: " + sRet.ToString() + "\n" + HlpViewer.path);
         }
     }
     else
     {
         MessageBox.Show("No VS 11 registered catalogs found.");
     }
 }
Exemple #4
0
        private void FillCatalogList()
        {
            _calalogList = FlatCatalogList.GetAll();
            int i = 0;

            foreach (FlatCatalogListItem catalog in _calalogList)
            {
                ToolStripMenuItem mnuItem = (ToolStripMenuItem)openCatalogDropDown.DropDownItems.Add(catalog.CatalogName + " | " + catalog.Locale, null, openCatalogDropDown_Click);
                mnuItem.AutoToolTip = true;
                mnuItem.ToolTipText = "LocalPath: " + catalog.LocationPath + Environment.NewLine
                                      + "Catalog Alias: " + catalog.CatalogID + Environment.NewLine
                                      + "Catalog Name: " + catalog.CatalogName + Environment.NewLine
                                      + "Locale: " + catalog.Locale + Environment.NewLine
                                      + "SeedFilePath: " + catalog.SeedFilePath + Environment.NewLine;
                mnuItem.Tag = i++;
                _catalogMnu.Add(mnuItem);
            }
            if (_calalogList.Count > 0)
            {
                _SelectedCatalog = 0;
            }
        }