Пример #1
0
        private SongPartForm CreateNewDocument(string text)
        {
            SongPartForm dummyDoc = new SongPartForm(null);

            dummyDoc.Text = text;
            return(dummyDoc);
        }
Пример #2
0
        private SongPartForm CreateNewDocument()
        {
            SongPartForm dummyDoc = new SongPartForm(null);

            int    count = 1;
            string text  = $"Document{count}";

            while (FindDocument(text) != null)
            {
                count++;
                text = $"Document{count}";
            }

            dummyDoc.Text = text;
            return(dummyDoc);
        }
Пример #3
0
        private void ProjectWindows_SelectedPartChanged(object sender, SongPartChangedEventArgs e)
        {
            var docTitle = $"{e.SongCollectionName} - {e.SongTitle} - {e.PartTitle}";
            var doc      = FindDocument(docTitle);

            if (doc != null)
            {
                // activate window
                doc.DockHandler.Show();
            }
            else
            {
                SongPartForm partForm = new SongPartForm(e.Part);
                partForm.Text = docTitle;
                partForm.Show(dockpanel);
            }
        }