Esempio n. 1
0
        public void ShowDataToLV(ExplorerNode parent)
        {
            lv_data.Clear();
            foreach (ExplorerNode item in parent.Child)
            {
                LV_data dt = new LV_data();
                dt.Node = item;

                if (item.Info.DateMod != time_default)
                {
                    dt.d_mod = item.Info.DateMod.ToString(timeformat);
                }
                if (item.Info.Size >= 0)
                {
                    dt.SizeString = UnitConventer.ConvertSize(item.Info.Size, 2, UnitConventer.unit_size);

                    string extension = item.GetExtension();
                    dt.ImgSource = Setting_UI.GetImage(
                        item.GetRoot.NodeType.Type == CloudType.LocalDisk ?
                        IconReader.GetFileIcon(item.GetFullPathString(), IconReader.IconSize.Small, false) :    //some large file make slow.
                        IconReader.GetFileIcon("." + extension, IconReader.IconSize.Small, false)
                        ).Source;
                }
                else
                {
                    dt.SizeString = "-1";
                    dt.ImgSource  = Setting_UI.GetImage(IconReader.GetFolderIcon(IconReader.IconSize.Small, IconReader.FolderType.Closed)).Source;
                }
                lv_data.Add(dt);
            }
        }
Esempio n. 2
0
        private void LV_items_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            LV_data data = LV_items.SelectedItem as LV_data;

            if (data == null)
            {
                return;
            }
            if (data.Node.Info.Size < 1)//folder
            {
                managerexplorernodes.Next(data.Node);
                ExplorerCurrentNode();
            }
            else
            {
                if (data.Node.GetRoot.NodeType.Type == CloudType.LocalDisk || string.IsNullOrEmpty(data.Node.GetRoot.NodeType.Email))
                {
                    System.Diagnostics.Process.Start(data.Node.GetFullPathString());
                }
                else
                {
                    //
                }
            }
        }
Esempio n. 3
0
        void Rename()
        {
            LV_data    data   = LV_items.SelectedItem as LV_data;
            RenameItem rename = new RenameItem(data.Node);

            rename.Show();
        }
        void Rename()
        {
            LV_data    data   = LV_items.SelectedItem as LV_data;
            RenameItem rename = new RenameItem(data.Node);

            rename.Owner = main_window;
            rename.ShowDialog();
        }
Esempio n. 5
0
        void OpenItemLV()
        {
            if (LV_items.SelectedItems.Count != 1)
            {
                return;
            }
            LV_data data = LV_items.SelectedItem as LV_data;

            if (data != null)
            {
                managerexplorernodes.Next(data.Node);
                ExplorerCurrentNode();
            }
        }