public HomePage () { InitializeComponent (); tealTemplate = (ControlTemplate)Application.Current.Resources ["TealTemplate"]; aquaTemplate = (ControlTemplate)Application.Current.Resources ["AquaTemplate"]; }
public void Template_Doesnt_Get_Executed_On_Set() { bool executed = false; var template = new ControlTemplate(_ => { executed = true; return new Control(); }); var target = new TemplatedControl { Template = template, }; Assert.False(executed); }
public void Template_Gets_Executed_On_Measure() { bool executed = false; var template = new ControlTemplate(_ => { executed = true; return new Control(); }); var target = new TemplatedControl { Template = template, }; target.Measure(new Size(100, 100)); Assert.True(executed); }
public void Template_Result_Becomes_Visual_Child() { Control templateResult = new Control(); var template = new ControlTemplate(_ => { return templateResult; }); var target = new TemplatedControl { Template = template, }; target.Measure(new Size(100, 100)); var children = target.GetVisualChildren().ToList(); Assert.Equal(new[] { templateResult }, children); }
public static ControlTemplate FromControl(Control control) { ControlTemplate ct = new ControlTemplate(); ct.Name = control.Name; ct.Class = control.ToString(); ct.Properties = new List<PropertyTemplate> { new PropertyTemplate("Left", control.Left), new PropertyTemplate("Top", control.Top), new PropertyTemplate("MinimumWidth", control.MinimumWidth), new PropertyTemplate("Height", control.Height), new PropertyTemplate("Width", control.Width), new PropertyTemplate("Anchor", (int) control.Anchor), }; if (control.Text != null) ct.Properties.Add(new PropertyTemplate("Text", control.Text)); if (control.StayOnBack) ct.Properties.Add(new PropertyTemplate("StayOnBack", control.StayOnBack)); if (control.Passive) ct.Properties.Add(new PropertyTemplate("Passive", control.Passive)); if (control is Label) ct.Properties.Add(new PropertyTemplate("Alignment", (int) (control as Label).Alignment)); //if (control is ImageBox) // ct.Properties.Add(new PropertyTemplate("Image", (control as ImageBox).Image)); ct.Controls = new List<ControlTemplate>(); foreach (var c in control.Controls) ct.Controls.Add(FromControl(c)); return ct; }
public void Template_Child_Of_Control_With_Two_Classes() { var template = new ControlTemplate(parent => { return new Border { Name = "border", }; }); var control = new Button { Template = template, }; control.ApplyTemplate(); var selector = new Selector() .OfType<Button>() .Class("foo") .Class("bar") .Template() .Name("border"); var border = (Border)((IVisual)control).VisualChildren.Single(); var values = new List<bool>(); var activator = selector.Match(border).ObservableResult; activator.Subscribe(x => values.Add(x)); Assert.Equal(new[] { false }, values); control.Classes.Add("foo", "bar"); Assert.Equal(new[] { false, true }, values); control.Classes.Remove("foo"); Assert.Equal(new[] { false, true, false }, values); }
public ConsumerControl(object dataContext, double buttonSize) { this.Button = new Button(); this.ButtonCanvas = new Canvas(); //Canvas.SetLeft(this, left); //Canvas.SetTop(this, top); //Canvas.SetZIndex(this, z); this.ButtonCanvas.Height = buttonSize; this.ButtonCanvas.Width = buttonSize; this.Button.Height = buttonSize; this.Button.Width = buttonSize; this.DataContext = dataContext; FrameworkElement frameworkElement = new FrameworkElement(); Style style = new Style(); style.TargetType = typeof(Button); Setter setter = new Setter(); setter.Property = Button.TemplateProperty; ControlTemplate template = new ControlTemplate(typeof(Button)); FrameworkElementFactory elemFactory = new FrameworkElementFactory(typeof(Border)); elemFactory.Name = "Border"; elemFactory.SetValue(Border.CornerRadiusProperty, new CornerRadius(buttonSize / 2)); elemFactory.SetValue(Border.BackgroundProperty, (SolidColorBrush)frameworkElement.FindResource("SwitchColorClosed")); template.VisualTree = elemFactory; Trigger trigger1 = new Trigger(); trigger1.Property = Button.IsMouseOverProperty; trigger1.Value = true; Setter setter1 = new Setter(); setter1.Property = Border.BackgroundProperty; setter1.Value = (SolidColorBrush)frameworkElement.FindResource("SwitchColorClosed"); setter1.TargetName = "Border"; trigger1.Setters.Add(setter1); template.Triggers.Add(trigger1); Trigger trigger2 = new Trigger(); trigger2.Property = Button.IsPressedProperty; trigger2.Value = true; Setter setter2 = new Setter(); setter2.Property = Border.BackgroundProperty; setter2.Value = (SolidColorBrush)frameworkElement.FindResource("SwitchColorClosed"); setter2.TargetName = "Border"; trigger2.Setters.Add(setter2); template.Triggers.Add(trigger2); DataTrigger dataTrigger1 = new DataTrigger(); dataTrigger1.Binding = new Binding("IsEnergized"); dataTrigger1.Value = false; Setter dataSetter1 = new Setter(); dataSetter1.Property = Border.BackgroundProperty; dataSetter1.Value = Brushes.Blue; dataSetter1.TargetName = "Border"; dataTrigger1.Setters.Add(dataSetter1); template.Triggers.Add(dataTrigger1); setter.Value = template; style.Triggers.Clear(); style.Setters.Add(setter); this.Button.Style = style; this.ButtonCanvas.Children.Add(Button); this.Children.Add(this.ButtonCanvas); EnergyConsumerProperties consumerProperties = (EnergyConsumerProperties)dataContext; if (consumerProperties.IsUnderScada) { Canvas scadaCanvas = new Canvas(); Border scadaBorder = new Border() { Height = buttonSize / 2, Width = buttonSize / 2, Background = Brushes.DarkOrange, BorderBrush = Brushes.White, ToolTip = "Under SCADA" }; scadaBorder.CornerRadius = new CornerRadius(scadaBorder.Height / 2); scadaBorder.BorderThickness = new Thickness(scadaBorder.Height / 10); Canvas.SetLeft(scadaBorder, -(scadaBorder.Width / 4)); Canvas.SetTop(scadaBorder, -(scadaBorder.Height / 4)); scadaCanvas.Children.Add(scadaBorder); TextBlock scadaTextblock = new TextBlock() { Text = "S", Foreground = Brushes.White, ToolTip = "Under SCADA", HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Center, FontSize = 4 * scadaBorder.Height / 5, Margin = new Thickness(0, 0, 0, scadaBorder.Height / 6) }; scadaBorder.Child = scadaTextblock; this.ButtonCanvas.Children.Add(scadaCanvas); } }
//////////////////////////////////////////////////////////////////////////// private static Control LoadControl(Manager manager, ControlTemplate controlTemplate, Type type, Control parent) { Control c = null; Object[] args; if (controlTemplate.Class.StartsWith("TomShane.Neoforce.Controls.ScrollBar")) args = new Object[] { manager, controlTemplate.Orientation }; else args = new Object[] { manager }; c = (Control)type.InvokeMember(null, BindingFlags.CreateInstance, null, null, args); c.Init(); if (parent != null) c.Parent = parent; c.Name = controlTemplate.Name; if (controlTemplate.Properties.Count >= 0) { LoadProperties(controlTemplate.Properties, c); } foreach (ControlTemplate controlTemplateChild in controlTemplate.Controls) { Type t = Type.GetType(controlTemplateChild.Class); if (t == null) { List<Assembly> assemblies = AppDomain.CurrentDomain.GetAssemblies().ToList(); foreach (var assembly in assemblies) { // try to load directly from full name t = assembly.GetType(controlTemplateChild.Class); if (t != null) break; // load from short name (should not happen) t = assembly.GetType("TomShane.Neoforce.Controls." + controlTemplateChild.Class); if (t != null) break; } } if (t == null) throw new Exception("Cannot load '" + controlTemplateChild.Class + "'"); LoadControl(manager, controlTemplateChild, t, c); } return c; }
public Issue12484CustomView() { ControlTemplate = new ControlTemplate(typeof(Issue12484Template)); }
public static void SetStyle(Button button, Brush unpressedBrush, Brush mouseOverBrush, Brush pressedBrush, Brush unpressedPen, Brush mouseOverPen, Brush pressedPen, double radius, bool bShine) { Initialise("Button1"); ControlTemplate template = null; foreach (Setter setter in style.Setters) { if (setter.Property == Button.TemplateProperty) { template = (ControlTemplate)setter.Value; foreach (Trigger trigger in template.Triggers) { if (trigger.Property == Button.IsMouseOverProperty) { foreach (Setter setter1 in trigger.Setters) { if (setter1.TargetName == "buttonBackground") { setter1.Value = mouseOverBrush; } else if (setter1.TargetName == "contentPresenter") { setter1.Value = mouseOverPen; } } } else if (trigger.Property == Button.IsPressedProperty) { foreach (Setter setter1 in trigger.Setters) { if (setter1.TargetName == "buttonBackground") { setter1.Value = pressedBrush; } else if (setter1.TargetName == "contentPresenter") { setter1.Value = pressedPen; } } } } } } button.Width = button.ActualWidth; button.Height = button.ActualHeight; button.Background = unpressedBrush; button.Foreground = unpressedPen; button.FocusVisualStyle = null; button.Style = style; button.UpdateLayout(); Rectangle rectangle = (Rectangle)button.Template.FindName("buttonBackground", button); rectangle.RadiusX = radius; rectangle.RadiusY = radius; rectangle = (Rectangle)button.Template.FindName("buttonShine", button); rectangle.Visibility = bShine ? Visibility.Visible : Visibility.Hidden; rectangle.RadiusX = radius * 0.67; rectangle.RadiusY = radius * 0.67; }
public static void SetConnectorDecoratorTemplate(UIElement element, ControlTemplate value) { element.SetValue(ConnectorDecoratorTemplateProperty, value); }
public GalleryTemplateTransform(Dictionary <string, ControlTemplate> defaultValueTemplates, EditorStateStore stateStore) { defaultValueTemplates.TryGetValue(_childTemplateName, out var template); _galleryTemplate = template; _controlStore = stateStore; }
public static void SetAttachContent(DependencyObject obj, ControlTemplate value) { obj.SetValue(AttachContentProperty, value); }
private void Window_Loaded(object sender, RoutedEventArgs e) { if (!Setting()) { Application.Current.Shutdown(); return; } Restr.ServerType = Restr.ServerType == "" ? mConfigData.Options.League : Restr.ServerType; Restr.ServerType = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(Restr.ServerType.ToLower()).Replace(" ", "%20"); Restr.ServerLang = (byte)(mConfigData.Options.Server == "en" ? 1 : 0); ComboBox[] cbs = { cbOrbs, cbSplinters, cbCorrupt, cbPriceListCount, cbInfluence1, cbInfluence2 }; foreach (ComboBox cb in cbs) { ControlTemplate ct = cb.Template; Popup popup = ct.FindName("PART_Popup", cb) as Popup; if (popup != null) { popup.Placement = PlacementMode.Top; } } int cnt = 0; cbOrbs.Items.Add("Select the orbs you want to exchange"); cbSplinters.Items.Add("Select the fossils, splinters you want"); foreach (KeyValuePair <string, string> item in Restr.lExchangeCurrency) { if (item.Key == "Blacksmith Whetstone") { break; } if (cnt++ > 33) { cbSplinters.Items.Add(item.Key); } else { cbOrbs.Items.Add(item.Key); } } mMainHwnd = new WindowInteropHelper(this).Handle; if (mAdministrator) { foreach (var item in mConfigData.Shortcuts) { if (item.Keycode > 0 && (item.Value ?? "") != "") { if (!mDisableClip && item.Value.ToLower() == "{run}") { mDisableClip = true; } else if (item.Value.ToLower() == "{close}") { closeKeyCode = item.Keycode; } } } } HwndSource source = HwndSource.FromHwnd(mMainHwnd); source.AddHook(new HwndSourceHook(WndProc)); string tmp = "Program version " + GetFileVersion() + " 을(를) 시작합니다." + '\n' + '\n' + "* Usage: In game press Ctrl + C on an in-game item." + '\n' + "* To close the program, right click on the tray icon." + '\n' + '\n' + (mAdministrator ? "Additional shortcuts have been enabled" : "To use the additional shortcuts, the program must be ran as administrator") + ""; if (mConfigData.Options.CheckUpdates && CheckUpdates()) { MessageBoxResult result = MessageBox.Show(Application.Current.MainWindow, tmp + '\n' + '\n' + "The latest version of this program has been found." + '\n' + "Would you like to get that verison now?", "POE 거래소 검색", MessageBoxButton.YesNo, MessageBoxImage.Question ); if (result == MessageBoxResult.Yes) { Process.Start("https://github.com/redSol/PoeTradeSearchEN/releases"); mTerminate = true; Close(); } } else { if (!mConfigData.Options.DisableStartupMessage) { MessageBox.Show(Application.Current.MainWindow, tmp + '\n' + "Press the top of the program (?) for more information.", "POETradeSearch - created by phiDelPark"); } } if (!mDisableClip) { IntPtr mNextClipBoardViewerHWnd = Native.SetClipboardViewer(new WindowInteropHelper(this).Handle); } if (mAdministrator) { //InstallRegisterHotKey(); // 창 활성화 후킹 사용시 가끔 꼬여서 타이머로 교체 (타이머를 쓰면 다른 목적으로 사용도 가능하고...) //EventHook.EventAction += new EventHandler(WinEvent); //EventHook.Start(); DispatcherTimer timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromMilliseconds(1000); timer.Tick += new EventHandler(Timer_Tick); timer.Start(); if (mConfigData.Options.CtrlWheel) { MouseHookCallbackTime = Convert.ToDateTime(DateTime.Now); MouseHook.MouseAction += new EventHandler(MouseEvent); MouseHook.Start(); } } this.Title += " - " + Restr.ServerType; this.Visibility = Visibility.Hidden; }
public TestView() { ControlTemplate = new ControlTemplate(typeof(ContentControl)); }
void CreatePopUpOnToggled() { FilteredOutValues.Clear(); SearchedListResult.Clear(); TemporaryFilteredOutValues.Clear(); InSearchTemporaryFilteredOutValues.Clear(); IList DataSourceForPopUp = TotalDataSource.ToList(); ListCollectionView viewForPopUp = new ListCollectionView(DataSourceForPopUp); Dictionary <String, Predicate <T> > dictionaryForPopUp = new Dictionary <String, Predicate <T> >(); foreach (var item in DictionaryFilter) { var arrayS = item.Key.Split('_'); if (!arrayS[0].Equals(HeaderTextNoUnderscore)) { dictionaryForPopUp.Add(item.Key, item.Value); } } viewForPopUp.Filter = (obj) => { T c = (T)obj; return(dictionaryForPopUp.Values.Aggregate(true, (prevValue, predicate) => prevValue && predicate(c))); }; PopUpFilterValues = viewForPopUp.Cast <T>().Select(o => o.GetValueOfField(HeaderText)).Distinct().OrderBy(o => o).Cast <String>().ToList(); int indexOfBlank = PopUpFilterValues.IndexOf(String.Empty); if (indexOfBlank != -1) { PopUpFilterValues.Remove(String.Empty); PopUpFilterValues.Insert(indexOfBlank, "(Blanks)"); } ListCollectionView viewForPopUpToTick = new ListCollectionView(DataSourceForPopUp); viewForPopUpToTick.Filter = (obj) => { T c = (T)obj; return(DictionaryFilter.Values.Aggregate(true, (prevValue, predicate) => prevValue && predicate(c))); }; List <String> PopUpFilterValuesToTick = viewForPopUpToTick.Cast <T>().Select(o => o.GetValueOfField(HeaderText)).Distinct().OrderBy(o => o).Cast <String>().ToList(); int indexOfBlankToTick = PopUpFilterValuesToTick.IndexOf(String.Empty); if (indexOfBlankToTick != -1) { PopUpFilterValuesToTick.Remove(String.Empty); PopUpFilterValuesToTick.Insert(indexOfBlankToTick, "(Blanks)"); } TemporaryFilteredOutValues = new ObservableCollection <String>(); if (PopUpFilterValues.Count != PopUpFilterValuesToTick.Count) { foreach (String s in PopUpFilterValues) { if (!PopUpFilterValuesToTick.Contains(s)) { FilteredOutValues.Add(s); TemporaryFilteredOutValues.Add(s); } } } Grid GlobalGridInPopUp = new Grid(); ColumnDefinition PupUpGridColumnDefinition = new ColumnDefinition(); PupUpGridColumnDefinition.Width = new GridLength(1, GridUnitType.Star); RowDefinition PopUpGridRowDefinition0 = new RowDefinition(); RowDefinition PopUpGridRowDefinition1 = new RowDefinition(); RowDefinition PopUpGridRowDefinition2 = new RowDefinition(); RowDefinition PopUpGridRowDefinition3 = new RowDefinition(); PopUpGridRowDefinition0.Height = new GridLength(1, GridUnitType.Auto); PopUpGridRowDefinition1.Height = new GridLength(1, GridUnitType.Star); PopUpGridRowDefinition2.Height = new GridLength(1, GridUnitType.Auto); PopUpGridRowDefinition3.Height = new GridLength(1, GridUnitType.Auto); GlobalGridInPopUp.ColumnDefinitions.Add(PupUpGridColumnDefinition); GlobalGridInPopUp.RowDefinitions.Add(PopUpGridRowDefinition0); GlobalGridInPopUp.RowDefinitions.Add(PopUpGridRowDefinition1); GlobalGridInPopUp.RowDefinitions.Add(PopUpGridRowDefinition2); GlobalGridInPopUp.RowDefinitions.Add(PopUpGridRowDefinition3); Grid SearchGrid = new Grid(); RowDefinition SearchGridRowDefinition = new RowDefinition(); SearchGridRowDefinition.Height = new GridLength(1, GridUnitType.Auto); ColumnDefinition SearchGridColumnDefinition0 = new ColumnDefinition(); ColumnDefinition SearchGridColumnDefinition1 = new ColumnDefinition(); SearchGridColumnDefinition0.Width = new GridLength(1, GridUnitType.Auto); SearchGridColumnDefinition1.Width = new GridLength(1, GridUnitType.Star); SearchGrid.RowDefinitions.Add(SearchGridRowDefinition); SearchGrid.ColumnDefinitions.Add(SearchGridColumnDefinition0); SearchGrid.ColumnDefinitions.Add(SearchGridColumnDefinition1); TextBox SearchBox = new TextBox(); SearchBox.MinWidth = 135; SearchBox.VerticalAlignment = VerticalAlignment.Center; SearchBox.HorizontalAlignment = HorizontalAlignment.Stretch; SearchBox.Margin = new Thickness(5); SearchBox.TextChanged += OnSearchTextChanged; TextBlock searchTextBlock = new TextBlock(); searchTextBlock.IsHitTestVisible = false; searchTextBlock.Text = "Search..."; searchTextBlock.VerticalAlignment = VerticalAlignment.Center; searchTextBlock.HorizontalAlignment = HorizontalAlignment.Left; searchTextBlock.Margin = new Thickness(10, 0, 0, 0); searchTextBlock.Foreground = new SolidColorBrush(Colors.DarkGray); Style textBlockStyle = new Style(typeof(TextBlock)); textBlockStyle.Setters.Add(new Setter(TextBlock.VisibilityProperty, Visibility.Collapsed)); DataTrigger textBlockDataTrigger = new DataTrigger(); textBlockDataTrigger.Value = ""; Binding textBlockBinding = new Binding("Text"); textBlockBinding.Source = SearchBox; textBlockDataTrigger.Binding = textBlockBinding; textBlockDataTrigger.Setters.Add(new Setter(TextBlock.VisibilityProperty, Visibility.Visible)); textBlockStyle.Triggers.Add(textBlockDataTrigger); searchTextBlock.Style = textBlockStyle; Grid.SetRow(searchTextBlock, 0); Grid.SetColumn(searchTextBlock, 0); Grid.SetRow(SearchBox, 0); Grid.SetColumn(SearchBox, 1); SearchGrid.Children.Add(searchTextBlock); SearchGrid.Children.Add(SearchBox); StackPanel StackForButtons = new StackPanel(); StackForButtons.Orientation = Orientation.Horizontal; StackForButtons.HorizontalAlignment = HorizontalAlignment.Right; StackForButtons.VerticalAlignment = VerticalAlignment.Bottom; OkButton = new Button(); OkButton.Tag = "OK"; OkButton.Content = " Ok "; OkButton.Click += ActOnOkCancelPressed; OkButton.Margin = new Thickness(5, 5, 5, 5); Button cancelButton = new Button(); cancelButton.Tag = "CANCEL"; cancelButton.Content = " Cancel "; cancelButton.Click += ActOnOkCancelPressed; cancelButton.Margin = new Thickness(5, 5, 5, 5); StackForButtons.Children.Add(OkButton); StackForButtons.Children.Add(cancelButton); Thumb PopUpResizeThumb = new Thumb(); ControlTemplate ThumbTemplate = new ControlTemplate(typeof(Thumb)); var imageThumb = new FrameworkElementFactory(typeof(Image)); imageThumb.SetValue(Image.SourceProperty, ImagePopBitmap); ThumbTemplate.VisualTree = imageThumb; PopUpResizeThumb.Template = ThumbTemplate; PopUpResizeThumb.DragStarted += OnDragThumbStarted; PopUpResizeThumb.DragDelta += OnDragThumbDelta; PopUpResizeThumb.DragCompleted += OnDragThumbCompleted; PopUpResizeThumb.VerticalAlignment = VerticalAlignment.Bottom; PopUpResizeThumb.HorizontalAlignment = HorizontalAlignment.Right; PopUpResizeThumb.Height = 10; BorderForStackChecks = new Border(); BorderForStackChecks.BorderBrush = Brushes.Black; BorderForStackChecks.BorderThickness = new Thickness(0.5); ViewerForCheckBoxes = new ScrollViewer(); ViewerForCheckBoxes.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto; ViewerForCheckBoxes.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; if (PopUpFilterValues.Count > 0) { PopulateStackWithCheckBoxes(PopUpFilterValues, true); } Grid.SetRow(SearchGrid, 0); Grid.SetColumn(SearchGrid, 0); Grid.SetRow(BorderForStackChecks, 1); Grid.SetColumn(BorderForStackChecks, 0); Grid.SetRow(StackForButtons, 2); Grid.SetColumn(StackForButtons, 0); Grid.SetRow(PopUpResizeThumb, 3); Grid.SetColumn(PopUpResizeThumb, 0); GlobalGridInPopUp.Children.Add(SearchGrid); GlobalGridInPopUp.Children.Add(BorderForStackChecks); GlobalGridInPopUp.Children.Add(StackForButtons); GlobalGridInPopUp.Children.Add(PopUpResizeThumb); Border aroundGlobalStackBorder = new Border(); aroundGlobalStackBorder.Background = new SolidColorBrush(Colors.White); aroundGlobalStackBorder.BorderBrush = new SolidColorBrush(Colors.Black); aroundGlobalStackBorder.BorderThickness = new Thickness(1); aroundGlobalStackBorder.Child = GlobalGridInPopUp; HeaderPopUp = new Popup(); HeaderPopUp.Closed += delegate(object sender, EventArgs ea) { if (!HeaderToggle.IsPressed) { HeaderToggle.IsChecked = false; } }; HeaderPopUp.PlacementTarget = this; HeaderPopUp.AllowsTransparency = false; HeaderPopUp.Child = aroundGlobalStackBorder; HeaderPopUp.Placement = PlacementMode.Bottom; HeaderPopUp.Width = 200; HeaderPopUp.MinHeight = 200; HeaderPopUp.MinWidth = 200; HeaderPopUp.Height = 200; HeaderPopUp.HorizontalOffset = this.ActualWidth - HeaderPopUp.MinWidth; HeaderPopUp.PopupAnimation = PopupAnimation.Slide; HeaderPopUp.StaysOpen = false; }
public ConTemplateEx() { InitializeComponent(); tealTemplate = (ControlTemplate)Application.Current.Resources["TealTemplate"]; aquaTemplate = (ControlTemplate)Application.Current.Resources["AquaTemplate"]; }
protected Layout(ControlTemplate errorTemplate = null) { _errorTemplate = errorTemplate ?? GetDefaultErrorTemplate(); }
private void UpdateUIResources() { ResourceDictionary resources = new ResourceDictionary { Source = new Uri("/DynamicDataDisplay;component/Charts/Axes/AxisControlStyle.xaml", UriKind.Relative) }; string templateKey; if (useSmoothPanning) { templateKey = smoothTemplateKey; } else { templateKey = AxisControl <T> .templateKey; } AxisPlacement placement = GetBetterPlacement(this.placement); ControlTemplate template = (ControlTemplate)resources[templateKey + placement.ToString()]; Verify.AssertNotNull(template); var content = (FrameworkElement)template.LoadContent(); if (ticksPath != null && ticksPath.Data != null) { GeometryGroup group = (GeometryGroup)ticksPath.Data; foreach (var child in group.Children) { LineGeometry geometry = (LineGeometry)child; lineGeomPool.Put(geometry); } group.Children.Clear(); } ticksPath = (Path)content.FindName(PART_TicksPath); ticksPath.SnapsToDevicePixels = true; Verify.AssertNotNull(ticksPath); // as this method can be called not only on loading of axisControl, but when its placement changes, internal panels // can be not empty and their contents should be released if (commonLabelsCanvas != null && labelProvider != null) { foreach (UIElement child in commonLabelsCanvas.Children) { if (child != null) { labelProvider.ReleaseLabel(child); } } labels = null; commonLabelsCanvas.Children.Clear(); } commonLabelsCanvas = (StackCanvas)content.FindName(PART_CommonLabelsCanvas); Verify.AssertNotNull(commonLabelsCanvas); commonLabelsCanvas.Placement = placement; if (additionalLabelsCanvas != null && majorLabelProvider != null) { foreach (UIElement child in additionalLabelsCanvas.Children) { if (child != null) { majorLabelProvider.ReleaseLabel(child); } } } additionalLabelsCanvas = (StackCanvas)content.FindName(PART_AdditionalLabelsCanvas); Verify.AssertNotNull(additionalLabelsCanvas); additionalLabelsCanvas.Placement = placement; mainGrid = (Panel)content.FindName(PART_ContentsGrid); Verify.AssertNotNull(mainGrid); mainGrid.SetBinding(Control.BackgroundProperty, new Binding { Path = new PropertyPath("Background"), Source = this }); mainGrid.SizeChanged += new SizeChangedEventHandler(mainGrid_SizeChanged); Content = mainGrid; string transformKey = additionalLabelTransformKey + placement.ToString(); if (resources.Contains(transformKey)) { additionalLabelTransform = (Transform)resources[transformKey]; } UpdateUI(); }
private void InitEvent() { ControlTemplate baseWindowTemplate = (ControlTemplate)App.Current.Resources["BaseWindowControlTemplate"]; Button minBtn = (Button)baseWindowTemplate.FindName("BorderMin", this); minBtn.Click += delegate(object sender, RoutedEventArgs e) { MinWindow(); }; Button maxBtn = (Button)baseWindowTemplate.FindName("BorderMax", this); maxBtn.Click += MaxWindow; Button closeBtn = (Button)baseWindowTemplate.FindName("BorderClose", this); closeBtn.Click += delegate(object sender, RoutedEventArgs e) { FadeOut(); }; Border borderTitle = (Border)baseWindowTemplate.FindName("BorderTitle", this); borderTitle.MouseMove += MoveWindow; borderTitle.MouseLeftButtonDown += delegate(object sender, MouseButtonEventArgs e) { if (e.ClickCount >= 2) { MaxWindow(this, new RoutedEventArgs()); } }; this.Closing += delegate { SaveWindow(); }; this.SizeChanged += onSizeChanged; this.ContentRendered += delegate { HideMargin(); }; #region "改变窗体大小" //https://www.cnblogs.com/yang-fei/p/4737308.html Grid resizeGrid = (Grid)baseWindowTemplate.FindName("resizeGrid", this); if (resizeGrid != null) { foreach (UIElement element in resizeGrid.Children) { Rectangle resizeRectangle = element as Rectangle; if (resizeRectangle != null) { resizeRectangle.PreviewMouseDown += ResizeRectangle_PreviewMouseDown; resizeRectangle.MouseMove += ResizeRectangle_MouseMove; } } } PreviewMouseMove += OnPreviewMouseMove; #endregion FadeIn(); }
private void InitializeResources() { // Resource - [buttonStyle] Style var r_0_s_bo = this[typeof(Button)]; Style r_0_s = new Style(typeof(Button), r_0_s_bo as Style); Setter r_0_s_S_0 = new Setter(Button.BackgroundProperty, new SolidColorBrush(new ColorW(255, 140, 0, 255))); r_0_s.Setters.Add(r_0_s_S_0); this.Add("buttonStyle", r_0_s); // Resource - [Image] BitmapImage BitmapImage r_1_bm = new BitmapImage(); r_1_bm.TextureAsset = "Images/MonoGameLogo"; this.Add("Image", r_1_bm); // Resource - [TetrisWindowBackground] SolidColorBrush this.Add("TetrisWindowBackground", new SolidColorBrush(new ColorW(0, 0, 0, 255))); // Resource - [TetrisForeground] SolidColorBrush this.Add("TetrisForeground", new SolidColorBrush(new ColorW(255, 255, 255, 255))); // Resource - [TitleResource] String this.Add("TitleResource", "Basic UI Example"); // Resource - [TetrisBorderStyle] Style Style r_5_s = new Style(typeof(Border)); Setter r_5_s_S_0 = new Setter(Border.SnapsToDevicePixelsProperty, true); r_5_s.Setters.Add(r_5_s_S_0); Setter r_5_s_S_1 = new Setter(Border.BackgroundProperty, new ResourceReferenceExpression("TetrisWindowBackground")); r_5_s.Setters.Add(r_5_s_S_1); Setter r_5_s_S_2 = new Setter(Border.BorderBrushProperty, new ResourceReferenceExpression("TetrisBorderBrush")); r_5_s.Setters.Add(r_5_s_S_2); Setter r_5_s_S_3 = new Setter(Border.BorderThicknessProperty, new Thickness(1F)); r_5_s.Setters.Add(r_5_s_S_3); Setter r_5_s_S_4 = new Setter(Border.OpacityProperty, 0.9F); r_5_s.Setters.Add(r_5_s_S_4); this.Add("TetrisBorderStyle", r_5_s); // Resource - [DataTemplateKey(GameData.TestTreeDataItem)] DataTemplate Func<UIElement, UIElement> r_6_dtFunc = r_6_dtMethod; this.Add(typeof(GameData.TestTreeDataItem), new DataTemplate(typeof(GameData.TestTreeDataItem), r_6_dtFunc)); // Resource - [CustomWindowTemplate] ControlTemplate Func<UIElement, UIElement> r_7_ctFunc = r_7_ctMethod; ControlTemplate r_7_ct = new ControlTemplate(r_7_ctFunc); this.Add("CustomWindowTemplate", r_7_ct); // Resource - [buttonAnimStyle] Style var r_8_s_bo = this[typeof(Button)]; Style r_8_s = new Style(typeof(Button), r_8_s_bo as Style); Setter r_8_s_S_0 = new Setter(Button.WidthProperty, 200F); r_8_s.Setters.Add(r_8_s_S_0); Setter r_8_s_S_1 = new Setter(Button.MarginProperty, new Thickness(0F, 1F, 0F, 1F)); r_8_s.Setters.Add(r_8_s_S_1); Setter r_8_s_S_2 = new Setter(Button.SnapsToDevicePixelsProperty, false); r_8_s.Setters.Add(r_8_s_S_2); EventTrigger r_8_s_ET_0 = new EventTrigger(Button.MouseEnterEvent); r_8_s.Triggers.Add(r_8_s_ET_0); BeginStoryboard r_8_s_ET_0_AC_0 = new BeginStoryboard(); r_8_s_ET_0_AC_0.Name = "r_8_s_ET_0_AC_0"; r_8_s_ET_0.AddAction(r_8_s_ET_0_AC_0); Storyboard r_8_s_ET_0_AC_0_SB = new Storyboard(); r_8_s_ET_0_AC_0.Storyboard = r_8_s_ET_0_AC_0_SB; r_8_s_ET_0_AC_0_SB.Name = "r_8_s_ET_0_AC_0_SB"; ThicknessAnimation r_8_s_ET_0_AC_0_SB_TL_0 = new ThicknessAnimation(); r_8_s_ET_0_AC_0_SB_TL_0.Name = "r_8_s_ET_0_AC_0_SB_TL_0"; r_8_s_ET_0_AC_0_SB_TL_0.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 500)); r_8_s_ET_0_AC_0_SB_TL_0.From = new Thickness(0F, 1F, 0F, 1F); r_8_s_ET_0_AC_0_SB_TL_0.To = new Thickness(0F, 5F, 0F, 5F); SineEase r_8_s_ET_0_AC_0_SB_TL_0_EA = new SineEase(); r_8_s_ET_0_AC_0_SB_TL_0.EasingFunction = r_8_s_ET_0_AC_0_SB_TL_0_EA; Storyboard.SetTargetProperty(r_8_s_ET_0_AC_0_SB_TL_0, Button.MarginProperty); r_8_s_ET_0_AC_0_SB.Children.Add(r_8_s_ET_0_AC_0_SB_TL_0); FloatAnimation r_8_s_ET_0_AC_0_SB_TL_1 = new FloatAnimation(); r_8_s_ET_0_AC_0_SB_TL_1.Name = "r_8_s_ET_0_AC_0_SB_TL_1"; r_8_s_ET_0_AC_0_SB_TL_1.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 500)); r_8_s_ET_0_AC_0_SB_TL_1.To = 220F; SineEase r_8_s_ET_0_AC_0_SB_TL_1_EA = new SineEase(); r_8_s_ET_0_AC_0_SB_TL_1.EasingFunction = r_8_s_ET_0_AC_0_SB_TL_1_EA; Storyboard.SetTargetProperty(r_8_s_ET_0_AC_0_SB_TL_1, Button.WidthProperty); r_8_s_ET_0_AC_0_SB.Children.Add(r_8_s_ET_0_AC_0_SB_TL_1); EventTrigger r_8_s_ET_1 = new EventTrigger(Button.MouseLeaveEvent); r_8_s.Triggers.Add(r_8_s_ET_1); BeginStoryboard r_8_s_ET_1_AC_0 = new BeginStoryboard(); r_8_s_ET_1_AC_0.Name = "r_8_s_ET_1_AC_0"; r_8_s_ET_1.AddAction(r_8_s_ET_1_AC_0); Storyboard r_8_s_ET_1_AC_0_SB = new Storyboard(); r_8_s_ET_1_AC_0.Storyboard = r_8_s_ET_1_AC_0_SB; r_8_s_ET_1_AC_0_SB.Name = "r_8_s_ET_1_AC_0_SB"; ThicknessAnimation r_8_s_ET_1_AC_0_SB_TL_0 = new ThicknessAnimation(); r_8_s_ET_1_AC_0_SB_TL_0.Name = "r_8_s_ET_1_AC_0_SB_TL_0"; r_8_s_ET_1_AC_0_SB_TL_0.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 500)); r_8_s_ET_1_AC_0_SB_TL_0.From = new Thickness(0F, 5F, 0F, 5F); r_8_s_ET_1_AC_0_SB_TL_0.To = new Thickness(0F, 1F, 0F, 1F); SineEase r_8_s_ET_1_AC_0_SB_TL_0_EA = new SineEase(); r_8_s_ET_1_AC_0_SB_TL_0.EasingFunction = r_8_s_ET_1_AC_0_SB_TL_0_EA; Storyboard.SetTargetProperty(r_8_s_ET_1_AC_0_SB_TL_0, Button.MarginProperty); r_8_s_ET_1_AC_0_SB.Children.Add(r_8_s_ET_1_AC_0_SB_TL_0); FloatAnimation r_8_s_ET_1_AC_0_SB_TL_1 = new FloatAnimation(); r_8_s_ET_1_AC_0_SB_TL_1.Name = "r_8_s_ET_1_AC_0_SB_TL_1"; r_8_s_ET_1_AC_0_SB_TL_1.Duration = new Duration(new TimeSpan(0, 0, 0, 0, 500)); r_8_s_ET_1_AC_0_SB_TL_1.To = 200F; SineEase r_8_s_ET_1_AC_0_SB_TL_1_EA = new SineEase(); r_8_s_ET_1_AC_0_SB_TL_1.EasingFunction = r_8_s_ET_1_AC_0_SB_TL_1_EA; Storyboard.SetTargetProperty(r_8_s_ET_1_AC_0_SB_TL_1, Button.WidthProperty); r_8_s_ET_1_AC_0_SB.Children.Add(r_8_s_ET_1_AC_0_SB_TL_1); this.Add("buttonAnimStyle", r_8_s); // Resource - [Sounds] SoundSourceCollection var r_9_sounds = new SoundSourceCollection(); r_9_sounds.Add(new SoundSource { SoundType = SoundType.ButtonsClick, SoundAsset = "Click" }); SoundManager.Instance.AddSound("Click"); r_9_sounds.Add(new SoundSource { SoundType = SoundType.TextBoxKeyPress, SoundAsset = "KeyPress" }); SoundManager.Instance.AddSound("KeyPress"); r_9_sounds.Add(new SoundSource { SoundType = SoundType.TabControlMove, SoundAsset = "Move" }); SoundManager.Instance.AddSound("Move"); r_9_sounds.Add(new SoundSource { SoundType = SoundType.TabControlSelect, SoundAsset = "Select" }); SoundManager.Instance.AddSound("Select"); this.Add("Sounds", r_9_sounds); // Resource - [TetrisBorderBrush] SolidColorBrush this.Add("TetrisBorderBrush", new SolidColorBrush(new ColorW(114, 176, 218, 255))); // Resource - [DataTemplateKey(GameData.CustomWindow)] DataTemplate Func<UIElement, UIElement> r_11_dtFunc = r_11_dtMethod; this.Add(typeof(GameData.CustomWindow), new DataTemplate(typeof(GameData.CustomWindow), r_11_dtFunc)); ImageManager.Instance.AddImage("Images/MonoGameLogo"); FontManager.Instance.AddFont("Segoe UI", 12F, FontStyle.Regular, "Segoe_UI_9_Regular"); FontManager.Instance.AddFont("Segoe UI", 20F, FontStyle.Bold, "Segoe_UI_15_Bold"); }
public TestView () { ControlTemplate = new ControlTemplate(typeof (ContentControl)); }
protected void OnTemplateChanged(ControlTemplate oldTemplate, ControlTemplate newTemplate) { if (newTemplate.TargetType != this.GetType()) { throw new System.ArgumentException(string.Format("Invalid TargetType expected {0} got {1}", this.GetType(), newTemplate.TargetType)); } if (this.controlTemplateInstance != null) { this.controlTemplateInstance.LayoutUpdated -= this.ControlTemplateInstance_LayoutUpdated; this.RemoveControlTemplateInstance(); this.RemoveLogicalChild(this.controlTemplateInstance); } if (newTemplate != null) { this.controlTemplateInstance = (UIElement)newTemplate.LoadContent(); this.controlTemplateInstance.LayoutUpdated += this.ControlTemplateInstance_LayoutUpdated; this.AddLogicalChild(this.controlTemplateInstance); this.AddControlTemplateInstance(); } else { this.controlTemplateInstance = null; this.NativeUIElement = null; this.NativeInit(); } this.OnLayoutUpdated(); }
/// <summary> /// 下载信息初始化 /// </summary> /// <param name="typeName">文件类型名称</param> /// <param name="fileName">文件名称</param> /// <param name="fileSize">文件大小(/MB或/KB)</param> /// <param name="upLoadStatu">文件下载状态(模板)</param> public FileInformationLb(string strTypeName, string strFileName, string strFileSize, ControlTemplate temUpLoadStatu) { try { System.Resources.ResourceManager rm = MhczTBG.Properties.Resources.ResourceManager; StrFileName = strFileName; StrFileSize = strFileSize; TemUpLoadStatu = temUpLoadStatu; } catch (Exception ex) { MethodLb.CreateLog(this.GetType().FullName, "FileInformationLb", ex.ToString(), strTypeName, strFileName, strFileSize, temUpLoadStatu); } finally { } }
public void Visit(ElementNode node, INode parentNode) { object value = null; XamlParseException xpe; var type = XamlParser.GetElementType(node.XmlType, node, Context.RootElement?.GetType().GetTypeInfo().Assembly, out xpe); if (xpe != null) { throw xpe; } Context.Types[node] = type; string ctorargname; if (IsXaml2009LanguagePrimitive(node)) { value = CreateLanguagePrimitive(type, node); } else if (node.Properties.ContainsKey(XmlName.xArguments) || node.Properties.ContainsKey(XmlName.xFactoryMethod)) { value = CreateFromFactory(type, node); } else if ( type.GetTypeInfo() .DeclaredConstructors.Any( ci => ci.IsPublic && ci.GetParameters().Length != 0 && ci.GetParameters().All(pi => pi.CustomAttributes.Any(attr => attr.AttributeType == typeof(ParameterAttribute)))) && ValidateCtorArguments(type, node, out ctorargname)) { value = CreateFromParameterizedConstructor(type, node); } else if (!type.GetTypeInfo().DeclaredConstructors.Any(ci => ci.IsPublic && ci.GetParameters().Length == 0) && !ValidateCtorArguments(type, node, out ctorargname)) { throw new XamlParseException($"The Property {ctorargname} is required to create a {type?.FullName} object.", node); } else { //this is a trick as the DataTemplate parameterless ctor is internal, and we can't CreateInstance(..., false) on WP7 try { if (type == typeof(DataTemplate)) { value = new DataTemplate(); } if (type == typeof(ControlTemplate)) { value = new ControlTemplate(); } if (value == null && node.CollectionItems.Any() && node.CollectionItems.First() is ValueNode) { var serviceProvider = new XamlServiceProvider(node, Context); var converted = ((ValueNode)node.CollectionItems.First()).Value.ConvertTo(type, () => type.GetTypeInfo(), serviceProvider); if (converted != null && converted.GetType() == type) { value = converted; } } if (value == null) { if (type.GetTypeInfo().DeclaredConstructors.Any(ci => ci.IsPublic && ci.GetParameters().Length == 0)) { //default constructor value = Activator.CreateInstance(type); } else { //constructor with all default parameters value = Activator.CreateInstance(type, BindingFlags.CreateInstance | BindingFlags.Public | BindingFlags.Instance | BindingFlags.OptionalParamBinding, null, new object[] { Type.Missing }, CultureInfo.CurrentCulture); } if (value is Element) { if (null != Application.Current) { Application.AddResourceChangedCallback(value, (value as Element).OnResourcesChanged); } if (value is BindableObject) { ((BindableObject)value).IsCreateByXaml = true; } } } } catch (TargetInvocationException e) { if (e.InnerException is XamlParseException || e.InnerException is XmlException) { throw e.InnerException; } throw; } } Values[node] = value; var markup = value as IMarkupExtension; if (markup != null && (value is TypeExtension || value is StaticExtension || value is ArrayExtension)) { var serviceProvider = new XamlServiceProvider(node, Context); var visitor = new ApplyPropertiesVisitor(Context); foreach (var cnode in node.Properties.Values.ToList()) { cnode.Accept(visitor, node); } foreach (var cnode in node.CollectionItems) { cnode.Accept(visitor, node); } value = markup.ProvideValue(serviceProvider); INode xKey; if (!node.Properties.TryGetValue(XmlName.xKey, out xKey)) { xKey = null; } node.Properties.Clear(); node.CollectionItems.Clear(); if (xKey != null) { node.Properties.Add(XmlName.xKey, xKey); } Values[node] = value; } if (value is BindableObject) { NameScope.SetNameScope(value as BindableObject, node.Namescope); } }
public static ControlTemplate GetBuildDoneImage(BuildInfo buildInfo, IEnumerable <ProjectItem> allProjects, out ControlTemplate stateImage) { if (buildInfo == null || buildInfo.BuildAction == null || buildInfo.BuildScope == null) { stateImage = null; return(VectorResources.TryGet(BuildActionResourcesUri, "StandBy")); } if (allProjects == null) { throw new InvalidOperationException(); } int errorProjectsCount = allProjects.Count(item => item.State.IsErrorState()); bool buildedProjectsSuccess = buildInfo.BuildedProjects.BuildWithoutErrors; string stateKey; if (buildInfo.BuildIsCancelled) { stateKey = "BuildCancelled"; } else if (!buildedProjectsSuccess) { stateKey = "BuildError"; } else if (buildedProjectsSuccess && errorProjectsCount == 0) { stateKey = "BuildDone"; } else if (buildedProjectsSuccess && errorProjectsCount != 0) { stateKey = "BuildErrorDone"; } else { throw new InvalidOperationException(); } stateImage = VectorResources.TryGet(BuildStateResourcesUri, stateKey); string actionKey = GetBuildActionResourceKey(buildInfo.BuildAction.Value); return(VectorResources.TryGet(BuildActionResourcesUri, actionKey)); }
public static void SetLabelTemplate(DependencyObject obj, ControlTemplate value) { obj.SetValue(LabelTemplateProperty, value); }
public void AfterContentIsSet() { Button button = new Button(); button.Content = ""; Assert.IsNull(button.TemplatedParent, "button.TemplatedParent"); #region Background Assert.IsInstanceOfType(typeof(LinearGradientBrush), button.Background); LinearGradientBrush background_linear_gradient_brush = (LinearGradientBrush)button.Background; Assert.AreEqual(background_linear_gradient_brush.StartPoint, new Point(0.5, 0), "background_linear_gradient_brush.StartPoint"); Assert.AreEqual(background_linear_gradient_brush.EndPoint, new Point(0.5, 1), "background_linear_gradient_brush.EndPoint"); Assert.AreEqual(background_linear_gradient_brush.GradientStops.Count, 2, "background_linear_gradient_brush.GradientStops.Count"); #region GradientStop 0 GradientStop gradient_stop0 = background_linear_gradient_brush.GradientStops [0]; Assert.AreEqual(gradient_stop0.Color, Colors.White, "gradient_stop0.Color"); Assert.AreEqual(gradient_stop0.Offset, 0, "gradient_stop0.Offset"); #endregion #region GradientStop 1 GradientStop gradient_stop1 = background_linear_gradient_brush.GradientStops [1]; Assert.AreEqual(gradient_stop1.Color, Color.FromArgb(0xFF, 0xF0, 0xF0, 0xEA), "gradient_stop1.Color"); Assert.AreEqual(gradient_stop1.Offset, 0.9, "gradient_stop1.Offset"); #endregion #endregion #region BorderBrush Assert.IsInstanceOfType(typeof(SolidColorBrush), button.BorderBrush, "button.BorderBrush Type"); SolidColorBrush border_brush = (SolidColorBrush)button.BorderBrush; Assert.AreEqual(border_brush.Color, Color.FromArgb(0xFF, 0x00, 0x3C, 0x74), "border_brush.Color"); #endregion #region Template ControlTemplate template = button.Template; Assert.IsInstanceOfType(typeof(ControlTemplate), template, "template Type"); Assert.AreEqual(template.TargetType, typeof(ButtonBase), "template.TargetType"); Assert.AreEqual(template.Resources.Count, 0, "template.Resources.Count"); Assert.AreEqual(template.Triggers.Count, 3, "template.Triggers.Count"); #region Trigger 0 Assert.IsInstanceOfType(typeof(Trigger), template.Triggers [0], "template.Triggers[0] Type"); Trigger trigger0 = (Trigger)button.Template.Triggers [0]; Assert.AreEqual(trigger0.Property, UIElement.IsKeyboardFocusedProperty, "trigger0.Property"); Assert.AreEqual(trigger0.Value, true, "trigger0.Value"); Assert.AreEqual(trigger0.Setters.Count, 1, "trigger0.Setters.Count"); #region Setter 0 Assert.IsInstanceOfType(typeof(Setter), trigger0.Setters [0], "trigger0.Setters[0] Type"); Setter setter_0_0 = (Setter)trigger0.Setters [0]; #if !Implementation //FIXME: I don't understand why this fails. See the VeryStrangeThing test. Assert.IsTrue(setter_0_0.Property.OwnerType == typeof(ButtonChrome), "setter_0_0.Property.OwnerType 1"); Assert.AreEqual(setter_0_0.Property.OwnerType, typeof(ButtonChrome), "setter_0_0.Property.OwnerType"); Assert.AreEqual(setter_0_0.Property, ButtonChrome.RenderDefaultedProperty, "setter_0_0.Property"); #endif Assert.AreEqual(setter_0_0.TargetName, "Chrome", "setter_0_0.TargetName"); Assert.AreEqual(setter_0_0.Value, true, "setter_0_0.Value"); #endregion #endregion #region Trigger 1 Assert.IsInstanceOfType(typeof(Trigger), template.Triggers [1], "template.Triggers[1] Type"); Trigger trigger1 = (Trigger)button.Template.Triggers [1]; Assert.AreEqual(trigger1.Property, ToggleButton.IsCheckedProperty, "trigger1.Property"); Assert.AreEqual(trigger1.Value, true, "trigger1.Value"); Assert.AreEqual(trigger1.Setters.Count, 1, "trigger1.Setters.Count"); #region Setter 0 Assert.IsInstanceOfType(typeof(Setter), trigger1.Setters [0], "trigger1.Setters[0] Type"); Setter setter_1_0 = (Setter)trigger1.Setters [0]; #if !Implementation //FIXME: Probably the same thing Assert.AreEqual(setter_1_0.Property, ButtonChrome.RenderPressedProperty, "setter_1_0.Property"); #endif Assert.AreEqual(setter_1_0.TargetName, "Chrome", "setter_1_0.TargetName"); Assert.AreEqual(setter_1_0.Value, true, "setter_1_0.Value"); #endregion #endregion #region Trigger 2 Assert.IsInstanceOfType(typeof(Trigger), template.Triggers [2], "template.Triggers[2] Type"); Trigger trigger2 = (Trigger)button.Template.Triggers [2]; Assert.AreEqual(trigger2.Property, UIElement.IsEnabledProperty, "trigger2.Property"); Assert.AreEqual(trigger2.Value, false, "trigger2.Value"); Assert.AreEqual(trigger2.Setters.Count, 1, "trigger2.Setters.Count"); #region Setter 0 Assert.IsInstanceOfType(typeof(Setter), trigger2.Setters [0], "trigger2.Setters[0] Type"); Setter setter_2_0 = (Setter)trigger2.Setters [0]; Assert.AreEqual(setter_2_0.Property, TextElement.ForegroundProperty, "setter_2_0.Property"); Assert.AreEqual(setter_2_0.TargetName, null, "setter_2_0.TargetName"); Assert.IsInstanceOfType(typeof(DynamicResourceExtension), setter_2_0.Value, "setter_2_0.Value Type"); DynamicResourceExtension settter_2_0DynamicResourceExtension = (DynamicResourceExtension)setter_2_0.Value; Assert.AreEqual(settter_2_0DynamicResourceExtension.ResourceKey.ToString(), "GrayTextBrush"); #endregion #endregion #endregion #region Alignment Assert.AreEqual(button.HorizontalAlignment, HorizontalAlignment.Stretch, "button.HorizontalAlignment"); Assert.AreEqual(button.VerticalAlignment, VerticalAlignment.Stretch, "button.VerticalAlignment"); Assert.AreEqual(button.HorizontalContentAlignment, HorizontalAlignment.Center, "button.HorizontalContentAlignment"); Assert.AreEqual(button.VerticalContentAlignment, VerticalAlignment.Center, "button.VerticalContentAlignment"); #endregion Assert.IsNull(button.Template.VisualTree, "button.Template.VisualTree"); }
public static void SetDragThumbTemplate(UIElement element, ControlTemplate value) { element.SetValue(DragThumbTemplateProperty, value); }
/// <summary> /// Called whenever the control's template changes. /// </summary> /// <param name="oldTemplate">The old template</param> /// <param name="newTemplate">The new template</param> protected override void OnTemplateChanged(ControlTemplate oldTemplate, ControlTemplate newTemplate) { base.OnTemplateChanged(oldTemplate, newTemplate); }
private FrameworkElementFactory CreateExpanderDock() { var dockFactory = new FrameworkElementFactory(typeof(DockPanel)); var source = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(ExTreeViewItem), 1); Style expanderStyle = new Style(typeof(SWC.Primitives.ToggleButton)); expanderStyle.Setters.Add(new Setter(UIElement.FocusableProperty, false)); expanderStyle.Setters.Add(new Setter(FrameworkElement.WidthProperty, 19d)); expanderStyle.Setters.Add(new Setter(FrameworkElement.HeightProperty, 13d)); var expanderTemplate = new ControlTemplate(typeof(SWC.Primitives.ToggleButton)); var outerBorderFactory = new FrameworkElementFactory(typeof(Border)); outerBorderFactory.SetValue(FrameworkElement.WidthProperty, 19d); outerBorderFactory.SetValue(FrameworkElement.HeightProperty, 13d); outerBorderFactory.SetValue(Control.BackgroundProperty, Brushes.Transparent); outerBorderFactory.SetBinding(UIElement.VisibilityProperty, new Binding("HasItems") { RelativeSource = source, Converter = BoolVisibilityConverter }); var innerBorderFactory = new FrameworkElementFactory(typeof(Border)); innerBorderFactory.SetValue(FrameworkElement.WidthProperty, 9d); innerBorderFactory.SetValue(FrameworkElement.HeightProperty, 9d); innerBorderFactory.SetValue(Control.BorderThicknessProperty, new Thickness(1)); innerBorderFactory.SetValue(Control.BorderBrushProperty, new SolidColorBrush(Color.FromRgb(120, 152, 181))); innerBorderFactory.SetValue(Border.CornerRadiusProperty, new CornerRadius(1)); innerBorderFactory.SetValue(UIElement.SnapsToDevicePixelsProperty, true); innerBorderFactory.SetValue(Control.BackgroundProperty, ExpanderBackgroundBrush); var pathFactory = new FrameworkElementFactory(typeof(Path)); pathFactory.SetValue(FrameworkElement.MarginProperty, new Thickness(1)); pathFactory.SetValue(Shape.FillProperty, Brushes.Black); pathFactory.SetBinding(Path.DataProperty, new Binding("IsChecked") { RelativeSource = new RelativeSource(RelativeSourceMode.FindAncestor, typeof(SWC.Primitives.ToggleButton), 1), Converter = BooleanGeometryConverter }); innerBorderFactory.AppendChild(pathFactory); outerBorderFactory.AppendChild(innerBorderFactory); expanderTemplate.VisualTree = outerBorderFactory; expanderStyle.Setters.Add(new Setter(Control.TemplateProperty, expanderTemplate)); var toggleFactory = new FrameworkElementFactory(typeof(SWC.Primitives.ToggleButton)); toggleFactory.SetValue(FrameworkElement.StyleProperty, expanderStyle); toggleFactory.SetBinding(FrameworkElement.MarginProperty, new Binding("Level") { RelativeSource = source, Converter = LevelConverter }); toggleFactory.SetBinding(SWC.Primitives.ToggleButton.IsCheckedProperty, new Binding("IsExpanded") { RelativeSource = source }); toggleFactory.SetValue(SWC.Primitives.ButtonBase.ClickModeProperty, ClickMode.Press); dockFactory.AppendChild(toggleFactory); return(dockFactory); }
private ContentControl CreateNewToolboxItem(ToolboxSettings toolboxSettings, ToolboxItemSettings itemsSetting) { var newItem = new ContentControl { Tag = itemsSetting, ToolTip = itemsSetting.DisplayName }; var stackPanel = new StackPanel { Orientation = Orientation.Horizontal }; var newGrid = new Grid(); var newPath = new Path { Style = itemsSetting.PathStyle /*, ToolTip = itemsSetting.DisplayName*/ }; newGrid.Children.Add(newPath); if (toolboxSettings.ToolboxGridType == ToolboxGrid.Grid) { newItem.Content = newGrid; } else { newGrid.Width = 25; stackPanel.Children.Add(newGrid); stackPanel.Children.Add(new TextBlock { Text = itemsSetting.DisplayName, VerticalAlignment = VerticalAlignment.Center, Margin = new Thickness(10, 0, 0, 0) }); newItem.Content = stackPanel; } if (itemsSetting.PathStyle_DragThumb != null) { var controlTemplate = new ControlTemplate(); var pathTemplate = new FrameworkElementFactory(typeof(Path)); pathTemplate.SetValue(Path.StyleProperty, itemsSetting.PathStyle_DragThumb); controlTemplate.VisualTree = pathTemplate; DesignerItem.SetDragThumbTemplate(newItem, controlTemplate); } if (itemsSetting.Container != null) { var bindingLeft = new Binding("ActualWidth"); bindingLeft.Source = newGrid; var bindingTop = new Binding("ActualHeight"); bindingTop.Source = newGrid; var multiBinding = new MultiBinding(); multiBinding.Bindings.Add(bindingLeft); multiBinding.Bindings.Add(bindingTop); multiBinding.Converter = new RelativeMarginToMarginConverter(itemsSetting.Container.RelativeMargin); var button = new Button { Content = new TextBlock { Text = Properties.Resources.ClickToOpen, TextWrapping = TextWrapping.Wrap, HorizontalAlignment = HorizontalAlignment.Center, Visibility = Visibility.Collapsed } }; button.SetBinding(TextBlock.MarginProperty, multiBinding); newGrid.Children.Add(button); } if (itemsSetting.ConnectorsSettings != null) { var controlTemplate = new ControlTemplate(); var relPanelTemplate = new FrameworkElementFactory(typeof(RelativePositionPanel)); relPanelTemplate.SetValue(RelativePositionPanel.MarginProperty, new Thickness(-4)); if (itemsSetting.ConnectorsSettings.Any()) { foreach (var connectorsSetting in itemsSetting.ConnectorsSettings) { var connectorTemplate = new FrameworkElementFactory(typeof(Connector)); connectorTemplate.SetValue(Connector.NameProperty, connectorsSetting.Name); connectorTemplate.SetValue(Connector.OrientationProperty, connectorsSetting.Orientation); connectorTemplate.SetValue(RelativePositionPanel.RelativePositionProperty, connectorsSetting.RelativePosition); connectorTemplate.SetValue(Connector.MaxInConnectionsProperty, connectorsSetting.MaxInConnections); connectorTemplate.SetValue(Connector.MaxOutConnectionsProperty, connectorsSetting.MaxOutConnections); relPanelTemplate.AppendChild(connectorTemplate); if (!string.IsNullOrEmpty(connectorsSetting.Caption)) { var newCaption = new TextBlock { Text = connectorsSetting.Caption, IsHitTestVisible = false, Tag = connectorsSetting }; if (connectorsSetting.Orientation == ConnectorOrientation.Left) { newCaption.HorizontalAlignment = HorizontalAlignment.Right; } if (connectorsSetting.Orientation == ConnectorOrientation.Top) { newCaption.VerticalAlignment = VerticalAlignment.Bottom; } var bindingLeft = new Binding("ActualWidth"); bindingLeft.Source = newGrid; var bindingTop = new Binding("ActualHeight"); bindingTop.Source = newGrid; var multiBinding = new MultiBinding(); multiBinding.Bindings.Add(bindingLeft); multiBinding.Bindings.Add(bindingTop); multiBinding.Converter = new SizeToMarginConverter(connectorsSetting.RelativePosition, connectorsSetting.Orientation); newCaption.SetBinding(TextBlock.MarginProperty, multiBinding); newGrid.Children.Add(newCaption); } } } controlTemplate.VisualTree = relPanelTemplate; DesignerItem.SetConnectorDecoratorTemplate(newItem, controlTemplate); } return(newItem); }
protected override void OnTemplateChanged(ControlTemplate oldTemplate, ControlTemplate newTemplate) { TemplateApplied = false; base.OnTemplateChanged(oldTemplate, newTemplate); }
/// <summary> /// Template has changed /// </summary> /// <param name="oldTemplate"> /// </param> /// <param name="newTemplate"> /// </param> protected override void OnTemplateChanged(ControlTemplate oldTemplate, ControlTemplate newTemplate) { base.OnTemplateChanged(oldTemplate, newTemplate); if (oldTemplate!=null && newTemplate!= null && oldTemplate.VisualTree != newTemplate.VisualTree) { DetachFromVisualTree(); } }
public VisibilityItem(string label, string description, Mastonet.Visibility visibility, ControlTemplate icon) { this.Label = label; this.Description = description; this.Visibility = visibility; this.Icon = icon; }
public static void SetItemContentTemplate(BindableObject view, ControlTemplate value) { view.SetValue(ItemContentTemplateProperty, value); }
public void Visit(ElementNode node, INode parentNode) { object value = null; if (node.SkipPrefix(node.NamespaceResolver.LookupPrefix(node.NamespaceURI))) return; XamlParseException xpe; var type = XamlParser.GetElementType(node.XmlType, node, Context.RootElement?.GetType().GetTypeInfo().Assembly, out xpe); if (xpe != null) throw xpe; Context.Types[node] = type; string ctorargname; if (IsXaml2009LanguagePrimitive(node)) value = CreateLanguagePrimitive(type, node); else if (node.Properties.ContainsKey(XmlName.xArguments) || node.Properties.ContainsKey(XmlName.xFactoryMethod)) value = CreateFromFactory(type, node); else if ( type.GetTypeInfo() .DeclaredConstructors.Any( ci => ci.IsPublic && ci.GetParameters().Length != 0 && ci.GetParameters().All(pi => pi.CustomAttributes.Any(attr => attr.AttributeType == typeof (ParameterAttribute)))) && ValidateCtorArguments(type, node, out ctorargname)) value = CreateFromParameterizedConstructor(type, node); else if (!type.GetTypeInfo().DeclaredConstructors.Any(ci => ci.IsPublic && ci.GetParameters().Length == 0) && !ValidateCtorArguments(type, node, out ctorargname)) { throw new XamlParseException( String.Format("The Property {0} is required to create a {1} object.", ctorargname, type.FullName), node); } else { //this is a trick as the DataTemplate parameterless ctor is internal, and we can't CreateInstance(..., false) on WP7 try { if (type == typeof (DataTemplate)) value = new DataTemplate(); if (type == typeof (ControlTemplate)) value = new ControlTemplate(); if (value == null && node.CollectionItems.Any() && node.CollectionItems.First() is ValueNode) { var serviceProvider = new XamlServiceProvider(node, Context); var converted = ((ValueNode)node.CollectionItems.First()).Value.ConvertTo(type, () => type.GetTypeInfo(), serviceProvider); if (converted != null && converted.GetType() == type) value = converted; } if (value == null) value = Activator.CreateInstance(type); } catch (TargetInvocationException e) { if (e.InnerException is XamlParseException || e.InnerException is XmlException) throw e.InnerException; throw; } } Values[node] = value; var typeExtension = value as TypeExtension; if (typeExtension != null) { var serviceProvider = new XamlServiceProvider(node, Context); var visitor = new ApplyPropertiesVisitor(Context); foreach (var cnode in node.Properties.Values.ToList()) cnode.Accept(visitor, node); foreach (var cnode in node.CollectionItems) cnode.Accept(visitor, node); value = typeExtension.ProvideValue(serviceProvider); node.Properties.Clear(); node.CollectionItems.Clear(); Values[node] = value; } if (value is BindableObject) NameScope.SetNameScope(value as BindableObject, node.Namescope); }
private void InitializeEvent() { ControlTemplate baseWindowTemplate = (ControlTemplate)App.Current.Resources["MacWindowTemplate"]; //set up background image //Button skinBtn = (Button)baseWindowTemplate.FindName("SkinBtn", this); //skinBtn.Click += delegate //{ // Microsoft.Win32.OpenFileDialog dlg = new Microsoft.Win32.OpenFileDialog(); // if (dlg.ShowDialog() == true) // { // ImageBrush brush = (ImageBrush)baseWindowTemplate.FindName("MyBgImg",this); // BitmapImage bitmap = new BitmapImage(); // bitmap.BeginInit(); // bitmap.UriSource = new Uri(dlg.FileName, UriKind.Absolute); // bitmap.EndInit(); // brush.ImageSource = bitmap; // } //}; Button RestoreButton = (Button)baseWindowTemplate.FindName("RestoreButton", this); Button maxBtn = (Button)baseWindowTemplate.FindName("MaxBtn", this); Border borderClip = (Border)baseWindowTemplate.FindName("MacWindowFrame", this); Border borderCliptop = (Border)baseWindowTemplate.FindName("top", this); TextBlock txtBlock = (TextBlock)baseWindowTemplate.FindName("txtBlock", this); //还原 RestoreButton.Click += delegate { maxBtn.Visibility = Visibility.Visible; this.WindowState = WindowState.Normal; RestoreButton.Visibility = Visibility.Collapsed; //CornerRadius corradius = new CornerRadius(10.0, 10.0, 0.0, 0.0); //borderClip.CornerRadius = corradius; //borderCliptop.CornerRadius = corradius; }; Button closeBtn = (Button)baseWindowTemplate.FindName("CloseBtn", this); //关闭 closeBtn.Click += delegate { MessageBoxResult result = MessageBox.Show(this, "您确定要退出吗?", "景格软件", MessageBoxButton.OKCancel); if (result == MessageBoxResult.OK) { this.Close(); } }; Button minBtn = (Button)baseWindowTemplate.FindName("MinBtn", this); //最小化 minBtn.Click += delegate { this.WindowState = WindowState.Minimized; }; //最大化 maxBtn.Click += delegate { RestoreButton.Visibility = Visibility.Visible; this.WindowState = WindowState.Maximized; maxBtn.Visibility = Visibility.Collapsed; //CornerRadius corradius = new CornerRadius(0.0, 0.0, 0.0, 0.0); // borderClip.CornerRadius =corradius; // borderCliptop.CornerRadius = corradius; }; borderClip.MouseMove += delegate { if (this.WindowState == WindowState.Normal) { DisplayResizeCursor(null, null); } }; borderClip.PreviewMouseDown += delegate { if (this.WindowState == WindowState.Normal) { Resize(null, null); } }; //borderClip.MouseLeftButtonDown += new MouseButtonEventHandler(borderClip_MouseLeftButtonDown); txtBlock.MouseLeftButtonDown += delegate { DragMove(); }; borderCliptop.MouseLeftButtonDown += delegate { DragMove(); }; this.PreviewMouseMove += delegate { if (this.WindowState == WindowState.Normal) { ResetCursor(null, null); } }; }
public void TemplatedParent_Is_Set_On_Generated_Template() { Control templateResult = new Control(); var template = new ControlTemplate(_ => { return templateResult; }); var target = new TemplatedControl { Template = template, }; target.Measure(new Size(100, 100)); Assert.Equal(target, templateResult.TemplatedParent); }
private void InitializeEvent() { base.Style = Application.Current.Resources["AyWindowStyle"] as Style; base.UpdateLayout(); ControlTemplate baseWindowTemplate = this.Template; //Button skinBtn = (Button)baseWindowTemplate.FindName("SkinBtn", this); //if (skinBtn != null) //{ // skinBtn.Click += delegate // { // if (curPop != null && !curPop.isClickClose) // { // curPop.BeginCloseAnimation(); // } // else // { // ShowSkinPop(); // } // }; //} Button closeBtn = (Button)baseWindowTemplate.FindName("CloseBtn", this); if (closeBtn != null) { closeBtn.Click += delegate { CloseWindowOperate(); }; } Button minBtn = (Button)baseWindowTemplate.FindName("MinBtn", this); if (minBtn != null) { minBtn.Click += delegate { MinWindowOperation(); }; } Button maxBtn = (Button)baseWindowTemplate.FindName("maxWindow", this); if (maxBtn != null) { maxBtn.Click += delegate { DoMaxOrReStoreWindow(); }; } Button menuWindow = (Button)baseWindowTemplate.FindName("menuWindow", this); if (menuWindow != null) { if (WindowMenu != null) { WindowMenuVisibility = Visibility.Visible; WindowMenu.Placement = PlacementMode.Bottom; WindowMenu.PlacementTarget = menuWindow; } menuWindow.Click += delegate { ShowWindowMenu(); }; } Button restoreBtn = (Button)baseWindowTemplate.FindName("restoreWindow", this); if (restoreBtn != null) { restoreBtn.Click += delegate { DoMaxOrReStoreWindow(); }; } if (this.WindowState == WindowState.Normal) { restoreWindowVisibility = Visibility.Collapsed; maxWindowVisibility = Visibility.Visible; } else { restoreWindowVisibility = Visibility.Visible; maxWindowVisibility = Visibility.Collapsed; } Border borderClip = (Border)baseWindowTemplate.FindName("AyWindowDragBorder", this); if (borderClip != null) { if (this.ResizeMode == ResizeMode.NoResize) { } else { borderClip.MouseMove += delegate { DisplayResizeCursor(null, null); }; this.PreviewMouseMove += delegate { ResetCursor(null, null); }; borderClip.PreviewMouseDown += delegate { Resize(null, null); }; } if (canDrag) { Border borderMove = (Border)baseWindowTemplate.FindName("AyWindowMovePanel", this); borderMove.MouseLeftButtonDown += borderClip_MouseLeftButtonDown; } } if (WindowState == WindowState.Maximized) { ShadowMargin = new Thickness(0); } }
public StackSettings(Orientation stackOrientation, Orientation headerStackOrientation, int headerIconScale, [CanBeNull] string header = null, [CanBeNull] Style stackStyle = null, [CanBeNull] Style stackItemBorderStyle = null, [CanBeNull] Style stackHeaderBorderStyle = null, [CanBeNull] ControlTemplate labelTemplate = null, [CanBeNull] string childXNodeName = null, [CanBeNull] StackSettings childSettings = null) { // Not adding a default orientation because that would make the init less intuitive. StackOrientation = stackOrientation; HeaderStackOrientation = headerStackOrientation; HeaderIconScale = headerIconScale; Header = header; StackStyle = stackStyle; StackItemBorderStyle = stackItemBorderStyle; StackHeaderBorderStyle = stackHeaderBorderStyle; LabelTemplate = labelTemplate; ChildXNodeName = childXNodeName; ChildSettings = childSettings; }
public static void SetTemplate(UIElement target, ControlTemplate value) { target.SetValue(TemplateProperty, value); }
public void SetTemplateBinding(TemplateBindingExpression tb, object obj) { DependencyObject dob = obj as DependencyObject; FrameworkElement fwe = obj as FrameworkElement; if (dob == null) { throw Parser.ParseException("Invalid TemplateBinding, expressions must be bound to DependendyObjects."); } // Applying a {TemplateBinding} to a DO which is not a FrameworkElement should silently discard the binding. if (fwe == null) { return; } if (Parser.Context == null || Parser.Context.Template == null) { throw Parser.ParseException("Invalid TemplateBinding, expressions can not be used outside of FrameworkTemplate."); } FrameworkElement source = Parser.Context.TemplateBindingSource; if (source == null) { throw Parser.ParseException("Invalid TemplateBinding, expression can not be used outside of a FrameworkTemplate."); } // we don't actually use the type of the source to do property lookups. TargetType is used for that. // // For ControlTemplates: // 1. if there is a TargetType, we look up the property on TargetType. // 2. if there isn't a TargetType, we look up the property on typeof (Control). // For FrameworkTemplates: // there is no TargetType, so we only look up properties on typeof (FrameworkElement) // Type property_lookup_type; ControlTemplate template = Parser.Context.Template as ControlTemplate; if (template == null) { return; // You can't apply Templatebindings outside of ControlTemplates } property_lookup_type = template.TargetType ?? typeof(Control); DependencyProperty source_prop = LookupDependencyProperty(Deployment.Current.Types.TypeToKind(property_lookup_type), tb.SourcePropertyName); if (source_prop == null) { throw Parser.ParseException("Invalid TemplateBinding, property {0} could not be found.", tb.SourcePropertyName); } DependencyProperty prop = LookupDependencyProperty(); if (prop == null) { var propInfo = property_lookup_type.GetProperty(tb.SourcePropertyName, XamlParser.PROPERTY_BINDING_FLAGS); if (!propInfo.PropertyType.IsInstanceOfType(tb)) { // If there is a CLR property with the correct name and there's no DP registered with that name // we should silently ignore the invalid TemplateBinding return; } throw Parser.ParseException("Invalid TemplateBinding, property {0} could not be found.", Name); } tb.TargetProperty = prop; tb.SourceProperty = source_prop; // If we TemplateBind two incompatible properties we silently discard // the TemplateBinding object. Source properties of type object can // potentially be of the correct type, so we allow that too. if (source_prop.PropertyType == typeof(object) || prop.PropertyType.IsAssignableFrom(source_prop.PropertyType)) { fwe.SetTemplateBinding(prop, tb); } }
private void InitializeComponent() { this.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); this.SetResourceReference(SoundManager.SoundsProperty, "Sounds"); InitializeElementResources(this); // backgroundGrid element this.backgroundGrid = new Grid(); this.Content = this.backgroundGrid; this.backgroundGrid.Name = "backgroundGrid"; this.backgroundGrid.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); // e_0 element this.e_0 = new StackPanel(); this.backgroundGrid.Children.Add(this.e_0); this.e_0.Name = "e_0"; this.e_0.Height = 120F; this.e_0.IsHitTestVisible = true; this.e_0.HorizontalAlignment = HorizontalAlignment.Stretch; this.e_0.VerticalAlignment = VerticalAlignment.Bottom; LinearGradientBrush e_0_Background = new LinearGradientBrush(); e_0_Background.StartPoint = new PointF(0.5F, 0F); e_0_Background.EndPoint = new PointF(0.5F, 1F); e_0_Background.SpreadMethod = GradientSpreadMethod.Pad; e_0_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 255), 0F)); e_0_Background.GradientStops.Add(new GradientStop(new ColorW(0, 70, 150, 255), 1F)); e_0_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 0F)); e_0_Background.GradientStops.Add(new GradientStop(new ColorW(0, 63, 139, 238), 0.517F)); e_0_Background.GradientStops.Add(new GradientStop(new ColorW(0, 22, 50, 85), 0.204F)); this.e_0.Background = e_0_Background; this.e_0.Orientation = Orientation.Horizontal; // e_1 element this.e_1 = new StackPanel(); this.e_0.Children.Add(this.e_1); this.e_1.Name = "e_1"; this.e_1.Height = 100F; this.e_1.VerticalAlignment = VerticalAlignment.Bottom; this.e_1.Orientation = Orientation.Horizontal; // txtDay element this.txtDay = new TextBlock(); this.e_1.Children.Add(this.txtDay); this.txtDay.Name = "txtDay"; this.txtDay.Margin = new Thickness(5F, 75F, 5F, 0F); Binding binding_txtDay_Text = new Binding("DaysElapsedValue"); this.txtDay.SetBinding(TextBlock.TextProperty, binding_txtDay_Text); // progTime element this.progTime = new ProgressBar(); this.e_1.Children.Add(this.progTime); this.progTime.Name = "progTime"; this.progTime.Height = 20F; this.progTime.Width = 200F; this.progTime.Margin = new Thickness(5F, 70F, 5F, 0F); Binding binding_progTime_Maximum = new Binding("MaxHours"); this.progTime.SetBinding(ProgressBar.MaximumProperty, binding_progTime_Maximum); Binding binding_progTime_Value = new Binding("TimeElapsedValue"); this.progTime.SetBinding(ProgressBar.ValueProperty, binding_progTime_Value); // e_2 element this.e_2 = new Border(); this.e_1.Children.Add(this.e_2); this.e_2.Name = "e_2"; this.e_2.Height = 22F; this.e_2.Width = 32F; this.e_2.Margin = new Thickness(0F, 70F, 0F, 0F); this.e_2.BorderThickness = new Thickness(1.5F, 1.5F, 1.5F, 1.5F); Binding binding_e_2_BorderBrush = new Binding("Speed0Colour"); this.e_2.SetBinding(Border.BorderBrushProperty, binding_e_2_BorderBrush); // e_3 element this.e_3 = new Button(); this.e_2.Child = this.e_3; this.e_3.Name = "e_3"; this.e_3.Height = 20F; this.e_3.Width = 30F; this.e_3.Margin = new Thickness(-0.5F, -0.5F, 0F, 0F); this.e_3.Content = "II"; Binding binding_e_3_IsEnabled = new Binding("IsUIEnabled"); this.e_3.SetBinding(Button.IsEnabledProperty, binding_e_3_IsEnabled); Binding binding_e_3_Command = new Binding("Speed0Command"); this.e_3.SetBinding(Button.CommandProperty, binding_e_3_Command); // e_4 element this.e_4 = new Border(); this.e_1.Children.Add(this.e_4); this.e_4.Name = "e_4"; this.e_4.Height = 22F; this.e_4.Width = 32F; this.e_4.Margin = new Thickness(0F, 70F, 0F, 0F); this.e_4.BorderThickness = new Thickness(1.5F, 1.5F, 1.5F, 1.5F); Binding binding_e_4_BorderBrush = new Binding("Speed1Colour"); this.e_4.SetBinding(Border.BorderBrushProperty, binding_e_4_BorderBrush); // e_5 element this.e_5 = new Button(); this.e_4.Child = this.e_5; this.e_5.Name = "e_5"; this.e_5.Height = 20F; this.e_5.Width = 30F; this.e_5.Margin = new Thickness(-0.5F, -0.5F, 0F, 0F); this.e_5.Content = ">"; Binding binding_e_5_IsEnabled = new Binding("IsUIEnabled"); this.e_5.SetBinding(Button.IsEnabledProperty, binding_e_5_IsEnabled); Binding binding_e_5_Command = new Binding("Speed1Command"); this.e_5.SetBinding(Button.CommandProperty, binding_e_5_Command); // e_6 element this.e_6 = new Border(); this.e_1.Children.Add(this.e_6); this.e_6.Name = "e_6"; this.e_6.Height = 22F; this.e_6.Width = 32F; this.e_6.Margin = new Thickness(0F, 70F, 0F, 0F); this.e_6.BorderThickness = new Thickness(1.5F, 1.5F, 1.5F, 1.5F); Binding binding_e_6_BorderBrush = new Binding("Speed2Colour"); this.e_6.SetBinding(Border.BorderBrushProperty, binding_e_6_BorderBrush); // e_7 element this.e_7 = new Button(); this.e_6.Child = this.e_7; this.e_7.Name = "e_7"; this.e_7.Height = 20F; this.e_7.Width = 30F; this.e_7.Margin = new Thickness(-0.5F, -0.5F, 0F, 0F); this.e_7.Content = ">>"; Binding binding_e_7_IsEnabled = new Binding("IsUIEnabled"); this.e_7.SetBinding(Button.IsEnabledProperty, binding_e_7_IsEnabled); Binding binding_e_7_Command = new Binding("Speed2Command"); this.e_7.SetBinding(Button.CommandProperty, binding_e_7_Command); // e_8 element this.e_8 = new Border(); this.e_1.Children.Add(this.e_8); this.e_8.Name = "e_8"; this.e_8.Height = 22F; this.e_8.Width = 32F; this.e_8.Margin = new Thickness(0F, 70F, 0F, 0F); this.e_8.BorderThickness = new Thickness(1.5F, 1.5F, 1.5F, 1.5F); Binding binding_e_8_BorderBrush = new Binding("Speed3Colour"); this.e_8.SetBinding(Border.BorderBrushProperty, binding_e_8_BorderBrush); // e_9 element this.e_9 = new Button(); this.e_8.Child = this.e_9; this.e_9.Name = "e_9"; this.e_9.Height = 20F; this.e_9.Width = 30F; this.e_9.Margin = new Thickness(-0.5F, -0.5F, 0F, 0F); this.e_9.Content = ">>>"; Binding binding_e_9_IsEnabled = new Binding("IsUIEnabled"); this.e_9.SetBinding(Button.IsEnabledProperty, binding_e_9_IsEnabled); Binding binding_e_9_Command = new Binding("Speed3Command"); this.e_9.SetBinding(Button.CommandProperty, binding_e_9_Command); // e_10 element this.e_10 = new StackPanel(); this.e_0.Children.Add(this.e_10); this.e_10.Name = "e_10"; this.e_10.VerticalAlignment = VerticalAlignment.Bottom; Binding binding_e_10_DataContext = new Binding("PlanetBuildingsData"); this.e_10.SetBinding(StackPanel.DataContextProperty, binding_e_10_DataContext); Binding binding_e_10_Visibility = new Binding("InfoVisibility"); this.e_10.SetBinding(StackPanel.VisibilityProperty, binding_e_10_Visibility); // e_11 element this.e_11 = new Border(); this.e_10.Children.Add(this.e_11); this.e_11.Name = "e_11"; this.e_11.Height = 45F; this.e_11.Margin = new Thickness(5F, 0F, 0F, 0F); this.e_11.HorizontalAlignment = HorizontalAlignment.Stretch; this.e_11.VerticalAlignment = VerticalAlignment.Bottom; this.e_11.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); LinearGradientBrush e_11_BorderBrush = new LinearGradientBrush(); e_11_BorderBrush.StartPoint = new PointF(0.5F, 0F); e_11_BorderBrush.EndPoint = new PointF(0.5F, 1F); e_11_BorderBrush.SpreadMethod = GradientSpreadMethod.Pad; e_11_BorderBrush.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 0F)); e_11_BorderBrush.GradientStops.Add(new GradientStop(new ColorW(89, 75, 75, 255), 1F)); e_11_BorderBrush.GradientStops.Add(new GradientStop(new ColorW(85, 72, 72, 246), 0.387F)); this.e_11.BorderBrush = e_11_BorderBrush; this.e_11.BorderThickness = new Thickness(2F, 2F, 2F, 2F); Binding binding_e_11_Visibility = new Binding("HasBuildQueue"); this.e_11.SetBinding(Border.VisibilityProperty, binding_e_11_Visibility); // e_12 element this.e_12 = new StackPanel(); this.e_11.Child = this.e_12; this.e_12.Name = "e_12"; this.e_12.HorizontalAlignment = HorizontalAlignment.Stretch; LinearGradientBrush e_12_Background = new LinearGradientBrush(); e_12_Background.StartPoint = new PointF(0.5F, 0F); e_12_Background.EndPoint = new PointF(0.5F, 1F); e_12_Background.SpreadMethod = GradientSpreadMethod.Pad; e_12_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 0F)); e_12_Background.GradientStops.Add(new GradientStop(new ColorW(89, 75, 75, 255), 1F)); e_12_Background.GradientStops.Add(new GradientStop(new ColorW(85, 72, 72, 246), 0.263F)); this.e_12.Background = e_12_Background; this.e_12.Orientation = Orientation.Horizontal; // e_13 element this.e_13 = new Button(); this.e_12.Children.Add(this.e_13); this.e_13.Name = "e_13"; this.e_13.Height = 40F; this.e_13.Width = 40F; this.e_13.Opacity = 0F; this.e_13.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); Binding binding_e_13_IsEnabled = new Binding("IsUIEnabled"); this.e_13.SetBinding(Button.IsEnabledProperty, binding_e_13_IsEnabled); // e_14 element this.e_14 = new Border(); this.e_12.Children.Add(this.e_14); this.e_14.Name = "e_14"; this.e_14.Height = 40F; this.e_14.Margin = new Thickness(-40F, 0F, 0F, -5F); this.e_14.HorizontalAlignment = HorizontalAlignment.Stretch; this.e_14.VerticalAlignment = VerticalAlignment.Bottom; this.e_14.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); LinearGradientBrush e_14_BorderBrush = new LinearGradientBrush(); e_14_BorderBrush.StartPoint = new PointF(0.5F, 0F); e_14_BorderBrush.EndPoint = new PointF(0.5F, 1F); e_14_BorderBrush.SpreadMethod = GradientSpreadMethod.Pad; e_14_BorderBrush.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 0F)); e_14_BorderBrush.GradientStops.Add(new GradientStop(new ColorW(89, 75, 75, 255), 1F)); e_14_BorderBrush.GradientStops.Add(new GradientStop(new ColorW(85, 72, 72, 246), 0.237F)); this.e_14.BorderBrush = e_14_BorderBrush; this.e_14.BorderThickness = new Thickness(1.5F, 1.5F, 1.5F, 1.5F); // e_15 element this.e_15 = new Image(); this.e_14.Child = this.e_15; this.e_15.Name = "e_15"; this.e_15.Height = 40F; this.e_15.Width = 40F; Binding binding_e_15_Source = new Binding("BuildQueueCurrentImage"); this.e_15.SetBinding(Image.SourceProperty, binding_e_15_Source); // e_16 element this.e_16 = new ProgressBar(); this.e_12.Children.Add(this.e_16); this.e_16.Name = "e_16"; this.e_16.Height = 10F; this.e_16.Width = 43F; this.e_16.Margin = new Thickness(-43F, 0F, 0F, -5F); this.e_16.VerticalAlignment = VerticalAlignment.Bottom; Binding binding_e_16_Maximum = new Binding("QueueItemMaxBuildTime"); this.e_16.SetBinding(ProgressBar.MaximumProperty, binding_e_16_Maximum); Binding binding_e_16_Value = new Binding("CurrentQueueItemElapsedTime"); this.e_16.SetBinding(ProgressBar.ValueProperty, binding_e_16_Value); // e_17 element this.e_17 = new ListBox(); this.e_12.Children.Add(this.e_17); this.e_17.Name = "e_17"; this.e_17.Height = 35F; this.e_17.Width = 200F; this.e_17.Margin = new Thickness(0F, 0F, 0F, -5F); this.e_17.VerticalAlignment = VerticalAlignment.Bottom; this.e_17.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); Func<UIElement, UIElement> e_17_iptFunc = e_17_iptMethod; ControlTemplate e_17_ipt = new ControlTemplate(e_17_iptFunc); this.e_17.ItemsPanel = e_17_ipt; Grid.SetColumn(this.e_17, 0); ScrollViewer.SetVerticalScrollBarVisibility(this.e_17, ScrollBarVisibility.Hidden); Binding binding_e_17_IsEnabled = new Binding("IsUIEnabled"); this.e_17.SetBinding(ListBox.IsEnabledProperty, binding_e_17_IsEnabled); Binding binding_e_17_ItemsSource = new Binding("BuildQueue"); this.e_17.SetBinding(ListBox.ItemsSourceProperty, binding_e_17_ItemsSource); Binding binding_e_17_SelectedIndex = new Binding("SelectedBuildQueueItem"); this.e_17.SetBinding(ListBox.SelectedIndexProperty, binding_e_17_SelectedIndex); // e_19 element this.e_19 = new DockPanel(); this.backgroundGrid.Children.Add(this.e_19); this.e_19.Name = "e_19"; this.e_19.Height = 120F; this.e_19.IsHitTestVisible = true; this.e_19.HorizontalAlignment = HorizontalAlignment.Stretch; this.e_19.VerticalAlignment = VerticalAlignment.Top; LinearGradientBrush e_19_Background = new LinearGradientBrush(); e_19_Background.StartPoint = new PointF(0.5F, 0F); e_19_Background.EndPoint = new PointF(0.5F, 1F); e_19_Background.SpreadMethod = GradientSpreadMethod.Pad; e_19_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 255), 0F)); e_19_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 1F)); e_19_Background.GradientStops.Add(new GradientStop(new ColorW(1, 68, 149, 255), 0F)); e_19_Background.GradientStops.Add(new GradientStop(new ColorW(0, 63, 139, 238), 0.364F)); e_19_Background.GradientStops.Add(new GradientStop(new ColorW(0, 22, 50, 85), 0.758F)); this.e_19.Background = e_19_Background; this.e_19.LastChildFill = false; Binding binding_e_19_IsEnabled = new Binding("IsUIEnabled"); this.e_19.SetBinding(DockPanel.IsEnabledProperty, binding_e_19_IsEnabled); // btnMoney element this.btnMoney = new Button(); this.e_19.Children.Add(this.btnMoney); this.btnMoney.Name = "btnMoney"; this.btnMoney.Height = 25F; this.btnMoney.Width = 150F; this.btnMoney.Margin = new Thickness(15F, 10F, 0F, 0F); this.btnMoney.HorizontalAlignment = HorizontalAlignment.Left; this.btnMoney.VerticalAlignment = VerticalAlignment.Top; this.btnMoney.Opacity = 0.8F; this.btnMoney.BorderBrush = new SolidColorBrush(new ColorW(255, 255, 255, 255)); this.btnMoney.Content = ""; Binding binding_btnMoney_IsEnabled = new Binding("IsUIEnabled"); this.btnMoney.SetBinding(Button.IsEnabledProperty, binding_btnMoney_IsEnabled); Binding binding_btnMoney_Command = new Binding("MoneyCommand"); this.btnMoney.SetBinding(Button.CommandProperty, binding_btnMoney_Command); // e_20 element this.e_20 = new Border(); this.e_19.Children.Add(this.e_20); this.e_20.Name = "e_20"; this.e_20.Height = 25F; this.e_20.Width = 150F; this.e_20.IsHitTestVisible = false; this.e_20.Margin = new Thickness(-150F, 10F, 0F, 0F); this.e_20.HorizontalAlignment = HorizontalAlignment.Left; this.e_20.VerticalAlignment = VerticalAlignment.Top; this.e_20.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); this.e_20.BorderBrush = new SolidColorBrush(new ColorW(255, 228, 59, 255)); this.e_20.BorderThickness = new Thickness(1F, 1F, 1F, 1F); // e_21 element this.e_21 = new TextBlock(); this.e_20.Child = this.e_21; this.e_21.Name = "e_21"; this.e_21.Height = 25F; this.e_21.Width = 150F; this.e_21.IsHitTestVisible = false; this.e_21.Margin = new Thickness(5F, 5F, 0F, 0F); this.e_21.HorizontalAlignment = HorizontalAlignment.Center; this.e_21.VerticalAlignment = VerticalAlignment.Center; this.e_21.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); this.e_21.Padding = new Thickness(5F, 0F, 5F, 0F); Binding binding_e_21_Text = new Binding("MoneyText"); this.e_21.SetBinding(TextBlock.TextProperty, binding_e_21_Text); // txtNet element this.txtNet = new TextBlock(); this.e_19.Children.Add(this.txtNet); this.txtNet.Name = "txtNet"; this.txtNet.Height = 20F; this.txtNet.Width = 50F; this.txtNet.Margin = new Thickness(2F, 0F, 0F, 80F); this.txtNet.Foreground = new SolidColorBrush(new ColorW(255, 228, 59, 255)); ToolTipService.SetInitialShowDelay(this.txtNet, 0); Binding binding_txtNet_Text = new Binding("NetText"); this.txtNet.SetBinding(TextBlock.TextProperty, binding_txtNet_Text); // btnMenu element this.btnMenu = new Button(); this.e_19.Children.Add(this.btnMenu); this.btnMenu.Name = "btnMenu"; this.btnMenu.Height = 45F; this.btnMenu.Width = 45F; this.btnMenu.Margin = new Thickness(0F, 0F, 10F, 0F); this.btnMenu.HorizontalAlignment = HorizontalAlignment.Stretch; this.btnMenu.VerticalAlignment = VerticalAlignment.Top; this.btnMenu.Opacity = 0F; DockPanel.SetDock(this.btnMenu, Dock.Right); Binding binding_btnMenu_IsEnabled = new Binding("IsUIEnabled"); this.btnMenu.SetBinding(Button.IsEnabledProperty, binding_btnMenu_IsEnabled); Binding binding_btnMenu_Command = new Binding("PauseCommand"); this.btnMenu.SetBinding(Button.CommandProperty, binding_btnMenu_Command); // Gear element this.Gear = new Image(); this.e_19.Children.Add(this.Gear); this.Gear.Name = "Gear"; this.Gear.Height = 45F; this.Gear.Width = 45F; this.Gear.IsHitTestVisible = false; this.Gear.Margin = new Thickness(0F, 0F, -45F, 0F); this.Gear.HorizontalAlignment = HorizontalAlignment.Stretch; this.Gear.VerticalAlignment = VerticalAlignment.Top; BitmapImage Gear_bm = new BitmapImage(); Gear_bm.TextureAsset = "ImagesUI\\gear"; this.Gear.Source = Gear_bm; this.Gear.Stretch = Stretch.UniformToFill; DockPanel.SetDock(this.Gear, Dock.Right); // e_22 element this.e_22 = new ListBox(); this.e_19.Children.Add(this.e_22); this.e_22.Name = "e_22"; this.e_22.Height = 55F; this.e_22.Margin = new Thickness(10F, -60F, 0F, 0F); this.e_22.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); Func<UIElement, UIElement> e_22_iptFunc = e_22_iptMethod; ControlTemplate e_22_ipt = new ControlTemplate(e_22_iptFunc); this.e_22.ItemsPanel = e_22_ipt; this.e_22.ItemsSource = Get_e_22_Items(); Binding binding_e_22_IsEnabled = new Binding("IsUIEnabled"); this.e_22.SetBinding(ListBox.IsEnabledProperty, binding_e_22_IsEnabled); Binding binding_e_22_SelectedIndex = new Binding("SelectedResourcesIndex"); this.e_22.SetBinding(ListBox.SelectedIndexProperty, binding_e_22_SelectedIndex); // e_32 element this.e_32 = new StackPanel(); this.backgroundGrid.Children.Add(this.e_32); this.e_32.Name = "e_32"; this.e_32.Width = 190F; this.e_32.IsHitTestVisible = true; this.e_32.Margin = new Thickness(0F, 150F, 0F, 130F); this.e_32.HorizontalAlignment = HorizontalAlignment.Left; this.e_32.VerticalAlignment = VerticalAlignment.Stretch; LinearGradientBrush e_32_Background = new LinearGradientBrush(); e_32_Background.StartPoint = new PointF(0F, 1F); e_32_Background.EndPoint = new PointF(1F, 1F); e_32_Background.SpreadMethod = GradientSpreadMethod.Pad; e_32_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 255), 0F)); e_32_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 1F)); e_32_Background.GradientStops.Add(new GradientStop(new ColorW(1, 68, 149, 255), 0F)); e_32_Background.GradientStops.Add(new GradientStop(new ColorW(0, 63, 139, 238), 0.664F)); e_32_Background.GradientStops.Add(new GradientStop(new ColorW(0, 22, 50, 85), 0.864F)); this.e_32.Background = e_32_Background; this.e_32.Orientation = Orientation.Vertical; Binding binding_e_32_Visibility = new Binding("InfoVisibility"); this.e_32.SetBinding(StackPanel.VisibilityProperty, binding_e_32_Visibility); // txtOwner element this.txtOwner = new TextBlock(); this.e_32.Children.Add(this.txtOwner); this.txtOwner.Name = "txtOwner"; this.txtOwner.Margin = new Thickness(0F, 5F, 25F, 5F); this.txtOwner.TextWrapping = TextWrapping.Wrap; Binding binding_txtOwner_Text = new Binding("OwnedBy"); this.txtOwner.SetBinding(TextBlock.TextProperty, binding_txtOwner_Text); // txtSysID element this.txtSysID = new TextBlock(); this.e_32.Children.Add(this.txtSysID); this.txtSysID.Name = "txtSysID"; this.txtSysID.Margin = new Thickness(0F, 5F, 25F, 5F); this.txtSysID.TextWrapping = TextWrapping.Wrap; Binding binding_txtSysID_Text = new Binding("SystemName"); this.txtSysID.SetBinding(TextBlock.TextProperty, binding_txtSysID_Text); // txtNumPlanets element this.txtNumPlanets = new TextBlock(); this.e_32.Children.Add(this.txtNumPlanets); this.txtNumPlanets.Name = "txtNumPlanets"; this.txtNumPlanets.Margin = new Thickness(0F, 5F, 25F, 5F); this.txtNumPlanets.TextWrapping = TextWrapping.Wrap; Binding binding_txtNumPlanets_Text = new Binding("NumberPlanets"); this.txtNumPlanets.SetBinding(TextBlock.TextProperty, binding_txtNumPlanets_Text); // txtPlanets element this.txtPlanets = new TextBlock(); this.e_32.Children.Add(this.txtPlanets); this.txtPlanets.Name = "txtPlanets"; this.txtPlanets.Margin = new Thickness(0F, 5F, 25F, 5F); this.txtPlanets.Text = "Planets List: "; this.txtPlanets.TextWrapping = TextWrapping.Wrap; // comboPlanets element this.comboPlanets = new ComboBox(); this.e_32.Children.Add(this.comboPlanets); this.comboPlanets.Name = "comboPlanets"; this.comboPlanets.Focusable = false; this.comboPlanets.Margin = new Thickness(0F, 5F, 55F, 5F); Binding binding_comboPlanets_IsEnabled = new Binding("IsUIEnabled"); this.comboPlanets.SetBinding(ComboBox.IsEnabledProperty, binding_comboPlanets_IsEnabled); Binding binding_comboPlanets_ItemsSource = new Binding("PlanetsList"); this.comboPlanets.SetBinding(ComboBox.ItemsSourceProperty, binding_comboPlanets_ItemsSource); Binding binding_comboPlanets_SelectedItem = new Binding("PlanetSelectedIndex"); this.comboPlanets.SetBinding(ComboBox.SelectedItemProperty, binding_comboPlanets_SelectedItem); Binding binding_comboPlanets_IsDropDownOpen = new Binding("PlanetsComboBoxDropDownOpen"); this.comboPlanets.SetBinding(ComboBox.IsDropDownOpenProperty, binding_comboPlanets_IsDropDownOpen); // btnViewPlanetInfo element this.btnViewPlanetInfo = new Button(); this.e_32.Children.Add(this.btnViewPlanetInfo); this.btnViewPlanetInfo.Name = "btnViewPlanetInfo"; this.btnViewPlanetInfo.Margin = new Thickness(0F, 5F, 55F, 5F); this.btnViewPlanetInfo.Content = "Toggle Planet Info"; Binding binding_btnViewPlanetInfo_IsEnabled = new Binding("IsUIEnabled"); this.btnViewPlanetInfo.SetBinding(Button.IsEnabledProperty, binding_btnViewPlanetInfo_IsEnabled); Binding binding_btnViewPlanetInfo_Command = new Binding("PlanetInfoCommand"); this.btnViewPlanetInfo.SetBinding(Button.CommandProperty, binding_btnViewPlanetInfo_Command); // txtStations element this.txtStations = new TextBlock(); this.e_32.Children.Add(this.txtStations); this.txtStations.Name = "txtStations"; this.txtStations.Margin = new Thickness(0F, 5F, 25F, 5F); this.txtStations.Text = "Space Stations List: "; this.txtStations.TextWrapping = TextWrapping.Wrap; // comboStations element this.comboStations = new ComboBox(); this.e_32.Children.Add(this.comboStations); this.comboStations.Name = "comboStations"; this.comboStations.Focusable = false; this.comboStations.Margin = new Thickness(0F, 5F, 55F, 5F); Binding binding_comboStations_IsEnabled = new Binding("IsUIEnabled"); this.comboStations.SetBinding(ComboBox.IsEnabledProperty, binding_comboStations_IsEnabled); Binding binding_comboStations_ItemsSource = new Binding("StationsList"); this.comboStations.SetBinding(ComboBox.ItemsSourceProperty, binding_comboStations_ItemsSource); Binding binding_comboStations_SelectedItem = new Binding("StationsSelectedIndex"); this.comboStations.SetBinding(ComboBox.SelectedItemProperty, binding_comboStations_SelectedItem); Binding binding_comboStations_IsDropDownOpen = new Binding("StationsComboBoxDropDownOpen"); this.comboStations.SetBinding(ComboBox.IsDropDownOpenProperty, binding_comboStations_IsDropDownOpen); // btnViewStationsInfo element this.btnViewStationsInfo = new Button(); this.e_32.Children.Add(this.btnViewStationsInfo); this.btnViewStationsInfo.Name = "btnViewStationsInfo"; this.btnViewStationsInfo.Margin = new Thickness(0F, 5F, 55F, 5F); this.btnViewStationsInfo.Content = "Toggle Station Info"; Binding binding_btnViewStationsInfo_IsEnabled = new Binding("IsUIEnabled"); this.btnViewStationsInfo.SetBinding(Button.IsEnabledProperty, binding_btnViewStationsInfo_IsEnabled); Binding binding_btnViewStationsInfo_Command = new Binding("StationInfoCommand"); this.btnViewStationsInfo.SetBinding(Button.CommandProperty, binding_btnViewStationsInfo_Command); // e_33 element this.e_33 = new StackPanel(); this.backgroundGrid.Children.Add(this.e_33); this.e_33.Name = "e_33"; this.e_33.Height = 143F; this.e_33.Width = 180F; this.e_33.Margin = new Thickness(0F, 0F, 0F, 120F); this.e_33.HorizontalAlignment = HorizontalAlignment.Right; this.e_33.VerticalAlignment = VerticalAlignment.Bottom; LinearGradientBrush e_33_Background = new LinearGradientBrush(); e_33_Background.StartPoint = new PointF(0F, 1F); e_33_Background.EndPoint = new PointF(1F, 1F); e_33_Background.SpreadMethod = GradientSpreadMethod.Pad; e_33_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 0F)); e_33_Background.GradientStops.Add(new GradientStop(new ColorW(1, 68, 149, 255), 1F)); e_33_Background.GradientStops.Add(new GradientStop(new ColorW(0, 63, 139, 238), 0.26F)); e_33_Background.GradientStops.Add(new GradientStop(new ColorW(0, 22, 50, 85), 0.147F)); this.e_33.Background = e_33_Background; this.e_33.Orientation = Orientation.Vertical; Binding binding_e_33_Visibility = new Binding("miniMapVisibility"); this.e_33.SetBinding(StackPanel.VisibilityProperty, binding_e_33_Visibility); // e_34 element this.e_34 = new WrapPanel(); this.e_33.Children.Add(this.e_34); this.e_34.Name = "e_34"; this.e_34.Margin = new Thickness(55F, 16F, 15F, 0F); Binding binding_e_34_DataContext = new Binding("MiniMapData"); this.e_34.SetBinding(WrapPanel.DataContextProperty, binding_e_34_DataContext); // e_35 element this.e_35 = new Button(); this.e_34.Children.Add(this.e_35); this.e_35.Name = "e_35"; this.e_35.Height = 22F; this.e_35.Width = 22F; this.e_35.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_35, 0); Binding binding_e_35_ToolTip = new Binding("btn1TT"); this.e_35.SetBinding(Button.ToolTipProperty, binding_e_35_ToolTip); Binding binding_e_35_IsEnabled = new Binding("IsUIEnabled"); this.e_35.SetBinding(Button.IsEnabledProperty, binding_e_35_IsEnabled); Binding binding_e_35_Command = new Binding("btn1Command"); this.e_35.SetBinding(Button.CommandProperty, binding_e_35_Command); // e_36 element this.e_36 = new TextBlock(); this.e_35.Content = this.e_36; this.e_36.Name = "e_36"; this.e_36.IsHitTestVisible = false; this.e_36.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_36_Foreground = new Binding("btn1Colour"); this.e_36.SetBinding(TextBlock.ForegroundProperty, binding_e_36_Foreground); Binding binding_e_36_Text = new Binding("btn1Text"); this.e_36.SetBinding(TextBlock.TextProperty, binding_e_36_Text); // e_37 element this.e_37 = new Button(); this.e_34.Children.Add(this.e_37); this.e_37.Name = "e_37"; this.e_37.Height = 22F; this.e_37.Width = 22F; this.e_37.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_37, 0); Binding binding_e_37_ToolTip = new Binding("btn2TT"); this.e_37.SetBinding(Button.ToolTipProperty, binding_e_37_ToolTip); Binding binding_e_37_IsEnabled = new Binding("IsUIEnabled"); this.e_37.SetBinding(Button.IsEnabledProperty, binding_e_37_IsEnabled); Binding binding_e_37_Command = new Binding("btn2Command"); this.e_37.SetBinding(Button.CommandProperty, binding_e_37_Command); // e_38 element this.e_38 = new TextBlock(); this.e_37.Content = this.e_38; this.e_38.Name = "e_38"; this.e_38.IsHitTestVisible = false; this.e_38.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_38_Foreground = new Binding("btn2Colour"); this.e_38.SetBinding(TextBlock.ForegroundProperty, binding_e_38_Foreground); Binding binding_e_38_Text = new Binding("btn2Text"); this.e_38.SetBinding(TextBlock.TextProperty, binding_e_38_Text); // e_39 element this.e_39 = new Button(); this.e_34.Children.Add(this.e_39); this.e_39.Name = "e_39"; this.e_39.Height = 22F; this.e_39.Width = 22F; this.e_39.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_39, 0); Binding binding_e_39_ToolTip = new Binding("btn3TT"); this.e_39.SetBinding(Button.ToolTipProperty, binding_e_39_ToolTip); Binding binding_e_39_IsEnabled = new Binding("IsUIEnabled"); this.e_39.SetBinding(Button.IsEnabledProperty, binding_e_39_IsEnabled); Binding binding_e_39_Command = new Binding("btn3Command"); this.e_39.SetBinding(Button.CommandProperty, binding_e_39_Command); // e_40 element this.e_40 = new TextBlock(); this.e_39.Content = this.e_40; this.e_40.Name = "e_40"; this.e_40.IsHitTestVisible = false; this.e_40.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_40_Foreground = new Binding("btn3Colour"); this.e_40.SetBinding(TextBlock.ForegroundProperty, binding_e_40_Foreground); Binding binding_e_40_Text = new Binding("btn3Text"); this.e_40.SetBinding(TextBlock.TextProperty, binding_e_40_Text); // e_41 element this.e_41 = new Button(); this.e_34.Children.Add(this.e_41); this.e_41.Name = "e_41"; this.e_41.Height = 22F; this.e_41.Width = 22F; this.e_41.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_41, 0); Binding binding_e_41_ToolTip = new Binding("btn4TT"); this.e_41.SetBinding(Button.ToolTipProperty, binding_e_41_ToolTip); Binding binding_e_41_IsEnabled = new Binding("IsUIEnabled"); this.e_41.SetBinding(Button.IsEnabledProperty, binding_e_41_IsEnabled); Binding binding_e_41_Command = new Binding("btn4Command"); this.e_41.SetBinding(Button.CommandProperty, binding_e_41_Command); // e_42 element this.e_42 = new TextBlock(); this.e_41.Content = this.e_42; this.e_42.Name = "e_42"; this.e_42.IsHitTestVisible = false; this.e_42.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_42_Foreground = new Binding("btn4Colour"); this.e_42.SetBinding(TextBlock.ForegroundProperty, binding_e_42_Foreground); Binding binding_e_42_Text = new Binding("btn4Text"); this.e_42.SetBinding(TextBlock.TextProperty, binding_e_42_Text); // e_43 element this.e_43 = new Button(); this.e_34.Children.Add(this.e_43); this.e_43.Name = "e_43"; this.e_43.Height = 22F; this.e_43.Width = 22F; this.e_43.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_43, 0); Binding binding_e_43_ToolTip = new Binding("btn5TT"); this.e_43.SetBinding(Button.ToolTipProperty, binding_e_43_ToolTip); Binding binding_e_43_IsEnabled = new Binding("IsUIEnabled"); this.e_43.SetBinding(Button.IsEnabledProperty, binding_e_43_IsEnabled); Binding binding_e_43_Command = new Binding("btn5Command"); this.e_43.SetBinding(Button.CommandProperty, binding_e_43_Command); // e_44 element this.e_44 = new TextBlock(); this.e_43.Content = this.e_44; this.e_44.Name = "e_44"; this.e_44.IsHitTestVisible = false; this.e_44.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_44_Foreground = new Binding("btn5Colour"); this.e_44.SetBinding(TextBlock.ForegroundProperty, binding_e_44_Foreground); Binding binding_e_44_Text = new Binding("btn5Text"); this.e_44.SetBinding(TextBlock.TextProperty, binding_e_44_Text); // e_45 element this.e_45 = new Button(); this.e_34.Children.Add(this.e_45); this.e_45.Name = "e_45"; this.e_45.Height = 22F; this.e_45.Width = 22F; this.e_45.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_45, 0); Binding binding_e_45_ToolTip = new Binding("btn6TT"); this.e_45.SetBinding(Button.ToolTipProperty, binding_e_45_ToolTip); Binding binding_e_45_IsEnabled = new Binding("IsUIEnabled"); this.e_45.SetBinding(Button.IsEnabledProperty, binding_e_45_IsEnabled); Binding binding_e_45_Command = new Binding("btn6Command"); this.e_45.SetBinding(Button.CommandProperty, binding_e_45_Command); // e_46 element this.e_46 = new TextBlock(); this.e_45.Content = this.e_46; this.e_46.Name = "e_46"; this.e_46.IsHitTestVisible = false; this.e_46.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_46_Foreground = new Binding("btn6Colour"); this.e_46.SetBinding(TextBlock.ForegroundProperty, binding_e_46_Foreground); Binding binding_e_46_Text = new Binding("btn6Text"); this.e_46.SetBinding(TextBlock.TextProperty, binding_e_46_Text); // e_47 element this.e_47 = new Button(); this.e_34.Children.Add(this.e_47); this.e_47.Name = "e_47"; this.e_47.Height = 22F; this.e_47.Width = 22F; this.e_47.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_47, 0); Binding binding_e_47_ToolTip = new Binding("btn7TT"); this.e_47.SetBinding(Button.ToolTipProperty, binding_e_47_ToolTip); Binding binding_e_47_IsEnabled = new Binding("IsUIEnabled"); this.e_47.SetBinding(Button.IsEnabledProperty, binding_e_47_IsEnabled); Binding binding_e_47_Command = new Binding("btn7Command"); this.e_47.SetBinding(Button.CommandProperty, binding_e_47_Command); // e_48 element this.e_48 = new TextBlock(); this.e_47.Content = this.e_48; this.e_48.Name = "e_48"; this.e_48.IsHitTestVisible = false; this.e_48.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_48_Foreground = new Binding("btn7Colour"); this.e_48.SetBinding(TextBlock.ForegroundProperty, binding_e_48_Foreground); Binding binding_e_48_Text = new Binding("btn7Text"); this.e_48.SetBinding(TextBlock.TextProperty, binding_e_48_Text); // e_49 element this.e_49 = new Button(); this.e_34.Children.Add(this.e_49); this.e_49.Name = "e_49"; this.e_49.Height = 22F; this.e_49.Width = 22F; this.e_49.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_49, 0); Binding binding_e_49_ToolTip = new Binding("btn8TT"); this.e_49.SetBinding(Button.ToolTipProperty, binding_e_49_ToolTip); Binding binding_e_49_IsEnabled = new Binding("IsUIEnabled"); this.e_49.SetBinding(Button.IsEnabledProperty, binding_e_49_IsEnabled); Binding binding_e_49_Command = new Binding("btn8Command"); this.e_49.SetBinding(Button.CommandProperty, binding_e_49_Command); // e_50 element this.e_50 = new TextBlock(); this.e_49.Content = this.e_50; this.e_50.Name = "e_50"; this.e_50.IsHitTestVisible = false; this.e_50.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_50_Foreground = new Binding("btn8Colour"); this.e_50.SetBinding(TextBlock.ForegroundProperty, binding_e_50_Foreground); Binding binding_e_50_Text = new Binding("btn8Text"); this.e_50.SetBinding(TextBlock.TextProperty, binding_e_50_Text); // e_51 element this.e_51 = new Button(); this.e_34.Children.Add(this.e_51); this.e_51.Name = "e_51"; this.e_51.Height = 22F; this.e_51.Width = 22F; this.e_51.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_51, 0); Binding binding_e_51_ToolTip = new Binding("btn9TT"); this.e_51.SetBinding(Button.ToolTipProperty, binding_e_51_ToolTip); Binding binding_e_51_IsEnabled = new Binding("IsUIEnabled"); this.e_51.SetBinding(Button.IsEnabledProperty, binding_e_51_IsEnabled); Binding binding_e_51_Command = new Binding("btn9Command"); this.e_51.SetBinding(Button.CommandProperty, binding_e_51_Command); // e_52 element this.e_52 = new TextBlock(); this.e_51.Content = this.e_52; this.e_52.Name = "e_52"; this.e_52.IsHitTestVisible = false; this.e_52.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_52_Foreground = new Binding("btn9Colour"); this.e_52.SetBinding(TextBlock.ForegroundProperty, binding_e_52_Foreground); Binding binding_e_52_Text = new Binding("btn9Text"); this.e_52.SetBinding(TextBlock.TextProperty, binding_e_52_Text); // e_53 element this.e_53 = new Button(); this.e_34.Children.Add(this.e_53); this.e_53.Name = "e_53"; this.e_53.Height = 22F; this.e_53.Width = 22F; this.e_53.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_53, 0); Binding binding_e_53_ToolTip = new Binding("btn10TT"); this.e_53.SetBinding(Button.ToolTipProperty, binding_e_53_ToolTip); Binding binding_e_53_IsEnabled = new Binding("IsUIEnabled"); this.e_53.SetBinding(Button.IsEnabledProperty, binding_e_53_IsEnabled); Binding binding_e_53_Command = new Binding("btn10Command"); this.e_53.SetBinding(Button.CommandProperty, binding_e_53_Command); // e_54 element this.e_54 = new TextBlock(); this.e_53.Content = this.e_54; this.e_54.Name = "e_54"; this.e_54.IsHitTestVisible = false; this.e_54.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_54_Foreground = new Binding("btn10Colour"); this.e_54.SetBinding(TextBlock.ForegroundProperty, binding_e_54_Foreground); Binding binding_e_54_Text = new Binding("btn10Text"); this.e_54.SetBinding(TextBlock.TextProperty, binding_e_54_Text); // e_55 element this.e_55 = new Button(); this.e_34.Children.Add(this.e_55); this.e_55.Name = "e_55"; this.e_55.Height = 22F; this.e_55.Width = 22F; this.e_55.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_55, 0); Binding binding_e_55_ToolTip = new Binding("btn11TT"); this.e_55.SetBinding(Button.ToolTipProperty, binding_e_55_ToolTip); Binding binding_e_55_IsEnabled = new Binding("IsUIEnabled"); this.e_55.SetBinding(Button.IsEnabledProperty, binding_e_55_IsEnabled); Binding binding_e_55_Command = new Binding("btn11Command"); this.e_55.SetBinding(Button.CommandProperty, binding_e_55_Command); // e_56 element this.e_56 = new TextBlock(); this.e_55.Content = this.e_56; this.e_56.Name = "e_56"; this.e_56.IsHitTestVisible = false; this.e_56.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_56_Foreground = new Binding("btn11Colour"); this.e_56.SetBinding(TextBlock.ForegroundProperty, binding_e_56_Foreground); Binding binding_e_56_Text = new Binding("btn11Text"); this.e_56.SetBinding(TextBlock.TextProperty, binding_e_56_Text); // e_57 element this.e_57 = new Button(); this.e_34.Children.Add(this.e_57); this.e_57.Name = "e_57"; this.e_57.Height = 22F; this.e_57.Width = 22F; this.e_57.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_57, 0); Binding binding_e_57_ToolTip = new Binding("btn12TT"); this.e_57.SetBinding(Button.ToolTipProperty, binding_e_57_ToolTip); Binding binding_e_57_IsEnabled = new Binding("IsUIEnabled"); this.e_57.SetBinding(Button.IsEnabledProperty, binding_e_57_IsEnabled); Binding binding_e_57_Command = new Binding("btn12Command"); this.e_57.SetBinding(Button.CommandProperty, binding_e_57_Command); // e_58 element this.e_58 = new TextBlock(); this.e_57.Content = this.e_58; this.e_58.Name = "e_58"; this.e_58.IsHitTestVisible = false; this.e_58.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_58_Foreground = new Binding("btn12Colour"); this.e_58.SetBinding(TextBlock.ForegroundProperty, binding_e_58_Foreground); Binding binding_e_58_Text = new Binding("btn12Text"); this.e_58.SetBinding(TextBlock.TextProperty, binding_e_58_Text); // e_59 element this.e_59 = new Button(); this.e_34.Children.Add(this.e_59); this.e_59.Name = "e_59"; this.e_59.Height = 22F; this.e_59.Width = 22F; this.e_59.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_59, 0); Binding binding_e_59_ToolTip = new Binding("btn13TT"); this.e_59.SetBinding(Button.ToolTipProperty, binding_e_59_ToolTip); Binding binding_e_59_IsEnabled = new Binding("IsUIEnabled"); this.e_59.SetBinding(Button.IsEnabledProperty, binding_e_59_IsEnabled); Binding binding_e_59_Command = new Binding("btn13Command"); this.e_59.SetBinding(Button.CommandProperty, binding_e_59_Command); // e_60 element this.e_60 = new TextBlock(); this.e_59.Content = this.e_60; this.e_60.Name = "e_60"; this.e_60.IsHitTestVisible = false; this.e_60.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_60_Foreground = new Binding("btn13Colour"); this.e_60.SetBinding(TextBlock.ForegroundProperty, binding_e_60_Foreground); Binding binding_e_60_Text = new Binding("btn13Text"); this.e_60.SetBinding(TextBlock.TextProperty, binding_e_60_Text); // e_61 element this.e_61 = new Button(); this.e_34.Children.Add(this.e_61); this.e_61.Name = "e_61"; this.e_61.Height = 22F; this.e_61.Width = 22F; this.e_61.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_61, 0); Binding binding_e_61_ToolTip = new Binding("btn14TT"); this.e_61.SetBinding(Button.ToolTipProperty, binding_e_61_ToolTip); Binding binding_e_61_IsEnabled = new Binding("IsUIEnabled"); this.e_61.SetBinding(Button.IsEnabledProperty, binding_e_61_IsEnabled); Binding binding_e_61_Command = new Binding("btn14Command"); this.e_61.SetBinding(Button.CommandProperty, binding_e_61_Command); // e_62 element this.e_62 = new TextBlock(); this.e_61.Content = this.e_62; this.e_62.Name = "e_62"; this.e_62.IsHitTestVisible = false; this.e_62.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_62_Foreground = new Binding("btn14Colour"); this.e_62.SetBinding(TextBlock.ForegroundProperty, binding_e_62_Foreground); Binding binding_e_62_Text = new Binding("btn14Text"); this.e_62.SetBinding(TextBlock.TextProperty, binding_e_62_Text); // e_63 element this.e_63 = new Button(); this.e_34.Children.Add(this.e_63); this.e_63.Name = "e_63"; this.e_63.Height = 22F; this.e_63.Width = 22F; this.e_63.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_63, 0); Binding binding_e_63_ToolTip = new Binding("btn15TT"); this.e_63.SetBinding(Button.ToolTipProperty, binding_e_63_ToolTip); Binding binding_e_63_IsEnabled = new Binding("IsUIEnabled"); this.e_63.SetBinding(Button.IsEnabledProperty, binding_e_63_IsEnabled); Binding binding_e_63_Command = new Binding("btn15Command"); this.e_63.SetBinding(Button.CommandProperty, binding_e_63_Command); // e_64 element this.e_64 = new TextBlock(); this.e_63.Content = this.e_64; this.e_64.Name = "e_64"; this.e_64.IsHitTestVisible = false; this.e_64.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_64_Foreground = new Binding("btn15Colour"); this.e_64.SetBinding(TextBlock.ForegroundProperty, binding_e_64_Foreground); Binding binding_e_64_Text = new Binding("btn15Text"); this.e_64.SetBinding(TextBlock.TextProperty, binding_e_64_Text); // e_65 element this.e_65 = new Button(); this.e_34.Children.Add(this.e_65); this.e_65.Name = "e_65"; this.e_65.Height = 22F; this.e_65.Width = 22F; this.e_65.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_65, 0); Binding binding_e_65_ToolTip = new Binding("btn16TT"); this.e_65.SetBinding(Button.ToolTipProperty, binding_e_65_ToolTip); Binding binding_e_65_IsEnabled = new Binding("IsUIEnabled"); this.e_65.SetBinding(Button.IsEnabledProperty, binding_e_65_IsEnabled); Binding binding_e_65_Command = new Binding("btn16Command"); this.e_65.SetBinding(Button.CommandProperty, binding_e_65_Command); // e_66 element this.e_66 = new TextBlock(); this.e_65.Content = this.e_66; this.e_66.Name = "e_66"; this.e_66.IsHitTestVisible = false; this.e_66.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_66_Foreground = new Binding("btn16Colour"); this.e_66.SetBinding(TextBlock.ForegroundProperty, binding_e_66_Foreground); Binding binding_e_66_Text = new Binding("btn16Text"); this.e_66.SetBinding(TextBlock.TextProperty, binding_e_66_Text); // e_67 element this.e_67 = new Button(); this.e_34.Children.Add(this.e_67); this.e_67.Name = "e_67"; this.e_67.Height = 22F; this.e_67.Width = 22F; this.e_67.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_67, 0); Binding binding_e_67_ToolTip = new Binding("btn17TT"); this.e_67.SetBinding(Button.ToolTipProperty, binding_e_67_ToolTip); Binding binding_e_67_IsEnabled = new Binding("IsUIEnabled"); this.e_67.SetBinding(Button.IsEnabledProperty, binding_e_67_IsEnabled); Binding binding_e_67_Command = new Binding("btn17Command"); this.e_67.SetBinding(Button.CommandProperty, binding_e_67_Command); // e_68 element this.e_68 = new TextBlock(); this.e_67.Content = this.e_68; this.e_68.Name = "e_68"; this.e_68.IsHitTestVisible = false; this.e_68.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_68_Foreground = new Binding("btn17Colour"); this.e_68.SetBinding(TextBlock.ForegroundProperty, binding_e_68_Foreground); Binding binding_e_68_Text = new Binding("btn17Text"); this.e_68.SetBinding(TextBlock.TextProperty, binding_e_68_Text); // e_69 element this.e_69 = new Button(); this.e_34.Children.Add(this.e_69); this.e_69.Name = "e_69"; this.e_69.Height = 22F; this.e_69.Width = 22F; this.e_69.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_69, 0); Binding binding_e_69_ToolTip = new Binding("btn18TT"); this.e_69.SetBinding(Button.ToolTipProperty, binding_e_69_ToolTip); Binding binding_e_69_IsEnabled = new Binding("IsUIEnabled"); this.e_69.SetBinding(Button.IsEnabledProperty, binding_e_69_IsEnabled); Binding binding_e_69_Command = new Binding("btn18Command"); this.e_69.SetBinding(Button.CommandProperty, binding_e_69_Command); // e_70 element this.e_70 = new TextBlock(); this.e_69.Content = this.e_70; this.e_70.Name = "e_70"; this.e_70.IsHitTestVisible = false; this.e_70.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_70_Foreground = new Binding("btn18Colour"); this.e_70.SetBinding(TextBlock.ForegroundProperty, binding_e_70_Foreground); Binding binding_e_70_Text = new Binding("btn18Text"); this.e_70.SetBinding(TextBlock.TextProperty, binding_e_70_Text); // e_71 element this.e_71 = new Button(); this.e_34.Children.Add(this.e_71); this.e_71.Name = "e_71"; this.e_71.Height = 22F; this.e_71.Width = 22F; this.e_71.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_71, 0); Binding binding_e_71_ToolTip = new Binding("btn19TT"); this.e_71.SetBinding(Button.ToolTipProperty, binding_e_71_ToolTip); Binding binding_e_71_IsEnabled = new Binding("IsUIEnabled"); this.e_71.SetBinding(Button.IsEnabledProperty, binding_e_71_IsEnabled); Binding binding_e_71_Command = new Binding("btn19Command"); this.e_71.SetBinding(Button.CommandProperty, binding_e_71_Command); // e_72 element this.e_72 = new TextBlock(); this.e_71.Content = this.e_72; this.e_72.Name = "e_72"; this.e_72.IsHitTestVisible = false; this.e_72.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_72_Foreground = new Binding("btn19Colour"); this.e_72.SetBinding(TextBlock.ForegroundProperty, binding_e_72_Foreground); Binding binding_e_72_Text = new Binding("btn19Text"); this.e_72.SetBinding(TextBlock.TextProperty, binding_e_72_Text); // e_73 element this.e_73 = new Button(); this.e_34.Children.Add(this.e_73); this.e_73.Name = "e_73"; this.e_73.Height = 22F; this.e_73.Width = 22F; this.e_73.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_73, 0); Binding binding_e_73_ToolTip = new Binding("btn20TT"); this.e_73.SetBinding(Button.ToolTipProperty, binding_e_73_ToolTip); Binding binding_e_73_IsEnabled = new Binding("IsUIEnabled"); this.e_73.SetBinding(Button.IsEnabledProperty, binding_e_73_IsEnabled); Binding binding_e_73_Command = new Binding("btn20Command"); this.e_73.SetBinding(Button.CommandProperty, binding_e_73_Command); // e_74 element this.e_74 = new TextBlock(); this.e_73.Content = this.e_74; this.e_74.Name = "e_74"; this.e_74.IsHitTestVisible = false; this.e_74.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_74_Foreground = new Binding("btn20Colour"); this.e_74.SetBinding(TextBlock.ForegroundProperty, binding_e_74_Foreground); Binding binding_e_74_Text = new Binding("btn20Text"); this.e_74.SetBinding(TextBlock.TextProperty, binding_e_74_Text); // e_75 element this.e_75 = new Button(); this.e_34.Children.Add(this.e_75); this.e_75.Name = "e_75"; this.e_75.Height = 22F; this.e_75.Width = 22F; this.e_75.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_75, 0); Binding binding_e_75_ToolTip = new Binding("btn21TT"); this.e_75.SetBinding(Button.ToolTipProperty, binding_e_75_ToolTip); Binding binding_e_75_IsEnabled = new Binding("IsUIEnabled"); this.e_75.SetBinding(Button.IsEnabledProperty, binding_e_75_IsEnabled); Binding binding_e_75_Command = new Binding("btn21Command"); this.e_75.SetBinding(Button.CommandProperty, binding_e_75_Command); // e_76 element this.e_76 = new TextBlock(); this.e_75.Content = this.e_76; this.e_76.Name = "e_76"; this.e_76.IsHitTestVisible = false; this.e_76.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_76_Foreground = new Binding("btn21Colour"); this.e_76.SetBinding(TextBlock.ForegroundProperty, binding_e_76_Foreground); Binding binding_e_76_Text = new Binding("btn21Text"); this.e_76.SetBinding(TextBlock.TextProperty, binding_e_76_Text); // e_77 element this.e_77 = new Button(); this.e_34.Children.Add(this.e_77); this.e_77.Name = "e_77"; this.e_77.Height = 22F; this.e_77.Width = 22F; this.e_77.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_77, 0); Binding binding_e_77_ToolTip = new Binding("btn22TT"); this.e_77.SetBinding(Button.ToolTipProperty, binding_e_77_ToolTip); Binding binding_e_77_IsEnabled = new Binding("IsUIEnabled"); this.e_77.SetBinding(Button.IsEnabledProperty, binding_e_77_IsEnabled); Binding binding_e_77_Command = new Binding("btn22Command"); this.e_77.SetBinding(Button.CommandProperty, binding_e_77_Command); // e_78 element this.e_78 = new TextBlock(); this.e_77.Content = this.e_78; this.e_78.Name = "e_78"; this.e_78.IsHitTestVisible = false; this.e_78.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_78_Foreground = new Binding("btn22Colour"); this.e_78.SetBinding(TextBlock.ForegroundProperty, binding_e_78_Foreground); Binding binding_e_78_Text = new Binding("btn22Text"); this.e_78.SetBinding(TextBlock.TextProperty, binding_e_78_Text); // e_79 element this.e_79 = new Button(); this.e_34.Children.Add(this.e_79); this.e_79.Name = "e_79"; this.e_79.Height = 22F; this.e_79.Width = 22F; this.e_79.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_79, 0); Binding binding_e_79_ToolTip = new Binding("btn23TT"); this.e_79.SetBinding(Button.ToolTipProperty, binding_e_79_ToolTip); Binding binding_e_79_IsEnabled = new Binding("IsUIEnabled"); this.e_79.SetBinding(Button.IsEnabledProperty, binding_e_79_IsEnabled); Binding binding_e_79_Command = new Binding("btn23Command"); this.e_79.SetBinding(Button.CommandProperty, binding_e_79_Command); // e_80 element this.e_80 = new TextBlock(); this.e_79.Content = this.e_80; this.e_80.Name = "e_80"; this.e_80.IsHitTestVisible = false; this.e_80.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_80_Foreground = new Binding("btn23Colour"); this.e_80.SetBinding(TextBlock.ForegroundProperty, binding_e_80_Foreground); Binding binding_e_80_Text = new Binding("btn23Text"); this.e_80.SetBinding(TextBlock.TextProperty, binding_e_80_Text); // e_81 element this.e_81 = new Button(); this.e_34.Children.Add(this.e_81); this.e_81.Name = "e_81"; this.e_81.Height = 22F; this.e_81.Width = 22F; this.e_81.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_81, 0); Binding binding_e_81_ToolTip = new Binding("btn24TT"); this.e_81.SetBinding(Button.ToolTipProperty, binding_e_81_ToolTip); Binding binding_e_81_IsEnabled = new Binding("IsUIEnabled"); this.e_81.SetBinding(Button.IsEnabledProperty, binding_e_81_IsEnabled); Binding binding_e_81_Command = new Binding("btn24Command"); this.e_81.SetBinding(Button.CommandProperty, binding_e_81_Command); // e_82 element this.e_82 = new TextBlock(); this.e_81.Content = this.e_82; this.e_82.Name = "e_82"; this.e_82.IsHitTestVisible = false; this.e_82.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_82_Foreground = new Binding("btn24Colour"); this.e_82.SetBinding(TextBlock.ForegroundProperty, binding_e_82_Foreground); Binding binding_e_82_Text = new Binding("btn24Text"); this.e_82.SetBinding(TextBlock.TextProperty, binding_e_82_Text); // e_83 element this.e_83 = new Button(); this.e_34.Children.Add(this.e_83); this.e_83.Name = "e_83"; this.e_83.Height = 22F; this.e_83.Width = 22F; this.e_83.Background = new SolidColorBrush(new ColorW(255, 255, 255, 0)); ToolTipService.SetInitialShowDelay(this.e_83, 0); Binding binding_e_83_ToolTip = new Binding("btn25TT"); this.e_83.SetBinding(Button.ToolTipProperty, binding_e_83_ToolTip); Binding binding_e_83_IsEnabled = new Binding("IsUIEnabled"); this.e_83.SetBinding(Button.IsEnabledProperty, binding_e_83_IsEnabled); Binding binding_e_83_Command = new Binding("btn25Command"); this.e_83.SetBinding(Button.CommandProperty, binding_e_83_Command); // e_84 element this.e_84 = new TextBlock(); this.e_83.Content = this.e_84; this.e_84.Name = "e_84"; this.e_84.IsHitTestVisible = false; this.e_84.Margin = new Thickness(-5F, -5F, -5F, -5F); Binding binding_e_84_Foreground = new Binding("btn25Colour"); this.e_84.SetBinding(TextBlock.ForegroundProperty, binding_e_84_Foreground); Binding binding_e_84_Text = new Binding("btn25Text"); this.e_84.SetBinding(TextBlock.TextProperty, binding_e_84_Text); // e_85 element this.e_85 = new Button(); this.backgroundGrid.Children.Add(this.e_85); this.e_85.Name = "e_85"; this.e_85.Height = 17F; this.e_85.Width = 139F; this.e_85.Margin = new Thickness(0F, 0F, 0F, 246F); this.e_85.HorizontalAlignment = HorizontalAlignment.Right; this.e_85.VerticalAlignment = VerticalAlignment.Bottom; Binding binding_e_85_IsEnabled = new Binding("IsUIEnabled"); this.e_85.SetBinding(Button.IsEnabledProperty, binding_e_85_IsEnabled); Binding binding_e_85_Command = new Binding("MiniMapUpPressed"); this.e_85.SetBinding(Button.CommandProperty, binding_e_85_Command); // e_86 element this.e_86 = new Image(); this.e_85.Content = this.e_86; this.e_86.Name = "e_86"; this.e_86.Height = 12F; this.e_86.Width = 88F; this.e_86.Margin = new Thickness(0F, 0F, 5F, 0F); this.e_86.HorizontalAlignment = HorizontalAlignment.Right; BitmapImage e_86_bm = new BitmapImage(); e_86_bm.TextureAsset = "ImagesUI\\arrowU"; this.e_86.Source = e_86_bm; // e_87 element this.e_87 = new Button(); this.backgroundGrid.Children.Add(this.e_87); this.e_87.Name = "e_87"; this.e_87.Height = 17F; this.e_87.Width = 139F; this.e_87.Margin = new Thickness(0F, 0F, 0F, 120F); this.e_87.HorizontalAlignment = HorizontalAlignment.Right; this.e_87.VerticalAlignment = VerticalAlignment.Bottom; Binding binding_e_87_IsEnabled = new Binding("IsUIEnabled"); this.e_87.SetBinding(Button.IsEnabledProperty, binding_e_87_IsEnabled); Binding binding_e_87_Command = new Binding("MiniMapDownPressed"); this.e_87.SetBinding(Button.CommandProperty, binding_e_87_Command); // e_88 element this.e_88 = new Image(); this.e_87.Content = this.e_88; this.e_88.Name = "e_88"; this.e_88.Height = 12F; this.e_88.Width = 88F; this.e_88.Margin = new Thickness(5F, 0F, 0F, 0F); this.e_88.HorizontalAlignment = HorizontalAlignment.Right; BitmapImage e_88_bm = new BitmapImage(); e_88_bm.TextureAsset = "ImagesUI\\arrowD"; this.e_88.Source = e_88_bm; // e_89 element this.e_89 = new Button(); this.backgroundGrid.Children.Add(this.e_89); this.e_89.Name = "e_89"; this.e_89.Height = 109F; this.e_89.Width = 17F; this.e_89.Margin = new Thickness(0F, 0F, 122F, 137F); this.e_89.HorizontalAlignment = HorizontalAlignment.Right; this.e_89.VerticalAlignment = VerticalAlignment.Bottom; Binding binding_e_89_IsEnabled = new Binding("IsUIEnabled"); this.e_89.SetBinding(Button.IsEnabledProperty, binding_e_89_IsEnabled); Binding binding_e_89_Command = new Binding("MiniMapLeftPressed"); this.e_89.SetBinding(Button.CommandProperty, binding_e_89_Command); // e_90 element this.e_90 = new Image(); this.e_89.Content = this.e_90; this.e_90.Name = "e_90"; this.e_90.Height = 88F; this.e_90.Width = 12F; this.e_90.Margin = new Thickness(0F, 3F, 0F, 0F); this.e_90.HorizontalAlignment = HorizontalAlignment.Right; BitmapImage e_90_bm = new BitmapImage(); e_90_bm.TextureAsset = "ImagesUI\\arrowL"; this.e_90.Source = e_90_bm; // e_91 element this.e_91 = new Button(); this.backgroundGrid.Children.Add(this.e_91); this.e_91.Name = "e_91"; this.e_91.Height = 109F; this.e_91.Width = 17F; this.e_91.Margin = new Thickness(0F, 0F, 0F, 137F); this.e_91.HorizontalAlignment = HorizontalAlignment.Right; this.e_91.VerticalAlignment = VerticalAlignment.Bottom; Binding binding_e_91_IsEnabled = new Binding("IsUIEnabled"); this.e_91.SetBinding(Button.IsEnabledProperty, binding_e_91_IsEnabled); Binding binding_e_91_Command = new Binding("MiniMapRightPressed"); this.e_91.SetBinding(Button.CommandProperty, binding_e_91_Command); // e_92 element this.e_92 = new Image(); this.e_91.Content = this.e_92; this.e_92.Name = "e_92"; this.e_92.Height = 88F; this.e_92.Width = 12F; this.e_92.Margin = new Thickness(0F, 0F, 0F, 3F); this.e_92.HorizontalAlignment = HorizontalAlignment.Right; BitmapImage e_92_bm = new BitmapImage(); e_92_bm.TextureAsset = "ImagesUI\\arrowR"; this.e_92.Source = e_92_bm; // txtSector element this.txtSector = new TextBlock(); this.backgroundGrid.Children.Add(this.txtSector); this.txtSector.Name = "txtSector"; this.txtSector.Height = 20F; this.txtSector.Width = 135F; this.txtSector.Margin = new Thickness(0F, 0F, 0F, 270F); this.txtSector.HorizontalAlignment = HorizontalAlignment.Right; this.txtSector.VerticalAlignment = VerticalAlignment.Bottom; LinearGradientBrush txtSector_Background = new LinearGradientBrush(); txtSector_Background.StartPoint = new PointF(0F, 1F); txtSector_Background.EndPoint = new PointF(1F, 1F); txtSector_Background.SpreadMethod = GradientSpreadMethod.Pad; txtSector_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 0F)); txtSector_Background.GradientStops.Add(new GradientStop(new ColorW(1, 68, 149, 255), 1F)); txtSector_Background.GradientStops.Add(new GradientStop(new ColorW(0, 63, 139, 238), 0.26F)); txtSector_Background.GradientStops.Add(new GradientStop(new ColorW(0, 22, 50, 85), 0.147F)); this.txtSector.Background = txtSector_Background; this.txtSector.TextAlignment = TextAlignment.Right; this.txtSector.TextWrapping = TextWrapping.Wrap; Binding binding_txtSector_Text = new Binding("CurrentSector"); this.txtSector.SetBinding(TextBlock.TextProperty, binding_txtSector_Text); // e_93 element this.e_93 = new StackPanel(); this.backgroundGrid.Children.Add(this.e_93); this.e_93.Name = "e_93"; this.e_93.Width = 175F; this.e_93.Margin = new Thickness(0F, 140F, 0F, 0F); this.e_93.HorizontalAlignment = HorizontalAlignment.Right; this.e_93.VerticalAlignment = VerticalAlignment.Top; LinearGradientBrush e_93_Background = new LinearGradientBrush(); e_93_Background.StartPoint = new PointF(0F, 1F); e_93_Background.EndPoint = new PointF(1F, 1F); e_93_Background.SpreadMethod = GradientSpreadMethod.Pad; e_93_Background.GradientStops.Add(new GradientStop(new ColorW(0, 0, 0, 0), 0F)); e_93_Background.GradientStops.Add(new GradientStop(new ColorW(1, 68, 149, 255), 1F)); e_93_Background.GradientStops.Add(new GradientStop(new ColorW(0, 63, 139, 238), 0.26F)); e_93_Background.GradientStops.Add(new GradientStop(new ColorW(0, 22, 50, 85), 0.147F)); this.e_93.Background = e_93_Background; this.e_93.Orientation = Orientation.Vertical; // txtPlayerName element this.txtPlayerName = new TextBlock(); this.e_93.Children.Add(this.txtPlayerName); this.txtPlayerName.Name = "txtPlayerName"; this.txtPlayerName.Margin = new Thickness(55F, 0F, 0F, 10F); this.txtPlayerName.TextWrapping = TextWrapping.Wrap; Binding binding_txtPlayerName_Text = new Binding("PlayerName"); this.txtPlayerName.SetBinding(TextBlock.TextProperty, binding_txtPlayerName_Text); // txtPlayerSystems element this.txtPlayerSystems = new TextBlock(); this.e_93.Children.Add(this.txtPlayerSystems); this.txtPlayerSystems.Name = "txtPlayerSystems"; this.txtPlayerSystems.Margin = new Thickness(55F, 0F, 0F, 0F); this.txtPlayerSystems.Text = "Controlled Systems"; this.txtPlayerSystems.TextWrapping = TextWrapping.Wrap; // comboPlayerSystems element this.comboPlayerSystems = new ComboBox(); this.e_93.Children.Add(this.comboPlayerSystems); this.comboPlayerSystems.Name = "comboPlayerSystems"; this.comboPlayerSystems.Focusable = false; this.comboPlayerSystems.Margin = new Thickness(55F, 5F, 0F, 5F); Binding binding_comboPlayerSystems_IsEnabled = new Binding("IsUIEnabled"); this.comboPlayerSystems.SetBinding(ComboBox.IsEnabledProperty, binding_comboPlayerSystems_IsEnabled); Binding binding_comboPlayerSystems_ItemsSource = new Binding("PlayerSystemsList"); this.comboPlayerSystems.SetBinding(ComboBox.ItemsSourceProperty, binding_comboPlayerSystems_ItemsSource); Binding binding_comboPlayerSystems_SelectedItem = new Binding("PlayerSystemsSelectedIndex"); this.comboPlayerSystems.SetBinding(ComboBox.SelectedItemProperty, binding_comboPlayerSystems_SelectedItem); // btnJumpSys element this.btnJumpSys = new Button(); this.e_93.Children.Add(this.btnJumpSys); this.btnJumpSys.Name = "btnJumpSys"; this.btnJumpSys.Margin = new Thickness(55F, 0F, 0F, 10F); this.btnJumpSys.Content = "Jump to system"; Binding binding_btnJumpSys_IsEnabled = new Binding("IsUIEnabled"); this.btnJumpSys.SetBinding(Button.IsEnabledProperty, binding_btnJumpSys_IsEnabled); Binding binding_btnJumpSys_Command = new Binding("JumpSystemCommand"); this.btnJumpSys.SetBinding(Button.CommandProperty, binding_btnJumpSys_Command); // txtPlayerPlanets element this.txtPlayerPlanets = new TextBlock(); this.e_93.Children.Add(this.txtPlayerPlanets); this.txtPlayerPlanets.Name = "txtPlayerPlanets"; this.txtPlayerPlanets.Margin = new Thickness(55F, 0F, 0F, 0F); this.txtPlayerPlanets.Text = "Controlled Planets:"; this.txtPlayerPlanets.TextWrapping = TextWrapping.Wrap; // comboPlayerPlanets element this.comboPlayerPlanets = new ComboBox(); this.e_93.Children.Add(this.comboPlayerPlanets); this.comboPlayerPlanets.Name = "comboPlayerPlanets"; this.comboPlayerPlanets.Focusable = false; this.comboPlayerPlanets.Margin = new Thickness(55F, 5F, 0F, 5F); Binding binding_comboPlayerPlanets_IsEnabled = new Binding("IsUIEnabled"); this.comboPlayerPlanets.SetBinding(ComboBox.IsEnabledProperty, binding_comboPlayerPlanets_IsEnabled); Binding binding_comboPlayerPlanets_ItemsSource = new Binding("PlayerPlanetsList"); this.comboPlayerPlanets.SetBinding(ComboBox.ItemsSourceProperty, binding_comboPlayerPlanets_ItemsSource); Binding binding_comboPlayerPlanets_SelectedItem = new Binding("PlayerPlanetsSelectedIndex"); this.comboPlayerPlanets.SetBinding(ComboBox.SelectedItemProperty, binding_comboPlayerPlanets_SelectedItem); // btnJumpPlanet element this.btnJumpPlanet = new Button(); this.e_93.Children.Add(this.btnJumpPlanet); this.btnJumpPlanet.Name = "btnJumpPlanet"; this.btnJumpPlanet.Margin = new Thickness(55F, 0F, 0F, 10F); this.btnJumpPlanet.Content = "Jump to planet"; Binding binding_btnJumpPlanet_IsEnabled = new Binding("IsUIEnabled"); this.btnJumpPlanet.SetBinding(Button.IsEnabledProperty, binding_btnJumpPlanet_IsEnabled); Binding binding_btnJumpPlanet_Command = new Binding("JumpPlanetCommand"); this.btnJumpPlanet.SetBinding(Button.CommandProperty, binding_btnJumpPlanet_Command); // PlanetInfoTabs element this.PlanetInfoTabs = new TabControl(); this.backgroundGrid.Children.Add(this.PlanetInfoTabs); this.PlanetInfoTabs.Name = "PlanetInfoTabs"; this.PlanetInfoTabs.IsHitTestVisible = true; this.PlanetInfoTabs.Margin = new Thickness(180F, 130F, 176F, 130F); this.PlanetInfoTabs.HorizontalAlignment = HorizontalAlignment.Stretch; this.PlanetInfoTabs.VerticalAlignment = VerticalAlignment.Stretch; this.PlanetInfoTabs.Background = new SolidColorBrush(new ColorW(0, 0, 0, 191)); this.PlanetInfoTabs.ItemsSource = Get_PlanetInfoTabs_Items(); Binding binding_PlanetInfoTabs_Visibility = new Binding("PlanetTabControlVisibility"); this.PlanetInfoTabs.SetBinding(TabControl.VisibilityProperty, binding_PlanetInfoTabs_Visibility); Binding binding_PlanetInfoTabs_SelectedIndex = new Binding("SelectedTab"); this.PlanetInfoTabs.SetBinding(TabControl.SelectedIndexProperty, binding_PlanetInfoTabs_SelectedIndex); // e_235 element this.e_235 = new Canvas(); this.backgroundGrid.Children.Add(this.e_235); this.e_235.Name = "e_235"; this.e_235.Height = 100F; this.e_235.Width = 220F; this.e_235.Margin = new Thickness(180F, 260F, 0F, 0F); this.e_235.HorizontalAlignment = HorizontalAlignment.Left; this.e_235.VerticalAlignment = VerticalAlignment.Top; this.e_235.Background = new SolidColorBrush(new ColorW(33, 32, 32, 204)); Binding binding_e_235_DataContext = new Binding("InfoTabData"); this.e_235.SetBinding(Canvas.DataContextProperty, binding_e_235_DataContext); Binding binding_e_235_Visibility = new Binding("ShowPlanetsPopup"); this.e_235.SetBinding(Canvas.VisibilityProperty, binding_e_235_Visibility); // e_236 element this.e_236 = new StackPanel(); this.e_235.Children.Add(this.e_236); this.e_236.Name = "e_236"; this.e_236.Orientation = Orientation.Vertical; // e_237 element this.e_237 = new TextBlock(); this.e_236.Children.Add(this.e_237); this.e_237.Name = "e_237"; this.e_237.Margin = new Thickness(5F, 5F, 0F, 5F); Binding binding_e_237_Text = new Binding("PNameText"); this.e_237.SetBinding(TextBlock.TextProperty, binding_e_237_Text); // e_238 element this.e_238 = new TextBlock(); this.e_236.Children.Add(this.e_238); this.e_238.Name = "e_238"; this.e_238.Margin = new Thickness(5F, 5F, 0F, 5F); Binding binding_e_238_Text = new Binding("PTierText"); this.e_238.SetBinding(TextBlock.TextProperty, binding_e_238_Text); // e_239 element this.e_239 = new TextBlock(); this.e_236.Children.Add(this.e_239); this.e_239.Name = "e_239"; this.e_239.Margin = new Thickness(5F, 5F, 0F, 5F); Binding binding_e_239_Text = new Binding("PPopulationText"); this.e_239.SetBinding(TextBlock.TextProperty, binding_e_239_Text); // e_240 element this.e_240 = new TextBlock(); this.e_236.Children.Add(this.e_240); this.e_240.Name = "e_240"; this.e_240.Margin = new Thickness(5F, 5F, 0F, 5F); Binding binding_e_240_Text = new Binding("POwnerText"); this.e_240.SetBinding(TextBlock.TextProperty, binding_e_240_Text); // e_241 element this.e_241 = new Canvas(); this.backgroundGrid.Children.Add(this.e_241); this.e_241.Name = "e_241"; this.e_241.Height = 100F; this.e_241.Width = 220F; this.e_241.Margin = new Thickness(0F, 0F, 180F, 130F); this.e_241.HorizontalAlignment = HorizontalAlignment.Right; this.e_241.VerticalAlignment = VerticalAlignment.Bottom; this.e_241.Background = new SolidColorBrush(new ColorW(33, 32, 32, 204)); Binding binding_e_241_Visibility = new Binding("ShowSystemsPopup"); this.e_241.SetBinding(Canvas.VisibilityProperty, binding_e_241_Visibility); // e_242 element this.e_242 = new StackPanel(); this.e_241.Children.Add(this.e_242); this.e_242.Name = "e_242"; this.e_242.Orientation = Orientation.Vertical; // e_243 element this.e_243 = new TextBlock(); this.e_242.Children.Add(this.e_243); this.e_243.Name = "e_243"; this.e_243.Margin = new Thickness(5F, 5F, 0F, 5F); Binding binding_e_243_Text = new Binding("SNameText"); this.e_243.SetBinding(TextBlock.TextProperty, binding_e_243_Text); // e_244 element this.e_244 = new TextBlock(); this.e_242.Children.Add(this.e_244); this.e_244.Name = "e_244"; this.e_244.Margin = new Thickness(5F, 5F, 0F, 5F); Binding binding_e_244_Text = new Binding("SNumPlanetsText"); this.e_244.SetBinding(TextBlock.TextProperty, binding_e_244_Text); // e_245 element this.e_245 = new TextBlock(); this.e_242.Children.Add(this.e_245); this.e_245.Name = "e_245"; this.e_245.Margin = new Thickness(5F, 5F, 0F, 5F); Binding binding_e_245_Text = new Binding("SOwnerText"); this.e_245.SetBinding(TextBlock.TextProperty, binding_e_245_Text); // e_246 element this.e_246 = new Canvas(); this.backgroundGrid.Children.Add(this.e_246); this.e_246.Name = "e_246"; this.e_246.Height = 400F; this.e_246.Width = 255F; this.e_246.Margin = new Thickness(222F, 60F, 0F, 0F); this.e_246.HorizontalAlignment = HorizontalAlignment.Left; this.e_246.VerticalAlignment = VerticalAlignment.Top; Grid.SetRowSpan(this.e_246, 2); Binding binding_e_246_Visibility = new Binding("ResourceDropDownVisible"); this.e_246.SetBinding(Canvas.VisibilityProperty, binding_e_246_Visibility); // e_247 element this.e_247 = new Grid(); this.e_246.Children.Add(this.e_247); this.e_247.Name = "e_247"; this.e_247.Height = 400F; this.e_247.Width = 255F; this.e_247.IsHitTestVisible = true; this.e_247.Background = new SolidColorBrush(new ColorW(33, 32, 32, 247)); RowDefinition row_e_247_0 = new RowDefinition(); row_e_247_0.Height = new GridLength(1F, GridUnitType.Auto); this.e_247.RowDefinitions.Add(row_e_247_0); RowDefinition row_e_247_1 = new RowDefinition(); row_e_247_1.Height = new GridLength(1F, GridUnitType.Auto); this.e_247.RowDefinitions.Add(row_e_247_1); ColumnDefinition col_e_247_0 = new ColumnDefinition(); col_e_247_0.Width = new GridLength(54F, GridUnitType.Pixel); this.e_247.ColumnDefinitions.Add(col_e_247_0); ColumnDefinition col_e_247_1 = new ColumnDefinition(); col_e_247_1.Width = new GridLength(150F, GridUnitType.Pixel); this.e_247.ColumnDefinitions.Add(col_e_247_1); ColumnDefinition col_e_247_2 = new ColumnDefinition(); col_e_247_2.Width = new GridLength(50F, GridUnitType.Pixel); this.e_247.ColumnDefinitions.Add(col_e_247_2); Binding binding_e_247_Visibility = new Binding("ResourceDropDownVisible"); this.e_247.SetBinding(Grid.VisibilityProperty, binding_e_247_Visibility); // e_248 element this.e_248 = new StackPanel(); this.e_247.Children.Add(this.e_248); this.e_248.Name = "e_248"; Grid.SetColumn(this.e_248, 0); Grid.SetRow(this.e_248, 1); Binding binding_e_248_Visibility = new Binding("MetalResourcesVisible"); this.e_248.SetBinding(StackPanel.VisibilityProperty, binding_e_248_Visibility); // aluminium1 element this.aluminium1 = new Image(); this.e_248.Children.Add(this.aluminium1); this.aluminium1.Name = "aluminium1"; this.aluminium1.Height = 40F; this.aluminium1.Margin = new Thickness(0F, 15F, 0F, 0F); this.aluminium1.VerticalAlignment = VerticalAlignment.Top; BitmapImage aluminium1_bm = new BitmapImage(); aluminium1_bm.TextureAsset = "ImagesUI\\aluminium_res"; this.aluminium1.Source = aluminium1_bm; // copper1 element this.copper1 = new Image(); this.e_248.Children.Add(this.copper1); this.copper1.Name = "copper1"; this.copper1.Height = 40F; this.copper1.Margin = new Thickness(0F, 0F, 0F, 0F); this.copper1.VerticalAlignment = VerticalAlignment.Top; BitmapImage copper1_bm = new BitmapImage(); copper1_bm.TextureAsset = "ImagesUI\\copper_res"; this.copper1.Source = copper1_bm; // iron1 element this.iron1 = new Image(); this.e_248.Children.Add(this.iron1); this.iron1.Name = "iron1"; this.iron1.Height = 40F; this.iron1.Margin = new Thickness(0F, 0F, 0F, 0F); this.iron1.VerticalAlignment = VerticalAlignment.Top; BitmapImage iron1_bm = new BitmapImage(); iron1_bm.TextureAsset = "ImagesUI\\iron_res"; this.iron1.Source = iron1_bm; // lead1 element this.lead1 = new Image(); this.e_248.Children.Add(this.lead1); this.lead1.Name = "lead1"; this.lead1.Height = 40F; this.lead1.Margin = new Thickness(0F, 0F, 0F, 0F); this.lead1.VerticalAlignment = VerticalAlignment.Top; BitmapImage lead1_bm = new BitmapImage(); lead1_bm.TextureAsset = "ImagesUI\\lead_res"; this.lead1.Source = lead1_bm; // magnesium1 element this.magnesium1 = new Image(); this.e_248.Children.Add(this.magnesium1); this.magnesium1.Name = "magnesium1"; this.magnesium1.Height = 40F; this.magnesium1.Margin = new Thickness(0F, 0F, 0F, 0F); this.magnesium1.VerticalAlignment = VerticalAlignment.Top; BitmapImage magnesium1_bm = new BitmapImage(); magnesium1_bm.TextureAsset = "ImagesUI\\magnesium_res"; this.magnesium1.Source = magnesium1_bm; // titanium1 element this.titanium1 = new Image(); this.e_248.Children.Add(this.titanium1); this.titanium1.Name = "titanium1"; this.titanium1.Height = 40F; this.titanium1.Margin = new Thickness(0F, 0F, 0F, 0F); this.titanium1.VerticalAlignment = VerticalAlignment.Top; BitmapImage titanium1_bm = new BitmapImage(); titanium1_bm.TextureAsset = "ImagesUI\\titanium_res"; this.titanium1.Source = titanium1_bm; // zinc1 element this.zinc1 = new Image(); this.e_248.Children.Add(this.zinc1); this.zinc1.Name = "zinc1"; this.zinc1.Height = 40F; this.zinc1.Margin = new Thickness(0F, 0F, 0F, 0F); this.zinc1.VerticalAlignment = VerticalAlignment.Top; BitmapImage zinc1_bm = new BitmapImage(); zinc1_bm.TextureAsset = "ImagesUI\\zinc_res"; this.zinc1.Source = zinc1_bm; // steel1 element this.steel1 = new Image(); this.e_248.Children.Add(this.steel1); this.steel1.Name = "steel1"; this.steel1.Height = 40F; this.steel1.Margin = new Thickness(0F, 0F, 0F, 0F); this.steel1.VerticalAlignment = VerticalAlignment.Top; BitmapImage steel1_bm = new BitmapImage(); steel1_bm.TextureAsset = "ImagesUI\\zinc_res"; this.steel1.Source = steel1_bm; // brass1 element this.brass1 = new Image(); this.e_248.Children.Add(this.brass1); this.brass1.Name = "brass1"; this.brass1.Height = 40F; this.brass1.Margin = new Thickness(0F, 0F, 0F, 0F); this.brass1.VerticalAlignment = VerticalAlignment.Top; BitmapImage brass1_bm = new BitmapImage(); brass1_bm.TextureAsset = "ImagesUI\\zinc_res"; this.brass1.Source = brass1_bm; // e_249 element this.e_249 = new StackPanel(); this.e_247.Children.Add(this.e_249); this.e_249.Name = "e_249"; Grid.SetColumn(this.e_249, 1); Grid.SetRow(this.e_249, 1); Binding binding_e_249_DataContext = new Binding("ResourcesDropdownData"); this.e_249.SetBinding(StackPanel.DataContextProperty, binding_e_249_DataContext); Binding binding_e_249_Visibility = new Binding("MetalResourcesVisible"); this.e_249.SetBinding(StackPanel.VisibilityProperty, binding_e_249_Visibility); // e_250 element this.e_250 = new TextBlock(); this.e_249.Children.Add(this.e_250); this.e_250.Name = "e_250"; this.e_250.Margin = new Thickness(0F, 27F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_250, 0); Binding binding_e_250_ToolTip = new Binding("AluminiumDeductions"); this.e_250.SetBinding(TextBlock.ToolTipProperty, binding_e_250_ToolTip); Binding binding_e_250_Text = new Binding("AluminiumResource"); this.e_250.SetBinding(TextBlock.TextProperty, binding_e_250_Text); // e_251 element this.e_251 = new TextBlock(); this.e_249.Children.Add(this.e_251); this.e_251.Name = "e_251"; this.e_251.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_251, 0); Binding binding_e_251_ToolTip = new Binding("CopperDeductions"); this.e_251.SetBinding(TextBlock.ToolTipProperty, binding_e_251_ToolTip); Binding binding_e_251_Text = new Binding("CopperResource"); this.e_251.SetBinding(TextBlock.TextProperty, binding_e_251_Text); // e_252 element this.e_252 = new TextBlock(); this.e_249.Children.Add(this.e_252); this.e_252.Name = "e_252"; this.e_252.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_252, 0); Binding binding_e_252_ToolTip = new Binding("IronDeductions"); this.e_252.SetBinding(TextBlock.ToolTipProperty, binding_e_252_ToolTip); Binding binding_e_252_Text = new Binding("IronResource"); this.e_252.SetBinding(TextBlock.TextProperty, binding_e_252_Text); // e_253 element this.e_253 = new TextBlock(); this.e_249.Children.Add(this.e_253); this.e_253.Name = "e_253"; this.e_253.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_253, 0); Binding binding_e_253_ToolTip = new Binding("LeadDeductions"); this.e_253.SetBinding(TextBlock.ToolTipProperty, binding_e_253_ToolTip); Binding binding_e_253_Text = new Binding("LeadResource"); this.e_253.SetBinding(TextBlock.TextProperty, binding_e_253_Text); // e_254 element this.e_254 = new TextBlock(); this.e_249.Children.Add(this.e_254); this.e_254.Name = "e_254"; this.e_254.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_254, 0); Binding binding_e_254_ToolTip = new Binding("MagnesiumDeductions"); this.e_254.SetBinding(TextBlock.ToolTipProperty, binding_e_254_ToolTip); Binding binding_e_254_Text = new Binding("MagnesiumResource"); this.e_254.SetBinding(TextBlock.TextProperty, binding_e_254_Text); // e_255 element this.e_255 = new TextBlock(); this.e_249.Children.Add(this.e_255); this.e_255.Name = "e_255"; this.e_255.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_255, 0); Binding binding_e_255_ToolTip = new Binding("TitaniumDeductions"); this.e_255.SetBinding(TextBlock.ToolTipProperty, binding_e_255_ToolTip); Binding binding_e_255_Text = new Binding("TitaniumResource"); this.e_255.SetBinding(TextBlock.TextProperty, binding_e_255_Text); // e_256 element this.e_256 = new TextBlock(); this.e_249.Children.Add(this.e_256); this.e_256.Name = "e_256"; this.e_256.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_256, 0); Binding binding_e_256_ToolTip = new Binding("ZincDeductions"); this.e_256.SetBinding(TextBlock.ToolTipProperty, binding_e_256_ToolTip); Binding binding_e_256_Text = new Binding("ZincResource"); this.e_256.SetBinding(TextBlock.TextProperty, binding_e_256_Text); // e_257 element this.e_257 = new TextBlock(); this.e_249.Children.Add(this.e_257); this.e_257.Name = "e_257"; this.e_257.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_257, 0); Binding binding_e_257_ToolTip = new Binding("SteelDeductions"); this.e_257.SetBinding(TextBlock.ToolTipProperty, binding_e_257_ToolTip); Binding binding_e_257_Text = new Binding("SteelResource"); this.e_257.SetBinding(TextBlock.TextProperty, binding_e_257_Text); // e_258 element this.e_258 = new TextBlock(); this.e_249.Children.Add(this.e_258); this.e_258.Name = "e_258"; this.e_258.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_258, 0); Binding binding_e_258_ToolTip = new Binding("BrassDeductions"); this.e_258.SetBinding(TextBlock.ToolTipProperty, binding_e_258_ToolTip); Binding binding_e_258_Text = new Binding("BrassResource"); this.e_258.SetBinding(TextBlock.TextProperty, binding_e_258_Text); // e_259 element this.e_259 = new StackPanel(); this.e_247.Children.Add(this.e_259); this.e_259.Name = "e_259"; this.e_259.Margin = new Thickness(5F, 0F, 0F, 0F); Grid.SetColumn(this.e_259, 0); Grid.SetRow(this.e_259, 1); Binding binding_e_259_Visibility = new Binding("PreciousResourcesVisibility"); this.e_259.SetBinding(StackPanel.VisibilityProperty, binding_e_259_Visibility); // silver1 element this.silver1 = new Image(); this.e_259.Children.Add(this.silver1); this.silver1.Name = "silver1"; this.silver1.Height = 40F; this.silver1.Margin = new Thickness(0F, 15F, 0F, 0F); this.silver1.VerticalAlignment = VerticalAlignment.Top; BitmapImage silver1_bm = new BitmapImage(); silver1_bm.TextureAsset = "ImagesUI\\silver_res"; this.silver1.Source = silver1_bm; // gold1 element this.gold1 = new Image(); this.e_259.Children.Add(this.gold1); this.gold1.Name = "gold1"; this.gold1.Height = 40F; this.gold1.Margin = new Thickness(0F, 0F, 0F, 0F); this.gold1.VerticalAlignment = VerticalAlignment.Top; BitmapImage gold1_bm = new BitmapImage(); gold1_bm.TextureAsset = "ImagesUI\\gold_res"; this.gold1.Source = gold1_bm; // platinum1 element this.platinum1 = new Image(); this.e_259.Children.Add(this.platinum1); this.platinum1.Name = "platinum1"; this.platinum1.Height = 40F; this.platinum1.Margin = new Thickness(0F, 0F, 0F, 0F); this.platinum1.VerticalAlignment = VerticalAlignment.Top; BitmapImage platinum1_bm = new BitmapImage(); platinum1_bm.TextureAsset = "ImagesUI\\platinum_res"; this.platinum1.Source = platinum1_bm; // diamond1 element this.diamond1 = new Image(); this.e_259.Children.Add(this.diamond1); this.diamond1.Name = "diamond1"; this.diamond1.Height = 40F; this.diamond1.Margin = new Thickness(0F, 0F, 0F, 0F); this.diamond1.VerticalAlignment = VerticalAlignment.Top; BitmapImage diamond1_bm = new BitmapImage(); diamond1_bm.TextureAsset = "ImagesUI\\diamond_res"; this.diamond1.Source = diamond1_bm; // e_260 element this.e_260 = new StackPanel(); this.e_247.Children.Add(this.e_260); this.e_260.Name = "e_260"; Grid.SetColumn(this.e_260, 1); Grid.SetRow(this.e_260, 1); Binding binding_e_260_DataContext = new Binding("ResourcesDropdownData"); this.e_260.SetBinding(StackPanel.DataContextProperty, binding_e_260_DataContext); Binding binding_e_260_Visibility = new Binding("PreciousResourcesVisibility"); this.e_260.SetBinding(StackPanel.VisibilityProperty, binding_e_260_Visibility); // e_261 element this.e_261 = new TextBlock(); this.e_260.Children.Add(this.e_261); this.e_261.Name = "e_261"; this.e_261.Margin = new Thickness(0F, 27F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_261, 0); Binding binding_e_261_ToolTip = new Binding("SilverDeductions"); this.e_261.SetBinding(TextBlock.ToolTipProperty, binding_e_261_ToolTip); Binding binding_e_261_Text = new Binding("SilverResource"); this.e_261.SetBinding(TextBlock.TextProperty, binding_e_261_Text); // e_262 element this.e_262 = new TextBlock(); this.e_260.Children.Add(this.e_262); this.e_262.Name = "e_262"; this.e_262.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_262, 0); Binding binding_e_262_ToolTip = new Binding("GoldDeductions"); this.e_262.SetBinding(TextBlock.ToolTipProperty, binding_e_262_ToolTip); Binding binding_e_262_Text = new Binding("GoldResource"); this.e_262.SetBinding(TextBlock.TextProperty, binding_e_262_Text); // e_263 element this.e_263 = new TextBlock(); this.e_260.Children.Add(this.e_263); this.e_263.Name = "e_263"; this.e_263.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_263, 0); Binding binding_e_263_ToolTip = new Binding("PlatinumDeductions"); this.e_263.SetBinding(TextBlock.ToolTipProperty, binding_e_263_ToolTip); Binding binding_e_263_Text = new Binding("PlatinumResource"); this.e_263.SetBinding(TextBlock.TextProperty, binding_e_263_Text); // e_264 element this.e_264 = new TextBlock(); this.e_260.Children.Add(this.e_264); this.e_264.Name = "e_264"; this.e_264.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_264, 0); Binding binding_e_264_ToolTip = new Binding("DiamondDeductions"); this.e_264.SetBinding(TextBlock.ToolTipProperty, binding_e_264_ToolTip); Binding binding_e_264_Text = new Binding("DiamondResource"); this.e_264.SetBinding(TextBlock.TextProperty, binding_e_264_Text); // e_265 element this.e_265 = new StackPanel(); this.e_247.Children.Add(this.e_265); this.e_265.Name = "e_265"; Grid.SetColumn(this.e_265, 0); Grid.SetRow(this.e_265, 1); Binding binding_e_265_Visibility = new Binding("FuelsResourcesVisibility"); this.e_265.SetBinding(StackPanel.VisibilityProperty, binding_e_265_Visibility); // coal1 element this.coal1 = new Image(); this.e_265.Children.Add(this.coal1); this.coal1.Name = "coal1"; this.coal1.Height = 40F; this.coal1.Margin = new Thickness(0F, 15F, 0F, 0F); this.coal1.VerticalAlignment = VerticalAlignment.Top; BitmapImage coal1_bm = new BitmapImage(); coal1_bm.TextureAsset = "ImagesUI\\coal_res"; this.coal1.Source = coal1_bm; // oil1 element this.oil1 = new Image(); this.e_265.Children.Add(this.oil1); this.oil1.Name = "oil1"; this.oil1.Height = 40F; this.oil1.Margin = new Thickness(0F, 0F, 0F, 0F); this.oil1.VerticalAlignment = VerticalAlignment.Top; BitmapImage oil1_bm = new BitmapImage(); oil1_bm.TextureAsset = "ImagesUI\\oil_res"; this.oil1.Source = oil1_bm; // NaturalGas1 element this.NaturalGas1 = new Image(); this.e_265.Children.Add(this.NaturalGas1); this.NaturalGas1.Name = "NaturalGas1"; this.NaturalGas1.Height = 40F; this.NaturalGas1.Margin = new Thickness(0F, 0F, 0F, 0F); this.NaturalGas1.VerticalAlignment = VerticalAlignment.Top; BitmapImage NaturalGas1_bm = new BitmapImage(); NaturalGas1_bm.TextureAsset = "ImagesUI\\gas_res"; this.NaturalGas1.Source = NaturalGas1_bm; // Uranium1 element this.Uranium1 = new Image(); this.e_265.Children.Add(this.Uranium1); this.Uranium1.Name = "Uranium1"; this.Uranium1.Height = 40F; this.Uranium1.Margin = new Thickness(0F, 0F, 0F, 0F); this.Uranium1.VerticalAlignment = VerticalAlignment.Top; BitmapImage Uranium1_bm = new BitmapImage(); Uranium1_bm.TextureAsset = "ImagesUI\\uranium_res"; this.Uranium1.Source = Uranium1_bm; // Thorium1 element this.Thorium1 = new Image(); this.e_265.Children.Add(this.Thorium1); this.Thorium1.Name = "Thorium1"; this.Thorium1.Height = 40F; this.Thorium1.Margin = new Thickness(0F, 0F, 0F, 0F); this.Thorium1.VerticalAlignment = VerticalAlignment.Top; BitmapImage Thorium1_bm = new BitmapImage(); Thorium1_bm.TextureAsset = "ImagesUI\\thorium_res"; this.Thorium1.Source = Thorium1_bm; // Propane1 element this.Propane1 = new Image(); this.e_265.Children.Add(this.Propane1); this.Propane1.Name = "Propane1"; this.Propane1.Height = 40F; this.Propane1.Margin = new Thickness(0F, 0F, 0F, 0F); this.Propane1.VerticalAlignment = VerticalAlignment.Top; BitmapImage Propane1_bm = new BitmapImage(); Propane1_bm.TextureAsset = "ImagesUI\\propane_res"; this.Propane1.Source = Propane1_bm; // Biomass1 element this.Biomass1 = new Image(); this.e_265.Children.Add(this.Biomass1); this.Biomass1.Name = "Biomass1"; this.Biomass1.Height = 40F; this.Biomass1.Margin = new Thickness(0F, 0F, 0F, 0F); this.Biomass1.VerticalAlignment = VerticalAlignment.Top; BitmapImage Biomass1_bm = new BitmapImage(); Biomass1_bm.TextureAsset = "ImagesUI\\biomass_res"; this.Biomass1.Source = Biomass1_bm; // Hydrogen1 element this.Hydrogen1 = new Image(); this.e_265.Children.Add(this.Hydrogen1); this.Hydrogen1.Name = "Hydrogen1"; this.Hydrogen1.Height = 40F; this.Hydrogen1.Margin = new Thickness(0F, 0F, 0F, 0F); this.Hydrogen1.VerticalAlignment = VerticalAlignment.Top; BitmapImage Hydrogen1_bm = new BitmapImage(); Hydrogen1_bm.TextureAsset = "ImagesUI\\hydrogen_res"; this.Hydrogen1.Source = Hydrogen1_bm; // e_266 element this.e_266 = new StackPanel(); this.e_247.Children.Add(this.e_266); this.e_266.Name = "e_266"; Grid.SetColumn(this.e_266, 1); Grid.SetRow(this.e_266, 1); Binding binding_e_266_DataContext = new Binding("ResourcesDropdownData"); this.e_266.SetBinding(StackPanel.DataContextProperty, binding_e_266_DataContext); Binding binding_e_266_Visibility = new Binding("FuelsResourcesVisibility"); this.e_266.SetBinding(StackPanel.VisibilityProperty, binding_e_266_Visibility); // e_267 element this.e_267 = new TextBlock(); this.e_266.Children.Add(this.e_267); this.e_267.Name = "e_267"; this.e_267.Margin = new Thickness(0F, 27F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_267, 0); Binding binding_e_267_ToolTip = new Binding("CoalDeductions"); this.e_267.SetBinding(TextBlock.ToolTipProperty, binding_e_267_ToolTip); Binding binding_e_267_Text = new Binding("CoalResource"); this.e_267.SetBinding(TextBlock.TextProperty, binding_e_267_Text); // e_268 element this.e_268 = new TextBlock(); this.e_266.Children.Add(this.e_268); this.e_268.Name = "e_268"; this.e_268.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_268, 0); Binding binding_e_268_ToolTip = new Binding("OilDeductions"); this.e_268.SetBinding(TextBlock.ToolTipProperty, binding_e_268_ToolTip); Binding binding_e_268_Text = new Binding("OilResource"); this.e_268.SetBinding(TextBlock.TextProperty, binding_e_268_Text); // e_269 element this.e_269 = new TextBlock(); this.e_266.Children.Add(this.e_269); this.e_269.Name = "e_269"; this.e_269.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_269, 0); Binding binding_e_269_ToolTip = new Binding("NaturalGasDeductions"); this.e_269.SetBinding(TextBlock.ToolTipProperty, binding_e_269_ToolTip); Binding binding_e_269_Text = new Binding("NaturalGasResource"); this.e_269.SetBinding(TextBlock.TextProperty, binding_e_269_Text); // e_270 element this.e_270 = new TextBlock(); this.e_266.Children.Add(this.e_270); this.e_270.Name = "e_270"; this.e_270.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_270, 0); Binding binding_e_270_ToolTip = new Binding("UraniumDeductions"); this.e_270.SetBinding(TextBlock.ToolTipProperty, binding_e_270_ToolTip); Binding binding_e_270_Text = new Binding("UraniumResource"); this.e_270.SetBinding(TextBlock.TextProperty, binding_e_270_Text); // e_271 element this.e_271 = new TextBlock(); this.e_266.Children.Add(this.e_271); this.e_271.Name = "e_271"; this.e_271.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_271, 0); Binding binding_e_271_ToolTip = new Binding("ThoriumDeductions"); this.e_271.SetBinding(TextBlock.ToolTipProperty, binding_e_271_ToolTip); Binding binding_e_271_Text = new Binding("ThoriumResource"); this.e_271.SetBinding(TextBlock.TextProperty, binding_e_271_Text); // e_272 element this.e_272 = new TextBlock(); this.e_266.Children.Add(this.e_272); this.e_272.Name = "e_272"; this.e_272.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_272, 0); Binding binding_e_272_ToolTip = new Binding("PropaneDeductions"); this.e_272.SetBinding(TextBlock.ToolTipProperty, binding_e_272_ToolTip); Binding binding_e_272_Text = new Binding("PropaneResource"); this.e_272.SetBinding(TextBlock.TextProperty, binding_e_272_Text); // e_273 element this.e_273 = new TextBlock(); this.e_266.Children.Add(this.e_273); this.e_273.Name = "e_273"; this.e_273.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_273, 0); Binding binding_e_273_ToolTip = new Binding("BiomassDeductions"); this.e_273.SetBinding(TextBlock.ToolTipProperty, binding_e_273_ToolTip); Binding binding_e_273_Text = new Binding("BiomassResource"); this.e_273.SetBinding(TextBlock.TextProperty, binding_e_273_Text); // e_274 element this.e_274 = new TextBlock(); this.e_266.Children.Add(this.e_274); this.e_274.Name = "e_274"; this.e_274.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_274, 0); Binding binding_e_274_ToolTip = new Binding("HydrogenDeductions"); this.e_274.SetBinding(TextBlock.ToolTipProperty, binding_e_274_ToolTip); Binding binding_e_274_Text = new Binding("HydrogenResource"); this.e_274.SetBinding(TextBlock.TextProperty, binding_e_274_Text); // e_275 element this.e_275 = new StackPanel(); this.e_247.Children.Add(this.e_275); this.e_275.Name = "e_275"; Grid.SetColumn(this.e_275, 0); Grid.SetRow(this.e_275, 1); Binding binding_e_275_Visibility = new Binding("MiscResourcesVisibility"); this.e_275.SetBinding(StackPanel.VisibilityProperty, binding_e_275_Visibility); // Timber1 element this.Timber1 = new Image(); this.e_275.Children.Add(this.Timber1); this.Timber1.Name = "Timber1"; this.Timber1.Height = 40F; this.Timber1.Margin = new Thickness(0F, 15F, 0F, 0F); this.Timber1.VerticalAlignment = VerticalAlignment.Top; BitmapImage Timber1_bm = new BitmapImage(); Timber1_bm.TextureAsset = "ImagesUI\\timber_res"; this.Timber1.Source = Timber1_bm; // Food1 element this.Food1 = new Image(); this.e_275.Children.Add(this.Food1); this.Food1.Name = "Food1"; this.Food1.Height = 40F; this.Food1.VerticalAlignment = VerticalAlignment.Top; BitmapImage Food1_bm = new BitmapImage(); Food1_bm.TextureAsset = "ImagesUI\\livestock_res"; this.Food1.Source = Food1_bm; // CleanWater1 element this.CleanWater1 = new Image(); this.e_275.Children.Add(this.CleanWater1); this.CleanWater1.Name = "CleanWater1"; this.CleanWater1.Height = 40F; this.CleanWater1.Margin = new Thickness(0F, 0F, 0F, 0F); this.CleanWater1.VerticalAlignment = VerticalAlignment.Top; BitmapImage CleanWater1_bm = new BitmapImage(); CleanWater1_bm.TextureAsset = "ImagesUI\\water_res"; this.CleanWater1.Source = CleanWater1_bm; // Plastic1 element this.Plastic1 = new Image(); this.e_275.Children.Add(this.Plastic1); this.Plastic1.Name = "Plastic1"; this.Plastic1.Height = 40F; this.Plastic1.Margin = new Thickness(0F, 0F, 0F, 0F); this.Plastic1.VerticalAlignment = VerticalAlignment.Top; BitmapImage Plastic1_bm = new BitmapImage(); Plastic1_bm.TextureAsset = "ImagesUI\\plastic_res"; this.Plastic1.Source = Plastic1_bm; // Fabric1 element this.Fabric1 = new Image(); this.e_275.Children.Add(this.Fabric1); this.Fabric1.Name = "Fabric1"; this.Fabric1.Height = 40F; this.Fabric1.Margin = new Thickness(0F, 0F, 0F, 0F); this.Fabric1.VerticalAlignment = VerticalAlignment.Top; BitmapImage Fabric1_bm = new BitmapImage(); Fabric1_bm.TextureAsset = "ImagesUI\\fabric_res"; this.Fabric1.Source = Fabric1_bm; // Oxygen1 element this.Oxygen1 = new Image(); this.e_275.Children.Add(this.Oxygen1); this.Oxygen1.Name = "Oxygen1"; this.Oxygen1.Height = 40F; this.Oxygen1.Margin = new Thickness(0F, 0F, 0F, 0F); this.Oxygen1.VerticalAlignment = VerticalAlignment.Top; BitmapImage Oxygen1_bm = new BitmapImage(); Oxygen1_bm.TextureAsset = "ImagesUI\\oxygen_res"; this.Oxygen1.Source = Oxygen1_bm; // Medecine1 element this.Medecine1 = new Image(); this.e_275.Children.Add(this.Medecine1); this.Medecine1.Name = "Medecine1"; this.Medecine1.Height = 40F; this.Medecine1.Margin = new Thickness(0F, 0F, 0F, 0F); this.Medecine1.VerticalAlignment = VerticalAlignment.Top; BitmapImage Medecine1_bm = new BitmapImage(); Medecine1_bm.TextureAsset = "ImagesUI\\water_res"; this.Medecine1.Source = Medecine1_bm; // e_276 element this.e_276 = new StackPanel(); this.e_247.Children.Add(this.e_276); this.e_276.Name = "e_276"; Grid.SetColumn(this.e_276, 1); Grid.SetRow(this.e_276, 1); Binding binding_e_276_DataContext = new Binding("ResourcesDropdownData"); this.e_276.SetBinding(StackPanel.DataContextProperty, binding_e_276_DataContext); Binding binding_e_276_Visibility = new Binding("MiscResourcesVisibility"); this.e_276.SetBinding(StackPanel.VisibilityProperty, binding_e_276_Visibility); // e_277 element this.e_277 = new TextBlock(); this.e_276.Children.Add(this.e_277); this.e_277.Name = "e_277"; this.e_277.Margin = new Thickness(0F, 27F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_277, 0); Binding binding_e_277_ToolTip = new Binding("TimberDeductions"); this.e_277.SetBinding(TextBlock.ToolTipProperty, binding_e_277_ToolTip); Binding binding_e_277_Text = new Binding("TimberResource"); this.e_277.SetBinding(TextBlock.TextProperty, binding_e_277_Text); // e_278 element this.e_278 = new TextBlock(); this.e_276.Children.Add(this.e_278); this.e_278.Name = "e_278"; this.e_278.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_278, 0); Binding binding_e_278_ToolTip = new Binding("FoodDeductions"); this.e_278.SetBinding(TextBlock.ToolTipProperty, binding_e_278_ToolTip); Binding binding_e_278_Text = new Binding("FoodResource"); this.e_278.SetBinding(TextBlock.TextProperty, binding_e_278_Text); // e_279 element this.e_279 = new TextBlock(); this.e_276.Children.Add(this.e_279); this.e_279.Name = "e_279"; this.e_279.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_279, 0); Binding binding_e_279_ToolTip = new Binding("WaterDeductions"); this.e_279.SetBinding(TextBlock.ToolTipProperty, binding_e_279_ToolTip); Binding binding_e_279_Text = new Binding("WaterResource"); this.e_279.SetBinding(TextBlock.TextProperty, binding_e_279_Text); // e_280 element this.e_280 = new TextBlock(); this.e_276.Children.Add(this.e_280); this.e_280.Name = "e_280"; this.e_280.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_280, 0); Binding binding_e_280_ToolTip = new Binding("PlasticDeductions"); this.e_280.SetBinding(TextBlock.ToolTipProperty, binding_e_280_ToolTip); Binding binding_e_280_Text = new Binding("PlasticResource"); this.e_280.SetBinding(TextBlock.TextProperty, binding_e_280_Text); // e_281 element this.e_281 = new TextBlock(); this.e_276.Children.Add(this.e_281); this.e_281.Name = "e_281"; this.e_281.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_281, 0); Binding binding_e_281_ToolTip = new Binding("FabricDeductions"); this.e_281.SetBinding(TextBlock.ToolTipProperty, binding_e_281_ToolTip); Binding binding_e_281_Text = new Binding("FabricResource"); this.e_281.SetBinding(TextBlock.TextProperty, binding_e_281_Text); // e_282 element this.e_282 = new TextBlock(); this.e_276.Children.Add(this.e_282); this.e_282.Name = "e_282"; this.e_282.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_282, 0); Binding binding_e_282_ToolTip = new Binding("OxygenDeductions"); this.e_282.SetBinding(TextBlock.ToolTipProperty, binding_e_282_ToolTip); Binding binding_e_282_Text = new Binding("OxygenResource"); this.e_282.SetBinding(TextBlock.TextProperty, binding_e_282_Text); // e_283 element this.e_283 = new TextBlock(); this.e_276.Children.Add(this.e_283); this.e_283.Name = "e_283"; this.e_283.Margin = new Thickness(0F, 24F, 0F, 0F); ToolTipService.SetInitialShowDelay(this.e_283, 0); Binding binding_e_283_ToolTip = new Binding("MedecineDeductions"); this.e_283.SetBinding(TextBlock.ToolTipProperty, binding_e_283_ToolTip); Binding binding_e_283_Text = new Binding("MedecineResource"); this.e_283.SetBinding(TextBlock.TextProperty, binding_e_283_Text); // e_284 element this.e_284 = new Button(); this.e_247.Children.Add(this.e_284); this.e_284.Name = "e_284"; this.e_284.HorizontalAlignment = HorizontalAlignment.Right; this.e_284.Content = "Close"; Grid.SetColumn(this.e_284, 2); Grid.SetRow(this.e_284, 0); Binding binding_e_284_IsEnabled = new Binding("IsUIEnabled"); this.e_284.SetBinding(Button.IsEnabledProperty, binding_e_284_IsEnabled); Binding binding_e_284_Command = new Binding("ResourceGridClosed"); this.e_284.SetBinding(Button.CommandProperty, binding_e_284_Command); // e_285 element this.e_285 = new StackPanel(); this.backgroundGrid.Children.Add(this.e_285); this.e_285.Name = "e_285"; this.e_285.Height = 370F; this.e_285.Width = 210F; this.e_285.Margin = new Thickness(0F, 200F, 0F, 0F); this.e_285.HorizontalAlignment = HorizontalAlignment.Center; this.e_285.VerticalAlignment = VerticalAlignment.Top; this.e_285.Background = new SolidColorBrush(new ColorW(33, 32, 32, 247)); Binding binding_e_285_Visibility = new Binding("IsPaused"); this.e_285.SetBinding(StackPanel.VisibilityProperty, binding_e_285_Visibility); // e_286 element this.e_286 = new Button(); this.e_285.Children.Add(this.e_286); this.e_286.Name = "e_286"; this.e_286.Margin = new Thickness(5F, 5F, 5F, 5F); this.e_286.Content = "Resume"; Binding binding_e_286_Command = new Binding("ResumeCommand"); this.e_286.SetBinding(Button.CommandProperty, binding_e_286_Command); // e_287 element this.e_287 = new Button(); this.e_285.Children.Add(this.e_287); this.e_287.Name = "e_287"; this.e_287.Margin = new Thickness(5F, 5F, 5F, 5F); this.e_287.Content = "Save"; Binding binding_e_287_Command = new Binding("SaveCommand"); this.e_287.SetBinding(Button.CommandProperty, binding_e_287_Command); // e_288 element this.e_288 = new Button(); this.e_285.Children.Add(this.e_288); this.e_288.Name = "e_288"; this.e_288.Margin = new Thickness(5F, 5F, 5F, 5F); this.e_288.Content = "Load"; Binding binding_e_288_Command = new Binding("LoadCommand"); this.e_288.SetBinding(Button.CommandProperty, binding_e_288_Command); // e_289 element this.e_289 = new Button(); this.e_285.Children.Add(this.e_289); this.e_289.Name = "e_289"; this.e_289.Margin = new Thickness(5F, 5F, 5F, 5F); this.e_289.Content = "Options"; Binding binding_e_289_Command = new Binding("OptionsCommand"); this.e_289.SetBinding(Button.CommandProperty, binding_e_289_Command); // e_290 element this.e_290 = new Button(); this.e_285.Children.Add(this.e_290); this.e_290.Name = "e_290"; this.e_290.Margin = new Thickness(5F, 5F, 5F, 5F); this.e_290.Content = "Quit To Menu"; Binding binding_e_290_Command = new Binding("QuitMenuCommand"); this.e_290.SetBinding(Button.CommandProperty, binding_e_290_Command); // e_291 element this.e_291 = new Button(); this.e_285.Children.Add(this.e_291); this.e_291.Name = "e_291"; this.e_291.Margin = new Thickness(5F, 5F, 5F, 5F); this.e_291.Content = "Quit To Windows"; Binding binding_e_291_Command = new Binding("QuitWindowsCommand"); this.e_291.SetBinding(Button.CommandProperty, binding_e_291_Command); // e_292 element this.e_292 = new TextBlock(); this.e_285.Children.Add(this.e_292); this.e_292.Name = "e_292"; this.e_292.Text = "Game Details:"; this.e_292.TextAlignment = TextAlignment.Center; ImageManager.Instance.AddImage("ImagesUI\\gear"); ImageManager.Instance.AddImage("ImagesUI\\iron_res"); ImageManager.Instance.AddImage("ImagesUI\\gold_res"); ImageManager.Instance.AddImage("ImagesUI\\oil_res"); ImageManager.Instance.AddImage("ImagesUI\\livestock_res"); ImageManager.Instance.AddImage("ImagesUI\\arrowU"); ImageManager.Instance.AddImage("ImagesUI\\arrowD"); ImageManager.Instance.AddImage("ImagesUI\\arrowL"); ImageManager.Instance.AddImage("ImagesUI\\arrowR"); ImageManager.Instance.AddImage("ImagesUI\\aluminium_res"); ImageManager.Instance.AddImage("ImagesUI\\copper_res"); ImageManager.Instance.AddImage("ImagesUI\\lead_res"); ImageManager.Instance.AddImage("ImagesUI\\magnesium_res"); ImageManager.Instance.AddImage("ImagesUI\\titanium_res"); ImageManager.Instance.AddImage("ImagesUI\\zinc_res"); ImageManager.Instance.AddImage("ImagesUI\\silver_res"); ImageManager.Instance.AddImage("ImagesUI\\platinum_res"); ImageManager.Instance.AddImage("ImagesUI\\diamond_res"); ImageManager.Instance.AddImage("ImagesUI\\coal_res"); ImageManager.Instance.AddImage("ImagesUI\\gas_res"); ImageManager.Instance.AddImage("ImagesUI\\uranium_res"); ImageManager.Instance.AddImage("ImagesUI\\thorium_res"); ImageManager.Instance.AddImage("ImagesUI\\timber_res"); ImageManager.Instance.AddImage("ImagesUI\\crops_res"); ImageManager.Instance.AddImage("ImagesUI\\water_res"); ImageManager.Instance.AddImage("ImagesUI\\propane_res"); ImageManager.Instance.AddImage("ImagesUI\\biomass_res"); ImageManager.Instance.AddImage("ImagesUI\\hydrogen_res"); ImageManager.Instance.AddImage("ImagesUI\\plastic_res"); ImageManager.Instance.AddImage("ImagesUI\\fabric_res"); ImageManager.Instance.AddImage("ImagesUI\\oxygen_res"); FontManager.Instance.AddFont("Segoe UI", 12F, FontStyle.Regular, "Segoe_UI_9_Regular"); FontManager.Instance.AddFont("Segoe UI", 12F, FontStyle.Regular, "Segoe_UI_9_Regular"); }