Interaction logic for MainWindow.xaml
Inheritance: Window
Exemple #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            MainWindow = new MainWindow() { DataContext = new MainViewModel() { Apa = "Hej" } };
            MainWindow.Show();

            base.OnStartup(e);
        }
Exemple #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.un = ((WpfTest.MainWindow)(target));

            #line 8 "..\..\MainWindow.xaml"
                this.un.Unloaded += new System.Windows.RoutedEventHandler(this.Un_Unloaded);

            #line default
            #line hidden
                return;

            case 2:
                this.buttonInvokeAddIn = ((System.Windows.Controls.Button)(target));

            #line 11 "..\..\MainWindow.xaml"
                this.buttonInvokeAddIn.Click += new System.Windows.RoutedEventHandler(this.ButtonInvokeAddIn_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        public ListeLecture(MainWindow AppMainWindow)
        {
            InitializeComponent();
            this.Top = AppMainWindow.Top;
            this.Left = AppMainWindow.Left;

            this.Height = AppMainWindow.ActualHeight;
            this.Width = AppMainWindow.ActualWidth;
            this.WindowState = AppMainWindow.WindowState;
        }
        public Bibliotheque(MainWindow AppMainWindow)
        {
            InitializeComponent();
            comboBox.SelectedIndex = 0;
            this.Top = AppMainWindow.Top;
            this.Left = AppMainWindow.Left;

            this.Height = AppMainWindow.ActualHeight;
            this.Width = AppMainWindow.ActualWidth;
            this.WindowState = AppMainWindow.WindowState;

            select_box();

        }
Exemple #5
0
        private void Application_Startup(object sender, System.Windows.StartupEventArgs e)
        {
            mainWin = new MainWindow();

            Screen mainScreen = GetMainScreen();

            mainWin.WindowStartupLocation = WindowStartupLocation.Manual;
            var mainLocation = mainScreen.WorkingArea.Location;
            mainWin.Left = mainLocation.X;
            mainWin.Top = mainLocation.Y;
            //mainWin.Height = mainScreen.Bounds.Height;
            //mainWin.Width = mainScreen.Bounds.Width;
            mainWin.Topmost = true;
            mainWin.Background = new SolidColorBrush(Colors.Black);
            mainWin.WindowStyle = WindowStyle.None;
            mainWin.Show();
            mainWin.WindowState = WindowState.Maximized;

            //mainWin.Focus();

            if (Screen.AllScreens.Length > 1)
            {

                Screen secondScreen = GetSecondaryScreen();
                if (secondScreen != null)
                {
                    secondWin = new MainWindow();

                    secondWin.WindowStartupLocation = WindowStartupLocation.Manual;
                    var location = secondScreen.WorkingArea.Location;
                    secondWin.Left = location.X;
                    secondWin.Top = location.Y;
                    secondWin.Height = secondScreen.Bounds.Height;
                    secondWin.Width = secondScreen.Bounds.Width;
                    secondWin.Topmost = true;
                    secondWin.Background = new SolidColorBrush(Colors.Black);
                    secondWin.WindowStyle = WindowStyle.None;
                    secondWin.Show();
                    //secondWin.Focus();
                }

            }
        }
        // コンストラクタ
        public MainWindow()
        {
            myInstance = this;

            //			DebugWindow.WriteLine("初期化");
            InitializeComponent();
            WriteMessage("初期化\n");

            //動作スレッドの初期化
            //			DebugWindow.WriteLine("シーケンス作成");
            WriteMessage("シーケンス作成\n");
            seq = new Sequences();
            seq.getCurrentSequence().bindGridUI(SequenceGrid);
            //			seq.getCurrentSequence().addAllAnalogOutput();
            communicator = new NIDaqCommunicator(seq);

            //ウィンドウをどこでもつかめるように
            this.MouseLeftButtonDown += (sender, e) => this.DragMove();

            TaskManager.GetInstance().addAllTaskEndEventHandler(Callback_SystemStop);
        }
        public ListeLecture(MainWindow AppMainWindow)
        {
            InitializeComponent();
            comboBox.SelectedIndex = 0;
            this.Top = AppMainWindow.Top;
            this.Left = AppMainWindow.Left;

            this.Height = AppMainWindow.ActualHeight;
            this.Width = AppMainWindow.ActualWidth;
            this.WindowState = AppMainWindow.WindowState;
            listView.Items.Clear();
            select_box();
            if (AppMainWindow.med.chemin != null)
            {
                for (int i = 0; i < AppMainWindow.med.chemin.Count(); ++i)
                {
                    listView.Items.Add((AppMainWindow.med.name[i]));
                    //listView.Items.Add(System.IO.Path.GetFileNameWithoutExtension(AppMainWindow.med.chemin[i]));
                }
            }
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.MainWindow1 = ((WpfTest.MainWindow)(target));
     
     #line 8 "..\..\MainWindow.xaml"
     this.MainWindow1.KeyDown += new System.Windows.Input.KeyEventHandler(this.Key_pressed);
     
     #line default
     #line hidden
     return;
     case 2:
     this.menu = ((System.Windows.Controls.Menu)(target));
     return;
     case 3:
     
     #line 17 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Open_click);
     
     #line default
     #line hidden
     return;
     case 4:
     this.textBox1 = ((System.Windows.Controls.TextBox)(target));
     return;
     case 5:
     
     #line 19 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Open_online);
     
     #line default
     #line hidden
     return;
     case 6:
     
     #line 21 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.quit_click);
     
     #line default
     #line hidden
     return;
     case 7:
     
     #line 24 "..\..\MainWindow.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.listeLecture_click);
     
     #line default
     #line hidden
     return;
     case 8:
     this.media_grid = ((System.Windows.Controls.Grid)(target));
     
     #line 30 "..\..\MainWindow.xaml"
     this.media_grid.MouseMove += new System.Windows.Input.MouseEventHandler(this.pos_mouse);
     
     #line default
     #line hidden
     
     #line 30 "..\..\MainWindow.xaml"
     this.media_grid.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.Grid_MouseWheel);
     
     #line default
     #line hidden
     
     #line 30 "..\..\MainWindow.xaml"
     this.media_grid.Drop += new System.Windows.DragEventHandler(this.mediaElementDrop);
     
     #line default
     #line hidden
     return;
     case 9:
     this.mediaElement = ((System.Windows.Controls.MediaElement)(target));
     
     #line 33 "..\..\MainWindow.xaml"
     this.mediaElement.MediaOpened += new System.Windows.RoutedEventHandler(this.Element_MediaOpened);
     
     #line default
     #line hidden
     
     #line 33 "..\..\MainWindow.xaml"
     this.mediaElement.MediaEnded += new System.Windows.RoutedEventHandler(this.Element_MediaEnded);
     
     #line default
     #line hidden
     
     #line 33 "..\..\MainWindow.xaml"
     this.mediaElement.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.full_screen);
     
     #line default
     #line hidden
     
     #line 33 "..\..\MainWindow.xaml"
     this.mediaElement.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.Grid_MouseWheel);
     
     #line default
     #line hidden
     return;
     case 10:
     this.Subtitles = ((System.Windows.Controls.Label)(target));
     return;
     case 11:
     this.controle = ((System.Windows.Controls.Grid)(target));
     
     #line 37 "..\..\MainWindow.xaml"
     this.controle.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.Grid_MouseWheel);
     
     #line default
     #line hidden
     return;
     case 12:
     this.button1 = ((System.Windows.Controls.Button)(target));
     
     #line 39 "..\..\MainWindow.xaml"
     this.button1.Click += new System.Windows.RoutedEventHandler(this.click_next);
     
     #line default
     #line hidden
     return;
     case 13:
     this.stop_button = ((System.Windows.Controls.Button)(target));
     
     #line 41 "..\..\MainWindow.xaml"
     this.stop_button.Click += new System.Windows.RoutedEventHandler(this.Stop_click);
     
     #line default
     #line hidden
     return;
     case 14:
     this.button = ((System.Windows.Controls.Button)(target));
     
     #line 42 "..\..\MainWindow.xaml"
     this.button.Click += new System.Windows.RoutedEventHandler(this.prev_click);
     
     #line default
     #line hidden
     return;
     case 15:
     this.play_button = ((System.Windows.Controls.Button)(target));
     
     #line 43 "..\..\MainWindow.xaml"
     this.play_button.Click += new System.Windows.RoutedEventHandler(this.play_click);
     
     #line default
     #line hidden
     return;
     case 16:
     this.fullscreen_button = ((System.Windows.Controls.Button)(target));
     
     #line 44 "..\..\MainWindow.xaml"
     this.fullscreen_button.Click += new System.Windows.RoutedEventHandler(this.fullscreen_click);
     
     #line default
     #line hidden
     return;
     case 17:
     this.shuffle_button = ((System.Windows.Controls.Primitives.ToggleButton)(target));
     
     #line 46 "..\..\MainWindow.xaml"
     this.shuffle_button.Click += new System.Windows.RoutedEventHandler(this.shuffle_click);
     
     #line default
     #line hidden
     return;
     case 18:
     this.repeat_button = ((System.Windows.Controls.Button)(target));
     
     #line 48 "..\..\MainWindow.xaml"
     this.repeat_button.Click += new System.Windows.RoutedEventHandler(this.repeat_click);
     
     #line default
     #line hidden
     return;
     case 19:
     this.lblVolume = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 20:
     this.volume_slider = ((System.Windows.Controls.Slider)(target));
     
     #line 51 "..\..\MainWindow.xaml"
     this.volume_slider.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.ChangeMediaVolume);
     
     #line default
     #line hidden
     return;
     case 21:
     this.lblStatus = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 22:
     this.pos_slider = ((System.Windows.Controls.Slider)(target));
     
     #line 55 "..\..\MainWindow.xaml"
     this.pos_slider.AddHandler(System.Windows.Controls.Primitives.Thumb.DragStartedEvent, new System.Windows.Controls.Primitives.DragStartedEventHandler(this.pos_slider_DragStarted));
     
     #line default
     #line hidden
     
     #line 55 "..\..\MainWindow.xaml"
     this.pos_slider.AddHandler(System.Windows.Controls.Primitives.Thumb.DragCompletedEvent, new System.Windows.Controls.Primitives.DragCompletedEventHandler(this.pos_slider_DragCompleted));
     
     #line default
     #line hidden
     
     #line 55 "..\..\MainWindow.xaml"
     this.pos_slider.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.pos_slider_ValueChanged);
     
     #line default
     #line hidden
     return;
     case 23:
     this.lblspeed = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 24:
     this.speed_slider = ((System.Windows.Controls.Slider)(target));
     
     #line 57 "..\..\MainWindow.xaml"
     this.speed_slider.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.speed_change);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }