public WeatherForecastController() { var host = ConfigurationManager.AppSettings["host"]; if (!int.TryParse(ConfigurationManager.AppSettings["port"], out int port) || string.IsNullOrEmpty(host)) { return; } _apiClient = Ioc.Resolve <IApiClient>(); _apiClient.Open(host, port); MainVM = new MainVM(_apiClient); DataContext = MainVM; var wc = Ioc.Resolve <IVisual>().GetVisualComponent(); _wcInterface = wc; if (wc.IsWpfCompatible) { _weatherControl = (UIElement)wc.Control; } else { _weatherControl = new WindowsFormsHost() { Child = (System.Windows.Forms.Control)wc.Control }; } Body.Content = _weatherControl; }
public MainWindow() { var host = ConfigurationManager.AppSettings["host"]; if (!int.TryParse(ConfigurationManager.AppSettings["port"], out int port) || string.IsNullOrEmpty(host)) { MessageBox.Show("Invalid Config"); Application.Current.Shutdown(); return; } InitializeComponent(); _apiClient = Ioc.Resolve <IApiClient>(); _apiClient.Open(host, port); MainVM = new MainVM(_apiClient); DataContext = MainVM; var wc = Ioc.Resolve <IVisual>().GetVisualComponent(); _wcInterface = wc; if (wc.IsWpfCompatible) { _weatherControl = (UIElement)wc.Control; } else { _weatherControl = new WindowsFormsHost() { Child = (System.Windows.Forms.Control)wc.Control }; } Body.Content = _weatherControl; }
//--------------------------------------------------------------------- public OutlineDecorator(IVisualComponent ThisComponent, int ThisLineWidth, Color ThisLineColor) : base(ThisComponent) { this.LineWidth = ThisLineWidth; this.LineColor = ThisLineColor; return; }
//--------------------------------------------------------------------- public DropShadowDecorator(IVisualComponent ThisComponent, int ThisShadowDepth, Color ThisShadowColor, int ThisShadowOpacity) : base(ThisComponent) { this.ShadowDepth = ThisShadowDepth; this.ShadowColor = ThisShadowColor; this.ShadowOpacity = ThisShadowOpacity; return; }
//===================================================================== // Constructors and Destructors //===================================================================== //--------------------------------------------------------------------- public DropShadowDecorator(IVisualComponent ThisComponent) : base(ThisComponent) { return; }
public Decorator(IVisualComponent component) { this.Component = component; }
//===================================================================== // Constructors and Destructors //===================================================================== //--------------------------------------------------------------------- public OutlineDecorator(IVisualComponent ThisComponent) : base(ThisComponent) { return; }
static void RenderView(IVisualComponent component) { component.Draw(); }
//===================================================================== // Constructors and Destructors //===================================================================== //--------------------------------------------------------------------- public ComponentDecorator(IVisualComponent ThisComponent) { this._VisualComponent = ThisComponent; return; }
public ScrollDecorator(IVisualComponent compt) : base(compt) { }
public ScrollDecorator(IVisualComponent Component, int scrollPosition) : base(Component) { this.scrollPosition = scrollPosition; }
public static ISetupAppBuilder AddComponent(this ISetupAppBuilder builder, IVisualComponent component) { builder.Context.Components.RegisterComponent(component); return(builder); }
public BorderDecorator(IVisualComponent wrapped, int width) { _wrapped = wrapped; _width = width; }
public BorderDecorator(IVisualComponent compt) : base(compt) { }
public void Remove(IVisualComponent visualComponent) { Console.WriteLine("Cannot remove from a Icon Visual Component"); }
public static void RegisterComponent(IVisualComponent component) { var items = (AvaloniaList <object>)_carousel.Items; items.Add(component.GetVisualControl(Runtime.Context)); }
public BorderDecorator(IVisualComponent Component, int borderWidth) : base(Component) { this.borderWidth = borderWidth; }
public void Add(IVisualComponent visualComponent) { _visualComponents.Add(visualComponent); }
public void Remove(IVisualComponent visualComponent) { _visualComponents.Remove(visualComponent); }
public void Add(IVisualComponent visualComponent) { Console.WriteLine("Cannot add to a Icon Visual Component"); }
public ScrollDecorator(IVisualComponent wrapped, int topLine) { _wrapped = wrapped; _topLine = topLine; }