using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Markup;
using FlowBotsLibrary.Properties;
using NinjaTrader.Gui.Tools;

namespace FlowBots.Util
{
	public partial class ProductUpdateWindow : NTWindow
	{
		[CompilerGenerated]
		private FlowBotsProductVersion.Product method_0()
		{
			return this.product_0;
		}

		[CompilerGenerated]
		private void method_1(FlowBotsProductVersion.Product product_1)
		{
			this.product_0 = product_1;
		}

		public ProductUpdateWindow(FlowBotsProductVersion.Product product)
		{
			this.InitializeComponent();
			this.method_1(product);
		}

		private void method_2(object sender, RoutedEventArgs e)
		{
			if (this.method_0() == null)
			{
				Delegate563.smethod_0(this, Delegate563.delegate563_0);
				return;
			}
			Delegate530.smethod_0(this.btnDownload, new RoutedEventHandler(this.method_4), Delegate530.delegate530_0);
			Delegate530.smethod_0(this.btnLater, new RoutedEventHandler(this.method_5), Delegate530.delegate530_0);
			Delegate530.smethod_0(this.btnProduct, new RoutedEventHandler(this.method_6), Delegate530.delegate530_0);
			try
			{
				Delegate316.smethod_0(this.txtText, Delegate50.smethod_0(Resources.ProductUpdateInfo, Delegate51.smethod_0("\"", this.method_0().file_name, "\"", Delegate51.delegate51_0), Delegate51.smethod_0("\"", this.method_0().file_version, "\"", Delegate51.delegate51_0), Delegate488.smethod_0(Delegate488.delegate488_0), Delegate50.delegate50_0), Delegate316.delegate316_0);
			}
			catch
			{
				Delegate563.smethod_0(this, Delegate563.delegate563_0);
			}
		}

		private void method_3(object sender, EventArgs e)
		{
			if (Delegate503.smethod_0(this.cbDontShowAgain, Delegate503.delegate503_0) != null && Delegate503.smethod_0(this.cbDontShowAgain, Delegate503.delegate503_0).Value)
			{
				this.method_0().DoNotShow = true;
				VersionCheck.PersistProductVersion(this.method_0());
			}
		}

		[CompilerGenerated]
		private void method_4(object sender, RoutedEventArgs e)
		{
			try
			{
				Delegate475.smethod_0(this.method_0().download_link, Delegate475.delegate475_0);
			}
			catch
			{
			}
		}

		[CompilerGenerated]
		private void method_5(object sender, RoutedEventArgs e)
		{
			Delegate563.smethod_0(this, Delegate563.delegate563_0);
		}

		[CompilerGenerated]
		private void method_6(object sender, RoutedEventArgs e)
		{
			try
			{
				Delegate475.smethod_0(this.method_0().product_link, Delegate475.delegate475_0);
			}
			catch
			{
			}
		}

		internal static void smethod_0()
		{
		}

		internal static object smethod_1()
		{
			return Resources.ProductUpdateInfo;
		}

		internal static object smethod_2(int int_0)
		{
			return Class10.smethod_17(int_0);
		}

		internal static object smethod_3(object object_0)
		{
			return object_0.file_name;
		}

		internal static object smethod_4(object object_0)
		{
			return object_0.file_version;
		}

		internal static void smethod_5(object object_0, bool value)
		{
			object_0.DoNotShow = value;
		}

		internal static bool smethod_6(object object_0)
		{
			return VersionCheck.PersistProductVersion(object_0);
		}

		internal static object smethod_7(object object_0)
		{
			return object_0.download_link;
		}

		internal static void smethod_8()
		{
		}

		[CompilerGenerated]
		private FlowBotsProductVersion.Product product_0;
	}
}
