public IMForm(CoreUI ui) : base(ui.Core) { InitializeComponent(); UI = ui; Core = ui.Core; GuiUtils.SetupToolstrip(TopStrip, new OpusColorTable()); GuiUtils.FixMonoDropDownOpening(OptionsButton, OptionsButton_DropDownOpening); UI.ShowView += ShowExternal; Text = "IM - " + Core.GetName(Core.UserID); BuddyList.Init(UI, Core.Buddies, SelectionInfo, true); IM = UI.GetService(ServiceIDs.IM) as IMUI; SelectionInfo.Init(UI); SelectionInfo.ShowNetwork(); if (GuiUtils.IsRunningOnMono()) { AddButton.Text = "Add"; SharedButton.Text = "Files"; } Rectangle screen = Screen.GetWorkingArea(this); Location = new Point(screen.Width - Width, screen.Height / 2 - Height / 2); ShowExternal(new Info.InfoView(Core, false, true)); }
public RemoveLinks(OpCore core, List<ulong> ids) : base(core) { InitializeComponent(); PersonIDs = ids; foreach (ulong id in PersonIDs) PeopleList.Items.Add(new RemoveItem(id, core.GetName(id))); }
public IdentityForm(OpCore core, ulong user) { InitializeComponent(); string name = core.GetName(user); HeaderLabel.Text = HeaderLabel.Text.Replace("<name>", name); HelpLabel.Text = HelpLabel.Text.Replace("<name>", name); LinkBox.Text = core.GetIdentity(user); }
public InviteForm(CoreUI ui, ChatService chat, ulong user, ChatRoom room) { InitializeComponent(); UI = ui; Core = ui.Core; Chat = chat; Room = room; IntroLabel.Text = IntroLabel.Text.Replace("<name>", Core.GetName(user)); NameLabel.Text = room.Title; TypeLabel.Text = room.Kind.ToString(); }
public ComposeMail(CoreUI ui, MailService mail, ulong id) { InitializeComponent(); UI = ui; Mail = mail; Core = mail.Core; DefaultID = id; if (id != 0) { ToTextBox.Text = Core.GetName(id); ToIDs.Add(id); } }
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 IgnoreItem(OpCore core, ulong id) { Name = core.GetName(id); ID = id; }
public DiffForm(InfoPanel info, ulong whoID, string what, StorageFile file, bool history) { InitializeComponent(); Core = info.ParentView.Core; Info = info; Target = file; TargetID = whoID; TargetHistory = history; Text = Target.Name + " Differences"; // set what txt // my/ben's Changes // my/ben's Integrated Changes // my/ben's History from <date> string who = (whoID == Core.UserID) ? "My" : (Core.GetName(whoID) + "'s"); WhatLabel.Text = who + " " + what; // local if (!info.CurrentFile.Temp) { if (Utilities.MemCompare(Target.InternalHash, ((StorageFile)Info.CurrentFile.Details).InternalHash)) LocalNote.Text = "Identical"; } else CurrentRadio.Enabled = false; // changes foreach (ChangeRow change in Info.SortChanges(Info.CurrentChanges)) ChangesCombo.Items.Add(new ComboFileItem(this, change.ID, (StorageFile) change.Item)); if (ChangesCombo.Items.Count > 0) ChangesCombo.SelectedIndex = 0; else ChangesRadio.Enabled = false; // integrated foreach (ChangeRow integrated in Info.SortChanges(Info.CurrentIntegrated)) IntegratedCombo.Items.Add(new ComboFileItem(this, integrated.ID, (StorageFile)integrated.Item)); if (IntegratedCombo.Items.Count > 0) IntegratedCombo.SelectedIndex = 0; else IntegratedRadio.Enabled = false; // history info.CurrentFile.Archived.LockReading(delegate() { foreach (StorageFile item in info.CurrentFile.Archived) HistoryCombo.Items.Add(new ComboFileItem(this, 0, item)); }); if (HistoryCombo.Items.Count > 0) HistoryCombo.SelectedIndex = 0; else HistoryRadio.Enabled = false; // using UsingCombo.Items.Add("WinMerge"); UsingCombo.Items.Add("Open Seperately"); UsingCombo.Items.Add("Another Tool..."); UsingCombo.SelectedIndex = 0; }