示例#1
0
文件: SysEvn.cs 项目: dourabbit/CPipe
 public SysEvn(double time,object sender, OBJTYPE type, 
     SYSEVN sysevn, params object[] inputs)
 {
     this._objT = type;
     this._time = time;
     this._evnT = sysevn;
     this._params = inputs;
     this._sender = sender;
     ISysInvoker();
 }
示例#2
0
 public ObjReciever(String IP, String PORT, OBJTYPE objType, StreamWriter sw, String sender, Object parent)
 {
     if (ChatClient.ClientForm.serverBusy == true)
     {
         MessageBox.Show("Another file transfer is in Progress!", "Server Busy", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
     listener      = new TcpListener(IPAddress.Parse(ChatClient.ClientForm.myIp), int.Parse(PORT));
     this.objType  = objType;
     this.swSender = sw;
     this.sender   = sender;
     this.parent   = parent;
 }
示例#3
0
    //根据类型获取itemlist
    public List <OBJTYPEData> getListByType(OBJTYPE T)
    {
        List <OBJTYPEData> list = new List <OBJTYPEData>();

        for (int i = 0; i < objects.Count; i++)
        {
            if (objects [i].type == T)
            {
                list.Add(objects [i]);
            }
        }
        return(list);
    }
示例#4
0
        public virtual void LoadFromStream(SerializationInfo info, int orderNumber)
        {
            this.seq      = (int)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryseq, orderNumber), typeof(int));
            this.objname  = (string)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryobjname, orderNumber), typeof(string));
            this.oldname  = (string)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryoldname, orderNumber), typeof(string));
            this.disname  = (string)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entrydisname, orderNumber), typeof(string));
            this.objtype  = (FLOObj.OBJTYPE)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryobjtype, orderNumber), typeof(FLOObj.OBJTYPE));
            this.selected = (bool)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryselected, orderNumber), typeof(bool));

            this.upnamelist = (ArrayList)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryuplist, orderNumber), typeof(ArrayList));
            this.dnnamelist = (ArrayList)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entrydnlist, orderNumber), typeof(ArrayList));
            this.ltnamelist = (ArrayList)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryltlist, orderNumber), typeof(ArrayList));
            this.rtnamelist = (ArrayList)info.GetValue(String.Format(CultureInfo.InvariantCulture, "{0}{1}", entryrtlist, orderNumber), typeof(ArrayList));
        }
示例#5
0
 public FTReciever(String IP, String PORT, string fileName, StreamWriter sw, 
     String sender,Int64 size, ChatClient.ClientForm me, OBJTYPE objType, Object parent)
 {
     if (ChatClient.ClientForm.serverBusy == true)
     {
         MessageBox.Show("Another file transfer is in Progress!", "Server Busy", MessageBoxButtons.OK, MessageBoxIcon.Error);
         return;
     }
     listener = new TcpListener(IPAddress.Parse(ChatClient.ClientForm.myIp), int.Parse(PORT));
     this.saveFile = fileName;
     this.swSender = sw;
     this.sender = sender;
     this.size = size;
     FTReciever.me = me;
     this.objType = objType;
     FTReciever.parent = parent;
 }
示例#6
0
        private void startObjectRecieve(string msg)
        {
            string[] tokens    = msg.Split('\"');
            string   className = "";
            OBJTYPE  objType   = OBJTYPE.SIESMIC_CUBE;
            string   response  = "";

            switch (tokens[2])
            {
            case "0":
                className = "Seismic Cube";
                objType   = OBJTYPE.SIESMIC_CUBE;
                response  = tokens[0] + "\"O\"0\"" + myIp + "\"1987\"";
                break;

            case "1":
                className = "Well Log";
                objType   = OBJTYPE.SIESMIC_CUBE;
                response  = tokens[0] + "\"O\"1\"" + myIp + "\"1987\"";
                break;
            }
            if (MessageBox.Show("Reicieve " + className + " : " + tokens[5] + " from " + tokens[0] + "?", "Object Send Requested",
                                MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Cancel)
            {
                return;
            }

            /*List<SeismicCollection> cols = Discuss.getAllSeismicCollections();
             * List<string> colNames = new List<string>();
             * foreach (SeismicCollection col in cols)
             *  colNames.Add(col.Name);
             * objSelect selector = new objSelect("Select a group to add object to", colNames);
             * if (selector.ShowDialog() == DialogResult.Cancel)
             * {
             *  MessageBox.Show("Object Recieve Cancelled!", "Petrel Object Reciever",
             *      MessageBoxButtons.OK, MessageBoxIcon.Information);
             *  return;
             * }
             * swSender.WriteLine(response);
             * swSender.Flush();
             * ObjReciever rec = new ObjReciever(tokens[3], tokens[4],
             *  objType, ChatClient.ClientForm.swSender, tokens[0], cols[objSelect.SelectedIndex]);
             * Thread thread = new Thread(new ThreadStart(rec.StartServer));
             * thread.Start();*/
        }
示例#7
0
        private void Manage_OK_CANCEL()
        {
            if (fgButtonGroupSave.Enabled)
            {
                DialogResult rst = MessageBox.Show(EP.EPES.EPESC0000103/*已修改资源群组权限,是否保存?*/, EP.EPES.EPESC0000024, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (rst == DialogResult.Yes)
                {
                    if (EPESCommon.AuthMode == AUTHMODE.MODE_CLASSIC)
                    {
                        SaveResToGroup();
                        treeListGroup.Focus();
                    }
                    else
                    {
                        SaveResGroupToGroup();
                        TreeListNode node = (treeListResGroup.FocusedNode.Level == 0) ? treeListResGroup.FocusedNode : treeListResGroup.FocusedNode.ParentNode;

                        QryGroupInResGroup(node.GetValue(treeListColumnRGID).ToString());
                    }
                }
                else
                {
                    if (EPESCommon.AuthMode == AUTHMODE.MODE_CLASSIC)
                    {
                        TreeListNode node = xtraTabControlObj.SelectedTabPage == xtraTabPageList ? treeListForm.FocusedNode : treeListRes.FocusedNode;

                        if (node.ImageIndex == FORMICON)
                        {
                            QryFormGroup(node.Tag.ToString());
                            treeListRes.FocusedNode = null;
                            objType = OBJTYPE.FORM;
                            formEname = node.Tag.ToString();
                            buttEname = "";
                        }
                        else if (node.ImageIndex == BUTTICON)
                        {
                            QryButtGroup(node.ParentNode.Tag.ToString(), node.Tag.ToString());
                            treeListRes.FocusedNode = null;
                            objType = OBJTYPE.BUTTON;
                            formEname = node.ParentNode.Tag.ToString();
                            buttEname = node.Tag.ToString();
                        }
                    }
                    else
                    {
                        TreeListNode node = (treeListResGroup.FocusedNode.Level == 0) ? treeListResGroup.FocusedNode : treeListResGroup.FocusedNode.ParentNode;
                        QryGroupInResGroup(node.GetValue(treeListColumnRGID).ToString());
                    }
                }
                fgButtonGroupSave.Enabled = false;
            }

            else if (fgDevCheckEdit1.Checked && fgButtonList.Enabled)
            {
                DialogResult rst = MessageBox.Show(EP.EPES.EPESC0000103/*已修改资源群组权限,是否保存?*/, EP.EPES.EPESC0000024, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (rst == DialogResult.Yes)
                {
                    SaveAuth();
                    fgButtonList.Enabled = false;
                }
                else
                {
                    fgButtonList.Enabled = false;

                    if (treeListForm.Nodes.Count == 0)
                    {
                        QryAuthForm();
                    }
                    else
                    {
                        RfgreshFormList();
                    }
                }
            }

            else if (fgButtonTree.Enabled)
            {
                DialogResult rst = MessageBox.Show(EP.EPES.EPESC0000089/*已修改群组资源权限,是否保存?*/, EP.EPES.EPESC0000024, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (rst == DialogResult.Yes)
                {
                    SaveAuth();
                    fgButtonTree.Enabled = false;
                }
                else
                {
                    RfgreshTree();
                    fgButtonTree.Enabled = false;
                }
            }

            else if (fgButtonOthRes.Enabled)
            {
                DialogResult rst = MessageBox.Show(EP.EPES.EPESC0000089/*已修改群组资源权限,是否保存?*/, EP.EPES.EPESC0000024, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (rst == DialogResult.Yes)
                {
                    if (!SaveOthResAuth())
                    {
                        //this.//ef_args.buttonStatusHold = true;
                        return;
                    }
                    else
                    {
                        fgButtonOthRes.Enabled = false;
                    }
                }
                else
                {
                    QryOthResAuth();
                    fgButtonOthRes.Enabled = false;
                }
            }

            else if (fgDevCheckEdit1.Checked && fgButtonResGroup.Enabled)
            {
                DialogResult rst = MessageBox.Show(EP.EPES.EPESC0000089/*已修改群组资源权限,是否保存?*/, EP.EPES.EPESC0000024, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (rst == DialogResult.Yes)
                {
                    if (!SaveGroupToResGroup())
                    {
                        //this.//ef_args.buttonStatusHold = true;
                        return;
                    }
                    else
                    {
                        fgButtonResGroup.Enabled = false;
                    }
                }
                else
                {
                    QryParentResGroup();
                    fgButtonResGroup.Enabled = false;
                }
            }

            isManageMode = false;
        }
示例#8
0
        private void treeListRes_Click(object sender, EventArgs e)
        {
            if (hiTreeRes == null || hiTreeRes.Column == null || hiTreeRes.Node == null) return;

            TreeListNode node = treeListRes.FocusedNode;
            if (node == null || node.Tag == null) return;

            if (fgDevCheckEdit2.Checked)
            {
                //this.//EFMsgInfo = "";

                if (fgButtonGroupSave.Enabled)
                {
                    DialogResult rst = MessageBox.Show(EP.EPES.EPESC0000089/*已修改群组资源权限,是否保存?*/, EP.EPES.EPESC0000024, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                    if (rst == DialogResult.Yes)
                    {
                        SaveResToGroup();
                    }
                }
                switch (node.ImageIndex)
                {
                    case 1:
                        QryFormGroup(node.Tag.ToString());
                        treeListGroup.FocusedNode = null;
                        treeListForm.FocusedNode = null;
                        objType = OBJTYPE.FORM;
                        formEname = node.Tag.ToString();
                        buttEname = "";
                        break;
                    case 2:
                        QryButtGroup(node.ParentNode.Tag.ToString(), node.Tag.ToString());
                        treeListGroup.FocusedNode = null;
                        treeListForm.FocusedNode = null;
                        objType = OBJTYPE.BUTTON;
                        formEname = node.ParentNode.Tag.ToString();
                        buttEname = node.Tag.ToString();
                        break;
                }

                listGroupGrant.Clear();
                listGroupRevok.Clear();
                fgButtonGroupSave.Enabled = false;
            }
        }
示例#9
0
        void select(OBJTYPE type, object[] nodeNms)
        {
            if (nodeNms == null || nodeNms.Length == 0)
                _treeView.SelectedNode = null;

            List<string> nodenms = new List<string>();
            foreach (string nm in nodeNms)
                nodenms.Add(nm);
            MyNode root;
            switch (type)
            {
                case OBJTYPE.Pipe:
                    root = _pipeRoot;
                    break;
                case OBJTYPE.Building:
                    root = _buildingRoot;
                    break;
                case OBJTYPE.Chamber:
                    root=_chamberRoot;
                    break;
                case OBJTYPE.Valve:
                    root=_valveRoot;
                    break;
                case OBJTYPE.Well:
                    root=_wellRoot;
                    break;
                case OBJTYPE.HoleEllipse:
                    root = _holeRoot;
                    break;
                case OBJTYPE.HoleRect:
                    root = _holeRoot;
                    break;
                default:
                    root = null;
                    break;
            }
            TreeNode node=null;
            findTreeNod(root, nodenms, ref node);
            _treeView.SelectedNode = node;
        }
示例#10
0
        public bool Init(DEVICE_PACK dp, string itexname, string imodelname, Vector2 iwh, OBJTYPE itype)
        {
            p = dp;
               type = itype;
               mesh.Init(p, itexname, imodelname, iwh, OBJTYPE.none);
               if (debugVerts) baseEffect = new BasicEffect(p.gd, null);
               mesh.rot = Matrix.CreateRotationZ(0);

               if (type != OBJTYPE.none) p.gameList.objList.Add(this);
               return false;
        }
示例#11
0
        public bool Init(DEVICE_PACK dp, string itexname, string imodelname, Vector2 iwh, OBJTYPE itype)
        {
            p = dp;
               wh = iwh;
               k = new Vector4(wh.X, wh.Y, 0, 0);
               uv = new Vector4(1, 1, 0, 0);
               texname = itexname;
               modelname = imodelname;
               type = itype;

               tex = null;
               model = null;
               tex = dp.Content.Load<Texture2D>("textures/" + texname);
               model = dp.Content.Load<Model>("models/" + modelname);

               if (tex == null || model == null) return true;
               rot = Matrix.Identity;

               if (type != OBJTYPE.none) p.gameList.meshList.Add(this);
               return false;
        }