public void Initialize(ListView list, IconListManager _iconListManager)
        {
            List <BindingIP> pwds = GetBindings();

            if (pwds.Count > 0)
            {
                list.Items.Clear();
                foreach (BindingIP b in pwds)
                {
                    ListViewItem item = new ListViewItem(b.ID.ToSafeString(), _iconListManager.AddFileIcon(b.Path));
                    item.UseItemStyleForSubItems = false;
                    item.SubItems.Add(b.Description);
                    item.SubItems.Add(b.Path);
                    item.SubItems.Add(b.AutoBind == 1? "Yes": "No");
                    item.SubItems[0].ForeColor = Color.White;
                    item.SubItems[1].Font      = new Font("Tahoma", 8.25F, FontStyle.Bold);
                    item.SubItems[2].ForeColor = Color.DarkGreen;
                    item.SubItems[3].ForeColor = b.AutoBind == 1 ? Color.Blue : Color.Gray;
                    if (list.InvokeRequired)
                    {
                        list.Invoke((MethodInvoker) delegate() {
                            list.Items.Add(item);
                        });
                    }
                    else
                    {
                        list.Items.Add(item);
                    }
                }
            }
        }
Beispiel #2
0
        public MogControl_LocalRepositoryTreeView()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            try
            {
                // Load the folder icon
                mWindowsExplorerIconList            = new ImageList();
                mWindowsExplorerIconList.ColorDepth = ColorDepth.Depth32Bit;
                mWindowsExplorerIconList.ImageSize  = new System.Drawing.Size(16, 16);

                foreach (Image icon in this.DefaultImageList.Images)
                {
                    mWindowsExplorerIconList.Images.Add(icon);
                }

                mWindowsExplorerIcons = new IconListManager(mWindowsExplorerIconList, Etier.IconHelper.IconReader.IconSize.Small);

                GameDataTreeView.ImageList = mWindowsExplorerIconList;
            }
            catch
            {
            }
        }
Beispiel #3
0
        private RemoteFileDialog()
        {
            InitializeComponent();

            toolStrip1.ImageList      = m_toolbarImages;
            toolUpFolder.ImageIndex   = 0;
            toolHomeFolder.ImageIndex = 1;
            toolRefresh.ImageIndex    = 2;

            FormFontFixer.Fix(this);

            m_currentPath  = new FilePath("~", PathFormat.Unix);
            m_userHomeDir  = new FilePath("~", PathFormat.Unix);
            m_selectedFile = new FilePath();

            m_dirs  = new List <string>();
            m_files = new List <string>();

            m_fileExtensionList = new List <List <string> >();

            m_fileFilterDescriptions = new List <string>();
            m_fileFilterExtensions   = new Dictionary <string, List <string> >();

            m_iconManager            = new IconListManager(m_images, IconSize.Small);
            listView1.SmallImageList = m_images;

            m_folderMode = false;
        }
        public FileBrowser(List <CFile> filesToView)
        {
            InitializeComponent();

            _smallImageList.ColorDepth = ColorDepth.Depth32Bit;
            _largeImageList.ColorDepth = ColorDepth.Depth32Bit;

            _smallImageList.ImageSize = new Size(16, 16);
            _largeImageList.ImageSize = new Size(32, 32);

            filesList.SmallImageList = _smallImageList;
            filesList.LargeImageList = _largeImageList;

            _iconListManager = new IconListManager(_smallImageList, _largeImageList);

            files = filesToView;

            foreach (CFile file in files)
            {
                string       filePath = file.GetTempFile();
                ListViewItem item     = new ListViewItem(file.FullFileName, _iconListManager.AddFileIcon(filePath));
                item.Tag = file;
                filesList.Items.Add(item);
            }

            btnDownloadFiles.Click += DownloadFiles;
        }
        /// <summary>
        /// Gets the icon for a file, returns GetClassIconIndex() if filename is not fully qualifed.
        /// </summary>
        /// <param name="filename">Fully qualified Windows filename of the file to be given an icon</param>
        /// <returns>Index of small icon for the file</returns>
        static public int GetFileIconIndex(string filename)
        {
            try
            {
                if (mFileTypeManager == null)
                {
                    mFileTypeManager = new IconListManager(mAssetTypeImages, IconReader.IconSize.Small);
                }

                int returnInt = 0;

                // Try getting a File Icon
                if (File.Exists(filename))
                {
                    returnInt = mFileTypeManager.AddFileIcon(filename);
                }

                // If we got the default index, return our Class Icon index
                if (returnInt == 0)
                {
                    return(GetAssetIconIndex(filename, null));
                }
                else
                {
                    return(returnInt);
                }
            }
            catch (Exception e)
            {
                // If we didn't have a valid, qualified filename, return Class Icon index
                e.ToString();                  // This line for debug purposes (keeps VS.NET from warning use that e* is not used)
                return(GetClassIconIndex(filename, null));
            }
        }
Beispiel #6
0
        public ctrShares(List <string> Hosts)
        {
            InitializeComponent();
            ico = new IconListManager(imgSmallIco, imgBigIco);

            ListHosts(Hosts);
        }
Beispiel #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AddInSettings"/> class.
        /// </summary>
        public AddInSettingsForm()
        {
            InitializeComponent();

            Logger.WriteEvent += new EventHandler <Logger.WriteEventArgs>(Logger_WriteEvent);

            _iconListManager = new IconListManager(imageList, IconSize.Small);
            _globalSettings  = new GlobalIncrementSettings();

            // Added this to implement fix the sorting of "Versioning Style.
            propertyGrid.PropertySort = PropertySort.Categorized;
            propertyGridGlobalSettings.PropertySort = PropertySort.Categorized;

            try
            {
                string version = ReflectionHelper.GetAssemblyAttribute <AssemblyFileVersionAttribute>(Assembly.GetExecutingAssembly()).Version;
                string config  = ReflectionHelper.GetAssemblyAttribute <AssemblyConfigurationAttribute>(Assembly.GetExecutingAssembly()).Configuration;

                this.Text = string.Format("{0} v{1} [{2}]", this.Text, version, config);
            }
            catch
            {
                // swallow any exception
            }
        }
Beispiel #8
0
        /// <summary> InitializeAssetIcons
        /// Loads all the bmp's specified in the asset declarations
        /// in the Project.ini files.  Each bmp is added to a
        /// list allong with its key added to a corresponding list
        /// for later searching.
        /// </summary>
        static public void ClassIconInitialize()
        {
            // Check to see if our project is loaded
            if (!MOG_ControllerProject.IsProject())
            {
                return;
            }

            // Only allow population of the images array once
            if (mAssetTypes.Count > 0)
            {
                return;
            }

            // Add the active item icon first
            // Get the image
            AddIcon("Images", "BaseNode.bmp", "dot");
            AddIcon("Images", MOG_ControllerProject.GetProjectName() + ".bmp", MOG_ControllerProject.GetProjectName());
            AddIcon("Images", "MOG Relationship.bmp", "Relationships");
            AddIcon("Images", "Group.bmp", "group");
            AddIcon("Images", "FileLocked.png", "locked");

            //mAssetTypeImages.TransparentColor = Color.Magenta;
            mAssetTypeImages.ColorDepth = ColorDepth.Depth32Bit;

            // Load our file icons as small icons
            mFileTypeManager = new IconListManager(mAssetTypeImages, IconReader.IconSize.Small);
        }
Beispiel #9
0
        static public int GetFileIconIndex(string filename, MOG_Properties properties)
        {
            if (mFileTypeManager == null)
            {
                mFileTypeManager = new IconListManager(mAssetTypeImages, IconReader.IconSize.Small);
            }

            int returnInt = 0;

            if (properties == null)
            {
                // Try getting a File Icon
                if (File.Exists(filename))
                {
                    returnInt = mFileTypeManager.AddFileIcon(filename);
                }
            }

            // If we got the default index, return our Class Icon index
            if (returnInt == 0)
            {
                return(GetAssetIconIndex(filename, properties));
            }
            else
            {
                return(returnInt);
            }
        }
Beispiel #10
0
        static public int GetFileIconIndex(string filename, string overlayIcon)
        {
            if (mFileTypeManager == null)
            {
                mFileTypeManager = new IconListManager(mAssetTypeImages, IconReader.IconSize.Small);
            }

            int returnInt = 0;

            // Make sure this is a full path, if not append the tools directory to it?
            string overlayIconFilename = MOG_ControllerSystem.LocateTool(overlayIcon);

            // Try getting a File Icon
            if (File.Exists(filename) && File.Exists(overlayIconFilename))
            {
                returnInt = mFileTypeManager.AddFileOverlayIcon(filename, "MISSING", overlayIconFilename);
            }

            // If we got the default index, return our Class Icon index
            if (returnInt == 0)
            {
                return(GetAssetIconIndex(filename, null));
            }
            else
            {
                return(returnInt);
            }
        }
 private void StartLoadFiles(bool newProfile)
 {
     if (!bgWorker.IsBusy)
     {
         if (newProfile)
         {
             NewProfile();
         }
         if (_autoUnBind)
         {
             _unbinder.UnbindProgress += UnbindProgress;
         }
         _iconListManager = new IconListManager(imageList16, IconReader.IconSize.Small);
         _iconListManager.ClearLists(); // to refresh Icon from .exe
         ToolBarMenusVisibility(false);
         listViewFiles.Items.Clear();
         lblProfileCaption.Text =
             lblStatus.Text     = "Scanning...";
         if (_selectedWorkspace != null)
         {
             menuItemUnbind.Text = btnUnbind.Text = "Unbind " + _selectedWorkspace.Name;
         }
         _scannedFiles = 0;
         _validFiles   = 0;
         _isLoading    = progressBar.Visible = true;
         lblPath.Text  = _directory;
         lblName.Text  = _folder;
         bgWorker.RunWorkerAsync();
     }
 }
Beispiel #12
0
 public void AddListViewItem(List <ItemLV> list)
 {
     LV_item.Items.Clear();
     _IconListManager = new IconListManager(_SmallImageList, _LargeImageList);
     foreach (ItemLV item in list)
     {
         LV_item.Items.Add(new ListViewItem(item.str, _IconListManager.AddIcon(item.icon)));
     }
 }
        private void InitSettings()
        {
            FileHelper.CheckAssociation();
            _iconListManager = new IconListManager(imageList16, IconReader.IconSize.Small);
            _intialDirectory = RegConfig.Get <string>("InitialDirectory");

            toolStripUploader.Visible       = hideToolbarToolStripMenuItem.Checked = RegConfig.Get <bool>("Toolbar");
            statusStripUploader.Visible     = hideStatusbarToolStripMenuItem.Checked = RegConfig.Get <bool>("Statusbar");
            splitContainer2.Panel2Collapsed = !(logsToolStripMenuItem.Checked = RegConfig.Get <bool>("Logs&Details"));
            splitContainer1.Panel1Collapsed = !(profileExplorerToolStripMenuItem.Checked = RegConfig.Get <bool>("ProfileExplorer"));
        }
        /// <summary> InitializeAssetIcons
        /// Loads all the bmp's specified in the asset declarations
        /// in the Project.ini files.  Each bmp is added to a
        /// list allong with its key added to a corresponding list
        /// for later searching.
        /// </summary>
        static public void ClassIconInitialize()
        {
            // Check to see if our project is loaded
            if (!MOG_ControllerProject.IsProject())
            {
                return;
            }

            // Only allow population of the images array once
            if (mAssetTypes.Count > 0)
            {
                return;
            }

            lock (mAssetTypes)
            {
                // Add the active item icon first
                // Get the image
                if (DosUtils.FileExist(MOG_ControllerSystem.LocateTool("Images", "BaseNode.bmp")))
                {
                    // Get the group image
                    Image myImage = new Bitmap(MOG_ControllerSystem.LocateTool("Images", "BaseNode.bmp"));

                    // Add the image and the type to the arrayLists
                    mAssetTypeImages.Images.Add(myImage);
                    mAssetTypes.Add("dot");
                }

                if (DosUtils.FileExist(MOG_ControllerSystem.LocateTool("Images", "Group.bmp")))
                {
                    // Get the group image
                    Image myImage = new Bitmap(MOG_ControllerSystem.LocateTool("Images", "Group.bmp"));

                    // Add the image and the type to the arrayLists
                    mAssetTypeImages.Images.Add(myImage);
                    mAssetTypes.Add("group");
                }
            }

            mAssetTypeImages.TransparentColor = Color.Magenta;

            // Initialize state icons
            FileInfo [] stateImages = DosUtils.FileGetList(MOG_ControllerSystem.LocateTool("Images\\States", ""), "*.bmp");

            foreach (FileInfo stateImage in stateImages)
            {
                LoadRawIcon(mStateTypeImages, mStateTypes, stateImage.FullName, Path.GetFileNameWithoutExtension(stateImage.Name));
            }

            // Load our file icons as small icons
            mFileTypeManager = new IconListManager(mAssetTypeImages, IconReader.IconSize.Small);
        }
        private void InitIconListManager()
        {
            m_smallImageList.ColorDepth = ColorDepth.Depth32Bit;
            m_largeImageList.ColorDepth = ColorDepth.Depth32Bit;

            m_smallImageList.ImageSize = new Size(16, 16);
            m_largeImageList.ImageSize = new Size(32, 32);

            m_iconListManager = new IconListManager(m_smallImageList, m_largeImageList);

            listViewFiles.SmallImageList = m_smallImageList;
            listViewFiles.LargeImageList = m_largeImageList;
        }
Beispiel #16
0
        private void InitializeOptions()
        {
            _iconListManager = new IconListManager(imageList16, IconReader.IconSize.Small);

            _cfgs                  = new Configs(BindingFile.DatabaseFile);
            _autoSelectArchi       = _cfgs.Get <bool>("AutoSelectArchitecture");
            _setPassword           = _cfgs.Get <bool>("SetPassword");
            _isShowEnterCmd        = _cfgs.Get <bool>("ShowEnterCmd");
            _isKillProcesses       = _cfgs.Get <bool>("KillProcess");
            _operationalStatusOnly = _cfgs.Get <bool>("OperationalStatus");
            menuToolbar.Checked    = _cfgs.Get <bool>("Toolbar");
            menuStatusbar.Checked  = _cfgs.Get <bool>("Statusbar");
            listViewBind.GridLines = menuGridlines.Checked = _cfgs.Get <bool>("Gridlines");

            int pingCount = _cfgs.Get <int>("PingCount");

            if (pingCount >= 4 && pingCount <= 100)
            {
                _pingCount = pingCount;
            }
            _responseDelay = _cfgs.Get <int>("ResponseDelay");

            Color cmdcolor = _cfgs.Get <Color>("CommandColor");

            if (cmdcolor != null)
            {
                _cmdColor = cmdcolor;
            }
            Font cmdFont = _cfgs.Get <Font>("CommandFont");

            if (cmdFont != null)
            {
                _cmdFont = cmdFont;
            }

            listBoxLog.Font    = _cmdFont;
            menuXPLook.Checked = _cfgs.Get <bool>("XPLook");
            if (menuXPLook.Checked)
            {
                menuStripBind.RenderMode = ToolStripRenderMode.System;
                toolStripBind.RenderMode = ToolStripRenderMode.System;
            }
            else
            {
                menuStripBind.RenderMode = ToolStripRenderMode.Professional;
                toolStripBind.RenderMode = ToolStripRenderMode.Professional;
            }
            _password = _cfgs.Get <string>("MasterPassword");
            _password = SimpleEncryption.Decrypt(_password);
        }
        public ProjectTreeNode(IProjectItem projectItem, IconListManager iconListManager)
        {
            ProjectItem      = projectItem;
            _iconListManager = iconListManager;

            IsFolder     = projectItem.IsFolder;
            FolderPath   = IsFolder ? projectItem.FileSystemPath : projectItem.ParentFolder;
            ParentFolder = projectItem.ParentFolder;
            IsProject    = (projectItem as CrcsProject) != null;
            IsSolution   = (projectItem as CrcsSolution) != null;
            Text         = IsProject || IsSolution?Path.GetFileNameWithoutExtension(projectItem.Name) ?? "" : projectItem.Name;

            projectItem.TreeNode = this;
            RefreshIcon();
        }
        public FsEnumerator()
        {
            InitializeComponent();

            smallImageList.ColorDepth = ColorDepth.Depth32Bit;
            largeImageList.ColorDepth = ColorDepth.Depth32Bit;

            smallImageList.ImageSize = new System.Drawing.Size(16, 16);
            largeImageList.ImageSize = new System.Drawing.Size(32, 32);

            smallImageList.Images.Add(Fs.FileIcon.FolderIcon.GetFolderIcon(
                                          Fs.FileIcon.FolderIcon.IconSize.Small,
                                          Fs.FileIcon.FolderIcon.FolderType.Closed));

            iconListManager = new IconListManager(smallImageList, largeImageList);
        }
Beispiel #19
0
        public HitomiExplorer()
        {
            InitializeComponent();

            smallImageList.ColorDepth = ColorDepth.Depth32Bit;
            largeImageList.ColorDepth = ColorDepth.Depth32Bit;

            smallImageList.ImageSize = new System.Drawing.Size(16, 16);
            largeImageList.ImageSize = new System.Drawing.Size(32, 32);

            smallImageList.Images.Add(FolderIcon.GetFolderIcon(
                                          FolderIcon.IconSize.Small,
                                          FolderIcon.FolderType.Closed));

            iconListManager = new IconListManager(smallImageList, largeImageList);

            PathTree.ImageList = smallImageList;
        }
Beispiel #20
0
        public MogControl_GameDataDestinationTreeView()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            // Set our NoLocalDataLabel.Text
            this.NoLocalDataLabel.Text = NoWorkspaceText;

            // Load the folder icon
            mWindowsExplorerIconList            = new ImageList();
            mWindowsExplorerIconList.ColorDepth = ColorDepth.Depth32Bit;
            mWindowsExplorerIconList.ImageSize  = new System.Drawing.Size(16, 16);
            mWindowsExplorerIconList.Images.Add(this.DefaultImageList.Images[0]);

            mWindowsExplorerIcons = new IconListManager(mWindowsExplorerIconList, Etier.IconHelper.IconReader.IconSize.Small);

            GameDataTreeView.ImageList = mWindowsExplorerIconList;
        }
Beispiel #21
0
 public AddInSettingsForm()
 {
     this.InitializeComponent();
     Logger.WriteEvent             += new EventHandler <Logger.WriteEventArgs>(this.Logger_WriteEvent);
     this._iconListManager          = new IconListManager(this.imageList, IconSize.Small);
     this._globalSettings           = new GlobalIncrementSettings();
     this.propertyGrid.PropertySort = PropertySort.Categorized;
     this.propertyGridGlobalSettings.PropertySort = PropertySort.Categorized;
     try
     {
         string version       = ReflectionHelper.GetAssemblyAttribute <AssemblyFileVersionAttribute>(Assembly.GetExecutingAssembly()).Version;
         string configuration = ReflectionHelper.GetAssemblyAttribute <AssemblyConfigurationAttribute>(Assembly.GetExecutingAssembly()).Configuration;
         this.Text = string.Format("{0} v{1} [{2}]", this.Text, version, configuration);
     }
     catch
     {
     }
 }
        static public void ExplorerIconInitialize()
        {
            // Only allow population of the images array once
            if (mAssetTypes.Count > 0)
            {
                return;
            }

            // Add the active item icon first
            // Get the image
            AddIcon("Images", "BaseNode.bmp", "dot");
            AddIcon("Images", "Group.bmp", "group");

            //mAssetTypeImages.TransparentColor = Color.Magenta;
            mAssetTypeImages.ColorDepth = ColorDepth.Depth32Bit;

            // Load our file icons as small icons
            mFileTypeManager = new IconListManager(mAssetTypeImages, IconReader.IconSize.Small);
        }
        /// <summary> InitializeAssetIcons
        /// Loads all the bmp's specified in the asset declarations
        /// in the Project.ini files.  Each bmp is added to a
        /// list allong with its key added to a corresponding list
        /// for later searching.
        /// </summary>
        static public void ClassIconInitialize()
        {
            // Check to see if our project is loaded
            if (!MOG_ControllerProject.IsProject())
            {
                return;
            }

            // Only allow population of the images array once
            if (mAssetTypes.Count > 0)
            {
                return;
            }

            // Add the active item icon first
            // Get the image
            AddIcon("Images", "BaseNode.bmp", "dot");
            AddIcon("Images", "Group.bmp", "group");
            AddIcon("Images", "FileLocked.png", "locked");

            //mAssetTypeImages.TransparentColor = Color.Magenta;
            mAssetTypeImages.ColorDepth = ColorDepth.Depth32Bit;

            // Initialize state icons
            FileInfo [] stateImages = DosUtils.FileGetList(MOG_ControllerSystem.LocateTool("Images\\States", ""), "*.bmp");

            foreach (FileInfo stateImage in stateImages)
            {
                LoadRawIcon(mStateTypeImages, mStateTypes, stateImage.FullName.ToLower(), Path.GetFileNameWithoutExtension(stateImage.Name).ToLower());
            }

            // Initialize state icons
            stateImages = DosUtils.FileGetList(MOG_ControllerSystem.LocateTool("Images\\States", ""), "*.png");

            foreach (FileInfo stateImage in stateImages)
            {
                LoadRawIcon(mStateTypeImages, mStateTypes, stateImage.FullName.ToLower(), Path.GetFileNameWithoutExtension(stateImage.Name).ToLower());
            }

            // Load our file icons as small icons
            mFileTypeManager = new IconListManager(mAssetTypeImages, IconReader.IconSize.Small);
        }
        static public void ExplorerIconInitialize()
        {
            // Only allow population of the images array once
            if (mAssetTypes.Count > 0)
            {
                return;
            }

            lock (mAssetTypes)
            {
                // Add the active item icon first
                // Get the image
                if (DosUtils.FileExist(MOG_ControllerSystem.LocateTool("Images", "BaseNode.bmp")))
                {
                    // Get the group image
                    Image myImage = new Bitmap(MOG_ControllerSystem.LocateTool("Images", "BaseNode.bmp"));

                    // Add the image and the type to the arrayLists
                    mAssetTypeImages.Images.Add(myImage);
                    mAssetTypes.Add("dot");
                }

                if (DosUtils.FileExist(MOG_ControllerSystem.LocateTool("Images", "Group.bmp")))
                {
                    // Get the group image
                    Image myImage = new Bitmap(MOG_ControllerSystem.LocateTool("Images", "Group.bmp"));

                    // Add the image and the type to the arrayLists
                    mAssetTypeImages.Images.Add(myImage);
                    mAssetTypes.Add("group");
                }
            }

            mAssetTypeImages.TransparentColor = Color.Magenta;

            // Load our file icons as small icons
            mFileTypeManager = new IconListManager(mAssetTypeImages, IconReader.IconSize.Small);
        }
Beispiel #25
0
        public PackView()
        {
            InitializeComponent();
            this.MinimizeBox           = Program.SHOWMINIMIZEBUTTON;
            _smallImageList.ColorDepth = ColorDepth.Depth32Bit;
            _largeImageList.ColorDepth = ColorDepth.Depth32Bit;

            _smallImageList.ImageSize = new System.Drawing.Size(16, 16);
            _largeImageList.ImageSize = new System.Drawing.Size(32, 32);

            _iconListManager        = new IconListManager(_smallImageList, _largeImageList);
            FileList.SmallImageList = _smallImageList;
            FileList.LargeImageList = _largeImageList;
            pictureBox1.AllowDrop   = true;
            Instance = this;
            JToolTip tool = new JToolTip();

            tool.SetToolTip(pictureBox1, "Open pck.");
            tool.SetToolTip(SavePackBox, "Save Changes.");
            tool.SetToolTip(RewritePackBox, "Rewrite PCK From Disk or into memory.");
            tool.SetToolTip(pictureBox2, "Unpack pck.");
            tool.SetToolTip(jPictureBox1, "Create new pck from files");
        }
Beispiel #26
0
 public ctrShares()
 {
     InitializeComponent();
     ico = new IconListManager(imgSmallIco, imgBigIco);
     GetShares("LocalHost");
 }
Beispiel #27
0
 public SolutionExplorer()
 {
     InitializeComponent();
     _iconManager = new IconListManager(imageListFiles, IconReader.IconSize.Large);
 }