예제 #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            selected1 = status1ComboBox.SelectedItem.ToString();
            selected1 = selected1.Substring(selected1.IndexOf(' '));
            if (selected1 == " dealMade")
            {
                or.Status1    = BEEnum.Status.dealMade;
                or.OrderDate1 = DateTime.Now;
                try
                {
                    bl.UpdateOrder(or);
                }
                catch
                {
                    MessageBox.Show("this should work");
                }
                BE.GuestRequest guesty = bl.GetGuestRequestByKey(Convert.ToInt64(guestRequestKey1Label.Content));
                guesty.status1 = BEEnum.Status.dealMade;
                try
                {
                    bl.UpdateGuestRequest(guesty);
                }
                catch
                {
                    MessageBox.Show("this should work2");
                }
            }

            Window HostWindow = new HostWindow(username);

            HostWindow.Show();
        }
예제 #2
0
        private void BackButton_Click(object sender, RoutedEventArgs e)
        {
            Window HostMain = new HostWindow(username);

            HostMain.Show();
            this.Close();
        }
예제 #3
0
        private void backbutton_Click(object sender, RoutedEventArgs e)
        {
            Window hosty = new HostWindow(username);

            hosty.Show();
            this.Close();
        }
예제 #4
0
 public MainWindow()
 {
     InitializeComponent();
     InitializeCommands();
     Application.Current.MainWindow = this;
     hostWindow.Show();
 }
예제 #5
0
 private void ConvertSource()
 {
     if (this._selectedForm != null)
     {
         this._formConverter = new WinFormConverter();
         this._formConverter.Properties.Add("Namespace", "");
         this._formConverter.Properties.Add("ClassName", this._selectedForm.Name);
         this._formConverter.RootContainerType = (WinFormConverter.RootContainerTypes) this._selectedProjectType.Code;
         try
         {
             SWF.Form form = (SWF.Form)Activator.CreateInstance(this._selectedForm);
             if (this._formConverter.Convert(form) && this._showPreview)
             {
                 if (this._selectedProjectType.Code == 4)
                 {
                     MessageBox.Show("Can't show preview for Windows Phone destination.", "Information", MessageBoxButton.OK, MessageBoxImage.Asterisk);
                 }
                 else
                 {
                     try
                     {
                         using (Stream memoryStream = new MemoryStream(Encoding.Default.GetBytes(this._formConverter.Result)))
                         {
                             object obj = XamlReader.Load(memoryStream);
                             if (obj.GetType() != typeof(Window))
                             {
                                 if (obj.GetType() == typeof(UserControl))
                                 {
                                     HostWindow hostWindow = new HostWindow();
                                     hostWindow.InjectControl((UserControl)obj);
                                     hostWindow.Show();
                                 }
                             }
                             else
                             {
                                 Window window = (Window)obj;
                                 window.Show();
                             }
                         }
                     }
                     catch (Exception exception1)
                     {
                         Exception exception = exception1;
                         this._formConverter.ParserErrors.Add(new ParserError(0, string.Format("Error while rendering XAML: {0}", exception.Message)));
                     }
                 }
             }
         }
         catch (Exception exception3)
         {
             Exception exception2 = exception3;
             this._formConverter.ParserErrors.Add(new ParserError(0, string.Format("Error: {0}", exception2.Message)));
         }
         base.OnPropertyChanged("ParserErrors");
         base.OnPropertyChanged("Result");
     }
 }