Esempio n. 1
0
 public frmSeriesControl(databaseController dbc, systemController sc, string opr)
 {
     this.opr = opr;
     this.DBC = dbc;
     this.SC  = sc;
     InitializeComponent();
 }
Esempio n. 2
0
 public frmViewImage(string imagePath, imageRecord IR, databaseController DBC, string opr)
 {
     this.opr         = opr;
     this.DBC         = DBC;
     ImageRecord      = IR;
     ContrastVal      = 0;
     BrightnessVal    = 0;
     bright_clicked   = false;
     contrast_clicked = false;
     ImgPro           = new imageProcessor(imagePath);
     ImgPath          = imagePath;
     InitializeComponent();
 }
Esempio n. 3
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            try
            {
                SC = new systemController(Application.StartupPath);
                int status = SC.Initialize();

                if (status == -1)
                {
                    Exception ex = new Exception("System failed to load some or all of its components !");
                }

                //Filling the lists of history and DB connections :
                fillHistoryList(SC.HistoryList);
                fillDBConnList(SC.DBConnectionList);

                //Connect to default connection
                DBC = new databaseController(
                    new System.Data.SqlClient.SqlConnection(SC.DefaultConnectionString));

                if (!DBC.Connect())
                {
                    Exception ex = new Exception("The default database connection is not valid !\nPlease select or add another connection string");
                }
                if (DBC.IsConnected)
                {
                    rbnMain.StatusBar.Text = rbnMain.StatusBar.Text + "connected.";
                    picLstResults.Items.Clear();
                    viewAllImages();
                }
                else
                {
                    rbnMain.StatusBar.Text = rbnMain.StatusBar.Text + "disconnected.";
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error Loading The System", MessageBoxButtons.OK, MessageBoxIcon.Error);
                if (DBC.IsConnected)
                {
                    rbnMain.StatusBar.Text = rbnMain.StatusBar.Text + "connected.";
                    picLstResults.Items.Clear();
                    viewAllImages();
                }
                else
                {
                    rbnMain.StatusBar.Text = rbnMain.StatusBar.Text + "disconnected.";
                }
            }
        }
    /*** double jump - powerup1
     *   triple coin - powerup2
     *   faster movement - powerup3
     *   extra life - powerup4
     ***/

    // Use this for initialization
    void Start()
    {
        scoresAdded = false;

        db       = FindObjectOfType <databaseController>();
        userName = "******";
        // Variable Setting
        life_count        = 3; // player life
        originalJumpSpeed = jumpSpeed;
        originalSpeed     = moveSpeed;
        beingCollected    = false;
        coins             = 0;
        CoinBoost         = false;
        GameOver.SetActive(false); // hide game over
        isSpeedBoost            = false;
        invincibleToSpikeDamage = false;


        // Get Components/Get Types
        myRigidbody       = GetComponent <Rigidbody2D>();
        MyLevelManager    = FindObjectOfType <LevelManager>();
        charaterKilling   = FindObjectOfType <KillEnemy>();
        checkPointChecker = FindObjectOfType <CheckPointController>();
        myAnim            = FindObjectOfType <Animator>();


        //Get history coins number
        totalCoins = PlayerPrefs.GetInt("totalcoins");

        if (PlayerPrefs.GetInt("hasPowerUp4") == 1)
        {
            life_count = 5;
        }

        //Get high score
        k         = FindObjectOfType <KillEnemy>();
        highScore = PlayerPrefs.GetInt("highscore");
    }
Esempio n. 5
0
 public frmPatiantControl(databaseController dbc, string opr)
 {
     this.opr = opr;
     this.DBC = dbc;
     InitializeComponent();
 }