Example #1
0
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);
            this.args = args;

            nameLabel.Text = info.name;
        }
Example #2
0
 private void frm_PollPresenter_Closed(object sender, System.EventArgs e)
 {
     if (ClientUI.getInstance() != null)
     {
         ClientUI.getInstance().CloseMsg();
     }
 }
Example #3
0
        public override void OnStartLocalPlayer()
        {
            //Setup UI
            ClientUI clientUi = Instantiate(clientUiPrefab).GetComponent <ClientUI>();

            clientUi.SetupUI(playerManager);
            gameObject.AddComponent <PlayerUIManager>().Setup(clientUi);

            //Allows for custom messages
            gameObject.AddComponent <PlayerServerMessages>();

            base.OnStartLocalPlayer();

            //Set up scene stuff
            GameManager.GetActiveSceneCamera().SetActive(false);
            localCamera.enabled = true;
            localCamera.gameObject.AddComponent <AudioListener>();

            //Player Input
            gameObject.AddComponent <PlayerInput>().Setup(inputReader);

            //Lock the cursor
            Cursor.visible   = false;
            Cursor.lockState = CursorLockMode.Locked;
        }
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);
            if (!args.data.ContainsKey("COMPANY_INFO") || !(args.data["COMPANY_INFO"] is Database.StockCompanyInfo))
            {
                MessageBox.Show("Args doesn't contain COMPANY_INFO", "StockDirectQty::Init ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            companyInfo = (Database.StockCompanyInfo)(args.data["COMPANY_INFO"]);

            qty = Convert.ToUInt64(args.data["QTY"]);
            price = Convert.ToUInt64(args.data["PRICE"]);
            receiverInfo = (Database.ATMLoginInfo)(args.data["RECEIVER_INFO"]);

            wrongLabel.Hide();
            remainLabel.Hide();
            pinBox.Show();

            greetLabel.Text = welcomeString.Replace("NAMEHERE", receiverInfo.name);

            pinBox.Text = "";

            pinBox.Focus();
            pinBox.KeyDown += pinBox_KeyDown;
        }
Example #5
0
 private void clientListToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (ClientUI cUI = new ClientUI())
     {
         cUI.ShowDialog();
     }
 }
Example #6
0
        private void startSlideShow(object sender, WebMeeting.Client.ManageContent.DartbordEventArgs e)
        {
            if (e.CurrentStatus == "completed")
            {
                try
                {
                    //MessageBox.Show("==> manage content presentatiuon 400");

                    ClientUI.getInstance().ShareMyDocumentByContentManagement(e.UploadPath);
                    //	nCountOpenFiles=1;
                    //	this.flagToUnique=false;
                    //this.StopNavigation=false;
                }
                catch (Exception ex)
                {
                    MessageBox.Show("error downloading " + ex.ToString());
                }
            }
//			else
//			{
//				//nCountOpenFiles=1;
//				//this.flagToUnique=false;
//				//this.StopNavigation=false;
//			}
        }
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);

            amountBox.KeyDown += new KeyEventHandler(amountBox_KeyDown);
            Init2();
        }
    private void _ShowWinningTeam()
    {
        m_winningTeamFrame.gameObject.SetActive(true);
        m_summaryTableFrame.gameObject.SetActive(false);
        ServerUI.Hide();
        ClientUI.Hide();

        int humanScore = Team.humanTeam.score;
        int robotScore = Team.robotTeam.score;

        string displayedScore = "";

        if (humanScore > robotScore)
        {
            m_winningTeamFrame.texture = m_humansWinFrame;
            displayedScore             = humanScore.ToString() + " - " + robotScore.ToString();
        }
        else if (robotScore > humanScore)
        {
            m_winningTeamFrame.texture = m_robotsWinFrame;
            displayedScore             = robotScore.ToString() + " - " + humanScore.ToString();
        }
        else
        {
            m_winningTeamFrame.texture = m_equalityFrame;
            displayedScore             = robotScore.ToString() + " - " + humanScore.ToString();
        }

        m_scoreDisplay.text = displayedScore;
    }
Example #9
0
 private void Awake()
 {
     _navMeshAgent         = GetComponent <NavMeshAgent>();
     _navMeshAgent.enabled = true;
     _targets  = new Queue <ClientInteractable>();
     _clientUI = GetComponent <ClientUI>();
 }
Example #10
0
        /// <summary>
        /// Discards selected changes from the selected project.
        /// </summary>
        public void Discard(string[] files)
        {
            if (CheckProjects())
            {
                return;
            }

            ClientUI.ShowProgress("Discarding...");

            try
            {
                var diffs  = CurrentProject.BuildDiff();
                var diff   = diffs.Where(file => files.Any(x => x == file.FileName)).ToList();
                var commit = Commit.FromDiff(diff.ToArray());

                CurrentProject.Discard(commit.Files,
                                       x =>
                {
                    ClientUI.SetProgress("Discarding " + diff.Count + " change(s). " + x);
                });
            }
            catch (Exception ex)
            {
                ClientUI.ShowMessage("Error when discarding, no changes were discared, message: <br>" + ex.Message, true);
            }

            ClientUI.HideProgress();

            ClientUI.ShowProgress("Discarding done! Loading...");
            CurrentProject.Refresh(delegate
            {
                UpdateView();
                ClientUI.HideProgress();
            });
        }
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);

            if (!args.data.ContainsKey("COMPANY_INFO") || !(args.data["COMPANY_INFO"] is Database.StockCompanyInfo))
            {
                MessageBox.Show("Args doesn't contain COMPANY_INFO", "StockDirectQty::Init ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            companyInfo = (Database.StockCompanyInfo)(args.data["COMPANY_INFO"]);

            qty = Convert.ToUInt64(args.data["QTY"]);
            price = Convert.ToUInt64(args.data["PRICE"]);
            receiverInfo = (Database.ATMLoginInfo)(args.data["RECEIVER_INFO"]);

            senderLabel.Text = info.name;
            receiverLabel.Text = receiverInfo.name;
            companyLabel.Text = companyInfo.key + " " + companyInfo.name;
            qtyLabel.Text = Convert.ToString(qty);
            decimal dollarPrice = (decimal)price / 100;
            priceLabel.Text = dollarPrice.ToString("N");

            infoLabel.Text = infoString;
            infoLabel.ForeColor = Color.White;

            ready = true;
        }
Example #12
0
        /// <summary>
        /// Pulls all changes on the selected project.
        /// </summary>
        public void Pull()
        {
            if (CheckProjects())
            {
                return;
            }

            try
            {
                ClientUI.ShowProgress("Pulling changes...");
                CurrentProject.Pull(x =>
                {
                    ClientUI.SetProgress("Pulling..." + x);
                });
                ClientUI.HideProgress();

                ClientUI.ShowProgress("Pulling done! Loading...");
                CurrentProject.Refresh(delegate
                {
                    UpdateView();
                    ClientUI.HideProgress();
                });
            }
            catch (WarningException ex)
            {
                ClientUI.HideProgress();
                ClientUI.ShowMessage(ex.Message);
            }
            catch (Exception ex)
            {
                ClientUI.HideProgress();
                ClientUI.ShowMessage("Error when pulling, no changes were pulled, message: <br>" + ex.Message, true);
            }
        }
        public override void OnStartLocalPlayer()
        {
            //Setup UI
            ClientUI clientUi = Instantiate(clientUiPrefab).GetComponent <ClientUI>();

            clientUi.SetupUI(playerManager);
            gameObject.AddComponent <PlayerUIManager>().Setup(clientUi);

            //Allows for custom messages
            gameObject.AddComponent <PlayerServerMessages>();

            foreach (MeshRenderer gfxMesh in gfxMeshes)
            {
                gfxMesh.enabled = false;
            }

            //Set up scene stuff
            playerVCam.enabled = true;

            //Player Input
            gameObject.AddComponent <PlayerInputManager>().Setup();

            //Lock the cursor
            Cursor.visible   = false;
            Cursor.lockState = CursorLockMode.Locked;
        }
 private void listEvaluation_DoubleClick(object sender, System.EventArgs e)
 {
     if (listEvaluation.SelectedItems.Count < 1)
     {
         return;
     }
     ClientUI.getInstance().ExecuteEvaluation(listEvaluation.SelectedItems[0].Index);
 }
Example #15
0
 private void listWebPolls_DoubleClick(object sender, System.EventArgs e)
 {
     if (listWebPolls.SelectedItems.Count < 1)
     {
         return;
     }
     ClientUI.getInstance().ExecuteWebPoll(listWebPolls.SelectedItems[0].Index);
 }
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);

            if (args.data.ContainsKey("PERSON_INFO"))
            {
                info = (Database.ATMLoginInfo)args.data["PERSON_INFO"];
            }
        }
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);
            infoLabel.Text = "";
            tickerBox.Text = "";
            stockInfo = null;

            tickerBox.Enabled = true;
        }
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);
            existingRequests = new DataTable();
            getDatabase().currentCyclePersonRequests(info.id, existingRequests);

            DataTable showTable = new DataTable();
            showTable.Columns.Add("ID", Type.GetType("System.UInt64"));
            showTable.Columns.Add("TICKER");
            showTable.Columns.Add("OPERATION");
            showTable.Columns.Add("QTY", Type.GetType("System.UInt64"));
            showTable.Columns.Add("PRICE");

            foreach (DataRow row in existingRequests.Rows)
            {
                String op;
                if (Convert.ToString(row["OPERATION"]) == "B")
                    op = "ПОКУПКА";
                else
                    op = "ПРОДАЖА";

                UInt64 qty = Convert.ToUInt64(row["QTY"]);
                UInt64 quote = Convert.ToUInt64(row["QUOTE"]);

                String price = moneyToString(qty*quote);

                showTable.Rows.Add(row["ID"], row["TICKER"], op, row["QTY"], price);
            }

            requestsView.DataSource = showTable;
            requestsView.Refresh();
            requestsView.Columns["ID"].Visible = false;

            noRequestsLabel.Visible = (existingRequests.Rows.Count == 0);

            lastCycle = new DataTable();
            getDatabase().fillWithCycleInfoAndQuotes(1, lastCycle);

            DateTime now = getDatabase().now();

            if (lastCycle.Rows.Count <= 0)
            {
                newRequestLabel.Visible = false;
                deleteRequestLabel.Visible = false;
            }
            else
            {
                DateTime start = Convert.ToDateTime(lastCycle.Rows[0]["START_TIME"]);
                DateTime border1 = Convert.ToDateTime(lastCycle.Rows[0]["BORDER1_TIME"]);
                DateTime border2 = Convert.ToDateTime(lastCycle.Rows[0]["BORDER2_TIME"]);
                DateTime finish = Convert.ToDateTime(lastCycle.Rows[0]["FINISH_TIME"]);

                newRequestLabel.Visible = (now >= start) && (now < border2);
                deleteRequestLabel.Visible = (now >= start) && (now < border1) && (showTable.Rows.Count > 0);
            }
        }
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);
            infoLabel.Text = "";
            tickerBox.Text = "";
            stockInfo = null;
            lastCycle = (DataTable)args.data["CYCLE"];

            tickerBox.Enabled = true;
        }
Example #20
0
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            if (!args.data.ContainsKey("PERSON_INFO") || !(args.data["PERSON_INFO"] is Database.FullPersonInfo))
            {
                MessageBox.Show("Args doesn't contain PERSON_INFO", "ATMPinCode::Init ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            info = (Database.FullPersonInfo)(args.data["PERSON_INFO"]);
        }
Example #21
0
        // private
        private bool CheckProjects()
        {
            if (CurrentProject == null || AllProjects.Count == 0)
            {
                ClientUI.ShowMessage("You have no any project, create or open new one.", true);
                return(true);
            }

            return(false);
        }
Example #22
0
 /// <summary>
 /// old code not used Now
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void listWebPresentations_DoubleClick(object sender, System.EventArgs e)
 {
     if (listWebPresentations.SelectedItems.Count < 1)
     {
         return;
     }
     if ((MessageBox.Show("Do you want to Execute the WebPresentation", "WebMeeting", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes))
     {
         ClientUI.getInstance().ExecuteWebPresentation(listWebPresentations.SelectedItems[0].Index);
     }
 }
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);

            DataRow row = (DataRow)args.data["ROW"];
            reqId = Convert.ToUInt64(row["ID"]);
            ticker = Convert.ToString(row["TICKER"]);
            operation = Convert.ToString(row["OPERATION"]);
            qty = Convert.ToUInt64(row["QTY"]);
            quote = Convert.ToUInt64(row["QUOTE"]);
        }
 public override void Init(ClientUI.UserObjectEventArgs args)
 {
     base.Init(args);
     searchString = Convert.ToString(args.data["SEARCH_STRING"]);
     DataTable table = new DataTable();
     getDatabase().searchInfo(searchString, table);
     baseTableView.DataSource = table;
     baseTableView.Columns["ID"].Width = 100;
     baseTableView.Columns["NAME"].Width = 200;
     baseTableView.Refresh();
 }
Example #25
0
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);
            infoLabel.Text = "";
            qtyBox.Text = "";
            stockInfo = null;
            lastCycle = (DataTable)args.data["CYCLE"];
            stockInfo = (Database.StockCompanyInfo)args.data["COMPANY_INFO"];

            qtyBox.Enabled = true;
        }
Example #26
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Debug.Log("Instance already exists, destroying");
         Destroy(this);
     }
 }
Example #27
0
        /// <summary>
        /// Pueshes selected changes from the selected project.
        /// </summary>
        public void Push(string[] files)
        {
            if (CheckProjects())
            {
                return;
            }

            if (files.Length == 0)
            {
                ClientUI.ShowMessage("No file changes selected, select some.");
                return;
            }

            try
            {
                ClientUI.ShowProgress("Building commit...");

                var diffs = CurrentProject.BuildDiff();
                var diff  = diffs.Where(file => files.Any(x => x == file.FileName)).ToList();

                if (diff.Count == 0)
                {
                    ClientUI.ShowMessage("No file changes selected, select some.");
                    return;
                }

                var commit   = Commit.FromDiff(diff.ToArray());
                var datafile = commit.Build(CurrentProject.RootDir, CurrentProject.RootDir + ".mysync\\commit.zip",
                                            x =>
                {
                    ClientUI.SetProgress("Building commit... " + x);
                });
                ClientUI.SetProgress("Pushing " + diff.Count + " change(s).");
                CurrentProject.Push(commit, datafile,
                                    x =>
                {
                    ClientUI.SetProgress("Pushing " + diff.Count + " change(s). " + x);
                });
                ClientUI.HideProgress();

                ClientUI.ShowProgress("Push done! Loading...");
                CurrentProject.Refresh(delegate
                {
                    UpdateView();
                    ClientUI.HideProgress();
                });
            }
            catch (Exception ex)
            {
                ClientUI.HideProgress();
                ClientUI.ShowMessage("Error when pushing, no changes were pushed, message: <br>" + ex.Message, true);
            }
        }
Example #28
0
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);

            newsTable = new DataTable();
            moveTimer.Interval = 50;
            moveTimer.Tick += new EventHandler(moveTimer_Tick);
            moveTimer.Start();

            InitiallyCreateItems();
            InitiallyShowItems();
        }
Example #29
0
        public MapClient(ClientUI ui)
        {
            //this.ui=ui;
            //mapClient=this;
            //try {
            //     ServerSocket socket=new ServerSocket(monPort);
            //    new Thread(){
            //        public void run(){
            //            try {
            //                socket.accept();
            //            } catch (IOException e) {
            //                e.printStackTrace();
            //                System.exit(0);
            //            }
            //        }
            //    }.start();
            //} catch (Exception e) {
            //    //e.printStackTrace();
            //    //System.exit(0);
            //}
            //try {
            //    route_tcp = new Route(null,routePort,Route.mode_client,true);
            //} catch (Exception e1) {
            //    //e1.printStackTrace();
            //    throw e1;
            //}
            //try {
            //    route_udp = new Route(null,routePort,Route.mode_client,false);
            //} catch (Exception e1) {
            //    //e1.printStackTrace();
            //    throw e1;
            //}
            //netStatus=new NetStatus();

            //portMapManager=new PortMapManager(this);

            //clientUISpeedUpdateThread=new Thread(){
            //    public void run(){
            //        while(true){
            //            try {
            //                Thread.sleep(500);
            //            } catch (InterruptedException e1) {
            //                e1.printStackTrace();
            //            }
            //            updateUISpeed();
            //        }
            //    }
            //};
            //clientUISpeedUpdateThread.start();

            //Route.addTrafficlistener(this);
        }
Example #30
0
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);

            if (!args.data.ContainsKey("RECV_INFO") || !(args.data["RECV_INFO"] is Database.ATMLoginInfo))
            {
                MessageBox.Show("Args doesn't contain RECV_INFO", "ATMAmount::Init ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            recvInfo = (Database.ATMLoginInfo)(args.data["RECV_INFO"]);

            amountBox.KeyDown += new KeyEventHandler(amountBox_KeyDown);
            Init2();
        }
Example #31
0
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);

            wrongLabel.Hide();
            remainLabel.Hide();
            pinBox.Show();

            greetLabel.Text = welcomeString.Replace("NAMEHERE", info.name);

            pinBox.Text = "";

            pinBox.Focus();
            pinBox.KeyDown += pinBox_KeyDown;
        }
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);

            if (!args.data.ContainsKey("COMPANY_INFO") || !(args.data["COMPANY_INFO"] is Database.StockCompanyInfo))
            {
                MessageBox.Show("Args doesn't contain COMPANY_INFO", "StockDirectQty::Init ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            companyInfo = (Database.StockCompanyInfo)(args.data["COMPANY_INFO"]);
            companyLabel.Text = companyInfo.key + ": " + companyInfo.name;

            qtyBox.Text = "";
            infoLabel.Text = "";
        }
Example #33
0
        /// <summary>
        /// Loads all available projects and selects last opened project.
        /// </summary>
        public void LoadAll()
        {
            ClientUI.ShowProgress("Loading...");

            if (File.Exists("client.json"))
            {
                var config = JsonConvert.DeserializeObject <ClientSettings>(File.ReadAllText("client.json"));

                var done = 0;
                foreach (var project in config.Projects)
                {
                    var projInst = Project.OpenWorkingCopy(project.Address, project.Name, project.RootDir);
                    projInst.Authority = new ProjectAuthority
                    {
                        ProjectName = project.Name,
                        Username    = project.Username,
                        AccessToken = PasswordHasher.Hash(project.Username, project.Password)
                    };

                    Javascript.Run("addProject('" + project.Name + "');");

                    projInst.Refresh(delegate
                    {
                        var diff = projInst.BuildDiff();

                        Javascript.Run("setChangeCount('" + project.Name + "', " + diff.Length + ");");

                        AllProjects.Add(projInst);

                        done++;

                        if (done == config.Projects.Length)
                        {
                            // select
                            if (!string.IsNullOrEmpty(config.Selected))
                            {
                                Select(config.Selected); // this will also hide the progress
                            }
                            else
                            {
                                ClientUI.HideProgress();
                            }
                        }
                    });
                }
            }
        }
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);
            searchString = Convert.ToString(args.data["SEARCH_STRING"]);
            infoAboutId = Convert.ToUInt64(args.data["INFO_ABOUT"]);

            String codeString = Convert.ToString(infoAboutId);
            int len = codeString.Length;
            for (int i = 0; i < 13 - len; ++i)
            {
                codeString = "0" + codeString;
            }

            String countryCode = codeString.Substring(0, 2);
            String manCode = codeString.Substring(2, 5);
            String prodCode = codeString.Substring(7, 5);
            String checkSum = codeString.Substring(12);
            Ean13Barcode2005.Ean13 ean13 =
                new Ean13Barcode2005.Ean13(countryCode, manCode, prodCode, checkSum);
            ean13.Scale = 2.0F;
            Bitmap bmp = ean13.CreateBitmap();
            Rectangle rect = new Rectangle(0, 95, 270, 100);
            Bitmap cropped = bmp.Clone(rect, bmp.PixelFormat);
            pictureBox.Image = cropped;

            Database.FullPersonInfo fpInfo = getDatabase().getPersonInfo(infoAboutId);
            DataTable table = new DataTable();
            getDatabase().fillWithPoliceProperties(infoAboutId, table);
            baseTableView.DataSource = table;
            baseTableView.Columns["ID"].Visible = false;
            baseTableView.Columns["NAME"].Width = 200;

            codeBox.Text = Convert.ToString(infoAboutId);
            nameBox.Text = fpInfo.name;
            switch (fpInfo.gender)
            {
                case Database.FullPersonInfo.Gender.Male:
                    genderBox.Text = "Мужской";
                    break;
                case Database.FullPersonInfo.Gender.Female:
                    genderBox.Text = "Женский";
                    break;
                default:
                    genderBox.Text = "Неизвестно";
                    break;
            }
        }
Example #35
0
        /// <summary>
        /// Selects project by name, also refreshes the files changes.
        /// </summary>
        /// <param name="projectName">The project name.</param>
        /// <param name="callback">Is this javascript callback?</param>
        /// <param name="refresh">Refresh the project?</param>
        public void Select(string projectName, bool callback = false, bool refresh = true)
        {
            try
            {
                ClientUI.ShowProgress("Loading...");

                // select
                CurrentProject = AllProjects.FirstOrDefault(project => project.ProjectName == projectName);

                if (CurrentProject == null)
                {
                    ClientUI.ShowMessage("Failed to select project '" + projectName + "', invalid project name!", true);
                    return;
                }

                if (!callback)
                {
                    Javascript.Run("selectProject('" + projectName + "', false);");
                }

                if (refresh)
                {
                    CurrentProject.Refresh(delegate
                    {
                        var diff    = CurrentProject.BuildDiff();
                        var filesJs = diff.Aggregate("", (current, file) => current + ("addFileChange('" + file.FileName + "', " + (int)file.DiffType) + ");");

                        Javascript.Run(filesJs);
                        Javascript.Run("setChangeCount('" + CurrentProject.ProjectName + "', " + diff.Length + ");");
                        ClientUI.HideProgress();
                    });
                }
            }
            catch
            {
                if (refresh)
                {
                    ClientUI.HideProgress();
                }

                ClientUI.ShowMessage("Failed to select project '" + projectName + "'!", true);
            }
        }
Example #36
0
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);
            decimal inDollars = (decimal)info.balance / 100;

            balanceLabel.Text = "$" + inDollars.ToString("N");

            DataTable table = new DataTable();
            getDatabase().fillSharesByPerson(info.id, table);

            foreach (DataRow row in table.Rows)
            {
                System.Console.WriteLine(Convert.ToString(row["TICKER"]) + ": " + Convert.ToString(row["SHARE"]));
            }

            dataGridView.DataSource = table;
            dataGridView.Refresh();
            dataGridView.Columns["NAME"].Visible = false;
        }
Example #37
0
        public void FindParticipents(string strText)
        {
            listParticipents.Items.Clear();
            ArrayList list = ClientUI.getInstance().arrayParticipents;
            bool      isParticipentExist = false;

            for (int i = 0; i < list.Count; i++)
            {
                ClientProfile profile = (ClientProfile)list[i];
                if (profile.Name.ToLower().IndexOf(strText.ToLower()) != -1)
                {
                    string strTemp = "";
                    if (profile.clientType == ClientType.ClientAttendee)
                    {
                        strTemp = "Attendee";
                    }
                    else if (profile.clientType == ClientType.ClientHost)
                    {
                        strTemp = "Host";
                    }
                    else if (profile.clientType == ClientType.ClientPresenter)
                    {
                        strTemp = "Presenter";
                    }

                    ListViewItem lv = listParticipents.Items.Add(strTemp);
                    lv.UseItemStyleForSubItems = false;
                    lv.SubItems.Add(profile.Name);
                    lv.SubItems.Add("");                    //.BackColor = profile.m_MoodIndicatorColor;
                    lv.SubItems.Add("");                    //.BackColor = profile.m_AssignedColor;
                    isParticipentExist = true;
                }
            }

            if (!isParticipentExist)
            {
                ListViewItem lv = listParticipents.Items.Add(" ");
                lv.UseItemStyleForSubItems = false;
                lv.SubItems.Add("Nothing matching");
            }
        }
Example #38
0
    public void ShowPlayScene()
    {
        m_playScene.SetActive(true);
        m_lobbyScene.SetActive(false);

        m_playersCameras.SetActive(NetworkClient.active);
        foreach (Camera camera in m_serverCameras)
        {
            camera.gameObject.SetActive(NetworkServer.active);
        }
        ClientUI.ShowClientUI(NetworkClient.active);
        SnooperUI.ShowSnooperPlayUI(NetworkClient.active);

        if (NetworkServer.active)
        {
            m_lobbyDiscovery.StopBroadcast();
            ServerUI.ShowServerUI(true);
            RoundManager.StartRound();
            TrapManager.StartSpawningTrap();
            GalaxyAudioPlayer.PlayMainAmbiance();
        }
    }
Example #39
0
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);

            bar.Visible = true;

            sessionId = Convert.ToUInt64(args.data["SESSION_ID"]);
            questionId = Convert.ToUInt64(args.data["QUESTION_ID"]);
            questionNum = Convert.ToUInt64(args.data["QUESTION_NUM"]);
            value = Convert.ToInt16(args.data["VALUE"]);
            middle = Convert.ToDouble(args.data["MIDDLE"]);
            qText = Convert.ToString(args.data["QUESTION_TEXT"]);

            nameLabel.Text = info.name;
            questionNumLabel.Text = "Вопрос №" + Convert.ToString(questionNum);
            questionText.Text = "Текст вопроса: " + qText;

            waitingTimer.Start();

            statusLabel.Text = "Ждём ответа";
            answerText.Text = "";
            answerInfo = null;
        }
Example #40
0
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);

            bar.Visible = true;

            sessionId = Convert.ToUInt64(args.data["SESSION_ID"]);
            value = Convert.ToInt16(args.data["VALUE"]);
            middle = Convert.ToDouble(args.data["MIDDLE"]);

            //bar.RealValue = Math.Abs(value);
            bar.Shaking = true;

            nameLabel.Text = info.name;

            DataTable table = new DataTable();
            getDatabase().fillWithQuestionsForGender(table, info.gender, sessionId);
            questionNum = getDatabase().questionNumberForSession(sessionId);
            questionNumLabel.Text = "Вопрос №" + Convert.ToString(questionNum + 1);
            bindingSource.DataSource = table;
            dataGridView.Columns[0].Visible = false;
            dataGridView.AutoResizeRows();
        }
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);

            lastCycle = (DataTable)args.data["CYCLE"];
            stockInfo = (Database.StockCompanyInfo)args.data["COMPANY_INFO"];
            qty = Convert.ToUInt64(args.data["QTY"]);

            foreach (DataRow row in lastCycle.Rows)
            {
                String ticker = Convert.ToString(row["TICKER"]);
                if (ticker == stockInfo.key)
                {
                    quote = Convert.ToUInt64(row["QUOTE"]);
                    break;
                }
            }

            infoLabel.Text = stockInfo.key + ", " + Convert.ToString(qty) + "\rкотировка $" +
                moneyToString(quote) + "\rСумма: $" + moneyToString(quote*qty);

            resultLabel.Text = "";
        }
Example #42
0
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);
            bar.Shaking = false;
            bar.Visible = false;

            int value = Convert.ToInt16(args.data["VALUE"]);
            if (value > 0)
            {
                if (value > 50)
                    value = 50;
                progressBarA.Value = 0;
                progressBarH.Value = value * 2;
            }
            else
            {
                if (value < -50)
                    value = -50;
                progressBarA.Value = -value * 2;
                progressBarH.Value = 0;
            }

            nameLabel.Text = info.name;
        }
Example #43
0
 //-------------------------------------------------
 public override void Init(ClientUI.UserObjectEventArgs args)
 {
     infoLabel.Text = "";
     bar.Visible = false;
 }
Example #44
0
 private void Awake()
 {
     s_singleton = this;
 }
Example #45
0
 private void btnCloseDeskShare_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
 {
     ClientUI.getInstance().CloseEntireDeskHostToClient(true);
     this.Close();
 }
 public override void Init(ClientUI.UserObjectEventArgs args)
 {
     base.Init(args);
     stockWidget.Retrieve();
 }
 public override void Init(ClientUI.UserObjectEventArgs args)
 {
     //base.Init(args);
     infoLabel.Text = "";
     codeBox.Text = "";
 }
    void Awake()
    {
        ClientUI myUI = gameObject.GetComponent <ClientUI> ();

        Mission = gameObject.GetComponent <MissionData> ();
    }
    static void Main(string[] args)
    {
        ClientObject co = new ClientObject();
        string myIpAddress = co.GetClientIpAdress();

        HttpChannel chnl = new HttpChannel(null, new XmlRpcClientFormatterSinkProvider(), null);
        ChannelServices.RegisterChannel(chnl, false);

        _localProxy = XmlRpcHelper.Connect("localhost");

        _currentMasterUrl = _localProxy.getIpMaster(myIpAddress);
        _masterProxy = XmlRpcHelper.Connect(_currentMasterUrl);

        try
        {
            // ====== Begin client input ======
            string input;
            ClientUI clientUi = new ClientUI();

            do
            {
                clientUi.DisplayMainMenu(myIpAddress);
                input = Console.ReadLine();
                switch (input)
                {
                    case "1":
                        // Menu 1: Show master hashmap.
                        // localProxy.checkMasterStatus();

                        XmlRpcStruct masterMap = _masterProxy.getMachines(myIpAddress);

                        Dictionary<int, string> networkHashMap = Helper.ConvertObjToDict(masterMap);

                        Console.WriteLine("The Masternode hashmap");
                        foreach (KeyValuePair<int, string> networkNode in networkHashMap)
                        {
                            Console.WriteLine("Priority {0} : {1}", networkNode.Key, networkNode.Value);
                        }

                        Console.ReadKey();
                        break;

                    case "2":
                        // Menu 2: Show local hashmap.
                        // localProxy.checkMasterStatus();

                        XmlRpcStruct localMap = _localProxy.getMachines(myIpAddress);

                        Dictionary<int, string> localhostHashMap = Helper.ConvertObjToDict(localMap);

                        Console.WriteLine("The localnode hashmap");
                        foreach (KeyValuePair<int, string> localNode in localhostHashMap)
                        {
                            Console.WriteLine("Priority {0} : {1}", localNode.Key, localNode.Value);
                        }
                        Console.ReadKey();
                        break;

                    case "3":
                        // Menu 3: Get Master Ip.
                        //localProxy.checkMasterStatus();

                        string result = _localProxy.getIpMaster(myIpAddress);
                        Console.WriteLine("the masterNode is {0}", result);
                        Console.ReadKey();
                        break;

                    case "4":
                        //Menu 4: do election.
                        // masterProxy.checkMasterStatus();

                        Console.WriteLine("Election held!!!");

                        string newMaster = _localProxy.leaderElection(myIpAddress);
                        //string newMasterIp = localProxy.getIpMaster(ipAddress);

                        Console.WriteLine("The new masternode is {0}", newMaster);
                        Console.ReadKey();
                        break;

                    case "5":
                        // Menu 5: Ricart Agrawala Exlusion.
                        StartMutualExclusion(false);
                        Console.ReadKey();
                        break;

                    case "6":
                        // Menu 6: Test Mutual Exclusion.
                        StartMutualExclusion(true);
                        Console.ReadKey();
                        break;

                    case "0":
                        // exit
                        break;

                    default:
                        Console.WriteLine("Invalid command. Please re-enter the command.");
                        Console.ReadKey();
                        break;
                }
            }
            while (input != "0");

            Console.WriteLine("Ending the client session.");
            Console.ReadKey();
        }
        catch (XmlRpcFaultException fex)
        {
            Console.WriteLine("Fault response {0} {1} {2}",
                fex.FaultCode, fex.FaultString, fex.Message);
            Console.ReadLine();
        }
        // ===========End of Client Input================
    }
Example #50
0
 public override void Init(ClientUI.UserObjectEventArgs args)
 {
     base.Init(args);
 }
Example #51
0
 private void Awake()
 {
     hand = GetComponent <ClientHand>();
     ui   = GetComponent <ClientUI>();
 }
 public override void Init(ClientUI.UserObjectEventArgs e)
 {
     infoLabel.Text = "";
     infoLabel.ForeColor = Color.White;
     info = null;
     ready = true;
 }
Example #53
0
 private void RpcStartMainPhase(int seconds)
 {
     ClientUI.StartTimer(seconds);
 }
        public override void Init(ClientUI.UserObjectEventArgs args)
        {
            base.Init(args);

            if (!args.data.ContainsKey("COMPANY_INFO") || !(args.data["COMPANY_INFO"] is Database.StockCompanyInfo))
            {
                MessageBox.Show("Args doesn't contain COMPANY_INFO", "StockDirectQty::Init ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            companyInfo = (Database.StockCompanyInfo)(args.data["COMPANY_INFO"]);
            //companyLabel.Text = companyInfo.key + ": " + companyInfo.name;

            qty = Convert.ToUInt64(args.data["QTY"]);
            price = Convert.ToUInt64(args.data["PRICE"]);

            ready = true;
            infoLabel.Text = "";
            infoLabel.ForeColor = Color.White;
        }
Example #55
0
 static void Main()
 {
      aForm = new ClientUI();
      aForm.Show();
 }
Example #56
0
        public void ShowContentPage()
        {
            //string str=@"C:/webshare.html";
            // commented by Zaeem as it shd pass the Host id for the meeting
            //string str = Info.getInstance().WebsiteName + "/application/contentlibrary.php?meetingid=" + NetworkManager.getInstance().profile.ConferenceID + "&mid=" + NetworkManager.getInstance().profile.ClientRegistrationId;
            // the line below is the modified line of the above , it will send the Host id
            string str  = Info.getInstance().WebsiteName + "/application/contentlibrary.php?meetingid=" + NetworkManager.getInstance().profile.ConferenceID + "&mid=" + ClientUI.getInstance().GetHostId_Registration();
            object oUrl = str;
            object o    = new object();

            axWebBrowser1.Visible = true;
            axWebBrowser1.Navigate2(ref oUrl, ref o, ref o, ref o, ref o);
        }
 /// <summary>
 ///     Sets up <see cref="PlayerUIManager" />
 /// </summary>
 /// <param name="clientUI"></param>
 public void Setup(ClientUI clientUI)
 {
     ui = clientUI;
     GetComponent <PlayerManager>().PlayerDamaged += OnPlayerDamaged;
     GetComponent <WeaponManager>().WeaponUpdated += OnWeaponUpdated;
 }
Example #58
0
        private void axWebBrowser1_TitleChange(object sender, AxSHDocVw.DWebBrowserEvents2_TitleChangeEvent e)
        {
            System.Windows.Forms.SaveFileDialog SvgFileDia = new SaveFileDialog();
            string str      = (string )e.text;
            string filePath = e.text;

            if (strOpenedPage == "")
            {
                return;
            }
            if (locktoexecute == true)
            {
                return;
            }
            //MessageBox.Show(str);
            if ((filePath.IndexOf("&") < 0 && filePath.IndexOf(".php") < 0))             //&&  nCountOpenFiles==2)
            {
                //MessageBox.Show(strOpenedPage,"CompassNav");
                if (strOpenedPage == "dmquestion")
                {
                    changeTitleofPage();
                    Client.ClientUI.getInstance().CreateNewPollingWindowFrmMangeContent(null, null, false, str);
                    return;
                }
                else if (strOpenedPage == "webshare")
                {
                    changeTitleofPage();
                    Client.ClientUI.getInstance().shareBrowserForWebFiles(str);
                    return;
                }
                else if (strOpenedPage == "uploads")
                {
                    changeTitleofPage();
                    SvgFileDia.FileName = System.IO.Path.GetFileName(str);
                    if (SvgFileDia.ShowDialog() == DialogResult.OK)
                    {
                        if (SvgFileDia.CheckPathExists)
                        {
                            WebMeeting.Client.ManageContent.frmDownloader frm = new WebMeeting.Client.ManageContent.frmDownloader(filePath, SvgFileDia.FileName);
                            frm.Show();
                        }
                    }
                    return;
                }


                string fileName = filePath.Substring(filePath.LastIndexOf("/") + 1);
                nCountOpenFiles = 0;
                changeTitleofPage();
                //string uploadPath = WebMeeting.Client.DocumentSharingEx.createUploadFullPath_MangCont(fileName);
                try
                {
//					WebMeeting.Client.ManageContent.frmDownloader frm=new WebMeeting.Client.ManageContent.frmDownloader(filePath ,uploadPath,true);
//					frm.DownComp +=new WebMeeting.Client.ManageContent.DownloadingComplete(this.startSlideShow);
//					frm.TopMost=true;
//					frm.Owner=ClientUI.getInstance();
//					frm.ShowDialog();
                    prevFileName = filePath;
                    //MessageBox.Show(filePath);
                    ClientUI.getInstance().ShareMyDocumentByContentManagement(filePath);
                    filePath = filePath.Substring(filePath.LastIndexOf("/") + 1);
                }
                catch (Exception exp)
                {
                    //frmDownload.Close();
                    WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("ManageContents ===>ManageContentWebPresentation.cs line==> 458", exp, "Error downloading " + exp.Message.ToString(), true);
                }

                //					filePath = filePath.Substring( filePath.LastIndexOf("/")+1 );
                //
                //					//MessageBox.Show("sharing: " + Application.StartupPath + "\\Downloaded\\" + fileName);
                //					//ClientUI.getInstance().ShareMyDocumentByContentManagement(filePath);
                //					ClientUI.getInstance().ShareMyDocumentByContentManagement(uploadPath);
            }
            else
            {
                //		if(nCountOpenFiles==2)nCountOpenFiles=0;
                //		nCountOpenFiles+=1;
            }
            flagToUnique = !flagToUnique;
            //}

            //flagToUnique = !flagToUnique ;
        }
Example #59
0
 public void Updateprogress()
 {
     ClientUI.getInstance().fromdb_to_Upload();
 }