示例#1
0
        public SharingView(OpCore core, ulong user)
        {
            InitializeComponent();

            Core   = core;
            UserID = user;

            Sharing = core.GetService(ServiceIDs.Share) as ShareService;

            GuiUtils.SetupToolstrip(TopStrip, new OpusColorTable());

            SharedFiles.SmallImageList = FileIcons;

            StatusLabel.Text = "";

            Local = (UserID == Core.UserID);

            if (Local)
            {
                SharedFiles.Columns.Add("Public", 50, HorizontalAlignment.Left, ColumnScaleStyle.Slide);
                StatusLabel.Visible = false;
            }
            else
            {
                DownloadButton.Visible = false;
                ShareButton.Visible    = false;
            }
        }
示例#2
0
        public SendFileForm(CoreUI ui, ulong user)
        {
            InitializeComponent();

            UI   = ui;
            Core = ui.Core;
            User = user;

            Sharing = Core.GetService(ServiceIDs.Share) as ShareService;

            if (user == 0)
            {
                Text = "Send File to Room";
            }
            else
            {
                Text = "Send File to " + Core.GetName(user);
            }

            Sharing.Local.Files.LockReading(() =>
            {
                foreach (SharedFile share in Sharing.Local.Files)
                {
                    if (share.Hash != null) // processed
                    {
                        RecentCombo.Items.Add(share);
                    }
                }
            });

            if (RecentCombo.Items.Count > 0)
            {
                RecentCombo.SelectedIndex = 0;
            }
        }
示例#3
0
        public AcceptFileForm(OpCore core, DhtClient client, SharedFile share)
        {
            InitializeComponent();

            Core = core;
            Sharing = core.GetService(ServiceIDs.Share) as ShareService;

            TheFile = share;
            Source = client;

            DescriptionLabel.Text = core.GetName(client.UserID) + " wants to send you a file";

            NameLabel.Text = TheFile.Name;

            SizeLabel.Text = Utilities.ByteSizetoDecString(TheFile.Size);
        }
示例#4
0
        public AcceptFileForm(OpCore core, DhtClient client, SharedFile share)
        {
            InitializeComponent();

            Core    = core;
            Sharing = core.GetService(ServiceIDs.Share) as ShareService;

            TheFile = share;
            Source  = client;

            DescriptionLabel.Text = core.GetName(client.UserID) + " wants to send you a file";

            NameLabel.Text = TheFile.Name;

            SizeLabel.Text = Utilities.ByteSizetoDecString(TheFile.Size);
        }
示例#5
0
 public ShareUI(CoreUI ui, OpService service)
 {
     UI = ui;
     Core = ui.Core;
     Share = service as ShareService;
 }
示例#6
0
文件: ShareUI.cs 项目: nandub/DeOps
 public ShareUI(CoreUI ui, OpService service)
 {
     UI    = ui;
     Core  = ui.Core;
     Share = service as ShareService;
 }