Interaction logic for ModifySettingsDialog.xaml
Inheritance: System.Windows.Window
Esempio n. 1
0
        private void SettingsButton_Clicked(object sender, RoutedEventArgs e)
        {
            ModifySettingsDialog dialog = new ModifySettingsDialog(this.NetworkConnectionData.UserName, this.NetworkConnectionData.ServerAddress, this.NetworkConnectionData.ViewerAddress);

            dialog.Owner = this;

            bool?result = dialog.ShowDialog();

            if (result.HasValue && result.Value)
            {
                if (!dialog.UserName.Equals(this.NetworkConnectionData.UserName))
                {
                    this.NetworkConnectionData.UserName = dialog.UserName;
                }

                if (!dialog.ServerAddress.Equals(this.NetworkConnectionData.ServerAddress))
                {
                    this.NetworkConnectionData.ServerAddress = dialog.ServerAddress;
                }

                if (!dialog.ViewerAddress.Equals(this.NetworkConnectionData.ViewerAddress))
                {
                    this.NetworkConnectionData.ViewerAddress = dialog.ViewerAddress;
                }
            }
        }
Esempio n. 2
0
        private void SettingsButton_Clicked(object sender, RoutedEventArgs e)
        {
            ModifySettingsDialog dialog = new ModifySettingsDialog(this.NetworkConnectionData.UserName, this.NetworkConnectionData.ServerAddress, this.NetworkConnectionData.ViewerAddress);
            dialog.Owner = this;

            bool? result = dialog.ShowDialog();

            if (result.HasValue && result.Value)
            {
                if (!dialog.UserName.Equals(this.NetworkConnectionData.UserName))
                {
                    this.NetworkConnectionData.UserName = dialog.UserName;
                }

                if (!dialog.ServerAddress.Equals(this.NetworkConnectionData.ServerAddress))
                {
                    this.NetworkConnectionData.ServerAddress = dialog.ServerAddress;
                }

                if (!dialog.ViewerAddress.Equals(this.NetworkConnectionData.ViewerAddress))
                {
                    this.NetworkConnectionData.ViewerAddress = dialog.ViewerAddress;
                }
            }
        }