コード例 #1
0
        private void MenuItem_OpenExcel_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                DataView dataView = excelService.LoadrExcel();

                if (dataView == null)
                {
                    return;
                }

                Views.SettingView windowSettinView = new Views.SettingView(dataView);
                if (windowSettinView.ShowDialog() == true)
                {
                    CanvasForImage.Children.Clear();
                    DataGridMain.ItemsSource = null;
                    DataGridMain.ItemsSource = dataView;
                }

                IssEnabledAllElementsControl();
            }
            catch (Exception)
            {
                MessageBox.Show("Ошибка при загрузке!");
            }
        }
コード例 #2
0
 private void NotificationMessageReceived(NotificationMessage msg)
 {
     if (msg.Notification == "View2")
     {
         var view2 = new Views.SettingView();
         view2.Owner = this;
         view2.WindowStartupLocation = WindowStartupLocation.CenterOwner;
         view2.ShowDialog();
     }
     if (msg.Notification == "IOTable")
     {
         var IOTable = new Views.WindowIOTable();
         IOTable.ShowDialog();
     }
 }