Esempio n. 1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mainWindow = ((VIS.MyEditor)(target));
                return;

            case 2:

            #line 22 "..\..\..\MyEditor.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Close_Click);

            #line default
            #line hidden
                return;

            case 3:

            #line 23 "..\..\..\MyEditor.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Exit_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.enableButton = ((System.Windows.Controls.MenuItem)(target));

            #line 32 "..\..\..\MyEditor.xaml"
                this.enableButton.Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.disableButton = ((System.Windows.Controls.MenuItem)(target));

            #line 33 "..\..\..\MyEditor.xaml"
                this.disableButton.Click += new System.Windows.RoutedEventHandler(this.MenuItem_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.textBox = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 2
0
 private void run_myeditor()
 {
     try
     {
         this.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() =>
         {
             MyEditor myEditor = new MyEditor();
             myEditor.ShowDialog();
         }));
     }
     catch (Exception e)
     {
         MessageBox.Show("Exception My Editor: " + e);
     }
 }