Esempio n. 1
0
 private void OpenFile(string filePath)
 {
     string fileName = System.IO.Path.GetFileName(filePath);
     var newTab = new TabItem();
     newTab.Header = fileName;
     int newTabIndex = tabControl.Items.Add(newTab);
     var logControl = new LogControl2();
     newTab.Content = logControl;
     tabControl.SelectedIndex = newTabIndex;
     logControl.LoadData(filePath);
 }
Esempio n. 2
0
        private void OpenFile(string filePath)
        {
            string fileName = System.IO.Path.GetFileName(filePath);
            var    newTab   = new TabItem();

            newTab.Header = fileName;
            int newTabIndex = tabControl.Items.Add(newTab);
            var logControl  = new LogControl2();

            newTab.Content           = logControl;
            tabControl.SelectedIndex = newTabIndex;
            logControl.LoadData(filePath);
        }