예제 #1
0
        public Form1()
        {
            InitializeComponent();
            FormClosed += new FormClosedEventHandler((sender, e) => Application.Exit());
#if DEBUG
            ShiminyFactory.AddAssemblySearchPath(@"..\..\..\..\Thing1\bin\x64\Debug");
            ShiminyFactory.AddAssemblySearchPath(@"..\..\..\..\Thing2\bin\x64\Debug");
#else
            ShiminyFactory.AddAssemblySearchPath(@"..\..\..\..\Thing1\bin\x64\Release");
            ShiminyFactory.AddAssemblySearchPath(@"..\..\..\..\Thing2\bin\x64\Release");
#endif
            _assy  = ShiminyFactory.MakeAssemblyShim("Thing1");
            _assy2 = ShiminyFactory.MakeAssemblyShim("Thing2");
        }
예제 #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

#if DEBUG
            ShiminyFactory.AddAssemblySearchPath(@"..\..\..\..\Forms\bin\x64\Debug");
#else
            ShiminyFactory.AddAssemblySearchPath(@"..\..\..\..\Forms\bin\x64\Release");
#endif
            _shim = ShiminyFactory.MakeAssemblyShim("Forms");
            _shim.BeforeUnload += new BeforeUnloadDelegate((assm) => {
                _form.Close();
            });
            _shim.AfterLoad += new AfterLoadDelegate((assm) => {
                _form = assm.New("Forms.Form1");
                assm.New("Forms.Class1");
                _form.ShowDialog();
            });
            _shim.Load();
            Application.Run();
        }