Ejemplo n.º 1
0
        private void build_gui()
        {
            SpectrumEditor cp = new SpectrumEditor(this.spectrum);

            StackPanel buttons = new StackPanel();
            buttons.Orientation = Orientation.Horizontal;
            buttons.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;

            Button ok = new Button();
            ok.Content = "OK";
            ok.Width = 50;
            ok.Margin = new Thickness(5);

            ok.Click += new RoutedEventHandler(ok_Click);

            Button cancel = new Button();
            cancel.Content = "Cancel";
            cancel.Width = 50;
            cancel.Margin = new Thickness(5);
            cancel.Click += new RoutedEventHandler(cancel_Click);

            buttons.Children.Add(ok);
            buttons.Children.Add(cancel);

            StackPanel sp_all = new StackPanel();
            sp_all.Children.Add(cp);
            sp_all.Children.Add(buttons);

            this.Content = sp_all;
            this.Width = 350;
            this.Height = 200;
        }
Ejemplo n.º 2
0
        private void build_gui()
        {
            SpectrumEditor cp = new SpectrumEditor(this.spectrum);

            StackPanel buttons = new StackPanel();

            buttons.Orientation         = Orientation.Horizontal;
            buttons.HorizontalAlignment = System.Windows.HorizontalAlignment.Right;


            Button ok = new Button();

            ok.Content = "OK";
            ok.Width   = 50;
            ok.Margin  = new Thickness(5);

            ok.Click += new RoutedEventHandler(ok_Click);

            Button cancel = new Button();

            cancel.Content = "Cancel";
            cancel.Width   = 50;
            cancel.Margin  = new Thickness(5);
            cancel.Click  += new RoutedEventHandler(cancel_Click);

            buttons.Children.Add(ok);
            buttons.Children.Add(cancel);

            StackPanel sp_all = new StackPanel();

            sp_all.Children.Add(cp);
            sp_all.Children.Add(buttons);

            this.Content = sp_all;
            this.Width   = 350;
            this.Height  = 200;
        }