private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            if (this.server != null)
            {
                this.server.SetName(ServerNameBox.Text);
                this.server.SetUrl(ServerUrlBox.Text);
                this.server.SetPort((uint)Int32.Parse(ServerPortBox.Text));

                if (ServerSecureBox.IsChecked == true)
                {
                    this.server.SetPrefix("https://");
                }
                else
                {
                    this.server.SetPrefix("http://");
                }
            }
            else
            {
                this.server = new MattermostServer(
                    ServerNameBox.Text,
                    ServerUrlBox.Text,
                    ServerSecureBox.IsChecked == true ? "https://" : "http://",
                    (uint)Int32.Parse(ServerPortBox.Text)
                    );
            }

            this.SaveServer();
        }
        public bool Equals(MattermostServer server)
        {
            if (server.GetUri().Equals(this.GetUri()))
            {
                return(true);
            }

            return(false);
        }
 public EditServer(MattermostServer server)
 {
     InitializeComponent();
     this.server = server;
 }
 public EditServer()
 {
     InitializeComponent();
     server = null;
 }