public GherkinKeywords(GherkinKeywordsViewModel viewModel) { InitializeComponent(); m_ViewModel = viewModel; this.Owner = Application.Current.MainWindow; this.DataContext = viewModel; }
public MainWindow(IAppSettings appSettings, GherkinViewModel viewModel, GherkinKeywordsViewModel gherkinKeywordsViewModel, TableEditViewModel tableEditViewModel) { InitializeComponent(); this.DataContext = viewModel; this.Language = XmlLanguage.GetLanguage(Thread.CurrentThread.CurrentCulture.Name); // コンバータのCultureInfo型のプロパティを使ってローカライズする時は、 // プログラムの言語設定をしておく必要があります。 m_AppSettings = appSettings; m_ViewModel = viewModel; m_GherkinKeywordsViewModel = gherkinKeywordsViewModel; m_ViewModel.EditorTabControl = this.editorTabControl; m_ViewModel.SetMessageTextEditor(this.messageTextEditor); this.tableEditorGrid.SetTableEditViewModel(tableEditViewModel); InitWindowSize(); this.Loaded += OnLoaded; this.Deactivated += OnWindowDeactivated; }