Exemplo n.º 1
0
 public void WriteLog(string @string)
 {
     if (null != @string)
     {
         StatusBox.AppendText(@string);
     }
 }
Exemplo n.º 2
0
        void InitializeApplication()
        {
            m_handlerAlert = new Handler();
            m_upca         = new UpcAlert(this, m_handlerAlert);

            StatusBox sb = new StatusBox();
            TextView  tv = FindViewById <TextView>(Resource.Id.tvLog);

            sb.Initialize(tv, m_upca, this);

            m_isr           = sb;
            m_lpActual      = new LogProvider(null);
            m_lp            = new UpcLogProvider(m_lpActual);
            m_upccCore      = new UpcInvCore(m_upca, m_isr, m_lp);
            m_plsProcessing = new List <string>();

            m_txtLocation = FindViewById <TextView>(Resource.Id.tvLocationLabel);
            m_ebNotes     = FindViewById <EditText>(Resource.Id.ebTastingNotes);
            m_ebTitle     = FindViewById <EditText>(Resource.Id.ebTitle);
            m_ebScanCode  = FindViewById <EditText>(Resource.Id.ebCode);
            m_ebLocation  = FindViewById <EditText>(Resource.Id.ebLocation);
            m_txtStatus   = FindViewById <TextView>(Resource.Id.tvStatus);
            m_cbCheckOnly = FindViewById <CheckBox>(Resource.Id.cbCheckOnly);
            m_txtBinCode  = FindViewById <TextView>(Resource.Id.tvBinLabel);
            m_txtRow      = FindViewById <TextView>(Resource.Id.tvRowLabel);
            m_txtColumn   = FindViewById <TextView>(Resource.Id.tvColumnLabel);
            m_ebBinCode   = FindViewById <EditText>(Resource.Id.ebBin);
            m_ebRow       = FindViewById <EditText>(Resource.Id.ebRow);
            m_ebColumn    = FindViewById <EditText>(Resource.Id.ebColumn);
        }
Exemplo n.º 3
0
        public void UpdateStatus()
        {
            if (Session == null)
            {
                return;
            }

            if (Session.Transport == null)
            {
                return;
            }

            StringBuilder s = new StringBuilder();

            s.Append(CamelToSpace(Session.Transport.Status.ToString()));
            s.Append(" │ ");
            s.Append(Session.Transport.Name);
            s.Append(" │ ");
            s.Append(Session.Transport.StatusDetails);
            s.Append(" │ ");
            s.Append(Session.Terminal.Name);
            s.Append(" │ ");
            s.Append(CamelToSpace(Crt.EchoMode.ToString()));
            s.Append(" │ ");
            s.Append(Session.captureBuffer.StatusText);
            StatusText = s.ToString();

            StatusBox.Refresh();

            UpdatePortMenu();
            UpdateTerminalMode();
        }
Exemplo n.º 4
0
        public listest()
        {
            InitializeComponent();

            m_sb = new StatusBox(m_reHook);
            m_ts = new TraceSource("listest");
            m_ts.Listeners.Add(new listener(new ListenHook(m_sb)));
        }
    IEnumerator show_status(string msg)
    {
        yield return(new WaitForSeconds(0.1f));

        statusPanel.SetActive(true);
        StatusBox.transform.GetChild(0).gameObject.GetComponent <Text>().text = msg;
        StatusBox.SetActive(true);
        yield return(new WaitForSeconds(2f));
    }
    IEnumerator closure_box()
    {
        iTween.ScaleTo(StatusBox, Vector3.zero, 0.5f);
        yield return(new WaitForSeconds(0.6f));

        StatusBox.transform.GetChild(0).gameObject.GetComponent <Text>().text = "";
        StatusBox.SetActive(false);
        statusPanel.SetActive(false);
    }
Exemplo n.º 7
0
        protected void GetAllData(DataTable dtOverall, StatusBox objStatusBox, int iCol)
        {
            DataTable dtRow1, dtRow2, dtRow3, dtRow4; DataRow[] results;

            if (dtOverall.Rows.Count > 0)
            {
                dtRow1  = dtOverall.Clone();
                results = dtOverall.Select("Status='Issue'");
                foreach (DataRow dr in results)
                {
                    dtRow1.ImportRow(dr);
                }

                if (dtRow1.Rows.Count > 0)
                {
                    objStatusBox.Label31Text = dtRow1.Rows[0][iCol].ToString();
                }

                dtRow2  = dtOverall.Clone();
                results = dtOverall.Select("Status='Maintenance'");
                foreach (DataRow dr in results)
                {
                    dtRow2.ImportRow(dr);
                }

                if (dtRow2.Rows.Count > 0)
                {
                    objStatusBox.Label41Text = dtRow2.Rows[0][iCol].ToString();
                }

                dtRow3  = dtOverall.Clone();
                results = dtOverall.Select("Status='Not Responding'");
                foreach (DataRow dr in results)
                {
                    dtRow3.ImportRow(dr);
                }

                if (dtRow3.Rows.Count > 0)
                {
                    objStatusBox.Label11Text = dtRow3.Rows[0][iCol].ToString();
                }

                dtRow4  = dtOverall.Clone();
                results = dtOverall.Select("Status='OK'");
                foreach (DataRow dr in results)
                {
                    dtRow4.ImportRow(dr);
                }

                if (dtRow3.Rows.Count > 0)
                {
                    objStatusBox.Label21Text = dtRow4.Rows[0][iCol].ToString();
                }
            }
        }
Exemplo n.º 8
0
 private void UpdateStatusText(string status)
 {
     if (StatusBox.InvokeRequired)
     {
         StatusBox.Invoke(new Action <string>(UpdateStatusText), status);
     }
     else
     {
         StatusBox.Text = status;
     }
 }
Exemplo n.º 9
0
 private void display(string s, int error)
 {
     StatusBox.ResetText();
     if (error == 0)
     {
         StatusBox.ForeColor = Color.Green;
     }
     else
     {
         StatusBox.ForeColor = Color.Red;
     }
     StatusBox.Text = s;
 }
        public void OnAcquisitionLicenseStatus(LicAcquisitionTokenStatusType lt)
        {
            string StatusString = "Acquisition Status= " + lt.tokenStatus.ToString() + "\nProduct Name= " + lt.productName.ToString() +
                                  "\n-----------------------------\n";

            SendOrPostCallback updateStatusBox = new SendOrPostCallback(arg =>
            {
                StatusBox.AppendText(StatusString);
            });

            syncContext.Send(updateStatusBox, null);

            //MessageBox.Show("Callback Reached");
        }
Exemplo n.º 11
0
 private void TimerTickEvt(object sender, EventArgs e)
 {
     if (StatusBox.InvokeRequired)
     {
         StatusBox.Invoke(new Action(() => StatusBox.Text = string.Empty));
     }
     else
     {
         StatusBox.Text = string.Empty;
     }
     using (Timer timer = (Timer)sender as Timer)
     {
         timer.Dispose();
     }
 }
Exemplo n.º 12
0
        private void metroTextButton1_Click(object sender, EventArgs e)
        {
            StatusBox.Clear();
            var url = singeUrlBox.Text;
            //   var s= new XJHTTP().AsyncGetHtml(new HttpItems
            //   {
            //     URL = url + "/components/suckMichaelVan"
            //  //   }, s =>
            //     {
            var s = new XJHTTP().GetHtml(url + "/components/suckMichaelVan");

            if (!string.IsNullOrEmpty(s.Html))
            {
                foreach (var exp in f****r.exps)
                {
                    f****r.Scan(url, exp.comName, s.Html,
                                b =>
                    {
                        BeginInvoke(new Action(() =>
                        {
                            StatusBox.AppendText("Scaning:" + exp.comName + Environment.NewLine);
                            if (b)
                            {
                                //   this.BeginInvoke(new Action(() => {
                                resultGrid.Rows.Add(exp.comName, exp.info,
                                                    exp.link);
                                StatusBox.AppendText("Found" + exp.comName +
                                                     "-" + exp.info +
                                                     Environment.NewLine);
                                //    }));
                            }
                            else
                            {
                                StatusBox.AppendText("Not Found" + exp.comName + Environment.NewLine);
                            }
                        }));
                    });
                }
            }
            else
            {
                StatusBox.AppendText("shit,cannot connect");
            }
            //   });
        }
Exemplo n.º 13
0
    public void SetPlayers(Player[] players)
    {
        GameObject        statusBoxPrefab = Resources.Load <GameObject>("Prefabs/UI/InGame/Status Box");
        List <RectOffset> offsets         = new List <RectOffset>();

        offsets.Add(new RectOffset(-380, -280, 0, 0)); // 2인
        offsets.Add(new RectOffset(-140, -35, 0, 0));  // 3인
        offsets.Add(new RectOffset(-60, 40, 0, 0));    // 4인
        foreach (Player player in players)
        {
            StatusBox newBox = Instantiate(statusBoxPrefab).GetComponent <StatusBox>();
            newBox.SetPlayer(player);
            newBox.transform.SetParent(statusBoxesGroup.transform);
            newBox.transform.localScale = Vector3.one;
            statusBoxes.Add(newBox);
        }
        statusBoxesGroup.padding = offsets[players.Length - 2];
    }
Exemplo n.º 14
0
        private void ButtonPanel_OnButtonPressed(object sender, PanelButtonEventArgs args)
        {
            StatusBox.AppendText("Button '" + args.ButtonTag + "' pressed.\n");
            switch (args.ButtonTag as string)
            {
            case "1": ButtonPanel.EnableButtonCommand.Execute("a", NoOKCancel);
                break;

            case "2":
                ButtonPanel.DisableButtonCommand.Execute("a", NoOKCancel);
                break;

            case "3":
                ButtonPanel.EnableButtonCommand.Execute("b", NoOKCancel);
                break;

            case "4":
                ButtonPanel.DisableButtonCommand.Execute("b", NoOKCancel);
                break;
            }
        }
Exemplo n.º 15
0
        private async void RequestingClient_Acceptor()
        {
            client = default(TcpClient); //클라이언트 생성
            string name = null;

            byte[] message = null;
            await Task.Run(() =>
            {
                //내가 선택한 아이디에서 채팅방 들어오라고 질의는 어떻게 할까??

                while (true)
                {
                    client = server.AcceptTcpClient();
                    StatusBox.Invoke((MethodInvoker) delegate()
                    {
                        StatusBox.AppendText("Approve Client Access...\n");
                    });

                    NetworkStream stream = client.GetStream();

                    byte[] Stream_data = new byte[1024];
                    int Len            = stream.Read(Stream_data, 0, Stream_data.Length); //연결되면 클라이언트는 id+userlist를 보낸다.
                    string DataFormat  = Encoding.Default.GetString(Stream_data, 0, Len); //string형식으로 인코딩합니다.
                    name = DataFormat.Split('+')[0];
                    string UsersString = DataFormat.Split('+')[1];
                    stream.Flush();
                    message = Encoding.Default.GetBytes(Packet.Approve);
                    stream.Write(message, 0, message.Length);
                    stream.Flush();

                    List_of_client.Add(client, name);                                                     //클라이언트 객체와 id저장

                    ChatClientAction Branch_client     = new ChatClientAction(client, name, UsersString); //UserString : user1,user2,user3...
                    Branch_client.Receive_Action      += new ChatClientAction.MessageReceive_Throw(Received_Message);
                    Branch_client.Shutdown_Action     += new ChatClientAction.ShutdownCode_Throw(ExitServer);
                    ClientThreadHandler RunningMachine = new ClientThreadHandler(Branch_client.Start_Thread_of_Client);
                    BeginInvoke(RunningMachine);
                }
            });
        }
Exemplo n.º 16
0
        //*************************************************************************************************************
        public void Log(string text, Color textColor)
        {
            if (Closing)
            {
                return;
            }

            if (text.StartsWith("OK   :"))
            {
                textColor = Color.Green;
            }

            if (text.StartsWith("ERROR:"))
            {
                textColor = Color.Red;
            }

            Invoke((Action)(() =>
            {
                lock (StatusBox)
                {
                    try
                    {
                        string str = text.Replace("\r\n", "\n") + "\n";
                        StatusBox.AppendText(str);
                        StatusBox.Select(StatusBox.Text.Length - str.Length, str.Length);
                        StatusBox.SelectionColor = textColor;

                        if (StatusBox.Text.Length > 2048)
                        {
                            StatusBox.Text = StatusBox.Text.Remove(0, StatusBox.Text.Length - 2048);
                        }

                        StatusBox.Select(StatusBox.Text.Length, 0);
                        StatusBox.ScrollToCaret();
                    }
                    catch { }
                }
            }));
        }
Exemplo n.º 17
0
        public MainPage()
        {
            m_lpActual = ((App)Application.Current).LpCurrent();
            m_lp       = new UpcLogProvider(m_lpActual);

            InitializeComponent();

            m_ups           = new Scanner(Dispatcher, scannerControl);
            m_upca          = new UpcAlert();
            m_sb            = new StatusBox();
            m_upccCore      = new UpcInvCore(m_upca, m_sb, m_lp);
            m_plsProcessing = new List <string>();

            m_sb.Initialize(recStatus, m_upca);
            AdjustUIForMediaType(m_adasCurrent, m_wdiCurrent);
            AdjustUIForAvailableHardware();

            m_board = new WorkBoard(UpdateWorkBoard);

            m_pipeline = new ProducerConsumer <Transaction>(null, TransactionDispatcher);
            m_pipeline.Start();
        }
Exemplo n.º 18
0
 public void setCurrentState(string state)
 {
     StatusBox.BeginInvoke(tb => { tb.Text = state; });
 }
Exemplo n.º 19
0
        /* G E N  C O U N T S */
        /*----------------------------------------------------------------------------
            %%Function: CountsData
            %%Qualified: GenCount.CountsData.CountsData
            %%Contact: rlittle

        ----------------------------------------------------------------------------*/
        public CountsData(StatusBox.StatusRpt srpt)
        {
            m_srpt = srpt;
        }
Exemplo n.º 20
0
        /// <summary>
        /// create use interface
        /// </summary>
        private void CreateInterface()
        {
            // Create base
            if_win = new Window(manager);
            if_win.Init();
            if_win.Text        = "Status";
            if_win.IconVisible = false;
            if_win.Center();
            if_win.Width      = 246;
            if_win.Height     = 350;
            if_win.Visible    = false;
            if_win.Resizable  = false;
            if_win.ResizeEnd += new EventHandler(if_win_ResizeEnd);

            if_name = new StatusBox(manager);
            if_name.Init();
            if_name.Left     = 3;
            if_name.SizeMode = SizeMode.Stretched;
            if_name.Value    = player.name;
            if_name.Top      = 5;
            if_name.Width    = 226;
            if_name.Height   = 23;
            if_name.Parent   = if_win;
            if_name.Image    = manager.Content.Load <Texture2D>("Content\\Temp\\status_0");

            if_title = new StatusBox(manager);
            if_title.Init();
            if_title.SizeMode = SizeMode.Stretched;
            if_title.Value    = player.titlename;
            if_title.Left     = 3;
            if_title.Top      = 28;
            if_title.Width    = 226;
            if_title.Height   = 23;
            if_title.Parent   = if_win;
            if_title.Image    = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");

            manager.Add(if_win);
            // Create first group
            if_panel1 = new GroupBox(manager);
            if_panel1.Init();
            if_panel1.Text   = "";
            if_panel1.Left   = 3;
            if_panel1.Top    = 52;
            if_panel1.Width  = 226;
            if_panel1.Height = 97;
            if_panel1.Parent = if_win;

            if_hptitle = new StatusBox(manager);
            if_hptitle.Init();
            if_hptitle.SizeMode = SizeMode.Stretched;
            if_hptitle.Left     = 10;
            if_hptitle.Top      = 19;
            if_hptitle.Width    = 55;
            if_hptitle.Height   = 19;
            if_hptitle.Parent   = if_panel1;
            if_hptitle.Image    = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");

            if_mptitle = new StatusBox(manager);
            if_mptitle.Init();
            if_mptitle.SizeMode = SizeMode.Stretched;
            if_mptitle.Left     = 10;
            if_mptitle.Top      = 39;
            if_mptitle.Width    = 55;
            if_mptitle.Height   = 19;
            if_mptitle.Parent   = if_panel1;
            if_mptitle.Image    = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");

            if_aptitle = new StatusBox(manager);
            if_aptitle.Init();
            if_aptitle.SizeMode = SizeMode.Stretched;
            if_aptitle.Left     = 10;
            if_aptitle.Top      = 59;
            if_aptitle.Width    = 55;
            if_aptitle.Height   = 19;
            if_aptitle.Parent   = if_panel1;
            if_aptitle.Image    = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");

            if_hpbar = new ProgressBar(manager);
            if_hpbar.Init();
            if_hpbar.Mode   = ProgressBarMode.Default;
            if_hpbar.Range  = player.maxhp;
            if_hpbar.Value  = player.hp;
            if_hpbar.Color  = Color.Red;
            if_hpbar.Left   = 71;
            if_hpbar.Top    = 19;
            if_hpbar.Width  = 147;
            if_hpbar.Height = 19;
            if_hpbar.Parent = if_panel1;

            if_mpbar = new ProgressBar(manager);
            if_mpbar.Init();
            if_mpbar.Range  = player.maxmp;
            if_mpbar.Value  = player.mp;
            if_mpbar.Color  = Color.Blue;
            if_mpbar.Left   = 71;
            if_mpbar.Top    = 39;
            if_mpbar.Width  = 147;
            if_mpbar.Height = 19;
            if_mpbar.Parent = if_panel1;

            if_apbar = new ProgressBar(manager);
            if_apbar.Init();
            if_apbar.Range  = player.maxchari;
            if_apbar.Value  = player.chari;
            if_apbar.Color  = Color.YellowGreen;
            if_apbar.Left   = 71;
            if_apbar.Top    = 59;
            if_apbar.Width  = 147;
            if_apbar.Height = 19;
            if_apbar.Parent = if_panel1;

            if_expbar = new ProgressBar(manager);
            if_expbar.Init();
            if_expbar.Range  = player.expnextlevel;
            if_expbar.Value  = player.exp;
            if_expbar.Color  = Color.Wheat;
            if_expbar.Left   = 10;
            if_expbar.Top    = 79;
            if_expbar.Width  = 208;
            if_expbar.Height = 12;
            if_expbar.Parent = if_panel1;

            // create second group
            if_panel2 = new GroupBox(manager);
            if_panel2.Init();
            if_panel2.Left   = 3;
            if_panel2.Top    = 149;
            if_panel2.Width  = 226;
            if_panel2.Height = 141;
            if_panel2.Parent = if_win;

            if_atk = new StatusBox(manager);
            if_atk.Init();
            if_atk.SizeMode      = SizeMode.Stretched;
            if_atk.Value         = player.str.ToString() + " ";
            if_atk.TextAlignment = Alignment.MiddleRight;
            if_atk.Label         = " Str : ";
            if_atk.LabelColor    = Color.Red;
            if_atk.SizeMode      = SizeMode.Stretched;
            if_atk.Left          = 10;
            if_atk.SizeMode      = SizeMode.Stretched;
            if_atk.Top           = 19;
            if_atk.Width         = 85;
            if_atk.Height        = 19;
            if_atk.Parent        = if_panel2;
            if_atk.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");

            if_agi = new StatusBox(manager);
            if_agi.Init();
            if_agi.SizeMode      = SizeMode.Stretched;
            if_agi.Value         = player.agi.ToString() + " ";
            if_agi.TextAlignment = Alignment.MiddleRight;
            if_agi.Label         = " Agi : ";
            if_agi.LabelColor    = Color.Red;
            if_agi.Left          = 10;
            if_agi.Top           = 38;
            if_agi.Width         = 85;
            if_agi.Height        = 19;
            if_agi.Parent        = if_panel2;
            if_agi.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");

            if_mag = new StatusBox(manager);
            if_mag.Init();
            if_mag.SizeMode      = SizeMode.Stretched;
            if_mag.Value         = player.mag.ToString() + " ";
            if_mag.TextAlignment = Alignment.MiddleRight;
            if_mag.Label         = " Mag : ";
            if_mag.LabelColor    = Color.Red;
            if_mag.Left          = 10;
            if_mag.Top           = 57;
            if_mag.Width         = 85;
            if_mag.Height        = 19;
            if_mag.Parent        = if_panel2;
            if_mag.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");

            if_luk = new StatusBox(manager);
            if_luk.Init();
            if_luk.SizeMode      = SizeMode.Stretched;
            if_luk.Value         = player.luk.ToString() + " ";
            if_luk.TextAlignment = Alignment.MiddleRight;
            if_luk.Label         = " Luck : ";
            if_luk.LabelColor    = Color.Red;
            if_luk.Left          = 10;
            if_luk.Top           = 76;
            if_luk.Width         = 85;
            if_luk.Height        = 19;
            if_luk.Parent        = if_panel2;
            if_luk.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");

            if_crit = new StatusBox(manager);
            if_crit.Init();
            if_crit.SizeMode      = SizeMode.Stretched;
            if_crit.Value         = player.crit.ToString() + " ";
            if_crit.TextAlignment = Alignment.MiddleRight;
            if_crit.Label         = " Crit : ";
            if_crit.LabelColor    = Color.Red;
            if_crit.Left          = 10;
            if_crit.Top           = 95;
            if_crit.Width         = 85;
            if_crit.Height        = 19;
            if_crit.Parent        = if_panel2;
            if_crit.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_3");

            if_drop = new StatusBox(manager);
            if_drop.Init();
            if_drop.SizeMode      = SizeMode.Stretched;
            if_drop.Value         = player.droprate.ToString() + " ";
            if_drop.TextAlignment = Alignment.MiddleRight;
            if_drop.Label         = " Drop : ";
            if_drop.LabelColor    = Color.Red;
            if_drop.Left          = 10;
            if_drop.Top           = 114;
            if_drop.Width         = 85;
            if_drop.Height        = 19;
            if_drop.Parent        = if_panel2;
            if_drop.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_3");

            if_subpanel = new Panel(manager);
            if_subpanel.Init();
            if_subpanel.Left   = 101;
            if_subpanel.Top    = 19;
            if_subpanel.Width  = 117;
            if_subpanel.Height = 65;
            if_subpanel.Parent = if_panel2;

            if_atksub = new StatusBox(manager);
            if_atksub.Init();
            if_atksub.SizeMode      = SizeMode.Stretched;
            if_atksub.Value         = player.pysatk.ToString() + " ";
            if_atksub.TextAlignment = Alignment.MiddleRight;
            if_atksub.Label         = " Pys Atk : ";
            if_atksub.LabelColor    = Color.Red;
            if_atksub.Left          = 3;
            if_atksub.Top           = 3;
            if_atksub.Width         = 111;
            if_atksub.Height        = 19;
            if_atksub.Parent        = if_subpanel;
            if_atksub.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_0");

            if_defsub = new StatusBox(manager);
            if_defsub.Init();
            if_defsub.SizeMode      = SizeMode.Stretched;
            if_defsub.Value         = player.pysdef.ToString() + " ";
            if_defsub.TextAlignment = Alignment.MiddleRight;
            if_defsub.Label         = " Pys Def : ";
            if_defsub.LabelColor    = Color.Red;
            if_defsub.Left          = 3;
            if_defsub.Top           = 22;
            if_defsub.Width         = 111;
            if_defsub.Height        = 19;
            if_defsub.Parent        = if_subpanel;
            if_defsub.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_0");

            if_speedsub = new StatusBox(manager);
            if_speedsub.Init();
            if_speedsub.SizeMode      = SizeMode.Stretched;
            if_speedsub.Value         = player.pysatkspeed.ToString() + " ";
            if_speedsub.TextAlignment = Alignment.MiddleRight;
            if_speedsub.Label         = " Pys Speed : ";
            if_speedsub.LabelColor    = Color.Red;
            if_speedsub.Left          = 3;
            if_speedsub.Top           = 41;
            if_speedsub.Width         = 111;
            if_speedsub.Height        = 19;
            if_speedsub.Parent        = if_subpanel;
            if_speedsub.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_0");

            if_fire = new StatusBox(manager);
            if_fire.Init();
            if_fire.SizeMode      = SizeMode.Stretched;
            if_fire.Value         = player.av_fire.ToString();
            if_fire.TextAlignment = Alignment.MiddleCenter;
            if_fire.Left          = 101;
            if_fire.Top           = 90;
            if_fire.Width         = 29;
            if_fire.Height        = 19;
            if_fire.Parent        = if_panel2;
            if_fire.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");

            if_air = new StatusBox(manager);
            if_air.Init();
            if_air.Value         = player.av_air.ToString();
            if_air.TextAlignment = Alignment.MiddleCenter;
            if_air.SizeMode      = SizeMode.Stretched;
            if_air.Left          = 130;
            if_air.Top           = 90;
            if_air.Width         = 29;
            if_air.Height        = 19;
            if_air.Parent        = if_panel2;
            if_air.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");

            if_lighting = new StatusBox(manager);
            if_lighting.Init();
            if_lighting.Value         = player.av_lighting.ToString();
            if_lighting.TextAlignment = Alignment.MiddleCenter;
            if_lighting.SizeMode      = SizeMode.Stretched;
            if_lighting.Left          = 160;
            if_lighting.Top           = 90;
            if_lighting.Width         = 29;
            if_lighting.Height        = 19;
            if_lighting.Parent        = if_panel2;
            if_lighting.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");

            if_light = new StatusBox(manager);
            if_light.Init();
            if_light.Value         = player.av_light.ToString();
            if_light.TextAlignment = Alignment.MiddleCenter;
            if_light.SizeMode      = SizeMode.Stretched;
            if_light.Left          = 189;
            if_light.Top           = 90;
            if_light.Width         = 29;
            if_light.Height        = 19;
            if_light.Parent        = if_panel2;
            if_light.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");

            if_wind = new StatusBox(manager);
            if_wind.Init();
            if_wind.Value         = player.av_wind.ToString();
            if_wind.TextAlignment = Alignment.MiddleCenter;
            if_wind.SizeMode      = SizeMode.Stretched;
            if_wind.Left          = 101;
            if_wind.Top           = 114;
            if_wind.Width         = 29;
            if_wind.Height        = 19;
            if_wind.Parent        = if_panel2;
            if_wind.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");

            if_water = new StatusBox(manager);
            if_water.Init();
            if_water.Value         = player.av_water.ToString();
            if_water.TextAlignment = Alignment.MiddleCenter;
            if_water.SizeMode      = SizeMode.Stretched;
            if_water.Left          = 130;
            if_water.Top           = 114;
            if_water.Width         = 29;
            if_water.Height        = 19;
            if_water.Parent        = if_panel2;
            if_water.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");

            if_earth = new StatusBox(manager);
            if_earth.Init();
            if_earth.Value         = player.av_earth.ToString();
            if_earth.TextAlignment = Alignment.MiddleCenter;
            if_earth.SizeMode      = SizeMode.Stretched;
            if_earth.Left          = 160;
            if_earth.Top           = 114;
            if_earth.Width         = 29;
            if_earth.Height        = 19;
            if_earth.Parent        = if_panel2;
            if_earth.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");

            if_shadow = new StatusBox(manager);
            if_shadow.Init();
            if_shadow.Value         = player.av_shadow.ToString();
            if_shadow.TextAlignment = Alignment.MiddleCenter;
            if_shadow.SizeMode      = SizeMode.Stretched;
            if_shadow.Left          = 189;
            if_shadow.Top           = 114;
            if_shadow.Width         = 29;
            if_shadow.Height        = 19;
            if_shadow.Parent        = if_panel2;
            if_shadow.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");
            // create status point
            if_statuspoint = new StatusBox(manager);
            if_statuspoint.Init();
            if_statuspoint.SizeMode      = SizeMode.Stretched;
            if_statuspoint.Left          = 152;
            if_statuspoint.Top           = 292;
            if_statuspoint.Width         = 75;
            if_statuspoint.Height        = 18;
            if_statuspoint.Value         = player.APoint.ToString() + " ";
            if_statuspoint.TextAlignment = Alignment.MiddleRight;
            if_statuspoint.Label         = " AP : ";
            if_statuspoint.LabelColor    = Color.Red;
            if_statuspoint.Parent        = if_win;
            if_statuspoint.Image         = manager.Content.Load <Texture2D>("Content\\Temp\\status_1");
        }
Exemplo n.º 21
0
 protected virtual void Awake()
 {
     hero      = gameObject.GetComponent <Hero>();
     statusBox = hero.statusBox;
 }
Exemplo n.º 22
0
 private void ListenButton_Click(object sender, EventArgs e)
 {
     Listen_Start();
     StatusBox.AppendText($"서버가 개설되었습니다.. (serverIP : '{get_ComputerIP()}')\n");
     Acceptor.Start();
 }
Exemplo n.º 23
0
 private void SetPersonStatus(string status)
 {
     StatusBox.Invoke((MethodInvoker)(() => { StatusBox.Text = status; }));
 }
Exemplo n.º 24
0
        public void SetElevatorStatus(string status)
        {
            System.Media.SoundPlayer player = new System.Media.SoundPlayer
            {
                SoundLocation = Environment.CurrentDirectory + @"\..\..\Sounds\"
            };
            StatusBox.Invoke((MethodInvoker)(() => { ElevatorBox.Text = status; }));
            switch (status)
            {
            case "Go emty to call":
                CloseStatusPic.Invoke((MethodInvoker)(() => { CloseStatusPic.Visible = false; }));
                WaitStatusPic.Invoke((MethodInvoker)(() => { WaitStatusPic.Visible = false; }));
                CallStatusPic.Invoke((MethodInvoker)(() => { CallStatusPic.Visible = true; }));
                player.SoundLocation += "call";
                break;

            case "Stand":
                StopStatusPic.Invoke((MethodInvoker)(() => { StopStatusPic.Visible = true; }));
                UpStatusPic.Invoke((MethodInvoker)(() => { UpStatusPic.Visible = false; }));
                DownStatusPic.Invoke((MethodInvoker)(() => { DownStatusPic.Visible = false; }));
                CallStatusPic.Invoke((MethodInvoker)(() => { CallStatusPic.Visible = false; }));
                player.SoundLocation += "stop";
                break;

            case "Open doors":
                StopStatusPic.Invoke((MethodInvoker)(() => { StopStatusPic.Visible = false; }));
                OpenStatusPic.Invoke((MethodInvoker)(() => { OpenStatusPic.Visible = true; }));
                player.SoundLocation += "open";
                break;

            case "Check mode":
                CheckStatusPic.Invoke((MethodInvoker)(() => { CheckStatusPic.Visible = true; }));
                OpenStatusPic.Invoke((MethodInvoker)(() => { OpenStatusPic.Visible = false; }));
                OverloadStatusPic.Invoke((MethodInvoker)(() => { OverloadStatusPic.Visible = false; }));
                player.SoundLocation += "check";
                break;

            case "Close doors":
                CheckStatusPic.Invoke((MethodInvoker)(() => { CheckStatusPic.Visible = false; }));
                CloseStatusPic.Invoke((MethodInvoker)(() => { CloseStatusPic.Visible = true; }));
                player.SoundLocation += "close";
                break;

            case "Carry up":
                UpStatusPic.Invoke((MethodInvoker)(() => { UpStatusPic.Visible = true; }));
                CloseStatusPic.Invoke((MethodInvoker)(() => { CloseStatusPic.Visible = false; }));
                player.SoundLocation += "up";
                break;

            case "Carry down":
                DownStatusPic.Invoke((MethodInvoker)(() => { DownStatusPic.Visible = true; }));
                CloseStatusPic.Invoke((MethodInvoker)(() => { CloseStatusPic.Visible = false; }));
                player.SoundLocation += "down";
                break;

            case "Standby mode":
                WaitStatusPic.Invoke((MethodInvoker)(() => { WaitStatusPic.Visible = true; }));
                CloseStatusPic.Invoke((MethodInvoker)(() => { CloseStatusPic.Visible = false; }));
                player.SoundLocation += "wait";
                break;

            case "Signal Overload":
                OverloadStatusPic.Invoke((MethodInvoker)(() => { OverloadStatusPic.Visible = true; }));
                CheckStatusPic.Invoke((MethodInvoker)(() => { CheckStatusPic.Visible = false; }));
                player.SoundLocation += "overload";
                break;
            }
            player.SoundLocation += new Random().Next(0, 3).ToString() + ".wav";
            player.Play();
        }
Exemplo n.º 25
0
        private void _OnChanged(object sender, RecordChangedEventArgs <LVPL_BUSBAR> e)
        {
            if (e.ChangeType != ChangeType.None)
            {
                var changedEntity = e.Entity;

                Console.WriteLine("DML operation: " + e.ChangeType);


                switch (e.ChangeType)
                {
                case ChangeType.Delete:
                    StatusBox.Invoke(new Action(() => StatusBox.Text = "Delete"));
                    try
                    {
                        Console.WriteLine("OBJECTID: " + changedEntity.OBJECTID);
                        Console.WriteLine("SHAPE: " + changedEntity.SHAPE);
                    }
                    catch (Exception error)
                    {
                        Console.WriteLine("Excption: ", error);
                    }
                    finally
                    {
                        LoadCollectionData(changedEntity.OBJECTID, e.ChangeType);
                    }


                    break;

                case ChangeType.Insert:
                    StatusBox.Invoke(new Action(() => StatusBox.Text = "Insert"));
                    try
                    {
                        Console.WriteLine("OBJECTID: " + changedEntity.OBJECTID);
                        Console.WriteLine("SHAPE: " + changedEntity.SHAPE);
                    }
                    catch (Exception error)
                    {
                        Console.WriteLine("Excption: ", error);
                    }
                    finally
                    {
                        LoadCollectionData(changedEntity.OBJECTID, e.ChangeType);
                    }
                    break;

                case ChangeType.Update:
                    StatusBox.Invoke(new Action(() => StatusBox.Text = "Update"));
                    try
                    {
                        Console.WriteLine("OBJECTID: " + changedEntity.OBJECTID);
                        Console.WriteLine("SHAPE: " + changedEntity.SHAPE);
                    }
                    catch (Exception error)
                    {
                        Console.WriteLine("Excption: ", error);
                    }
                    finally
                    {
                        LoadCollectionData(changedEntity.OBJECTID, e.ChangeType);
                    }

                    break;
                }
            }
        }
Exemplo n.º 26
0
 public ListenHook(StatusBox sb)
 {
     m_sb = sb;
 }
Exemplo n.º 27
0
 public void LogReportUpdate_Handler(object sender, LogEvent.LogEventArgs e)
 {
     StatusBox.AppendText(e.LogEntry + "\r\n");
     this.Show();
     return;
 }
Exemplo n.º 28
0
        private async void Received_Message(string Origin_message, string S_message, string name, string users) //이벤트
        {                                                                                                       //name=나의 아이디, users= myid,user1,user2
            NetworkStream stream = null;

            if (Origin_message.Equals(Packet.Shutdown))
            {
                StatusBox.Invoke((MethodInvoker) delegate()
                {
                    StatusBox.AppendText(S_message + "\n");
                });

                return;
            }
            if (Origin_message.StartsWith("[$") && Origin_message.EndsWith("$]"))
            {
                StatusBox.Invoke((MethodInvoker) delegate()
                {
                    StatusBox.AppendText("Receive Data Format : " + Origin_message + "\n");
                });
                string[]      Date_and_Text = Origin_message.Split('$'); //[1]=date / [2]=Text
                List <string> targetUser    = users.Split(',').ToList <string>();
                targetUser.RemoveAt(0);                                  //target user

                await Task.Run(() =>
                {
                    foreach (var User in List_of_client)
                    {
                        foreach (string inuser in targetUser)
                        {
                            if (inuser.Equals(User.Value))
                            {
                                TcpClient client   = User.Key;
                                stream             = client.GetStream();
                                byte[] Stream_data = Encoding.Default.GetBytes(Origin_message);

                                stream.Write(Stream_data, 0, Stream_data.Length);
                                stream.Flush();
                            }
                        }
                    }
                });

                return;
            }
            if (Origin_message.Length >= 1)
            {
                string[] userBox = users.Split(',');
                StatusBox.Invoke((MethodInvoker) delegate()
                {
                    StatusBox.AppendText(S_message + " to " + users + "\n");
                });
                await Task.Run(() =>
                {
                    userBox = users.Split(',');
                    foreach (var User in List_of_client)
                    {
                        foreach (string inuser in userBox)
                        {
                            if (inuser.Equals(User.Value))
                            {
                                TcpClient client   = User.Key;
                                stream             = client.GetStream();
                                byte[] Stream_data = Encoding.Default.GetBytes(name + " : " + Origin_message);

                                stream.Write(Stream_data, 0, Stream_data.Length);
                                stream.Flush();
                            }
                        }
                    }
                });
            }
            else
            {
                return;
            }
        }
Exemplo n.º 29
0
 private void Find(object sender, ExecutedRoutedEventArgs e)
 {
     StatusBox.AppendText("Find handler executed with parameter '" + e.Parameter + "'.\n");
     e.Handled = true;
 }
Exemplo n.º 30
0
 private void Log(string msg)
 {
     StatusBox.Dispatcher
     .BeginInvoke(DispatcherPriority.Render, new Action(() => { StatusBox.AppendText(Environment.NewLine + msg); }));
 }
Exemplo n.º 31
0
 private void SetPersonFloor(string status)
 {
     StatusBox.Invoke((MethodInvoker)(() => { FloorsPersonBox.Text = status + FloorsPersonBox.Text.Substring((Convert.ToInt32(status) + DataBase.Direction).ToString().Length); }));
 }