Exemple #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            Text = "MOSA GDB Debugger v" + CompilerVersion.VersionString;

            dockPanel.SuspendLayout(true);
            dockPanel.DockTopPortion = 75;

            controlView.Show(dockPanel, DockState.DockTop);
            statusView.Show(controlView.PanelPane, DockAlignment.Right, 0.50);

            breakPointView.Show(dockPanel, DockState.DockBottom);
            watchView.Show(breakPointView.PanelPane, DockAlignment.Right, 0.50);

            displayView.Show(dockPanel, DockState.Document);
            outputView.Show(dockPanel, DockState.Document);

            //scriptView.Show(dockPanel, DockState.Document);
            registersView.Show(dockPanel, DockState.DockRight);
            stackFrameView.Show(registersView.Pane, DockAlignment.Bottom, 0.5);

            sourceView.Show(dockPanel, DockState.Document);
            sourceDataView.Show(dockPanel, DockState.Document);

            //stackFrameView.Show(dockPanel, DockState.DockRight);

            var memoryView = new MemoryView(this);

            memoryView.Show(dockPanel, DockState.Document);
            symbolView.Show(dockPanel, DockState.Document);

            instructionView.Show(symbolView.PanelPane, DockAlignment.Right, 0.35);
            methodView.Show(instructionView.PanelPane, instructionView);
            callStackView.Show(instructionView.PanelPane, DockAlignment.Bottom, 0.25);

            registersView.Show();

            dockPanel.ResumeLayout(true, true);

            CalculateVMHash();

            LauncherOptions.SerialConnectionOption = SerialConnectionOption.TCPServer;
            LauncherOptions.SerialConnectionPort   = 1250;

            if (LauncherOptions.ImageFile != null)
            {
                VMProcess = StartQEMU();
            }
            LoadDebugFile();
            if (LauncherOptions.AutoStart)
            {
                System.Threading.Thread.Sleep(3000);
                Connect();
            }

            LoadBreakPoints();
            LoadWatches();
        }
Exemple #2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            Text = "MOSA GDB Debugger v" + CompilerVersion.VersionString;

            dockPanel.SuspendLayout(true);
            dockPanel.Theme          = new VS2015DarkTheme();
            dockPanel.DockTopPortion = 88;

            controlView.Show(dockPanel, DockState.DockTop);
            statusView.Show(controlView.PanelPane, DockAlignment.Right, 0.50);

            breakPointView.Show(dockPanel, DockState.DockBottom);
            watchView.Show(breakPointView.PanelPane, DockAlignment.Right, 0.50);

            launchView.Show(dockPanel, DockState.Document);
            displayView.Show(dockPanel, DockState.Document);
            traceView.Show(dockPanel, DockState.Document);
            outputView.Show(dockPanel, DockState.Document);

            //scriptView.Show(dockPanel, DockState.Document);
            registersView.Show(dockPanel, DockState.DockRight);
            stackFrameView.Show(registersView.Pane, DockAlignment.Bottom, 0.5);

            sourceView.Show(dockPanel, DockState.Document);

            sourceDataView.Show(dockPanel, DockState.Document);

            var memoryView = new MemoryView(this);

            memoryView.Show(dockPanel, DockState.Document);

            symbolView.Show(dockPanel, DockState.Document);

            methodParametersView.Show(symbolView.PanelPane, DockAlignment.Right, 0.35);

            instructionView.Show(methodParametersView.PanelPane, DockAlignment.Bottom, 0.85);
            methodView.Show(instructionView.PanelPane, instructionView);

            callStackView.Show(instructionView.PanelPane, DockAlignment.Bottom, 0.25);

            registersView.Show();
            launchView.Show();

            dockPanel.ResumeLayout(true, true);

            if (ImageFile != null)
            {
                LaunchImage();
            }
        }
Exemple #3
0
        private void Registration_Click(object sender, EventArgs e)
        {
            var Register = new RegisterView();

            this.Hide();
            Register.Show();
        }
        private void RegisterButtonClick(object sender, RoutedEventArgs e)
        {
            RegisterView registerView = new RegisterView();

            registerView.Show();
            Close();
        }
Exemple #5
0
        private void register_btn_Click(object sender, RoutedEventArgs e)
        {
            RegisterView registerView = new RegisterView();

            registerView.Show();
            this.Close();
        }
        private void NewRegisterView(object sender, EventArgs e)
        {
            var t = new RegisterView("RegisterView");

            t.Show(dockPanel1, WeifenLuo.WinFormsUI.Docking.DockState.Float);
            myDocks.Add(t);
        }
Exemple #7
0
        private void registerButton_Click(object sender, EventArgs e)
        {
            RegisterView view = new RegisterView();

            view.Show();
            Hide();
        }
        private void btnRegister_Click(object sender, EventArgs e)
        {
            var next = new RegisterView();

            _user.Dispose();
            next.Show();
            this.Hide();
        }
Exemple #9
0
        private void Register()
        {
            Application.Current.Windows[Application.Current.Windows.Count - 1].Close();
            RegisterView view = new RegisterView();

            view.DataContext = new RegisterViewModel();
            view.Show();
        }
Exemple #10
0
        private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
        {
            var registerView = new RegisterView();

            registerView.UserCreate += OnUserCreate;
            registerView.Owner       = this;
            registerView.Show();
        }
        private void button2_Click_1(object sender, EventArgs e)
        {
            var registerView = new RegisterView();

            Hide();
            registerView.Show();
            Dispose();
        }
Exemple #12
0
        private void ShowRegisterWindow()
        {
            RegisterView      registerView      = new RegisterView();
            RegisterViewModel registerViewModel = new RegisterViewModel();

            registerView.DataContext = registerViewModel;
            registerView.Show();
        }
Exemple #13
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            dockPanel.SuspendLayout(true);
            dockPanel.DockTopPortion = 75;

            controlView.Show(dockPanel, DockState.DockTop);
            statusView.Show(controlView.PanelPane, DockAlignment.Right, 0.50);

            breakPointView.Show(dockPanel, DockState.DockBottom);
            watchView.Show(breakPointView.PanelPane, DockAlignment.Right, 0.50);

            displayView.Show(dockPanel, DockState.Document);
            outputView.Show(dockPanel, DockState.Document);

            //scriptView.Show(dockPanel, DockState.Document);
            registersView.Show(dockPanel, DockState.DockRight);

            //flagView.Show(dockPanel, DockState.DockRight);
            //stackView.Show(dockPanel, DockState.DockRight);
            stackFrameView.Show(dockPanel, DockState.DockRight);

            var memoryView = new MemoryView(this);

            memoryView.Show(dockPanel, DockState.Document);
            symbolView.Show(dockPanel, DockState.Document);

            instructionView.Show(symbolView.PanelPane, DockAlignment.Right, 0.35);
            methodView.Show(instructionView.PanelPane, instructionView);
            callStackView.Show(instructionView.PanelPane, DockAlignment.Bottom, 0.25);

            registersView.Show();

            dockPanel.ResumeLayout(true, true);

            if (Options.AutoConnect)
            {
                Connect();
            }

            if (Options.DebugInfoFile != null)
            {
                LoadDebugData.LoadDebugInfo(Options.DebugInfoFile, DebugSource);
            }
        }
Exemple #14
0
        private void RegisterBtn_Click(object sender, EventArgs e)
        {
            var myRegistration = new RegisterView(MyUser);

            myRegistration.Show();

            base.Close();

            this.Close();
        }
Exemple #15
0
 private void CloseExecute()
 {
     try
     {
         RegisterView registerView = new RegisterView();
         registerView.Show();
         view.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
        private void Register(object parameter)
        {
            if (parameter == null)
            {
                return;
            }
            var registration = new RegisterView {
                DataContext = new RegisterViewModel()
            };

            registration.Show();
            CloseWindow();
        }
Exemple #17
0
        public string OnRegister(string email, string user, string pass)
        {
            RegisterView view = new RegisterView();
            Validator validator = new Validator();

            // Validate the user input here.
            if (!validator.Make(new string[] { email, user, pass },
                new string[] { "email", "minLength:1", "minLength:8" },
                new string[] { "email", "username", "password" }))
            {
                return view.Error(validator.GetDetail());
            }

            UserRepository userRepo = new UserRepository();
            int result = userRepo.Register(email, user, pass, 0);

            return view.Show(result);
        }
        public string Store(string email, string user, string pass, int mode)
        {
            RegisterView view = new RegisterView();
            Validator validator = new Validator();

            // Validate the user input here.
            if (!validator.Make(new string[] { email, user, pass, mode + "" },
                new string[] { "email", "required", "required", "required" },
                new string[] { "email", "username", "password", "mode" }))
            {
                return view.Error(validator.GetDetail());
            }

            int result = userRepo.Register(email, user, pass, mode);

            return view.Show(result);
        }
        public LoginViewModel()
        {
            _playerManager = new PlayerManager();

            LoginCommand = new RelayCommand(param =>
            {
                Player player = new Player(Username, (param as PasswordBox)?.Password);
                Player        = _playerManager.Login(player);

                if (null == Player)
                {
                    MessageBox.Show("There are no players with given credentials in the database", "Login Error",
                                    MessageBoxButton.OK);
                }
                else
                {
                    if (null == Player.UserPicture)
                    {
                        player.UserPicture =
                            GetJpgFromImageControl(new BitmapImage(new Uri("../../Images/default.jpg",
                                                                           UriKind.Relative)));
                        Player = _playerManager.Edit(Player.Id, player);
                    }

                    AvatarPath = ByteToImage(Player.UserPicture);
                    LoginEvent?.Invoke(this, EventArgs.Empty);
                    App.CurrentApp.MainViewModel.Refresh();
                }
            },
                                            param => !string.IsNullOrEmpty(Username) &&
                                            !string.IsNullOrEmpty((param as PasswordBox)?.Password));

            ShowRegisterCommand = new RelayCommand(param =>
            {
                RegisterView registerView = new RegisterView();
                registerView.Show();
            });

            RegisterCommand = new RelayCommand(param =>
            {
                Player player = new Player(Username, (param as PasswordBox)?.Password)
                {
                    UserPicture = GetJpgFromImageControl(AvatarPath)
                };

                if (!_playerManager.Register(player))
                {
                    MessageBox.Show("Username already in use.\n Please, pick another.", "Register Error",
                                    MessageBoxButton.OK);
                }
                else
                {
                    Application.Current.Windows.OfType <RegisterView>().FirstOrDefault()?.Close();
                }
            });

            QuitCommand = new RelayCommand(param =>
            {
                Application.Current.Windows.OfType <RegisterView>().FirstOrDefault()?.Close();
                Application.Current.Windows.OfType <EditView>().FirstOrDefault()?.Close();
                AvatarPath = ByteToImage(Player.UserPicture);
            });

            EditCommand = new RelayCommand(param =>
            {
                Player player =
                    new Player(Username, (param as PasswordBox)?.Password)
                {
                    UserPicture = GetJpgFromImageControl(AvatarPath)
                };
                Player = _playerManager.Edit(Player.Id, player);

                App.CurrentApp.MainViewModel.Refresh();

                Application.Current.Windows.OfType <EditView>().FirstOrDefault()?.Close();
                AvatarPath = ByteToImage(Player.UserPicture);
            },
                                           param => !string.IsNullOrEmpty(Username) &&
                                           !string.IsNullOrEmpty((param as PasswordBox)?.Password));

            SelectAvatarCommand = new RelayCommand(param => { AvatarPath = GetUserPicture(); });
        }
Exemple #20
0
        private void CreateUser()
        {
            RegisterView view = new RegisterView();

            view.Show();
        }
Exemple #21
0
        /// <summary>
        /// Show the popup to register a new wallet
        /// </summary>
        /// <see cref="RegisterView"/>
        public void RegisterMethod()
        {
            var registerView = new RegisterView();

            registerView.Show();
        }
Exemple #22
0
 private void RegisterButtonClick(object sender, RoutedEventArgs e)
 {
     RegisterView registerView = new RegisterView();
     registerView.Show();
     Close();
 }