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; } }
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; } }
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); }
public ShareUI(CoreUI ui, OpService service) { UI = ui; Core = ui.Core; Share = service as ShareService; }