Ejemplo n.º 1
0
        public FileExplorerForm(IServerUIHandler UIHandler, IClient c)
        {
            Client = c;
            UIHost = UIHandler;
            InitializeComponent();

            Image uiFolder = UIHandler.GetImage("folder.png");
            Image uiFolder2 = UIHandler.GetImage("folder2.png");
            Image uiFile = UIHandler.GetImage("file.png");
            Image uiDrive = UIHandler.GetImage("drive.png");
            Image uiError = UIHandler.GetImage("error.png");

            if(uiFolder != null)
                images.Images.Add("Folder", uiFolder);
            if (uiFolder2 != null)
                images.Images.Add("Folder2", uiFolder2);
            if (uiFile!=null)
                images.Images.Add("File", uiFile);
            if(uiDrive!=null)
                images.Images.Add("Drive", uiDrive);
            if(uiError != null)
                images.Images.Add("Error", uiError);

            lvFileView.SmallImageList = images;
            lvFileBucket.SmallImageList = images;
            c.Send((byte)NetworkCommand.FileManager, (byte)FileManagerCommand.Update, string.Empty);
        }
Ejemplo n.º 2
0
        public TaskManagerForm(IClient c, IServerUIHandler ui)
        {
            InitializeComponent();
            Client = c;
            Image standardProc = ui.GetImage("service.png");
            Image thisProc     = ui.GetImage("bug.png");
            Image appImage     = ui.GetImage("application.png");


            if (standardProc != null)
            {
                images.Images.Add("background", standardProc);
                if (thisProc != null)
                {
                    images.Images.Add("me", thisProc);
                }
                else
                {
                    images.Images.Add("me", standardProc);
                }

                if (appImage != null)
                {
                    images.Images.Add("app", appImage);
                }
                else
                {
                    images.Images.Add("app", standardProc);
                }

                lvProcessList.SmallImageList = images;
            }
        }
Ejemplo n.º 3
0
        public void AddFile(string name, string size)
        {
            ListViewItem i = new ListViewItem(name);

            i.Tag      = false;
            i.ImageKey = "File";
            string fullExt   = Path.GetExtension(name).ToLower();
            string extention = fullExt.Substring(1, fullExt.Length - 1);

            if (!images.Images.ContainsKey(extention))
            {
                Image extImage = UIHost.GetImage(string.Format("FileExtention/file_extension_{0}.png", extention));
                if (extImage != null)
                {
                    images.Images.Add(extention, extImage);
                    i.ImageKey = extention;
                }
            }
            else
            {
                i.ImageKey = extention;
            }
            i.SubItems.Add(size);
            AddItem(i);
        }
Ejemplo n.º 4
0
 public static void Start(IClient c)
 {
     if (!FormHandler.ContainsKey(c.ID))
     {
         formConnections form = new formConnections(c, UIHost.GetImage("ethernet_port.png"));
         form.FormClosed += Form_FormClosed;
         FormHandler.Add(c.ID, form);
         form.Show();
     }
 }
Ejemplo n.º 5
0
        public FileExplorerForm(IServerUIHandler UIHandler, IClient c)
        {
            Client = c;
            UIHost = UIHandler;
            InitializeComponent();

            Image uiFolder  = UIHandler.GetImage("folder.png");
            Image uiFolder2 = UIHandler.GetImage("folder2.png");
            Image uiFile    = UIHandler.GetImage("file.png");
            Image uiDrive   = UIHandler.GetImage("drive.png");
            Image uiError   = UIHandler.GetImage("error.png");

            if (uiFolder != null)
            {
                images.Images.Add("Folder", uiFolder);
            }
            if (uiFolder2 != null)
            {
                images.Images.Add("Folder2", uiFolder2);
            }
            if (uiFile != null)
            {
                images.Images.Add("File", uiFile);
            }
            if (uiDrive != null)
            {
                images.Images.Add("Drive", uiDrive);
            }
            if (uiError != null)
            {
                images.Images.Add("Error", uiError);
            }

            lvFileView.SmallImageList   = images;
            lvFileBucket.SmallImageList = images;
            c.Send((byte)NetworkCommand.FileManager, (byte)FileManagerCommand.Update, string.Empty);
        }
Ejemplo n.º 6
0
        public TaskManagerForm(IClient c, IServerUIHandler ui)
        {
            InitializeComponent();
            Client = c;
            Image standardProc = ui.GetImage("service.png");
            Image thisProc = ui.GetImage("bug.png");
            Image appImage = ui.GetImage("application.png");

            if(standardProc != null)
            {
                images.Images.Add("background", standardProc);
                if(thisProc != null)
                    images.Images.Add("me", thisProc);
                else
                    images.Images.Add("me", standardProc);

                if(appImage != null)
                    images.Images.Add("app", appImage);
                else
                    images.Images.Add("app", standardProc);

                lvProcessList.SmallImageList = images;
            }
        }