Exemplo n.º 1
0
        internal static DocForm CreateForm()
        {
            var form = new DocForm();

            form.Text = "New Document " + ++_counter;
            SDIApplication.SdiInstance.ApplicationContext.MainForm = form;//aici am setat ca instanta aia singleton sa fie main formul aplicatiei
            form.Show();

            return(form);//returnam referinta la DocForm
        }
 protected override void OnStartupNextInstance(StartupNextInstanceEventArgs eventArgs)
 {
     DocForm.CreateForm();
 }
 //trebuie sa faci override la metodele astea pentru SDI
 protected override void OnCreateMainForm()
 {
     DocForm.CreateForm();
 }