コード例 #1
0
ファイル: Main.cs プロジェクト: markfenton/bookreader
 public static void Main(string[] args)
 {
     Application.Init ();
     MainWindow win = new MainWindow ();
     win.Show ();
     Application.Run ();
 }
コード例 #2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.Main = ((BookReader.MainWindow)(target));
         return;
     }
     this._contentLoaded = true;
 }
コード例 #3
0
ファイル: App.xaml.cs プロジェクト: jazzlife/pdf-ebook-reader
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            MainWindow window = new MainWindow();

            // Create the ViewModel
            var viewModel = new MainWindowViewModel();
            window.DataContext = viewModel;

            // Save the options when window is closed
            window.Closed += ((src,ea) => viewModel.Close());

            window.Show();
        }