示例#1
0
 private void pluginitem_Click(object sender, EventArgs e)
 {
     this.FoolMenu();
     if (this.SelectedChatParticipant != null)
     {
         MenuItem item = sender as MenuItem;
         IFormPlugin plugin = (item.Tag as PluginInfo).CreatePlugin();
         UserControl control = plugin as UserControl;
         if (control != null)
         {
             DlgBase base2 = new DlgBase();
             base2.Show();
             base2.Width = control.Width + 40;
             base2.Height = control.Height + 100;
             base2.Text = plugin.FormTitle;
             control.Top = 50;
             control.Left = 20;
             base2.Controls.Add(control);
             control.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
             control.Width = base2.Width - 40;
             control.Height = base2.Height - 100;
             plugin.SetUserInformation(this.SelectedChatParticipant.Name, this.SelectedChatParticipant.ID);
         }
     }
 }
示例#2
0
 private void MenuPluginItem(object sender, EventArgs e)
 {
     ToolStripMenuItem item = sender as ToolStripMenuItem;
     IFormPlugin plugin = (item.Tag as PluginInfo).CreatePlugin();
     UserControl control = plugin as UserControl;
     if (control != null)
     {
         DlgBase base2 = new DlgBase();
         base2.Show();
         base2.Width = control.Width + 40;
         base2.Height = control.Height + 100;
         base2.Text = plugin.FormTitle;
         control.Top = 50;
         control.Left = 20;
         base2.Controls.Add(control);
         control.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
         control.Width = base2.Width - 40;
         control.Height = base2.Height - 100;
     }
 }