标签:
App.xml.cs
public partial class App : Application { public void App_Startup(object sender, StartupEventArgs e) { MainWindow win = new MainWindow(); win.Show(); if(e.Args.Length > 0) { string file = e.Args[0]; win.TextBox1.Text = file; } } }
App.xml
<Application x:Class="Test.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Startup="App_Startup"> <Application.Resources> </Application.Resources> </Application>
标签:
原文地址:http://www.cnblogs.com/jane850113/p/5731675.html