private void Button_Click(object sender, RoutedEventArgs e) { if (String.IsNullOrEmpty(T1.Text) || String.IsNullOrEmpty(T2.Password)) { MessageBox.Show("Введите данные!"); } else { string jo = Connect.login(T1.Text, T2.Password); if (!String.IsNullOrEmpty(jo)) { //MessageBox.Show(jo); MParent main = (MParent)Application.Current.Windows[1]; main.Show(); main.load(jo.Replace(" ", " ")); this.Hide(); } else { MessageBox.Show("Неправильный логин или пароль!"); } } }
public void load() { mp = (MParent)Application.Current.Windows[1]; if (MParent.id == 0) { btn1.Visibility = Visibility.Hidden; } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.forma = ((JJBa.MParent)(target)); #line 8 "..\..\MParent.xaml" this.forma.Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden #line 8 "..\..\MParent.xaml" this.forma.Closed += new System.EventHandler(this.forma_Closed); #line default #line hidden return; } this._contentLoaded = true; }
private void Button_Click_1(object sender, RoutedEventArgs e) { MParent mp = (MParent)Application.Current.Windows[1]; mp.forma.Content = mp.mn.Mtop; }