Exemplo n.º 1
0
Arquivo: App.cs Projeto: Szaki/Signals
        public void NewDocument()
        {
            NewDocForm form = new NewDocForm();

            if (form.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            SignalDocument doc = new SignalDocument(form.DocName);

            documents.Add(doc);
            createView(doc, true);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Létrehoz egy új dokumentumot a hozzá tartozó nézettel.
        /// </summary>
        public void NewDocument()
        {
            // Bekérdezzük az új font típus (dokumentum) nevét a felhasználótól egy modális dialógs ablakban.
            NewDocForm form = new NewDocForm();

            if (form.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            // Új dokumentum objektum létrehozása és felvétele a dokumentum listába.
            // TODO: ne a Document-et példányosítsuk, hanem a leszármazottunkat
            SignalDocument doc = new SignalDocument(form.DocName);

            documents.Add(doc);
            createView(doc, true);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Creates a new document with a corresponding view
        /// </summary>
        public void NewDocument()
        {
            // Read the name of the document in a modal dialog
            NewDocForm form = new NewDocForm();

            if (form.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            // Create a new document and add it to the list of documents
            // TODO: instantiate the concrete document, instead
            SignalDocument doc = new SignalDocument(form.DocName); // changed it from Document to SignalDocument

            documents.Add(doc);                                    // add it to the list of documents
            createView(doc, true);                                 // make the view
        }