Пример #1
0
 public Table(ref Grid grid, ref UniformGrid uniformGrid)
 {
     TableGrid = grid;
     TableUniformgrid = uniformGrid;
     CreateTable();
     CreateFigures();
 }
        private void InitWeekGrid()
        {
            _lessonControls = new Dictionary<string, LessonControl[]>();
            weekGrid.Children.Clear();
            var weekDays = new List<string>() { "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота" };
            foreach (var day in weekDays)
            {
                _lessonControls[day] = new LessonControl[8];
                var groupBox = new GroupBox
                {

                    Header = day,
                    Margin = new Thickness(5, 5, 5, 10),
                    BorderThickness = new Thickness(1),
                    Foreground = new SolidColorBrush((Color)FindResource("AccentColor")),
                    BorderBrush = new SolidColorBrush((Color)FindResource("AccentColor"))
                };
                weekGrid.Children.Add(groupBox);
                Grid.SetColumn(groupBox, weekDays.IndexOf(day));

                var lessonsGrid = new UniformGrid
                {
                    Rows = 8,
                    Columns = 1,
                    Margin = new Thickness(0, 4, 0, 4)
                };
                for (var i = 0; i < 8; i++)
                {
                    var lessonControl = new LessonControl();
                    lessonsGrid.Children.Add(lessonControl);
                    _lessonControls[day][i] = lessonControl;
                }
                groupBox.Content = lessonsGrid;
            }
        }
Пример #3
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     AlertUpdates();
     if (MangaList.List.Count == 0)
     {
         Content.Children.Add(FragmentHelper.ExtractUI<NoManga>());
     }
     else
     {
         grid = new UniformGrid();
         Content.Children.Add(grid);
         foreach (Manga m in MangaList.List)
         {
             AddMangaTile(m);
         }
         new Thread(new ThreadStart(delegate
         {
             foreach (Request request in this.request)
             {
                 ImageSource img = request.manga.GetCover();
                 Dispatcher.BeginInvoke(new Action(delegate
                 {
                     request.box.MangaCover = img;
                 }));
                 Thread.Sleep(10);
             }
         })).Start();
         
     }
 }
Пример #4
0
        public ColorGrid()
        {
            bord = new Border();
            bord.BorderBrush = SystemColors.ControlDarkDarkBrush;
            bord.BorderThickness = new Thickness(1);
            AddVisualChild(bord);
            AddLogicalChild(bord);

            unigrid = new UniformGrid();
            unigrid.Background = SystemColors.WindowBrush;
            unigrid.Columns = xNum;
            bord.Child = unigrid;

            for (int y = 0; y < yNum; y++)
            {
                for (int x = 0; x < xNum; x++)
                {
                    Color clr = (Color) typeof(Colors).GetProperty(strColors[y, x]).GetValue(null, null);
                    cells[y, x] = new ColorCell(clr);
                    unigrid.Children.Add(cells[y, x]);

                    if (clr == SelectedColor)
                    {
                        cellSelected = cells[y, x];
                        cells[y, x].IsSelected = true;
                    }

                    ToolTip tip = new ToolTip();
                    tip.Content = strColors[y, x];
                    cells[y, x].ToolTip = tip;
                }
            }
        }
        public override UIElement GetUIElement()
        {
            if (Values.Count == 0)
            {
                Values.Add(true.ToString());
            }

            StackPanel sp = new StackPanel();
            CheckBox cb = new CheckBox();
            cb.Content = Localization.TranslationManager.Instance.Translate(STR_ONOFSELECTED);
            cb.IsChecked = bool.Parse(Values[0]);
            cb.IsEnabled = false;
            sp.Children.Add(cb);
            ScrollViewer sv = new ScrollViewer();
            UniformGrid g = new UniformGrid();
            g.Background = new SolidColorBrush(Color.FromArgb(255, 255, 255, 255));
            sv.Content = g;
            sv.CanContentScroll = true;
            sv.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden;
            sv.VerticalScrollBarVisibility = ScrollBarVisibility.Visible;
            sv.Width = 200;
            sv.Height = 120;
            foreach (var attr in ApplicationData.Instance.GeocacheAttributes)
            {
                StackPanel ga = new StackPanel();
                ga.Width = 40;
                ga.Height = 60;
                Image img = new Image();
                img.ToolTip = Localization.TranslationManager.Instance.Translate(attr.Name);
                if (Math.Abs(attr.ID) < 100)
                {
                    img.Source = new BitmapImage(Utils.ResourceHelper.GetResourceUri(string.Format("/Resources/Attributes/{0}.gif", attr.ID.ToString().Replace('-', '_'))));
                }
                else
                {
                    img.Source = new BitmapImage(Utils.ResourceHelper.GetResourceUri(string.Format("/Resources/Attributes/{0}.png", attr.ID.ToString().Replace('-', '_'))));
                }
                img.Width = 30;
                img.Height = 30;
                img.HorizontalAlignment = HorizontalAlignment.Center;
                img.VerticalAlignment = VerticalAlignment.Top;
                CheckBox acb = new CheckBox();
                acb.HorizontalAlignment = HorizontalAlignment.Center;
                acb.VerticalAlignment = VerticalAlignment.Top;
                acb.Tag = attr.ID;
                acb.IsChecked = Values.Contains(acb.Tag.ToString());
                ga.Children.Add(img);
                ga.Children.Add(acb);
                g.Children.Add(ga);
            }
            sp.Children.Add(sv);

            sv.VerticalScrollBarVisibility = ScrollBarVisibility.Hidden;
            sv.HorizontalScrollBarVisibility = ScrollBarVisibility.Hidden;
            sv.MouseEnter += new System.Windows.Input.MouseEventHandler(sv_MouseEnter);
            sv.MouseLeave += new System.Windows.Input.MouseEventHandler(sv_MouseLeave);

            return sp;
        }
        public CoordinatesGridWindow()
        {

            InitializeComponent();
            uniformGrid = new UniformGrid();
            Content = uniformGrid;
            FillGrid();
        }
Пример #7
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.SquaresGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
         return;
     }
     this._contentLoaded = true;
 }
Пример #8
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.GameGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 2:
                this.lbxChooseLevel = ((System.Windows.Controls.ListBox)(target));
                return;

            case 3:

            #line 22 "..\..\FindPairs.xaml"
                ((System.Windows.Controls.ListBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ChangeGridLevel);

            #line default
            #line hidden
                return;

            case 4:

            #line 24 "..\..\FindPairs.xaml"
                ((System.Windows.Controls.ListBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ChangeGridLevel);

            #line default
            #line hidden
                return;

            case 5:

            #line 26 "..\..\FindPairs.xaml"
                ((System.Windows.Controls.ListBoxItem)(target)).Selected += new System.Windows.RoutedEventHandler(this.ChangeGridLevel);

            #line default
            #line hidden
                return;

            case 6:
                this.lbUserScore = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.btnGetBack = ((System.Windows.Controls.Button)(target));

            #line 33 "..\..\FindPairs.xaml"
                this.btnGetBack.Click += new System.Windows.RoutedEventHandler(this.Accept_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #9
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.grid8_1 = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 2:
                this.grid8_2 = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 3:
                this.grid8_3 = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 4:
                this.grid8_4 = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 5:
                this.grid8_5 = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 6:
                this.grid8_6 = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 7:
                this.grid8_7 = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 8:
                this.grid8_8 = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 9:
                this.grid4_1 = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 10:
                this.grid4_2 = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 11:
                this.grid2_1 = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 12:
                this.grid2_2 = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #10
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.WindowGame = ((MyWPFSnakeGame.MainWindow)(target));

            #line 8 "..\..\MainWindow.xaml"
                this.WindowGame.KeyDown += new System.Windows.Input.KeyEventHandler(this.GameWindow_KeyDown);

            #line default
            #line hidden
                return;

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

            #line 14 "..\..\MainWindow.xaml"
                this.ButtonStart.Click += new System.Windows.RoutedEventHandler(this.ButtonStart_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.ButtonPausePlay = ((System.Windows.Controls.Button)(target));

            #line 15 "..\..\MainWindow.xaml"
                this.ButtonPausePlay.Click += new System.Windows.RoutedEventHandler(this.ButtonPausePlay_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.ButtonRecords = ((System.Windows.Controls.Button)(target));

            #line 16 "..\..\MainWindow.xaml"
                this.ButtonRecords.Click += new System.Windows.RoutedEventHandler(this.ButtonRecords_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.TextScore = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 6:
                this.AreaGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #11
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.CommonPublicToolBarBorder = ((System.Windows.Controls.Border)(target));

            #line 59 "..\..\..\..\CustomControls\ImageToggleButton\AppToolBar.xaml"
                this.CommonPublicToolBarBorder.Loaded += new System.Windows.RoutedEventHandler(this.CommonLoadedControls);

            #line default
            #line hidden
                return;

            case 2:
                this.toolgrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 3:
                this.ThemeChang = ((UserControlPackage.CustomControls.ImageToggleButton.ImageToggleButton)(target));
                return;

            case 4:
                this.Globe = ((UserControlPackage.CustomControls.ImageToggleButton.ImageToggleButton)(target));
                return;

            case 5:
                this.MeasureButton = ((UserControlPackage.CustomControls.ImageToggleButton.ImageToggleButton)(target));
                return;

            case 6:
                this.CommonPublicToolBarBorderRight = ((System.Windows.Controls.Border)(target));

            #line 89 "..\..\..\..\CustomControls\ImageToggleButton\AppToolBar.xaml"
                this.CommonPublicToolBarBorderRight.Loaded += new System.Windows.RoutedEventHandler(this.CommonLoadedControls);

            #line default
            #line hidden
                return;

            case 7:
                this.toolgridRight = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 8:
                this.GlobeRight = ((UserControlPackage.CustomControls.ImageToggleButton.ImageToggleButton)(target));
                return;

            case 9:
                this.MeasureButtonRight = ((UserControlPackage.CustomControls.ImageToggleButton.ImageToggleButton)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.botones = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 2:
                this.btn_7 = ((Karaoke.Controles.BotonTouch)(target));
                return;

            case 3:
                this.btn_8 = ((Karaoke.Controles.BotonTouch)(target));
                return;

            case 4:
                this.btn_9 = ((Karaoke.Controles.BotonTouch)(target));
                return;

            case 5:
                this.btn_4 = ((Karaoke.Controles.BotonTouch)(target));
                return;

            case 6:
                this.btn_5 = ((Karaoke.Controles.BotonTouch)(target));
                return;

            case 7:
                this.btn_6 = ((Karaoke.Controles.BotonTouch)(target));
                return;

            case 8:
                this.btn_1 = ((Karaoke.Controles.BotonTouch)(target));
                return;

            case 9:
                this.btn_2 = ((Karaoke.Controles.BotonTouch)(target));
                return;

            case 10:
                this.btn_3 = ((Karaoke.Controles.BotonTouch)(target));
                return;

            case 11:
                this.txt_buscador = ((Karaoke.textBoxRedondeado)(target));
                return;

            case 12:
                this.rtg_Logo = ((System.Windows.Shapes.Rectangle)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #13
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.stack_wrap = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 2:
                this.txt_RecvCmd = ((System.Windows.Controls.TextBox)(target));
                return;

            case 3:
                this.btn_sendCmd = ((System.Windows.Controls.Button)(target));
                return;

            case 4:
                this.unif_wrap = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 5:
                this.btn_copy_src = ((System.Windows.Controls.Button)(target));
                return;

            case 6:
                this.txt_copy_dst = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:
                this.txt_Name = ((System.Windows.Controls.TextBox)(target));
                return;

            case 8:
                this.ls_NewItems = ((System.Windows.Controls.ListBox)(target));
                return;

            case 9:

#line 44 "..\..\UseCommandDemo.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CommandBinding_CanExecute);

#line default
#line hidden

#line 44 "..\..\UseCommandDemo.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_Executed);

#line default
#line hidden
                return;
            }
            this._contentLoaded = true;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.BoardControl = ((Gemtris.Board)(target));
     return;
     case 2:
     this.boardGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
     return;
     }
     this._contentLoaded = true;
 }
		public override void OnApplyTemplate()
		{
			base.OnApplyTemplate();
			PART_bubbles = GetTemplateChild<UniformGrid>(nameof(PART_bubbles));
			var dt = new DispatcherTimer {Interval = TimeSpan.FromMilliseconds(300)};
			dt.Tick += (Sender, Args) =>
			{
				dt.Stop();
				loadBubbles();
			};
			dt.Start();
		}
Пример #16
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 10 "..\..\MainWindow.xaml"
                ((soudu.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.windowLoaded);

            #line default
            #line hidden
                return;

            case 2:
                this.mainGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.gameGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 4:
                this.timeLabel = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.dialogGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 6:

            #line 44 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.newGame);

            #line default
            #line hidden
                return;

            case 7:

            #line 45 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.exitGame);

            #line default
            #line hidden
                return;

            case 8:
                this.chooseLevel = ((System.Windows.Controls.ComboBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #17
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.borderRectangle = ((System.Windows.Shapes.Rectangle)(target));
                return;

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

            #line 100 "..\..\PersianCalendar.xaml"
                this.titleButton.Click += new System.Windows.RoutedEventHandler(this.titleButton_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.previousButton = ((System.Windows.Controls.Button)(target));

            #line 101 "..\..\PersianCalendar.xaml"
                this.previousButton.Click += new System.Windows.RoutedEventHandler(this.previousButton_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.nextButton = ((System.Windows.Controls.Button)(target));

            #line 102 "..\..\PersianCalendar.xaml"
                this.nextButton.Click += new System.Windows.RoutedEventHandler(this.nextButton_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.monthUniformGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 6:
                this.yearUniformGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 7:
                this.decadeUniformGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #18
0
 // constructor
 public Game(UniformGrid g, Label label, StackPanel panel)
 {
     // TODO
     grid = g;
     titleLabel = label;
     stackPanel = panel;
     soundElement = InitializeMediaElement();
     stackPanel.Children.Add(soundElement);
     soundElement.Play();
     board = new Tile[grid.Rows, grid.Columns];
     CreateBoard();
     AddToGrid();
 }
Пример #19
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 5 "..\..\MainWindow.xaml"
                ((Gomoku.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.ugrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 3:
                this.btnChange = ((System.Windows.Controls.Button)(target));

            #line 18 "..\..\MainWindow.xaml"
                this.btnChange.Click += new System.Windows.RoutedEventHandler(this.btnChange_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.txtName = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.Lview = ((System.Windows.Controls.ListView)(target));
                return;

            case 6:
                this.txtMsg = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:
                this.btnSend = ((System.Windows.Controls.Button)(target));

            #line 28 "..\..\MainWindow.xaml"
                this.btnSend.Click += new System.Windows.RoutedEventHandler(this.btnSend_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #20
0
        public UIElement Render()
        {
            //The Grid field
            var container = new UniformGrid();
            container.Height = 37;
            container.Columns = 3;

            //The PropName
            var nameField = new TextBlock();
            nameField.Text = this.PropName;
            nameField.Foreground = Brushes.White;
            nameField.Width = 172;
            nameField.Height = 27;
            nameField.Margin = new Thickness(0, 10, 0, 0);
            Grid.SetColumn(nameField, 0);
            container.Children.Add(nameField);

            //The PropValue
            var valueBox = new TextBox();
            valueBox.Text = this.PropValue.ToString();
            valueBox.Foreground = Brushes.White;
            valueBox.Background = Brushes.Transparent;
            valueBox.Width = 35;
            valueBox.Height = 27;
            valueBox.Margin = new Thickness(10, 10, 0, 0);
            Grid.SetColumn(valueBox, 1);
            container.Children.Add(valueBox);

            //The Up/Down buttons
            var upButton = new Button();
            upButton.Content = "&#x25B2;";
            upButton.HorizontalAlignment = HorizontalAlignment.Right;
            upButton.VerticalAlignment = VerticalAlignment.Top;
            upButton.Height = 17;
            upButton.Width = 25;
            Grid.SetColumn(upButton, 2);
            upButton.Click += (snd, args) => this.PropValue++;
            container.Children.Add(upButton);

            var downButton = new Button();
            downButton.Content = "&#x25BC;";
            downButton.HorizontalAlignment = HorizontalAlignment.Right;
            downButton.VerticalAlignment = VerticalAlignment.Bottom;
            downButton.Height = 17;
            downButton.Width = 25;
            Grid.SetColumn(downButton, 2);
            downButton.Click += (snd, args) => this.PropValue--;
            container.Children.Add(downButton);

            return container;
        }
Пример #21
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.MainWindow1 = ((movie_lists.MainWindow)(target));
                return;

            case 2:
                this.grMaster = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.grSearch = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.lbQuery = ((System.Windows.Controls.Label)(target));
                return;

            case 5:
                this.tbInput = ((System.Windows.Controls.TextBox)(target));

            #line 27 "..\..\MainWindow.xaml"
                this.tbInput.KeyDown += new System.Windows.Input.KeyEventHandler(this.CheckEnterKeyDown);

            #line default
            #line hidden
                return;

            case 6:
                this.btnSearch = ((System.Windows.Controls.Button)(target));

            #line 30 "..\..\MainWindow.xaml"
                this.btnSearch.Click += new System.Windows.RoutedEventHandler(this.ButtonClick);

            #line default
            #line hidden
                return;

            case 7:
                this.lbResultCount = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.resultsGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.DropDownMenu = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 2:
                this.QuizButton = ((System.Windows.Controls.MenuItem)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #23
0
 private void AddControlsToWindow()
 {
     UniformGrid grid = new UniformGrid() { Columns = 2 };
     grid.Children.Add(new Label() { Content = "Project:" });
     grid.Children.Add(_projectsComboBox);
     Label label = new Label() { Content = "Estimated Cost:" };
     grid.Children.Add(label);
     grid.Children.Add(_estimateTextBox);
     label = new Label() { Content = "Actual Cost:" };
     grid.Children.Add(label);
     grid.Children.Add(_actualTextBox);
     grid.Children.Add(_updateButton);
     Content = grid;
 }
Пример #24
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.RegisterBlock = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 2:
                this.RegisterValues = ((System.Windows.Controls.ListView)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #25
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.patternGrid = ((PatternAssociator.UserControls.PatternGrid)(target));
                return;

            case 2:
                this.Pattern = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.grd_resultados = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 2:
                this.txt_busqueda = ((Karaoke.textBoxRedondeado)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #27
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.GameWindow = ((minesweeper.MainWindow)(target));
                return;

            case 2:
                this.ugr = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #28
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Expression = ((System.Windows.Controls.TextBox)(target));
                return;

            case 2:
                this.Buttons = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #29
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.dockPanel = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 2:
                this.quickviewer = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 3:
                this.namespaceComboBox = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 4:
                this.classComboBox = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 5:
                this.memberComboBox = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 6:
                this.grid = ((System.Windows.Controls.Grid)(target));
                return;

            case 7:
                this.ex_textEditor = ((ICSharpCode.AvalonEdit.TextEditor)(target));
                return;

            case 8:
                this.splitter = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 9:
                this.textEditor = ((ICSharpCode.AvalonEdit.TextEditor)(target));

            #line 354 "..\..\EditorWindow.xaml"
                this.textEditor.SizeChanged += new System.Windows.SizeChangedEventHandler(this.textEditor_SizeChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #30
0
        private UniformGrid goldrushgrid()
        {
            TextBlock goldrush_diamond = new TextBlock
            {
                Text                = "♦",
                Margin              = new Thickness(5),
                FontSize            = 24,
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment   = VerticalAlignment.Center
            };
            TextBlock goldrush_heart = new TextBlock
            {
                Text                = "♥",
                Margin              = new Thickness(5),
                FontSize            = 24,
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment   = VerticalAlignment.Center
            };
            TextBlock goldrush_spade = new TextBlock
            {
                Text                = "♠",
                Margin              = new Thickness(5),
                FontSize            = 24,
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment   = VerticalAlignment.Center
            };
            TextBlock goldrush_club = new TextBlock
            {
                Text                = "♣",
                Margin              = new Thickness(5),
                FontSize            = 24,
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment   = VerticalAlignment.Center
            };

            System.Windows.Controls.Primitives.UniformGrid goldrush_symbols = new System.Windows.Controls.Primitives.UniformGrid
            {
                Columns = 4,
                Rows    = 1
            };

            goldrush_symbols.Children.Add(goldrush_diamond);
            goldrush_symbols.Children.Add(goldrush_heart);
            goldrush_symbols.Children.Add(goldrush_spade);
            goldrush_symbols.Children.Add(goldrush_club);

            return(goldrush_symbols);
        }
Пример #31
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.root = ((FrontView.ModalDialog)(target));
                return;

            case 2:
                this.grd_YesNo = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 3:
                this.YesButton = ((System.Windows.Controls.Button)(target));

            #line 20 "..\..\..\ModalDialog.xaml"
                this.YesButton.Click += new System.Windows.RoutedEventHandler(this.YesButton_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.NoButton = ((System.Windows.Controls.Button)(target));

            #line 21 "..\..\..\ModalDialog.xaml"
                this.NoButton.Click += new System.Windows.RoutedEventHandler(this.NoButton_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.grd_Ok = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 6:
                this.OkButton = ((System.Windows.Controls.Button)(target));

            #line 25 "..\..\..\ModalDialog.xaml"
                this.OkButton.Click += new System.Windows.RoutedEventHandler(this.OkButton_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #32
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.MyMainPanel = ((System.Windows.Controls.Primitives.UniformGrid)(target));

            #line 16 "..\..\MainWindow.xaml"
                this.MyMainPanel.Loaded += new System.Windows.RoutedEventHandler(this.MyMainPanel_Loaded);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #33
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 8 "..\..\MainWindow.xaml"
                ((battlestit.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing);

            #line default
            #line hidden
                return;

            case 2:
                this.ugr = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 3:
                this.ugr1 = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 4:
                this.makemake = ((System.Windows.Controls.Button)(target));

            #line 17 "..\..\MainWindow.xaml"
                this.makemake.Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.tagofcell = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:
                this.make_shot_button = ((System.Windows.Controls.Button)(target));

            #line 20 "..\..\MainWindow.xaml"
                this.make_shot_button.Click += new System.Windows.RoutedEventHandler(this.Make_shot_button_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Пример #34
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 4 "..\..\Window1.xaml"
                ((GameOfLife_GUI.Window1)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.stackPanel1 = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 3:
                this.checkBox1 = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 4:
                this.buttonUp = ((System.Windows.Controls.Button)(target));

            #line 9 "..\..\Window1.xaml"
                this.buttonUp.Click += new System.Windows.RoutedEventHandler(this.buttonUp_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.buttonDown = ((System.Windows.Controls.Button)(target));

            #line 10 "..\..\Window1.xaml"
                this.buttonDown.Click += new System.Windows.RoutedEventHandler(this.buttonDown_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.myGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #35
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 9 "..\..\MainWindow.xaml"
                ((Tetris.MainWindow)(target)).KeyDown += new System.Windows.Input.KeyEventHandler(this.OnKeyDownHandler);

            #line default
            #line hidden
                return;

            case 2:
                this.MY_BOARD = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.MY_GRID = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 4:
                this.PREVIEW_GRID = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 5:
                this.SCORE = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 6:
                this.LEVEL = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 7:
                this.ROWS_DESTROYED = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 8:
                this.TIME = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 9:
                this.MESSAGE = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #36
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.stack = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 2:
                this.grid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 3:
                this.dificultate = ((System.Windows.Controls.ListBox)(target));
                return;

            case 4:
                this.algoritm = ((System.Windows.Controls.ListBox)(target));
                return;

            case 5:
                this.juc_3 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 6:
                this.juc_4 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 7:
                this.juc_5 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 8:
                this.ai_3 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 9:
                this.ai_4 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 10:
                this.ai_5 = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #37
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 15 "..\..\MainWindow - 复制.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ConnectServer);

            #line default
            #line hidden
                return;

            case 2:

            #line 16 "..\..\MainWindow - 复制.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.CheckCOM);

            #line default
            #line hidden
                return;

            case 3:

            #line 17 "..\..\MainWindow - 复制.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Publish);

            #line default
            #line hidden
                return;

            case 4:

            #line 18 "..\..\MainWindow - 复制.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Exit);

            #line default
            #line hidden
                return;

            case 5:
                this.loader = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.LayoutStack = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 2:
                this.BedCountComboBox = ((System.Windows.Controls.ComboBox)(target));

            #line 18 "..\..\MainWindow.xaml"
                this.BedCountComboBox.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ComboBox_OnSelect);

            #line default
            #line hidden
                return;

            case 3:
                this.MenuStack = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 4:
                this.BedStack = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 5:
                this.MonitorUniformGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 6:
                this.MonitorStartButton = ((System.Windows.Controls.Button)(target));

            #line 46 "..\..\MainWindow.xaml"
                this.MonitorStartButton.Click += new System.Windows.RoutedEventHandler(this.ButtonClick);

            #line default
            #line hidden
                return;

            case 7:
                this.MonitorIcuUniformGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #39
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 12 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1);

            #line default
            #line hidden
                return;

            case 2:

            #line 13 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_2);

            #line default
            #line hidden
                return;

            case 3:
                this.txt_busqueda = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:

            #line 15 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_3);

            #line default
            #line hidden
                return;

            case 5:
                this.reproductor = ((Karaoke.Controles.Reproductor)(target));
                return;

            case 6:
                this.discos = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #40
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.unif_main = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 2:
                this.ls_box = ((System.Windows.Controls.ListBox)(target));
                return;

            case 3:
                this.btn_attach = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #41
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.main = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.ChessBoard_Up = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 3:
                this.ChessBoard_Down = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }
Пример #42
0
        internal static void InstallTab()
        {
            Application.Current.Dispatcher.Invoke(
                () =>
                {

                    Window mainWindow = Application.Current.MainWindow;

                    _tabGrid = new UniformGrid
                    {
                        HorizontalAlignment = HorizontalAlignment.Stretch,
                        VerticalAlignment = VerticalAlignment.Top,
                        MaxHeight = 180,
                    };

                    CreateButton("Configure", ShowMainTrinityUIEventHandler);
                    CreateButton("Sort Backpack", SortBackEventHandler);
                    CreateButton("Sort Stash", SortStashEventHandler);
                    CreateButton("Clean Stash", CleanStashEventHandler);
                    CreateButton("Reload Item Rules", ReloadItemRulesEventHandler);
                    CreateButton("Drop Legendaries", DropLegendariesEventHandler);
                    CreateButton("Find New ActorIds", GetNewActorSNOsEventHandler);
                    CreateButton("Dump My Build", DumpBuildEventHandler);
                    CreateButton("Show Cache", ShowCacheWindowEventHandler);
                    CreateButton("Reset TVars", ResetTVarsEventHandler);
                    CreateButton("Start LazyCache", StartLazyCacheEventHandler);
                    CreateButton("Stop LazyCache", StopLazyCacheEventHandler);
                    CreateButton("Cache Test", CacheTestCacheEventHandler);

                    _tabItem = new TabItem
                    {
                        Header = "Trinity",
                        ToolTip = "Trinity Functions",
                        Content = _tabGrid,
                    };

                    var tabs = mainWindow.FindName("tabControlMain") as TabControl;
                    if (tabs == null)
                        return;

                    tabs.Items.Add(_tabItem);
                }
            );
        }
Пример #43
0
        private static UniformGrid BuildColorGrid(int numberOfCells)
        {
            Random r = new Random();

            UniformGrid grid = new UniformGrid();
            for (int i = 0; i < numberOfCells; i++)
            {
                Color color = Color.FromScRgb(1.0f, (float)r.NextDouble(), (float)r.NextDouble(), (float)r.NextDouble());
                SolidColorBrush fill = new SolidColorBrush(color);
                fill.Freeze();

                System.Windows.Shapes.Rectangle child = new System.Windows.Shapes.Rectangle();
                child.Fill = fill;

                grid.Children.Add(child);
            }

            return grid;
        }
        public Cuadrante(Sudoku s, int cuad, Action<int, int, int> solicitudCambioNúmero, Action<int, int> solicitudSeleccionada, Action<int, int> solicitudCambioTinta)
        {
            var ug = new UniformGrid() { Rows = Sudoku.Tamaño / 3, Columns = Sudoku.Tamaño / 3 };
            UI = new Border()
            {
                BorderBrush = Brushes.Black,
                BorderThickness = new Thickness(2),
                Child = ug
            };

            for (int i = 0; i < Sudoku.Tamaño; ++i)
            {
                int f, c;
                Sudoku.CuadrantePosicionAFilaColumna(cuad, i, out f, out c);
                var celda = new Celda(s[f, c], (n) => solicitudCambioNúmero(f, c, n), () => solicitudSeleccionada(f, c), () => solicitudCambioTinta(f, c));
                _celdas[i] = celda;
                ug.Children.Add(celda.UI);
            }
        }
        public DrawButtonsOnBitmap()
        {
            Title = "Draw Buttons on Bitmap";

            // Create a UniformGrid for hosting buttons.
            UniformGrid unigrid = new UniformGrid();
            unigrid.Columns = 4;

            // Create 32 ToggleButton objects on UniformGrid.
            for (int i = 0; i < 32; i++)
            {
                ToggleButton btn = new ToggleButton();
                btn.Width = 96;
                btn.Height = 24;
                btn.IsChecked = (i < 4 | i > 27) ^ (i % 4 == 0 | i % 4 == 3);
                unigrid.Children.Add(btn);
            }

            // Size the UniformGrid.
            unigrid.Measure(new Size(Double.PositiveInfinity,
                                     Double.PositiveInfinity));

            Size szGrid = unigrid.DesiredSize;

            // Arrange the UniformGrid.
            unigrid.Arrange(new Rect(new Point(0, 0), szGrid));

            // Create the RenderTargetBitmap object.
            RenderTargetBitmap renderbitmap =
                new RenderTargetBitmap((int)Math.Ceiling(szGrid.Width),
                                       (int)Math.Ceiling(szGrid.Height),
                                       96, 96, PixelFormats.Default);

            // Render the UniformGrid on the RenderTargetBitmap.
            renderbitmap.Render(unigrid);

            // Create an Image object and set its Source to the bitmap.
            Image img = new Image();
            img.Source = renderbitmap;

            // Make the Image object the content of the window.
            Content = img;
        }
        public DrawButtonsOnBitmap()
        {
            Title = "Draw Buttons on Bitmap";

            // ��ư�� ��ġ��ų UniformGrid ����
            UniformGrid unigrid = new UniformGrid();
            unigrid.Columns = 4;

            // UniformGrid ���� 32���� ��۹�ư ��ü�� ����
            for (int i = 0; i < 32; i++)
            {
                ToggleButton btn = new ToggleButton();
                btn.Width = 96;
                btn.Height = 24;
                btn.IsChecked = (i < 4 | i > 27) ^ (i % 4 == 0 | i % 4 == 3);
                unigrid.Children.Add(btn);
            }

            // ������Ʈ �Ǵ� ��Ʈ���� ������ �������� �׸��� �ݵ�� Measure / Arrage �޼ҵ带 ȣ���ؼ� ũ�⸦ �����������.
            unigrid.Measure(new Size(Double.PositiveInfinity,
                                     Double.PositiveInfinity));

            Size szGrid = unigrid.DesiredSize;

            unigrid.Arrange(new Rect(new Point(0, 0), szGrid));

            // ���� ������ ������ ������ ��ħ.
            RenderTargetBitmap renderbitmap =
                new RenderTargetBitmap((int)Math.Ceiling(szGrid.Width),
                                       (int)Math.Ceiling(szGrid.Height),
                                       96, 96, PixelFormats.Default);

            renderbitmap.Render(unigrid);

            Image img = new Image();
            img.Source = renderbitmap;

            Content = img;
        }
Пример #47
0
        public PlayJeuDeTacquin()
        {
            Title = "Jeu de Tacquin";
            SizeToContent = SizeToContent.WidthAndHeight;
            ResizeMode = ResizeMode.CanMinimize;
            Background = SystemColors.ControlBrush;

            StackPanel stack = new StackPanel();
            Content = stack;

            Button btn = new Button();
            btn.Content = "_Scramble";
            btn.Margin = new Thickness(10);
            btn.HorizontalAlignment = HorizontalAlignment.Center;
            btn.Click += ScrambleOnClick;
            stack.Children.Add(btn);

            Border bord = new Border();
            bord.BorderBrush = SystemColors.ControlDarkDarkBrush;
            bord.BorderThickness = new Thickness(1);
            stack.Children.Add(bord);

            unigrid = new UniformGrid();
            unigrid.Rows = NumberRows;
            unigrid.Columns = NumberCols;
            bord.Child = unigrid;

            for (int i = 0; i < NumberRows*NumberCols - 1; i++)
            {
                Tile tile = new Tile();
                tile.Text = (i+1).ToString();
                tile.MouseLeftButtonDown += TileOnMouseLeftButtonDown;
                unigrid.Children.Add(tile);
            }

            unigrid.Children.Add(new Empty());
            xEmpty = NumberCols - 1;
            yEmpty = NumberRows - 1;
        }
Пример #48
0
        internal static void InstallTab()
        {
            Application.Current.Dispatcher.Invoke(
                () =>
                {
                    var mainWindow = Application.Current.MainWindow;

                    _tabGrid = new UniformGrid
                    {
                        HorizontalAlignment = HorizontalAlignment.Stretch,
                        VerticalAlignment = VerticalAlignment.Top,
                        Columns = 1,
                        //MaxHeight = 180
                    };

                    var path = Path.Combine("Tab", "Tab.xaml");
                    var mainControl = UILoader.GetControl<UserControl>(path);
                    ViewModel = new TabViewModel();
                    mainControl.DataContext = ViewModel;

                    _tabItem = new TabItem
                    {
                        Header = "AutoFollow",
                        //ToolTip = "",
                        Content = _tabGrid
                    };

                    var tabs = mainWindow.FindName("tabControlMain") as TabControl;
                    if (tabs == null)
                        return;

                    tabs.Items.Add(_tabItem);
                    _tabGrid.Children.Add(mainControl);
                }
                );
        }
Пример #49
0
        // Public constructor.
        public ColorGrid()
        {
            // Create a Border for the control.
            bord = new Border();
            bord.BorderBrush = SystemColors.ControlDarkDarkBrush;
            bord.BorderThickness = new Thickness(1);
            AddVisualChild(bord);           // necessary for event routing.
            AddLogicalChild(bord);

            // Create a UniformGrid as a child of the Border.
            unigrid = new UniformGrid();
            unigrid.Background = SystemColors.WindowBrush;
            unigrid.Columns = xNum;
            bord.Child = unigrid;

            // Fill up the UniformGrid with ColorCell objects.
            for (int y = 0; y < yNum; y++)
            for (int x = 0; x < xNum; x++)
            {
                Color clr = (Color) typeof(Colors).
                    GetProperty(strColors[y, x]).GetValue(null, null);

                cells[y, x] = new ColorCell(clr);
                unigrid.Children.Add(cells[y, x]);

                if (clr == SelectedColor)
                {
                    cellSelected = cells[y, x];
                    cells[y, x].IsSelected = true;
                }

                ToolTip tip = new ToolTip();
                tip.Content = strColors[y, x];
                cells[y, x].ToolTip = tip;
            }
        }
Пример #50
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.MainPane = ((System.Windows.Controls.ScrollViewer)(target));
     return;
     case 2:
     this.progressBar = ((System.Windows.Controls.ProgressBar)(target));
     
     #line 15 "..\..\TabPage.xaml"
     this.progressBar.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.ProgressBar_ValueChanged_1);
     
     #line default
     #line hidden
     return;
     case 3:
     this.searchBox = ((System.Windows.Controls.TextBox)(target));
     
     #line 16 "..\..\TabPage.xaml"
     this.searchBox.KeyDown += new System.Windows.Input.KeyEventHandler(this.onKey);
     
     #line default
     #line hidden
     return;
     case 4:
     this.cancel = ((System.Windows.Controls.Button)(target));
     
     #line 17 "..\..\TabPage.xaml"
     this.cancel.Click += new System.Windows.RoutedEventHandler(this.cancelSearch);
     
     #line default
     #line hidden
     return;
     case 5:
     this.btnGo = ((System.Windows.Controls.Button)(target));
     
     #line 21 "..\..\TabPage.xaml"
     this.btnGo.Click += new System.Windows.RoutedEventHandler(this.search);
     
     #line default
     #line hidden
     return;
     case 6:
     this.btnShowFav = ((System.Windows.Controls.Button)(target));
     
     #line 68 "..\..\TabPage.xaml"
     this.btnShowFav.Click += new System.Windows.RoutedEventHandler(this.showFav);
     
     #line default
     #line hidden
     return;
     case 7:
     this.btnHelp = ((System.Windows.Controls.Button)(target));
     
     #line 116 "..\..\TabPage.xaml"
     this.btnHelp.Click += new System.Windows.RoutedEventHandler(this.help);
     
     #line default
     #line hidden
     return;
     case 8:
     this.SearchWrap = ((System.Windows.Controls.Grid)(target));
     return;
     case 9:
     this.SearchPane = ((System.Windows.Controls.Grid)(target));
     return;
     case 10:
     this.radioAuthor = ((System.Windows.Controls.RadioButton)(target));
     return;
     case 11:
     this.radioJournal = ((System.Windows.Controls.RadioButton)(target));
     return;
     case 12:
     this.radioCitations = ((System.Windows.Controls.RadioButton)(target));
     return;
     case 13:
     this.radioDate = ((System.Windows.Controls.RadioButton)(target));
     return;
     case 14:
     this.yearStart = ((System.Windows.Controls.TextBox)(target));
     return;
     case 15:
     this.yearEnd = ((System.Windows.Controls.TextBox)(target));
     return;
     case 16:
     this.checkBoxCustomRange = ((System.Windows.Controls.CheckBox)(target));
     
     #line 178 "..\..\TabPage.xaml"
     this.checkBoxCustomRange.Click += new System.Windows.RoutedEventHandler(this.checkBoxCustomRange_Click);
     
     #line default
     #line hidden
     return;
     case 17:
     this.btnAddFav = ((System.Windows.Controls.Label)(target));
     
     #line 179 "..\..\TabPage.xaml"
     this.btnAddFav.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.addFav);
     
     #line default
     #line hidden
     return;
     case 18:
     this.btnExport = ((System.Windows.Controls.Button)(target));
     
     #line 182 "..\..\TabPage.xaml"
     this.btnExport.Click += new System.Windows.RoutedEventHandler(this.export);
     
     #line default
     #line hidden
     return;
     case 19:
     this.sep1 = ((System.Windows.Controls.Separator)(target));
     return;
     case 20:
     this.sep2 = ((System.Windows.Controls.Separator)(target));
     return;
     case 21:
     this.ResultScroll = ((System.Windows.Controls.Grid)(target));
     return;
     case 22:
     this.ResultsPane = ((System.Windows.Controls.ListBox)(target));
     return;
     case 23:
     this.previewPane = ((System.Windows.Controls.ScrollViewer)(target));
     return;
     case 24:
     
     #line 248 "..\..\TabPage.xaml"
     ((System.Windows.Controls.StackPanel)(target)).Loaded += new System.Windows.RoutedEventHandler(this.keyFocus);
     
     #line default
     #line hidden
     return;
     case 25:
     this.Author = ((System.Windows.Controls.Grid)(target));
     return;
     case 26:
     this.Journal = ((System.Windows.Controls.Grid)(target));
     return;
     case 27:
     this.Paper = ((System.Windows.Controls.Grid)(target));
     return;
     case 28:
     this.Pagination = ((System.Windows.Controls.Primitives.UniformGrid)(target));
     return;
     case 29:
     this.statusBar = ((System.Windows.Controls.Primitives.StatusBar)(target));
     return;
     case 30:
     this.textbox = ((System.Windows.Controls.TextBlock)(target));
     return;
     }
     this._contentLoaded = true;
 }
Пример #51
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.Paint = ((Paint.MainWindow)(target));
     
     #line 5 "..\..\MainWindow.xaml"
     this.Paint.KeyDown += new System.Windows.Input.KeyEventHandler(this.Paint_KeyDown);
     
     #line default
     #line hidden
     return;
     case 2:
     this.MyCanvas = ((System.Windows.Controls.Canvas)(target));
     
     #line 8 "..\..\MainWindow.xaml"
     this.MyCanvas.Loaded += new System.Windows.RoutedEventHandler(this.MyCanvas_Loaded);
     
     #line default
     #line hidden
     
     #line 9 "..\..\MainWindow.xaml"
     this.MyCanvas.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.MyCanvas_MouseLeftButtonDown);
     
     #line default
     #line hidden
     
     #line 9 "..\..\MainWindow.xaml"
     this.MyCanvas.MouseMove += new System.Windows.Input.MouseEventHandler(this.MyCanvas_MouseMove);
     
     #line default
     #line hidden
     
     #line 9 "..\..\MainWindow.xaml"
     this.MyCanvas.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.MyCanvas_MouseLeftButtonUp);
     
     #line default
     #line hidden
     return;
     case 3:
     this.gridColor = ((System.Windows.Controls.Grid)(target));
     return;
     case 4:
     this.btnColor1 = ((System.Windows.Controls.Button)(target));
     
     #line 20 "..\..\MainWindow.xaml"
     this.btnColor1.Click += new System.Windows.RoutedEventHandler(this.btnColor1_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     this.btnColor2 = ((System.Windows.Controls.Button)(target));
     
     #line 21 "..\..\MainWindow.xaml"
     this.btnColor2.Click += new System.Windows.RoutedEventHandler(this.btnColor2_Click);
     
     #line default
     #line hidden
     return;
     case 6:
     this.btnMoreColor = ((System.Windows.Controls.Button)(target));
     
     #line 22 "..\..\MainWindow.xaml"
     this.btnMoreColor.Click += new System.Windows.RoutedEventHandler(this.btnMoreColor_Click);
     
     #line default
     #line hidden
     return;
     case 7:
     this.unfgrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
     return;
     case 8:
     this.btnColorBlack = ((System.Windows.Controls.Button)(target));
     
     #line 24 "..\..\MainWindow.xaml"
     this.btnColorBlack.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 9:
     this.btnColorRed = ((System.Windows.Controls.Button)(target));
     
     #line 25 "..\..\MainWindow.xaml"
     this.btnColorRed.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 10:
     this.btnColorOrange = ((System.Windows.Controls.Button)(target));
     
     #line 26 "..\..\MainWindow.xaml"
     this.btnColorOrange.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 11:
     this.btnColorYellow = ((System.Windows.Controls.Button)(target));
     
     #line 27 "..\..\MainWindow.xaml"
     this.btnColorYellow.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 12:
     this.btnColorGreen = ((System.Windows.Controls.Button)(target));
     
     #line 28 "..\..\MainWindow.xaml"
     this.btnColorGreen.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 13:
     this.btnColorBlue = ((System.Windows.Controls.Button)(target));
     
     #line 29 "..\..\MainWindow.xaml"
     this.btnColorBlue.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 14:
     this.btnColorWhite = ((System.Windows.Controls.Button)(target));
     
     #line 30 "..\..\MainWindow.xaml"
     this.btnColorWhite.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 15:
     this.btnColorMagenta = ((System.Windows.Controls.Button)(target));
     
     #line 31 "..\..\MainWindow.xaml"
     this.btnColorMagenta.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 16:
     this.btnColorChocolate = ((System.Windows.Controls.Button)(target));
     
     #line 32 "..\..\MainWindow.xaml"
     this.btnColorChocolate.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 17:
     this.btnColorPurple = ((System.Windows.Controls.Button)(target));
     
     #line 33 "..\..\MainWindow.xaml"
     this.btnColorPurple.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 18:
     this.btnColorLime = ((System.Windows.Controls.Button)(target));
     
     #line 34 "..\..\MainWindow.xaml"
     this.btnColorLime.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 19:
     this.btnColorDeepSkyBlue = ((System.Windows.Controls.Button)(target));
     
     #line 35 "..\..\MainWindow.xaml"
     this.btnColorDeepSkyBlue.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 20:
     this.btnMoreColor1 = ((System.Windows.Controls.Button)(target));
     
     #line 36 "..\..\MainWindow.xaml"
     this.btnMoreColor1.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 21:
     this.btnMoreColor2 = ((System.Windows.Controls.Button)(target));
     
     #line 37 "..\..\MainWindow.xaml"
     this.btnMoreColor2.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 22:
     this.btnMoreColor3 = ((System.Windows.Controls.Button)(target));
     
     #line 38 "..\..\MainWindow.xaml"
     this.btnMoreColor3.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 23:
     this.btnMoreColor4 = ((System.Windows.Controls.Button)(target));
     
     #line 39 "..\..\MainWindow.xaml"
     this.btnMoreColor4.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 24:
     this.btnMoreColor5 = ((System.Windows.Controls.Button)(target));
     
     #line 40 "..\..\MainWindow.xaml"
     this.btnMoreColor5.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 25:
     this.btnMoreColor6 = ((System.Windows.Controls.Button)(target));
     
     #line 41 "..\..\MainWindow.xaml"
     this.btnMoreColor6.Click += new System.Windows.RoutedEventHandler(this.btnColor_Click);
     
     #line default
     #line hidden
     return;
     case 26:
     this.lblShapes = ((System.Windows.Controls.Label)(target));
     return;
     case 27:
     this.cbbShapes = ((System.Windows.Controls.ComboBox)(target));
     
     #line 58 "..\..\MainWindow.xaml"
     this.cbbShapes.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbbShapes_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 28:
     this.lblSize = ((System.Windows.Controls.Label)(target));
     return;
     case 29:
     this.cbbSize = ((System.Windows.Controls.ComboBox)(target));
     
     #line 68 "..\..\MainWindow.xaml"
     this.cbbSize.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbbSize_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 30:
     this.lblFill = ((System.Windows.Controls.Label)(target));
     return;
     case 31:
     this.cbbFill = ((System.Windows.Controls.ComboBox)(target));
     
     #line 79 "..\..\MainWindow.xaml"
     this.cbbFill.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbbFill_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 32:
     this.lblOutLine = ((System.Windows.Controls.Label)(target));
     return;
     case 33:
     this.cbbOutLine = ((System.Windows.Controls.ComboBox)(target));
     
     #line 87 "..\..\MainWindow.xaml"
     this.cbbOutLine.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.cbbOutLine_SelectionChanged);
     
     #line default
     #line hidden
     return;
     case 34:
     this.btnCut = ((System.Windows.Controls.Button)(target));
     
     #line 95 "..\..\MainWindow.xaml"
     this.btnCut.Click += new System.Windows.RoutedEventHandler(this.btnCut_Click);
     
     #line default
     #line hidden
     return;
     case 35:
     this.btnCopy = ((System.Windows.Controls.Button)(target));
     
     #line 96 "..\..\MainWindow.xaml"
     this.btnCopy.Click += new System.Windows.RoutedEventHandler(this.btnCopy_Click);
     
     #line default
     #line hidden
     return;
     case 36:
     this.btnPaste = ((System.Windows.Controls.Button)(target));
     
     #line 97 "..\..\MainWindow.xaml"
     this.btnPaste.Click += new System.Windows.RoutedEventHandler(this.btnPaste_Click);
     
     #line default
     #line hidden
     return;
     case 37:
     this.btnSave = ((System.Windows.Controls.Button)(target));
     
     #line 98 "..\..\MainWindow.xaml"
     this.btnSave.Click += new System.Windows.RoutedEventHandler(this.btnSave_Click);
     
     #line default
     #line hidden
     return;
     case 38:
     this.Load = ((System.Windows.Controls.Button)(target));
     
     #line 99 "..\..\MainWindow.xaml"
     this.Load.Click += new System.Windows.RoutedEventHandler(this.Load_Click);
     
     #line default
     #line hidden
     return;
     case 39:
     this.Undo = ((System.Windows.Controls.Button)(target));
     
     #line 101 "..\..\MainWindow.xaml"
     this.Undo.Click += new System.Windows.RoutedEventHandler(this.Undo_Click);
     
     #line default
     #line hidden
     return;
     case 40:
     this.Redo = ((System.Windows.Controls.Button)(target));
     
     #line 102 "..\..\MainWindow.xaml"
     this.Redo.Click += new System.Windows.RoutedEventHandler(this.Redo_Click);
     
     #line default
     #line hidden
     return;
     case 41:
     this.btnFont = ((System.Windows.Controls.Button)(target));
     
     #line 103 "..\..\MainWindow.xaml"
     this.btnFont.Click += new System.Windows.RoutedEventHandler(this.btnFont_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Пример #52
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 50 "..\..\..\UserControls\Categories.xaml"
     ((System.Windows.Controls.TabControl)(target)).SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.categoryTabController);
     
     #line default
     #line hidden
     return;
     case 2:
     this.categoriesListInnerTab = ((System.Windows.Controls.TabItem)(target));
     return;
     case 3:
     this.CategoriesContainer = ((System.Windows.Controls.Primitives.UniformGrid)(target));
     return;
     case 4:
     this.addCategoryTab = ((System.Windows.Controls.TabItem)(target));
     return;
     case 5:
     this.categoryName = ((System.Windows.Controls.TextBox)(target));
     return;
     case 6:
     
     #line 67 "..\..\..\UserControls\Categories.xaml"
     ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
     
     #line default
     #line hidden
     return;
     }
     this._contentLoaded = true;
 }
Пример #53
0
        public EditorNavigationMargin(IWpfTextView wpfTextView, IEnumerable<IEditorNavigationSource> sources, IEditorNavigationTypeRegistryService editorNavigationTypeRegistryService)
        {
            Contract.Requires<ArgumentNullException>(wpfTextView != null, "wpfTextView");
            Contract.Requires<ArgumentNullException>(sources != null, "sources");
            Contract.Requires<ArgumentNullException>(editorNavigationTypeRegistryService != null, "editorNavigationTypeRegistryService");

            this._wpfTextView = wpfTextView;
            this._sources = sources;
            this._editorNavigationTypeRegistryService = editorNavigationTypeRegistryService;

            _navigationControls =
                this._sources
                .SelectMany(source => source.GetNavigationTypes())
                .Distinct()
                //.OrderBy(...)
                .Select(type => Tuple.Create(type, default(EditorNavigationComboBox)))
                .ToArray();

            if (this._navigationControls.Length == 0)
            {
                this._container =
                    new UniformGrid()
                    {
                        Visibility = Visibility.Collapsed
                    };

                return;
            }

            this._container = new UniformGrid()
            {
                Columns = _navigationControls.Length,
                Rows = 1
            };

            _navigationControls = Array.ConvertAll(_navigationControls,
                pair =>
                {
                    EditorNavigationComboBox comboBox =
                        new EditorNavigationComboBox()
                        {
                            Cursor = Cursors.Arrow,
                            ToolTip = new ToolTip()
                            {
                                Content = pair.Item1.Definition.DisplayName
                            }
                        };

                    comboBox.DropDownOpened += OnDropDownOpened;
                    comboBox.SelectionChanged += OnSelectionChanged;
                    return Tuple.Create(pair.Item1, comboBox);
                });

            foreach (var controlPair in _navigationControls)
            {
                this._container.Children.Add(controlPair.Item2);
            }

            this._wpfTextView.Caret.PositionChanged += OnCaretPositionChanged;
            foreach (var source in this._sources)
            {
                source.NavigationTargetsChanged += WeakEvents.AsWeak(OnNavigationTargetsChanged, eh => source.NavigationTargetsChanged -= eh);
                UpdateNavigationTargets(source);
            }

        }
Пример #54
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.PlayerTurns = ((System.Windows.Controls.Label)(target));
     return;
     case 2:
     this.Movement = ((System.Windows.Controls.Label)(target));
     return;
     case 3:
     this.Board = ((System.Windows.Controls.Primitives.UniformGrid)(target));
     return;
     case 4:
     this.Promote = ((System.Windows.Controls.Primitives.UniformGrid)(target));
     return;
     case 5:
     this.Queen = ((System.Windows.Controls.Button)(target));
     return;
     case 6:
     this.Bishop = ((System.Windows.Controls.Button)(target));
     return;
     case 7:
     this.Rook = ((System.Windows.Controls.Button)(target));
     return;
     case 8:
     this.Knight = ((System.Windows.Controls.Button)(target));
     return;
     }
     this._contentLoaded = true;
 }
Пример #55
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.root = ((Technewlogic.WpfDialogManagement.DialogBaseControl)(target));
     return;
     case 2:
     this.BackgroundImageHolder = ((System.Windows.Controls.ContentControl)(target));
     return;
     case 3:
     this.ButtonsGrid = ((System.Windows.Controls.Primitives.UniformGrid)(target));
     return;
     case 4:
     this.CustomContent = ((System.Windows.Controls.ContentControl)(target));
     return;
     }
     this._contentLoaded = true;
 }
Пример #56
0
        internal static void InstallTab()
        {
            Application.Current.Dispatcher.Invoke(
                () =>
                {

                    var mainWindow = Application.Current.MainWindow;

                    var dumpers = new StackPanel { Background = Brushes.DimGray, Height = 176, Margin = new Thickness(2, 2, 0, 2) };
                    dumpers.Children.Add(CreateTitle("Dumpers"));
                    dumpers.Children.Add(CreateButton("Map Markers", DumpMapMarkers_Click));
                    dumpers.Children.Add(CreateButton("All Actors", DumpObjects_Click));
                    dumpers.Children.Add(CreateButton("Specific Actor", DumpActor_Click));
                    dumpers.Children.Add(CreateButton("Unsupported Bounties", DumpUnsupportedBounties_Click));
                    dumpers.Children.Add(CreateButton("Scenes", DumpLevelAreaScenes_Click));
                    dumpers.Children.Add(CreateButton("Toggle MapUI", ToggleRadarUI_Click, default(Thickness), new SolidColorBrush(Colors.NavajoWhite) { Opacity = 0.2 }));

                    var coroutineHelpers = new StackPanel { Background = Brushes.DimGray, Height = 176, Margin = new Thickness(2, 2, 0, 2) };
                    coroutineHelpers.Children.Add(CreateTitle("Coroutines"));
                    coroutineHelpers.Children.Add(CreateButton("Move To Position", MoveToPosition_Click));
                    coroutineHelpers.Children.Add(CreateButton("Move To Map Marker", MoveToMapMarker_Click));
                    coroutineHelpers.Children.Add(CreateButton("Move To Actor", MoveToActor_Click));
                    coroutineHelpers.Children.Add(CreateButton("Enter LevelA rea", EnterLevelArea_Click));
                    coroutineHelpers.Children.Add(CreateButton("Clear Level Area", ClearLevelArea_Click));
                    coroutineHelpers.Children.Add(CreateButton("Clear Area For N Seconds", ClearAreaForNSeconds_Click));

                    var coroutineHelpers2 = new StackPanel { Background = Brushes.DimGray, Height = 176, Margin = new Thickness(0, 2, 2, 2) };
                    coroutineHelpers2.Children.Add(CreateTitle(" "));
                    coroutineHelpers2.Children.Add(CreateButton("Wait For N Seconds", WaitForNSeconds_Click, new Thickness(0, 2.5, 5, 2.5)));
                    coroutineHelpers2.Children.Add(CreateButton("Interact With Gizmo", InteractWithGizmo_Click, new Thickness(0, 2.5, 5, 2.5)));
                    coroutineHelpers2.Children.Add(CreateButton("Interact With Unit", InteractWithUnit_Click, new Thickness(0, 2.5, 5, 2.5)));
                    coroutineHelpers2.Children.Add(CreateButton("MoveToScene", MoveToScene_Click, new Thickness(0, 2.5, 5, 2.5)));
                    coroutineHelpers2.Children.Add(CreateButton("MoveToScenePosition", MoveToScenePosition_Click, new Thickness(0, 2.5, 5, 2.5)));

                    var tests = new StackPanel { Background = Brushes.DimGray, Height = 176, Margin = new Thickness(0, 2, 2, 2) };
                    tests.Children.Add(CreateTitle("Tests"));
                    tests.Children.Add(CreateButton("Dump Experience", DumpExperience_Click));
                    tests.Children.Add(CreateButton("Dump Me", DumpMe_Click));
                    tests.Children.Add(CreateButton("Dump Bounty Quests", DumpBountyQuests_Click));
                    tests.Children.Add(CreateButton("Dump Backpack", DumpBackpack_Click));
                    tests.Children.Add(CreateButton("Dump Party Members", DumpParty_Click));
                    tests.Children.Add(CreateButton("Dump Test1", DumpDynamicBounty_Click));                    
                    //tests.Children.Add(CreateButton("Dump Waypoint", DumpWaypoint_Click));



                    //var mapUiContainer = new StackPanel { Background = Brushes.DimGray, Height = 176, Margin = new Thickness(0, 2, 0, 2)};

                    //var mapUiButton = new Button();
                    //mapUiButton.Click += ToggleRadarUI_Click;
                    //mapUiButton.Content = "Toggle\r\nMap UI";
                    //mapUiButton.Margin = new Thickness(5);
                    //mapUiButton.Background = new SolidColorBrush(Colors.NavajoWhite) {Opacity = 0.2};
                    //mapUiButton.Height = 166;
                    //mapUiButton.FontWeight = FontWeights.Bold;
                    //mapUiButton.FontSize = 26;
                    //mapUiButton.Width = 140;
                    //mapUiButton.HorizontalAlignment = HorizontalAlignment.Left;
                    //mapUiButton.VerticalAlignment = VerticalAlignment.Top;
                    //mapUiContainer.Children.Add(mapUiButton);

                    var uniformGrid = new UniformGrid
                    {
                        HorizontalAlignment = HorizontalAlignment.Left,
                        VerticalAlignment = VerticalAlignment.Top,
                        MaxHeight = 180,
                        Columns = 4
                    };

                    //uniformGrid.Children.Add(mapUiContainer);
                    uniformGrid.Children.Add(dumpers);
                    uniformGrid.Children.Add(coroutineHelpers);
                    uniformGrid.Children.Add(coroutineHelpers2);
                    uniformGrid.Children.Add(tests);


                    _tabItem = new TabItem
                    {
                        Header = "Adventurer",
                        ToolTip = "Developer Tools",
                        Content = uniformGrid,
                    };

                    var tabs = mainWindow.FindName("tabControlMain") as TabControl;
                    if (tabs == null)
                        return;

                    tabs.Items.Add(_tabItem);
                }
            );
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 4 "..\..\MainWindow.xaml"
     ((WpfApplication1.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded_1);
     
     #line default
     #line hidden
     
     #line 4 "..\..\MainWindow.xaml"
     ((WpfApplication1.MainWindow)(target)).PreviewKeyDown += new System.Windows.Input.KeyEventHandler(this.Window_PreviewKeyDown_1);
     
     #line default
     #line hidden
     return;
     case 2:
     this.main = ((System.Windows.Controls.Grid)(target));
     return;
     case 3:
     this.ugdBoard = ((System.Windows.Controls.Primitives.UniformGrid)(target));
     return;
     case 4:
     this.Map = ((System.Windows.Controls.Image)(target));
     return;
     }
     this._contentLoaded = true;
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 2 "..\..\ServiceCalls.xaml"
     ((BMC.Presentation.POS.ServiceCalls)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);
     
     #line default
     #line hidden
     return;
     case 2:
     this.btnExit = ((System.Windows.Controls.Button)(target));
     
     #line 14 "..\..\ServiceCalls.xaml"
     this.btnExit.Click += new System.Windows.RoutedEventHandler(this.btnExit_Click_1);
     
     #line default
     #line hidden
     return;
     case 3:
     this.grdServiceCalls = ((System.Windows.Controls.Primitives.UniformGrid)(target));
     return;
     case 4:
     this.lblStatus = ((System.Windows.Controls.Label)(target));
     return;
     case 5:
     this.progressBar1 = ((System.Windows.Controls.ProgressBar)(target));
     return;
     case 6:
     this.lblSerialNo = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 7:
     this.lblAsset = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 8:
     this.lblManufacturer = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 9:
     this.lblGame = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 10:
     this.pnlHeader = ((System.Windows.Controls.Grid)(target));
     return;
     case 11:
     this.txtHeader = ((System.Windows.Controls.TextBlock)(target));
     return;
     }
     this._contentLoaded = true;
 }
Пример #59
0
        private void CreateNewScript()
        {
            HandleUnsavedChanges();

            //Build a dialog for the user to enter the script name and type
            var dialog = new CustomDialog();

            StackPanel panel = new StackPanel();

            Label label = new Label() { Content = "Enter script name:" };
            TextBox textBox = new TextBox();

            StackPanel radioBtnPanel = new StackPanel { Orientation = Orientation.Horizontal };
            var orderRadioBtn = new RadioButton { Content = "Order Script", IsChecked = true, Margin = new Thickness(5) };
            var tradeRadioBtn = new RadioButton { Content = "Trade Script", IsChecked = false, Margin = new Thickness(5) };
            radioBtnPanel.Children.Add(orderRadioBtn);
            radioBtnPanel.Children.Add(tradeRadioBtn);

            UniformGrid btnPanel = new UniformGrid { Columns = 2, HorizontalAlignment = HorizontalAlignment.Stretch };
            Button nextBtn = new Button { Content = "Create Script", Margin = new Thickness(5) };
            nextBtn.Click += (s, e) =>
                {
                    string scriptType = (orderRadioBtn.IsChecked.HasValue && orderRadioBtn.IsChecked.Value) ? "Order" : "Trade";
                    CreateNewScript(textBox.Text, scriptType);
                    _dialogService.HideMetroDialogAsync(this, dialog);

                };

            Button cancelBtn = new Button { Content = "Cancel", Margin = new Thickness(5) };
            cancelBtn.Click += (s, e) =>
                {
                    _dialogService.HideMetroDialogAsync(this, dialog);
                };

            btnPanel.Children.Add(nextBtn);
            btnPanel.Children.Add(cancelBtn);


            panel.Children.Add(label);
            panel.Children.Add(textBox);
            panel.Children.Add(radioBtnPanel);
            panel.Children.Add(btnPanel);

            dialog.Content = panel;

            //There is no point to awaiting this one, it returns immediately
            _dialogService.ShowMetroDialogAsync(this, dialog);
        }
Пример #60
0
        public override void Initialize(MainWindow mainwindow)
        {
            base.Initialize(mainwindow);

            UniformGrid grid = new UniformGrid();
            grid.Columns = 2;
            Border b1 = new Border();
            b1.Style = (Style)App.Current.Resources["Border_Default"];
            b1.Child = this.ListBox_ResourcePanels;
            this.ListBox_ResourcePanels.SelectionChanged += ListBox_ResourcePanels_SelectionChanged;
            //UniformGrid SaveGrid = new UniformGrid();
            //SaveGrid.Rows = 2;
            StackPanel savestack = new StackPanel();
            TextBlock textblock_save = new TextBlock();
            textblock_save.Text = "保存用";
            Button Button_Save = new Button();
            Button_Save.Click += Button_Save_Click;
            Button_Save.Content = "保存";
            Button Button_Stop_save = new Button();
            Button_Stop_save.Click += Button_Stop_save_Click;
            Button_Stop_save.Content = "停止";
            Button Button_savefolder = new Button();
            Button_savefolder.Click += Button_savefile_Click;
            Button_savefolder.Content = "フォルダ選択";

            textbox_SavefileName.Text = "name";
            Button Button_FileName = new Button();
            Button_FileName.Click += Button_FileName_Click;
            Button_FileName.Content = "名前変更";

            size.Items.Add("320,240");
            size.Items.Add("512,424");

            SliderTextBox = new SliderAndTextControl();
            savestack.Children.Add(SliderTextBox);
            SliderTextBox.TextBlock_Title.Text = "Image Index : ";
            SliderTextBox.Slider_Main.ValueChanged += Slider_Main_ValueChanged;

            savestack.Children.Add(textblock_save);
            savestack.Children.Add(Button_Save);

            savestack.Children.Add(Button_Stop_save);
            savestack.Children.Add(Button_savefolder);
            savestack.Children.Add(textbox_SavefileName);
            savestack.Children.Add(Button_FileName);
            savestack.Children.Add(size);
            grid.Children.Add(savestack);
            grid.Children.Add(b1);

            Grid.SetColumn(b1, 0);

            Border b2 = new Border();
            b2.Style = (Style)App.Current.Resources["Border_Default"];
            StackPanel loadstack = new StackPanel();
            TextBlock textblock_load = new TextBlock();
            textblock_load.Text = "再生用";
            Button Button_Loadone = new Button();
            Button_Loadone.Click += Button_Loadone_Click;
            Button_Loadone.Content = "読み込み";
            Button Button_Load = new Button();
            Button_Load.Click += Button_Load_Click;
            Button_Load.Content = "再生";
            Button Button_Stop_load = new Button();
            Button_Stop_load.Click += Button_Stop_load_Click; ;
            Button_Stop_load.Content = "終了";
            Button Button_loadfolder = new Button();
            Button_loadfolder.Click += Button_loadfolder_Click;
            Button_loadfolder.Content = "フォルダ選択";
            textbox_LoadfileName.Text = "name";
            Button Button_LoadFileName = new Button();
            Button_LoadFileName.Click += Button_LoadFileName_Click; ;
            Button_LoadFileName.Content = "名前変更";

            loadstack.Children.Add(textblock_load);
            loadstack.Children.Add(Button_Loadone);
            loadstack.Children.Add(Button_Load);
            loadstack.Children.Add(Button_Stop_load);
            loadstack.Children.Add(Button_loadfolder);
            loadstack.Children.Add(textbox_LoadfileName);
            loadstack.Children.Add(Button_LoadFileName);

            grid.Children.Add(loadstack);
            grid.Children.Add(b2);
            Grid.SetColumn(b2, 1);


            StackPanel stackpanel = new StackPanel();


            Button Button_Update = new Button();
            Button_Update.Content = "Update";
            Button_Update.Click += Button_Update_Click;

            Button Button_Delete = new Button();
            Button_Delete.Click += Button_Delete_Click;
            Button_Delete.Content = "Delete";


            //stackpanel.Children.Add(Button_Add);
            stackpanel.Children.Add(Button_Update);

            stackpanel.Children.Add(Button_Delete);
            base.AddContent(stackpanel, Dock.Top);
            base.AddContent(grid, Dock.Top);

            this.SetImageToGridChildren(this.Image_Load);
            Image_Load.Source = loadbit;
            this.AddContent(base.Grid_Image, Dock.Bottom);

            this.UpdateLists();

            var timer = new Timer(new TimerCallback(loadtimercallback), null, 0, 30);

        }