Exemplo n.º 1
0
        public AddUsersDialog(CoreUI ui, uint project)
            : base(ui.Core)
        {
            InitializeComponent();

            UI        = ui;
            Core      = ui.Core;
            ProjectID = project;

            // load up trust
            if (Core.Trust != null)
            {
                LoadTrustTree();
            }

            // load up buddies - last option
            BuddyList.FirstLineBlank = false;
            BuddyList.Init(ui, Core.Buddies, null, false);
            ProjectCombo.Items.Add(new AddProjectItem("Buddies"));


            if (Core.Trust != null)
            {
                foreach (AddProjectItem item in ProjectCombo.Items)
                {
                    if (item.ID == ProjectID)
                    {
                        ProjectCombo.SelectedItem = item;
                        break; // break before buddies is selected
                    }
                }
            }
            else
            {
                ProjectCombo.SelectedIndex = 0; // buddy list
            }
        }
Exemplo n.º 2
0
        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));
        }