コード例 #1
0
    private void pictureBox1_Click(object sender, EventArgs e)
    {
      if (m_dt == null || m_controlType == null)
      {
        MessageBox.Show("You need to call 'Create' on the ShowChartSeparateControl with argument so that it knows how to instantiate the chart.");
        return;
      }

      Control c;

      if ((c = Activator.CreateInstance(m_controlType) as Control) == null)
        return;

      ((IChartHolder)c).Chart.DataSource = m_dt;

      ShowForm sf = new ShowForm();

      sf.FormBorderStyle = FormBorderStyle.Sizable;
      sf.Text = c.Text;
      sf.ProcessLookFeel = false;
      sf.Create(c);

      sf.Show();
      sf.BringToFront();

      //.ShowForm.Show(c, FormBorderStyle.Sizable, null, m_title);
    }
コード例 #2
0
ファイル: ShowForm.cs プロジェクト: heimanhon/researchwork
    public static ShowForm Show(Control c_,FormBorderStyle borderStyle_,Icon icon_, string title_)
    {
      ShowForm sf = new ShowForm();

      sf.FormBorderStyle = borderStyle_;
      sf.Text = title_;
      sf.Create(c_);
      sf.Icon = icon_;
      if (icon_ == null && c_ is IFormIconProvider)
        sf.Icon = ((IFormIconProvider)c_).FormIcon;
      else
        sf.Icon = DefaultIcon;

      sf.Show();
      sf.BringToFront();

      return sf;
    }