Exemple #1
0
        private void LoginBtnClick(object sender, RoutedEventArgs e)
        {
            string[] param = new string[2];
            param[0] = ((System.Windows.Controls.TextBox)(FindName("idText"))).Text;
            param[1] = ((System.Windows.Controls.PasswordBox)(FindName("pwText"))).Password;

            try
            {
                string result = HttpGetter.HttpPost("api/Account/Login", paramName, param);
                JObject obj = JObject.Parse(result);
                string res = obj["pk"].ToString();

                AccessTokenManager.getInstance().setToken(res);

                Attributes instance = Attributes.getInstance();
                instance.addLinkGroup(1);

                BBCodeBlock bs = new BBCodeBlock();
                try
                {
                    bs.LinkNavigator.Navigate(new Uri("/Pages/Upload.xaml", UriKind.Relative), this);
                    instance.removeLinkGroup(0);
                }
                catch (Exception error)
                {
                    ModernDialog.ShowMessage(error.Message, FirstFloor.ModernUI.Resources.NavigationFailed, MessageBoxButton.OK);
                }
            }
            catch (Exception error)
            {
                ModernDialog.ShowMessage(error.Message, FirstFloor.ModernUI.Resources.NavigationFailed, MessageBoxButton.OK);
            }
        }
Exemple #2
0
        private async void login()
        {
            BBCodeBlock bb = new BBCodeBlock();
            //User user = new User(this.txtEmail.Text, this.txtPassword.Password);
            //prototype form
            this.mpr.IsActive = true;

            Console.WriteLine(MailManager.GetInstance().IP);

            try
            {
                await MailManager.GetInstance().LogIn(this.txtEmail.Text, this.txtPassword.Password);                                //login attempt

                this.txtWelcome.Text = "Please logout first if you want to login.";
                this.EmailGrid.Visibility = System.Windows.Visibility.Collapsed;
                this.PasswordGrid.Visibility = System.Windows.Visibility.Collapsed;
                this.ButtonsGrid.Visibility = System.Windows.Visibility.Collapsed;
                User.GetInstance().LoggedIn = true;
                buildNavigation();
                bb.LinkNavigator.Navigate(new Uri("/Pages/Profile/User.xaml", UriKind.Relative), this);      //if login attempt correct
            }
            catch (Exception ex)
            {
                ModernDialog md = new ModernDialog();
                md.Title = "Error";
                md.Content = ex.Message;
                md.Buttons = new List<Button>() { md.OkButton };
                md.ShowDialog();
            }
            this.mpr.IsActive = false;
        }
       // adoraDBContext _context = new adoraDBContext();
        private void UserControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            System.Windows.Data.CollectionViewSource showCurDetailViewSource =
                ((System.Windows.Data.CollectionViewSource)(this.FindResource("showCurDetailViewSource")));

           
            _context.showCurDetails.Load();
            showCurDetailViewSource.Source = _context.showCurDetails.Local;

            System.Windows.Data.CollectionViewSource userViewSource =
                     ((System.Windows.Data.CollectionViewSource)(this.FindResource("userViewSource")));

            _context.Users.Load();
            userViewSource.Source = _context.Users.Local;
            // After the data is loaded call the DbSet<T>.Local property  
            // to use the DbSet<T> as a binding source. 
            //showCurDetailViewSource.Source = _context.showCurDetails.Local;
            populateCurrencyTypes(dropCurType);
            btnEditUser.Visibility = Visibility.Hidden;

            if (_userType.getUserLevel() != 1)
            {
                BBCodeBlock bs = new BBCodeBlock();
                try
                {
                    bs.LinkNavigator.Navigate(new Uri("/Views/firstOpen.xaml", UriKind.Relative), this);
                    ModernDialog.ShowMessage("You are not privilaged to access this page", "Access Denied!", MessageBoxButton.OK);
                }
                catch (Exception error)
                {
                    ModernDialog.ShowMessage(error.Message, FirstFloor.ModernUI.Resources.NavigationFailed, MessageBoxButton.OK);
                }
            }

        }
        private static object CreateContent(string text)
        {
            var grid = new Grid();

            grid.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto });
            grid.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(125) });

            grid.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto });
            grid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(400) });

            var bbCodeBlock = new BBCodeBlock { BBCode = text, Margin = new Thickness(0, 2, 0, 8) };
            grid.Children.Add(bbCodeBlock);
            textBox = new TextBox() { Margin = new Thickness(2, 0, 0, 8), TextWrapping = TextWrapping.Wrap, AcceptsReturn = true, VerticalAlignment = VerticalAlignment.Stretch, HorizontalAlignment = HorizontalAlignment.Stretch };

            grid.Children.Add(textBox);

            Grid.SetRow(bbCodeBlock, 0);
            Grid.SetColumn(bbCodeBlock, 0);

            Grid.SetRow(textBox, 0);
            Grid.SetRowSpan(textBox, 2);
            Grid.SetColumn(textBox, 1);

            return grid;
        }
 private void LoginProcess()
 {
     if (!username.Text.Equals("") && !password.Password.Equals(""))
     {
         if (username.Text.Equals("admin") && password.Password.Equals("admin"))
         {
             //MainWindow main = new MainWindow();
             //App.Current.MainWindow = main;
             //this.Close();
             //main.Show();
             BBCodeBlock bs = new BBCodeBlock();
             try
             {
                 bs.LinkNavigator.Navigate(new Uri("/Pages/Home.xaml", UriKind.Relative), this);
             }
             catch (Exception error)
             {
                 ModernDialog.ShowMessage(error.Message, FirstFloor.ModernUI.Resources.NavigationFailed, MessageBoxButton.OK);
             }
             //string url = "/MainWindow.xaml";
             //BBCodeBlock bbBlock = new BBCodeBlock();
             //bbBlock.LinkNavigator.Navigate(new Uri(url, UriKind.Relative), null);
         }
         else
         {
             MessageBox.Show("Username atau Password salah");
         }
     }
     else
     {
         MessageBox.Show("Username dan Password tidak boleh kosong");
     }
 }
Exemple #6
0
 private async void btnLogin_Click(object sender, RoutedEventArgs e)
 {
     BBCodeBlock bb = new BBCodeBlock();
     //prototype form
     this.mpr.Visibility = System.Windows.Visibility.Visible;
     await Task.Delay(3000);                                     //login attempt
     this.mpr.Visibility = System.Windows.Visibility.Hidden;
     bb.LinkNavigator.Navigate(new Uri("/Pages/Email/Hub.xaml", UriKind.Relative), this);      //if login attempt correct
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.fragmentNav = ((FirstFloor.ModernUI.Windows.Controls.BBCodeBlock)(target));
     return;
     }
     this._contentLoaded = true;
 }
Exemple #8
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.fragmentNav = ((FirstFloor.ModernUI.Windows.Controls.BBCodeBlock)(target));
         return;
     }
     this._contentLoaded = true;
 }
Exemple #9
0
 private async void btnLogout_Click(object sender, RoutedEventArgs e)
 {
     BBCodeBlock bb = new BBCodeBlock();
     Model.User.GetInstance().LoggedIn = false;
     this.mpr.IsActive = true;
     //await MailManager.GetInstance().LogOut();
     this.mpr.IsActive = false;
     clearNavigation();
     bb.LinkNavigator.Navigate(new Uri("/Pages/Profile/Login.xaml", UriKind.Relative), this);
 }
Exemple #10
0
 public void logout()
 {
     Attributes instance = Attributes.getInstance();
     //instance.removeLinkGroup(1);
     BBCodeBlock bs = new BBCodeBlock();
     try
     {
         bs.LinkNavigator.Navigate(new Uri("/Pages/Home.xaml", UriKind.Relative), this);
     }
     catch (Exception error)
     {
         ModernDialog.ShowMessage(error.Message, FirstFloor.ModernUI.Resources.NavigationFailed, MessageBoxButton.OK);
     }
 }
        private void EventSetter_OnHandler(object sender, MouseButtonEventArgs e)
        {
            var cmd = App.Container.GetExportedValues<ICommand>("cmd://home/AttachToProcessCommand").FirstOrDefault();
            if (cmd == null) return;
            if (cmd.CanExecute(null))
                try
                {
                    cmd.Execute(null);
                }
                catch (Exception ex)
                {
                    ModernDialog.ShowMessage("Error in attach to process. \n" + ex.Message, "Error", MessageBoxButton.OK);
                }

            var bbBlock = new BBCodeBlock();
            bbBlock.LinkNavigator.Navigate(new Uri("/OperationTypes", UriKind.Relative), this, NavigationHelper.FrameSelf);
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.TextBlock = ((FirstFloor.ModernUI.Windows.Controls.BBCodeBlock)(target));
                return;

            case 2:
                this.SaveAsBtn = ((System.Windows.Controls.Button)(target));

            #line 12 "..\..\..\..\Pages\Tools\ViewParams.xaml"
                this.SaveAsBtn.Click += new System.Windows.RoutedEventHandler(this.SaveAsBtn_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Exemple #13
0
 private void JoinBtn_Click(object sender, RoutedEventArgs e)
 {
     string[] param = new string[3];
     param[0] = ((System.Windows.Controls.TextBox)(FindName("idText"))).Text;
     param[1] = ((System.Windows.Controls.PasswordBox)(FindName("pwText"))).Password;
     param[2] = ((System.Windows.Controls.PasswordBox)(FindName("confirmText"))).Password;
     if (param[1] != param[2])
     {
         System.Windows.Forms.MessageBox.Show("Confirmed Password does not match to the Password.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
     try
     {
         string result = HttpGetter.HttpPost("api/Account/Register", paramName, param);
         if(result.Equals(""))
         {
             BBCodeBlock bs = new BBCodeBlock();
             try
             {
                 bs.LinkNavigator.Navigate(new Uri("/Pages/Home.xaml", UriKind.Relative), this);
             }
             catch (Exception error)
             {
                 ModernDialog.ShowMessage(error.Message, FirstFloor.ModernUI.Resources.NavigationFailed, MessageBoxButton.OK);
             }
         }
         else
         {
             System.Windows.Forms.MessageBox.Show(result, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
     catch (Exception error)
     {
         ModernDialog.ShowMessage(error.Message, FirstFloor.ModernUI.Resources.NavigationFailed, MessageBoxButton.OK);
     }
 }
 public void NavigateToLogin()
 {
     BBCodeBlock bs = new BBCodeBlock();
     bs.LinkNavigator.Navigate(new Uri("/Pages/HomePage.xaml", UriKind.Relative), _instance);
 }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 12 "..\..\..\Views\TestCaseEditView.xaml"
     ((TestCaseManagerApp.Views.TestCaseEditView)(target)).Loaded += new System.Windows.RoutedEventHandler(this.UserControl_Loaded);
     
     #line default
     #line hidden
     return;
     case 2:
     
     #line 18 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.btnSaveTestCase_Click);
     
     #line default
     #line hidden
     return;
     case 3:
     
     #line 19 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.btnSaveAndCloseTestCase_Click);
     
     #line default
     #line hidden
     return;
     case 4:
     
     #line 20 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.btnEdit_Click);
     
     #line default
     #line hidden
     return;
     case 5:
     
     #line 21 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.btnChange_Click);
     
     #line default
     #line hidden
     return;
     case 6:
     
     #line 22 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.btnInsertStep_Click);
     
     #line default
     #line hidden
     return;
     case 7:
     
     #line 23 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.btnAssociateToAutomation_Click);
     
     #line default
     #line hidden
     return;
     case 8:
     
     #line 24 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.deleteStep_Command);
     
     #line default
     #line hidden
     return;
     case 9:
     
     #line 25 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.moveUp_Command);
     
     #line default
     #line hidden
     return;
     case 10:
     
     #line 26 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.moveDown_Command);
     
     #line default
     #line hidden
     return;
     case 11:
     
     #line 27 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.btnAdd_Click);
     
     #line default
     #line hidden
     return;
     case 12:
     
     #line 28 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.btnShare_Click);
     
     #line default
     #line hidden
     return;
     case 13:
     
     #line 29 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.copyTestSteps_Command);
     
     #line default
     #line hidden
     return;
     case 14:
     
     #line 30 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.cutTestSteps_Command);
     
     #line default
     #line hidden
     return;
     case 15:
     
     #line 31 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.pasteTestSteps_Command);
     
     #line default
     #line hidden
     return;
     case 16:
     
     #line 32 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.btnUndo_Click);
     
     #line default
     #line hidden
     return;
     case 17:
     
     #line 33 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.btnRedo_Click);
     
     #line default
     #line hidden
     return;
     case 18:
     
     #line 34 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.editSharedStep_Command);
     
     #line default
     #line hidden
     return;
     case 19:
     
     #line 35 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.duplicateSharedStep_Command);
     
     #line default
     #line hidden
     return;
     case 20:
     
     #line 36 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.btnEdit_Click);
     
     #line default
     #line hidden
     return;
     case 21:
     
     #line 37 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.PreviewButton_Click);
     
     #line default
     #line hidden
     return;
     case 22:
     this.progressBar = ((System.Windows.Controls.ProgressBar)(target));
     return;
     case 23:
     this.mainGrid = ((System.Windows.Controls.Grid)(target));
     return;
     case 24:
     this.btnUndo = ((System.Windows.Controls.Button)(target));
     
     #line 58 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnUndo.Click += new System.Windows.RoutedEventHandler(this.btnUndo_Click);
     
     #line default
     #line hidden
     return;
     case 25:
     this.btnRedo = ((System.Windows.Controls.Button)(target));
     
     #line 59 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnRedo.Click += new System.Windows.RoutedEventHandler(this.btnRedo_Click);
     
     #line default
     #line hidden
     return;
     case 26:
     this.tbTitle = ((System.Windows.Controls.TextBox)(target));
     return;
     case 27:
     this.tbSuite = ((System.Windows.Controls.TextBox)(target));
     return;
     case 28:
     this.cbArea = ((System.Windows.Controls.ComboBox)(target));
     
     #line 94 "..\..\..\Views\TestCaseEditView.xaml"
     this.cbArea.MouseEnter += new System.Windows.Input.MouseEventHandler(this.cbArea_MouseEnter);
     
     #line default
     #line hidden
     
     #line 94 "..\..\..\Views\TestCaseEditView.xaml"
     this.cbArea.MouseMove += new System.Windows.Input.MouseEventHandler(this.cbArea_MouseMove);
     
     #line default
     #line hidden
     return;
     case 29:
     this.cbPriority = ((System.Windows.Controls.ComboBox)(target));
     
     #line 97 "..\..\..\Views\TestCaseEditView.xaml"
     this.cbPriority.MouseEnter += new System.Windows.Input.MouseEventHandler(this.cbPriority_MouseEnter);
     
     #line default
     #line hidden
     
     #line 97 "..\..\..\Views\TestCaseEditView.xaml"
     this.cbPriority.MouseMove += new System.Windows.Input.MouseEventHandler(this.cbPriority_MouseMove);
     
     #line default
     #line hidden
     return;
     case 30:
     this.Column3 = ((System.Windows.Controls.ColumnDefinition)(target));
     return;
     case 31:
     this.rtbAction = ((System.Windows.Controls.RichTextBox)(target));
     
     #line 126 "..\..\..\Views\TestCaseEditView.xaml"
     this.rtbAction.GotFocus += new System.Windows.RoutedEventHandler(this.rtbStep_GotFocus);
     
     #line default
     #line hidden
     
     #line 126 "..\..\..\Views\TestCaseEditView.xaml"
     this.rtbAction.LostFocus += new System.Windows.RoutedEventHandler(this.rtbStep_LostFocus);
     
     #line default
     #line hidden
     return;
     case 32:
     this.rtbExpectedResult = ((System.Windows.Controls.RichTextBox)(target));
     
     #line 127 "..\..\..\Views\TestCaseEditView.xaml"
     this.rtbExpectedResult.GotFocus += new System.Windows.RoutedEventHandler(this.rtbExpectedResult_GotFocus);
     
     #line default
     #line hidden
     
     #line 127 "..\..\..\Views\TestCaseEditView.xaml"
     this.rtbExpectedResult.LostFocus += new System.Windows.RoutedEventHandler(this.rtbExpectedResult_LostFocus);
     
     #line default
     #line hidden
     return;
     case 33:
     this.btnAssociateToAutomation = ((System.Windows.Controls.Button)(target));
     
     #line 130 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnAssociateToAutomation.Click += new System.Windows.RoutedEventHandler(this.btnAssociateToAutomation_Click);
     
     #line default
     #line hidden
     return;
     case 34:
     this.btnInsertStep = ((System.Windows.Controls.Button)(target));
     
     #line 140 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnInsertStep.Click += new System.Windows.RoutedEventHandler(this.btnInsertStep_Click);
     
     #line default
     #line hidden
     return;
     case 35:
     this.btnEdit = ((System.Windows.Controls.Button)(target));
     
     #line 141 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnEdit.Click += new System.Windows.RoutedEventHandler(this.btnEdit_Click);
     
     #line default
     #line hidden
     return;
     case 36:
     this.btnSaveTestStep = ((System.Windows.Controls.Button)(target));
     
     #line 142 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnSaveTestStep.Click += new System.Windows.RoutedEventHandler(this.btnSaveTestStep_Click);
     
     #line default
     #line hidden
     return;
     case 37:
     this.btnCancelEdit = ((System.Windows.Controls.Button)(target));
     
     #line 143 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnCancelEdit.Click += new System.Windows.RoutedEventHandler(this.btnCancelEdit_Click);
     
     #line default
     #line hidden
     return;
     case 38:
     this.dgTestSteps = ((System.Windows.Controls.DataGrid)(target));
     
     #line 156 "..\..\..\Views\TestCaseEditView.xaml"
     this.dgTestSteps.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.dgTestSteps_MouseLeftButtonUp);
     
     #line default
     #line hidden
     
     #line 156 "..\..\..\Views\TestCaseEditView.xaml"
     this.dgTestSteps.PreviewMouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.dgTestSteps_PreviewMouseRightButtonDown);
     
     #line default
     #line hidden
     
     #line 157 "..\..\..\Views\TestCaseEditView.xaml"
     this.dgTestSteps.SelectedCellsChanged += new System.Windows.Controls.SelectedCellsChangedEventHandler(this.dgTestSteps_SelectedCellsChanged);
     
     #line default
     #line hidden
     
     #line 157 "..\..\..\Views\TestCaseEditView.xaml"
     this.dgTestSteps.LoadingRow += new System.EventHandler<System.Windows.Controls.DataGridRowEventArgs>(this.dgTestSteps_LoadingRow);
     
     #line default
     #line hidden
     return;
     case 39:
     
     #line 164 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.copyTestSteps_Command);
     
     #line default
     #line hidden
     return;
     case 40:
     
     #line 165 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.pasteTestSteps_Command);
     
     #line default
     #line hidden
     return;
     case 41:
     
     #line 166 "..\..\..\Views\TestCaseEditView.xaml"
     ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.cutTestSteps_Command);
     
     #line default
     #line hidden
     return;
     case 43:
     this.dgTestStepsCutMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 44:
     this.dgTestStepsCopyMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 45:
     this.dgTestStepsPasteMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 46:
     this.dgTestStepsShareMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 47:
     this.dgTestStepsEditMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 48:
     this.dgTestStepsDeleteMenuItem = ((System.Windows.Controls.MenuItem)(target));
     return;
     case 49:
     this.btnMoveUp = ((System.Windows.Controls.Button)(target));
     
     #line 229 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnMoveUp.Click += new System.Windows.RoutedEventHandler(this.btnMoveUp_Click);
     
     #line default
     #line hidden
     return;
     case 50:
     this.btnMoveDown = ((System.Windows.Controls.Button)(target));
     
     #line 230 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnMoveDown.Click += new System.Windows.RoutedEventHandler(this.btnMoveDown_Click);
     
     #line default
     #line hidden
     return;
     case 51:
     this.btnAdd = ((System.Windows.Controls.Button)(target));
     
     #line 231 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnAdd.Click += new System.Windows.RoutedEventHandler(this.btnAdd_Click);
     
     #line default
     #line hidden
     return;
     case 52:
     this.btnShare = ((System.Windows.Controls.Button)(target));
     
     #line 232 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnShare.Click += new System.Windows.RoutedEventHandler(this.btnShare_Click);
     
     #line default
     #line hidden
     return;
     case 53:
     this.btnDeleteStep = ((System.Windows.Controls.Button)(target));
     
     #line 233 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnDeleteStep.Click += new System.Windows.RoutedEventHandler(this.btnDeleteStep_Click);
     
     #line default
     #line hidden
     return;
     case 54:
     this.btnChange = ((System.Windows.Controls.Button)(target));
     
     #line 234 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnChange.Click += new System.Windows.RoutedEventHandler(this.btnChange_Click);
     
     #line default
     #line hidden
     return;
     case 55:
     this.tbSharedStepFilter = ((System.Windows.Controls.TextBox)(target));
     
     #line 247 "..\..\..\Views\TestCaseEditView.xaml"
     this.tbSharedStepFilter.GotFocus += new System.Windows.RoutedEventHandler(this.tbSharedStepFilter_GotFocus);
     
     #line default
     #line hidden
     
     #line 247 "..\..\..\Views\TestCaseEditView.xaml"
     this.tbSharedStepFilter.LostFocus += new System.Windows.RoutedEventHandler(this.tbSharedStepFilter_LostFocus);
     
     #line default
     #line hidden
     
     #line 247 "..\..\..\Views\TestCaseEditView.xaml"
     this.tbSharedStepFilter.KeyUp += new System.Windows.Input.KeyEventHandler(this.tbSharedStepFilter_KeyUp);
     
     #line default
     #line hidden
     return;
     case 56:
     this.dgSharedSteps = ((System.Windows.Controls.DataGrid)(target));
     
     #line 251 "..\..\..\Views\TestCaseEditView.xaml"
     this.dgSharedSteps.SelectedCellsChanged += new System.Windows.Controls.SelectedCellsChangedEventHandler(this.dgSharedSteps_SelectedCellsChanged);
     
     #line default
     #line hidden
     return;
     case 58:
     this.btnSaveAndCloseTestCase = ((System.Windows.Controls.Button)(target));
     
     #line 285 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnSaveAndCloseTestCase.Click += new System.Windows.RoutedEventHandler(this.btnSaveAndCloseTestCase_Click);
     
     #line default
     #line hidden
     return;
     case 59:
     this.btnSaveTestCase = ((System.Windows.Controls.Button)(target));
     
     #line 286 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnSaveTestCase.Click += new System.Windows.RoutedEventHandler(this.btnSaveTestCase_Click);
     
     #line default
     #line hidden
     return;
     case 60:
     this.btnCancel = ((System.Windows.Controls.Button)(target));
     
     #line 287 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnCancel.Click += new System.Windows.RoutedEventHandler(this.btnCancel_Click);
     
     #line default
     #line hidden
     return;
     case 61:
     this.btnDuplicate = ((System.Windows.Controls.Button)(target));
     
     #line 289 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnDuplicate.Click += new System.Windows.RoutedEventHandler(this.btnDuplicate_Click);
     
     #line default
     #line hidden
     return;
     case 62:
     this.btnPreview = ((System.Windows.Controls.Button)(target));
     
     #line 290 "..\..\..\Views\TestCaseEditView.xaml"
     this.btnPreview.Click += new System.Windows.RoutedEventHandler(this.PreviewButton_Click);
     
     #line default
     #line hidden
     return;
     case 63:
     this.lbSaved = ((FirstFloor.ModernUI.Windows.Controls.BBCodeBlock)(target));
     return;
     }
     this._contentLoaded = true;
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 10 "..\..\..\Cwa-Engine\PreviousResults.xaml"
                ((Companion_1._0.Cwa_Engine.PreviousResults)(target)).Unloaded += new System.Windows.RoutedEventHandler(this.UserControl_Unloaded);

            #line default
            #line hidden
                return;

            case 2:
                this.LevelLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 3:
                this.DG1 = ((System.Windows.Controls.DataGrid)(target));

            #line 27 "..\..\..\Cwa-Engine\PreviousResults.xaml"
                this.DG1.KeyUp += new System.Windows.Input.KeyEventHandler(this.DG1_KeyUp);

            #line default
            #line hidden
                return;

            case 4:
                this.SemesterOneTrailLabel = ((FirstFloor.ModernUI.Windows.Controls.BBCodeBlock)(target));
                return;

            case 5:
                this.TDG1 = ((System.Windows.Controls.DataGrid)(target));

            #line 37 "..\..\..\Cwa-Engine\PreviousResults.xaml"
                this.TDG1.KeyUp += new System.Windows.Input.KeyEventHandler(this.TDG1_KeyUp);

            #line default
            #line hidden
                return;

            case 6:
                this.SemesterTwoLabel = ((FirstFloor.ModernUI.Windows.Controls.BBCodeBlock)(target));
                return;

            case 7:
                this.DG2 = ((System.Windows.Controls.DataGrid)(target));

            #line 48 "..\..\..\Cwa-Engine\PreviousResults.xaml"
                this.DG2.KeyUp += new System.Windows.Input.KeyEventHandler(this.DG2_KeyUp);

            #line default
            #line hidden
                return;

            case 8:
                this.SemesterTwoTrailLabel = ((FirstFloor.ModernUI.Windows.Controls.BBCodeBlock)(target));
                return;

            case 9:
                this.TDG2 = ((System.Windows.Controls.DataGrid)(target));

            #line 57 "..\..\..\Cwa-Engine\PreviousResults.xaml"
                this.TDG2.KeyUp += new System.Windows.Input.KeyEventHandler(this.TDG2_KeyUp);

            #line default
            #line hidden
                return;

            case 10:
                this.SubmitButton = ((System.Windows.Controls.Button)(target));

            #line 66 "..\..\..\Cwa-Engine\PreviousResults.xaml"
                this.SubmitButton.Click += new System.Windows.RoutedEventHandler(this.Submit_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Exemple #17
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.userControl = ((Companion_1._0.Cwa_Engine.CwaAnalyst)(target));

            #line 9 "..\..\..\Cwa-Engine\CwaAnalyst.xaml"
                this.userControl.Loaded += new System.Windows.RoutedEventHandler(this.userControl_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.MainGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.FlatCanvas = ((System.Windows.Controls.Canvas)(target));

            #line 29 "..\..\..\Cwa-Engine\CwaAnalyst.xaml"
                this.FlatCanvas.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.FlatCanvas_MouseUp);

            #line default
            #line hidden
                return;

            case 4:
                this.ErectCanvas = ((System.Windows.Controls.Canvas)(target));

            #line 57 "..\..\..\Cwa-Engine\CwaAnalyst.xaml"
                this.ErectCanvas.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.ErectCanvas_MouseUp);

            #line default
            #line hidden
                return;

            case 5:
                this.MainStack = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 6:
                this.DreamCwaTextBox = ((System.Windows.Controls.TextBox)(target));

            #line 98 "..\..\..\Cwa-Engine\CwaAnalyst.xaml"
                this.DreamCwaTextBox.KeyUp += new System.Windows.Input.KeyEventHandler(this.TextBox_KeyUp);

            #line default
            #line hidden
                return;

            case 7:
                this.lblErrorMessage = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.CourseStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 9:
                this.DG = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 10:
                this.SemesterTrailLabel = ((FirstFloor.ModernUI.Windows.Controls.BBCodeBlock)(target));
                return;

            case 11:
                this.TDG = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 12:
                this.SliderStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 13:
                this.HighestCwa = ((System.Windows.Controls.Label)(target));
                return;

            case 14:
                this.LowestCwa = ((System.Windows.Controls.Label)(target));
                return;

            case 15:
                this.BlurEffect = ((System.Windows.Media.Effects.BlurEffect)(target));
                return;

            case 16:
                this.CwaValue = ((System.Windows.Controls.Canvas)(target));

            #line 165 "..\..\..\Cwa-Engine\CwaAnalyst.xaml"
                this.CwaValue.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.CwaValue_MouseUp);

            #line default
            #line hidden
                return;

            case 17:
                this.CwaLabel = ((FirstFloor.ModernUI.Windows.Controls.BBCodeBlock)(target));
                return;

            case 18:
                this.SidePaneCanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 19:
                this.ControlsListBox = ((System.Windows.Controls.ListBox)(target));
                return;

            case 20:
                this.CalculateCwaButton = ((System.Windows.Controls.Button)(target));

            #line 177 "..\..\..\Cwa-Engine\CwaAnalyst.xaml"
                this.CalculateCwaButton.Click += new System.Windows.RoutedEventHandler(this.CalculateCwaButton_Click);

            #line default
            #line hidden
                return;

            case 21:
                this.PreviousRecordButton = ((System.Windows.Controls.Button)(target));

            #line 202 "..\..\..\Cwa-Engine\CwaAnalyst.xaml"
                this.PreviousRecordButton.Click += new System.Windows.RoutedEventHandler(this.PreviousRecordButton_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 7 "..\..\..\Views\AboutView.xaml"
     ((TestCaseManagerApp.AboutView)(target)).Loaded += new System.Windows.RoutedEventHandler(this.UserControl_Loaded);
     
     #line default
     #line hidden
     return;
     case 2:
     this.bbcVersion = ((FirstFloor.ModernUI.Windows.Controls.BBCodeBlock)(target));
     return;
     case 3:
     this.tbVersion = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 4:
     this.bbcDate = ((FirstFloor.ModernUI.Windows.Controls.BBCodeBlock)(target));
     return;
     case 5:
     this.tbDate = ((System.Windows.Controls.TextBlock)(target));
     return;
     }
     this._contentLoaded = true;
 }
 private void UserControl_Loaded(object sender, RoutedEventArgs e)
 {
     if (_userType.getUserLevel() != 1)
     {
         BBCodeBlock bs = new BBCodeBlock();
         try
         {
             bs.LinkNavigator.Navigate(new Uri("/Views/firstOpen.xaml", UriKind.Relative), this);
             ModernDialog.ShowMessage("You are not privilaged to access this page", "Access Denied!", MessageBoxButton.OK);
         }
         catch (Exception error)
         {
             ModernDialog.ShowMessage(error.Message, FirstFloor.ModernUI.Resources.NavigationFailed, MessageBoxButton.OK);
         }
     }
 }
 public void OnLogin()
 {
     try
     {
         if (_server.Login(UserName, Password))
         {
             LoadUserList(_server.GetCurrentUsers());
             LoginVis = false;
             LogoutVis = true;
             ChatEnabled = true;
             Chat = "";
             BBCodeBlock bs = new BBCodeBlock();
             bs.LinkNavigator.Navigate(new Uri("/Pages/ChatPage.xaml", UriKind.Relative), HomePage.GetInstance(), NavigationHelper.FrameSelf);
             CurrentUser = UserName;
             ReturnMessage.LoginMessage = "Logged In as: " + UserName;
         }
         else
         {
             ReturnMessage.LoginColor = "Red";
             ReturnMessage.LoginMessage = "Incorrect Username or Password";
         }
     }
     catch (Exception)
     {
         ReturnMessage.LoginColor = "Red";
         ReturnMessage.LoginMessage = "Unable to connect, Server status: Offline";
     }
 }