コード例 #1
0
        /// <summary>
        /// 듀얼시스템으로 키 데이터를 전송한다.
        /// </summary>
        /// <param name="keyData"></param>
        public void SendKeyDataToDual(NCasKeyData keyData)
        {
            byte[] tmpBuff = keyData.KeyDataToByteArry();

            if (tmpBuff == null)
            {
                NCasLoggingMng.ILogging.WriteLog("MainForm.SendKeyDataToDual(NCasKeyData keyData)", "NCasKeyData.KeyDataToByteArry()가 null");
                return;
            }

            if (this.dualSessionMng == null)
            {
                NCasLoggingMng.ILogging.WriteLog("MainForm.SendKeyDataToDual(NCasKeyData keyData)", "DUAL 시스템이 null");
                return;
            }

            if (this.dualSessionMng is NCasNetSessionServerMng)
            {
                (this.dualSessionMng as NCasNetSessionServerMng).SendData(this.profile, tmpBuff, tmpBuff.Length);
            }
            else if (this.dualSessionMng is NCasNetSessionClientMng)
            {
                (this.dualSessionMng as NCasNetSessionClientMng).SendData(this.profile, tmpBuff, tmpBuff.Length);
            }
        }
コード例 #2
0
ファイル: KeyBizData.cs プロジェクト: jay-JYPark/NCAS-System
        public override void CloneFrom(NCasObject obj)
        {
            KeyBizData newObject = obj as KeyBizData;

            this.keyData = newObject.keyData;
            this.isLocal = newObject.isLocal;
        }
コード例 #3
0
        /// <summary>
        /// 듀얼로 버튼키 데이터를 전달하기 위한 메소드
        /// </summary>
        /// <param name="keyData"></param>
        public void SetKeyBizData(NCasKeyData keyData)
        {
            KeyBizData keyBizData = new KeyBizData();

            keyBizData.IsLocal = true;
            keyBizData.KeyData = keyData;
            this.pAlmScreenBiz.AddBizData(keyBizData);
        }
コード例 #4
0
ファイル: MainForm.cs プロジェクト: jay-JYPark/NCAS-System
 /// <summary>
 /// 방송공유 버튼 정보를 전송한다.
 /// </summary>
 /// <param name="keyData"></param>
 public void SendBroadShareKeyData(NCasKeyData keyData)
 {
     //System.Diagnostics.Debug.WriteLine("### 방송대에서 방송공유 키 값 보내기 직전, byte[]로 변환직전");
     byte[] buff = keyData.KeyDataToByteArry();
     //System.Diagnostics.Debug.WriteLine("### 방송대에서 방송공유 키 값 보내기 직전, 변환 후 - "
     //        + Encoding.Default.GetString(buff));
     this.sendUdpBroadShare.SendTo(this.IP_LOOPBACK, (int)NCasPipes.PipePcbRgnKeyData, buff);
     //System.Diagnostics.Debug.WriteLine("### 방송대에서 방송공유 키 값 " + ((int)NCasPipes.PipePcbRgnKeyData).ToString() + " 보냈음");
     //System.Diagnostics.Debug.WriteLine("### 방송대에서 방송공유 키 값 보낸 후, 현재 키 상태 - "
     //       + ((keyData.KeyStatus == NCasKeyState.Check) ? "체크됨" : "언체크됨"));
 }
コード例 #5
0
ファイル: MainForm.cs プロジェクト: jay-JYPark/NCAS-System
        /// <summary>
        /// 방송공유 UDP 데이터 수신 이벤트
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void recvUdpBroadShare_ReceivedData(object sender, NCasUdpRecvEventArgs e)
        {
            NCasKeyData keyData = new NCasKeyData(e.Buff);

            if (this.provInfo.IsBroadShareRequest == false)
            {
                return;
            }

            OrderView19201080 orderView = (OrderView19201080)this.dicViews[ViewKind.OrderView19201080];

            orderView.SetKeyBroadShare((keyData.KeyStatus == NCasKeyState.Check) ? true : false);
        }
コード例 #6
0
        /// <summary>
        /// 단일 버튼 데이터 가져오기
        /// </summary>
        /// <param name="keyData"></param>
        /// <returns></returns>
        public static NCasKeyData GetKeyData(NCasKeyData keyData)
        {
            NCasKeyData rstKeyData = new NCasKeyData();

            foreach (NCasKeyData eachKeyData in lstKeyData.LstKeyData)
            {
                if (eachKeyData == keyData)
                {
                    rstKeyData = eachKeyData;
                    break;
                }
            }

            return(rstKeyData);
        }
コード例 #7
0
        /// <summary>
        /// 듀얼 시스템에서 수신받는 데이터 리시브 이벤트
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dualSessionMng_RecvNetSessionClient(object sender, NCasNetSessionRecvEventArgs e)
        {
            if (e.Len == 1)
            {
                return;
            }

            byte[] tmpBuff = new byte[e.Len];
            System.Buffer.BlockCopy(e.Buff, 0, tmpBuff, 0, e.Len);
            NCasKeyData dualKeyData = new NCasKeyData(tmpBuff);
            KeyBizData  keyBizData  = new KeyBizData();

            keyBizData.IsLocal = false;
            keyBizData.KeyData = dualKeyData;
            this.pAlmScreenBiz.AddBizData(keyBizData);
        }
コード例 #8
0
        /// <summary>
        /// 듀얼시스템으로부터 수신받은 키 데이터를 화면에 반영한다.
        /// </summary>
        /// <param name="keyData"></param>
        public void SetKeyDataFromDual(NCasKeyData keyData)
        {
            MethodInvoker invoker = delegate()
            {
                OrderView19201080 orderView = (OrderView19201080)this.dicViews[ViewKind.OrderView19201080];
                orderView.SetKeyDataFromDual(keyData);
            };

            if (this.InvokeRequired)
            {
                this.Invoke(invoker);
            }
            else
            {
                invoker();
            }
        }
コード例 #9
0
 /// <summary>
 /// 버튼 데이터 삭제
 /// </summary>
 /// <param name="keyData"></param>
 public static void RemoveKeyData(NCasKeyData keyData)
 {
 }
コード例 #10
0
 /// <summary>
 /// 버튼 데이터 저장
 /// </summary>
 /// <param name="keyData">저장할 버튼 데이터</param>
 public static void AddKeyData(NCasKeyData keyData)
 {
 }
コード例 #11
0
 /// <summary>
 /// 듀얼시스템에서 수신받은 키 데이터를 화면에 반영한다.
 /// </summary>
 /// <param name="keyData"></param>
 public void SetKeyDataFromDual(NCasKeyData keyData)
 {
     this.controller.SetKeyDataFromDual(keyData);
 }
コード例 #12
0
        /// <summary>
        /// 기초데이터 초기화
        /// </summary>
        private void Init()
        {
            this.groupBtnList = this.orderView.GetGroupButton();
            GroupContent content = null;

            foreach (NCasButton btn in this.groupBtnList)
            {
                NCasKeyData keyData   = btn.Tag as NCasKeyData;
                GroupInfo   groupInfo = new GroupInfo();
                groupInfo.Title    = keyData.Name;
                groupInfo.ButtonID = keyData.ID.ToString();
                this.groupSelectComboBox.Items.Insert(0, groupInfo);

                content       = new GroupContent();
                content.Title = keyData.ID.ToString();
                this.lstGroupContent.Add(content);
            }

            #region ListView 초기화
            this.groupMemberListView.GridLineStyle      = NCasListViewGridLine.GridBoth;
            this.groupMemberListView.GridDashStyle      = DashStyle.Dot;
            this.groupMemberListView.ScrollType         = NCasListViewScrollType.ScrollBoth;
            this.groupMemberListView.Font               = new Font(NCasPAlmScreenRsc.FontName, 11.0f);
            this.groupMemberListView.ColumnHeight       = 32;
            this.groupMemberListView.ItemHeight         = 29;
            this.groupMemberListView.HideColumnCheckBox = true;

            NCasColumnHeader col = new NCasColumnHeader();
            col.Text       = string.Empty;
            col.Width      = 30;
            col.SortType   = NCasListViewSortType.SortChecked;
            col.TextAlign  = HorizontalAlignment.Center;
            col.ColumnLock = true;
            col.ColumnHide = true;
            col.CheckBoxes = true;
            this.groupMemberListView.Columns.Add(col);

            col           = new NCasColumnHeader();
            col.Text      = "이름";
            col.Width     = 200;
            col.SortType  = NCasListViewSortType.SortText;
            col.TextAlign = HorizontalAlignment.Left;
            this.groupMemberListView.Columns.Add(col);

            col           = new NCasColumnHeader();
            col.Text      = "IP";
            col.Width     = 160;
            col.SortType  = NCasListViewSortType.SortText;
            col.TextAlign = HorizontalAlignment.Center;
            this.groupMemberListView.Columns.Add(col);

            col           = new NCasColumnHeader();
            col.Text      = "소속";
            col.Width     = 150;
            col.SortType  = NCasListViewSortType.SortText;
            col.TextAlign = HorizontalAlignment.Center;
            this.groupMemberListView.Columns.Add(col);

            col           = new NCasColumnHeader();
            col.Text      = "구분";
            col.Width     = 120;
            col.SortType  = NCasListViewSortType.SortText;
            col.TextAlign = HorizontalAlignment.Center;
            this.groupMemberListView.Columns.Add(col);
            #endregion

            #region ListView Items 셋팅
            foreach (DistInfo distInfo in this.provInfo.LstDists)
            {
                NCasListViewItem lvi = new NCasListViewItem();
                lvi.Name = distInfo.NetIdToString;

                NCasListViewItem.NCasListViewSubItem sub = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = distInfo.Name;
                sub.TextAlign = HorizontalAlignment.Left;
                lvi.SubItems.Add(sub);

                sub           = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = distInfo.NetIdToString;
                sub.TextAlign = HorizontalAlignment.Center;
                lvi.SubItems.Add(sub);

                sub           = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = this.provInfo.Name;
                sub.TextAlign = HorizontalAlignment.Center;
                lvi.SubItems.Add(sub);

                sub           = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = NCASBIZ.NCasUtility.NCasUtilityMng.INCasCommUtility.NCasDefineOrderSource2String(NCasDefineOrderSource.DistCtrlRoom);
                sub.TextAlign = HorizontalAlignment.Center;
                lvi.SubItems.Add(sub);

                this.groupMemberListView.Items.Add(lvi);
            }

            foreach (TermInfo termInfo in this.provInfo.LstTerms)
            {
                if (termInfo.UseFlag != NCasDefineUseStatus.Use)
                {
                    continue;
                }

                NCasListViewItem lvi = new NCasListViewItem();
                lvi.Name = termInfo.IpAddrToSring;

                NCasListViewItem.NCasListViewSubItem sub = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = termInfo.Name;
                sub.TextAlign = HorizontalAlignment.Left;
                lvi.SubItems.Add(sub);

                sub           = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = termInfo.IpAddrToSring;
                sub.TextAlign = HorizontalAlignment.Center;
                lvi.SubItems.Add(sub);

                sub           = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = termInfo.DistInfo.Name;
                sub.TextAlign = HorizontalAlignment.Center;
                lvi.SubItems.Add(sub);

                sub           = new NCasListViewItem.NCasListViewSubItem();
                sub.Text      = "단말";
                sub.TextAlign = HorizontalAlignment.Center;
                lvi.SubItems.Add(sub);

                this.groupMemberListView.Items.Add(lvi);
            }
            #endregion
        }
コード例 #13
0
ファイル: MainForm.cs プロジェクト: jay-JYPark/NCAS-System
        /// <summary>
        /// 듀얼시스템으로부터 수신받은 키 데이터를 화면에 반영한다.
        /// </summary>
        /// <param name="keyData"></param>
        public void SetKeyDataFromDual(NCasKeyData keyData)
        {
            OrderView19201080 orderView = (OrderView19201080)this.dicViews[ViewKind.OrderView19201080];

            orderView.SetKeyDataFromDual(keyData);
        }