示例#1
0
        /// <summary>
        /// To edit the proxy settings.
        /// </summary>
        public static void EditProxySettigs()
        {
            var wnd = new ProxyEditorWindow
            {
                ProxySettings = ProxySettings.Clone()
            };

            if (!wnd.ShowModal())
            {
                return;
            }

            ProxySettings.Load(wnd.ProxySettings.Save());
            ProxySettings.ApplyProxySettings();

            if (!ProxyConfigurationFile.IsEmpty())
            {
                new XmlSerializer <SettingsStorage>().Serialize(ProxySettings.Save(), ProxyConfigurationFile);
            }
        }
示例#2
0
		/// <summary>
		/// To edit the proxy settings.
		/// </summary>
		public static void EditProxySettigs()
		{
			var wnd = new ProxyEditorWindow
			{
				ProxySettings = ProxySettings.Clone()
			};

			if (!wnd.ShowModal())
				return;

			ProxySettings.Load(wnd.ProxySettings.Save());
			ProxySettings.ApplyProxySettings();

			if (!ProxyConfigurationFile.IsEmpty())
				new XmlSerializer<SettingsStorage>().Serialize(ProxySettings.Save(), ProxyConfigurationFile);
		}
示例#3
0
		private void ProxySettingsClick(object sender, RoutedEventArgs e)
		{
			var wnd = new ProxyEditorWindow();

			if (wnd.ShowModal(this))
				wnd.ProxySettings.ApplyProxySettings();
		}