Example #1
0
 public Form1()
 {
     InitializeComponent();
     ipc = new IPC(this);
     ipc.Handler += ipc_Handler;
     MyLB.Items.Add("This application HWND: " + this.Handle);
 }
Example #2
0
        public void Start(Dictionary <string, string> cmdline)
        {
            if (m_ipcThread != null)
            {
                return;
            }

            IPC.CommandEvent += IPC_CommandEvent;
            IPC.m_cmdline     = cmdline;
            IPC.m_serviceMode = ((cmdline.ContainsKey("mode")) && (cmdline["mode"] == "service"));

            IPC.LogDebug("Start");

            m_ipcThread = new Thread(new ThreadStart(IPC.MainLoop));
            m_ipcThread.Start();
        }
Example #3
0
            public static IPC Build(eIPC etype, Type type)
            {
                if (type == null)
                {
                    return(null);
                }
                if (type.GetInterface(typeof(IPC).Name) == null)
                {
                    return(null);
                }
                IPC obj = (IPC)AppDomain.CurrentDomain.CreateInstanceAndUnwrap(type.Assembly.FullName, type.FullName, false, BindingFlags.CreateInstance, null,
                                                                               null, null, null);

                obj.Init(etype);
                return(obj);
            }
Example #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (UserSession.唯一键 == "")
        {
            Response.Write("保存失败,找不到用户登录状态信息。");
            return;
        }
        if (Request["caozuo"].ToString() == "")
        {
            Response.Write("保存失败,操作不明确。");
            return;
        }
        if (Request["id"].ToString() == "")
        {
            Response.Write("保存失败,布局目标不明确。");
            return;
        }

        if (Request["lx"].ToString() == "")
        {
            Response.Write("保存失败,布局目标类型不明确。");
            return;
        }
        //保存布局
        string sp = "";

        if (Request["caozuo"].ToString() == "baocun")
        {
            sp = "保存";
        }
        if (Request["caozuo"].ToString() == "chongzhi")
        {
            sp = "重置";
        }
        object[] re_dsi = IPC.Call("保存或者获取用户布局", new object[] { UserSession.唯一键, Request["lx"].ToString(), Request["id"].ToString(), Request["jsonstr"].ToString(), sp });
        if (re_dsi[0].ToString() == "ok")
        {
            //这个就是得到远程方法真正的返回值,不同类型的,自行进行强制转换即可。
            DataSet dsreturn = (DataSet)re_dsi[1];
            Response.Write(dsreturn.Tables["返回值单条"].Rows[0]["提示文本"].ToString());
        }
        else
        {
            Response.Write(re_dsi[1].ToString());//向客户端输出错误字符串
        }
    }
Example #5
0
        public RimHelperProxy(ModContentPack content) : base(content)
        {
            IPC.Create();
            Log.Warning($"[RimHelperProxy] Shared memory with size: {IPC.MemorySize / (1024 * 1024)} Mb allocated!");

            HM.Init();

            new Thread(() => // Exception not handling from another threads!
            {
                while (true)
                {
                    HandleMessagesTick();
                    ResetTick();
                    Thread.Sleep(100);
                }
            }).Start();
        }
Example #6
0
        public void Execute(string[] splittedCommand, IPC pc, ILaptop laptop, IServer server)
        {
            var commandName = splittedCommand[0];
            var commandArguments = int.Parse(splittedCommand[1]);

            if (commandName == "Charge")
            {
                laptop.ChargeBattery(commandArguments);
            }
            else if (commandName == "Process")
            {
                server.Process(commandArguments);
            }
            else if (commandName == "Play")
            {
                pc.Play(commandArguments);
            }
        }
Example #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //模拟长时间处理
        //Thread.Sleep(5000);

        //清理历史数据
        string lujing = "/exceltemp/";

        DelFileAll(Server.MapPath(lujing));

        //获取参数
        DataTable dt_request = RequestForUI.Get_parameter_forUI(Request);


        //根据id获取配置自动生成电子表格存到服务器上,注意命名防止重复覆盖。
        DataSet dsreturn = new DataSet();

        object[] re_dsi = IPC.Call("根据配置生成导出数据", new object[] { dt_request });
        if (re_dsi[0].ToString() == "ok")
        {
            //这个就是得到远程方法真正的返回值,不同类型的,自行进行强制转换即可。
            dsreturn = (DataSet)(re_dsi[1]);
        }

        //文件名
        string filename = dsreturn.Tables["返回值单条"].Rows[0]["附件信息1"].ToString() + "-" + DateTime.Now.ToFileTime().ToString() + ".xls";

        //生成
        if (Directory.Exists(Server.MapPath(lujing)))
        {
        }
        else
        {
            DirectoryInfo directoryInfo = new DirectoryInfo(Server.MapPath(lujing));
            directoryInfo.Create();
        }
        DataSet dsxlsDB = new DataSet();

        dsxlsDB.Tables.Add(dsreturn.Tables["导出的数据"].Copy());
        MyXlsClass.goxls(dsxlsDB, filename, dsreturn.Tables["返回值单条"].Rows[0]["附件信息1"].ToString(), dsreturn.Tables["返回值单条"].Rows[0]["附件信息1"].ToString(), 30, Server.MapPath(lujing));
        //返回下载地址和状态""
        Response.Write("ok|" + lujing + filename);
    }
Example #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.ContentType = "text/xml";
        Response.Charset     = "UTF-8";


        try
        {
            DataSet   dsjieguo   = new DataSet();
            DataTable dt_request = RequestForUI.Get_parameter_forUI(Request);
            object[]  re_ds      = IPC.Call("获取省市区数据", new object[] { dt_request });
            if (re_ds[0].ToString() == "ok")
            {
                //这个就是得到远程方法真正的返回值,不同类型的,自行进行强制转换即可。
                dsjieguo = (DataSet)re_ds[1];
            }
            else
            {
                Response.Write(geterrmod(re_ds[1].ToString()));
                return;
            }

            //转换xml
            System.IO.StringWriter writer = new System.IO.StringWriter();
            if (!dsjieguo.Tables.Contains("省市区数据"))
            {
                Response.Write(geterrmod("没有数据!"));
                return;
            }
            dsjieguo.Tables["省市区数据"].WriteXml(writer);
            string xmlstr = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + writer.ToString();


            System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
            doc.LoadXml(xmlstr);
            doc.Save(Response.OutputStream);
        }
        catch (Exception ex)
        {
            Response.Write(geterrmod("获取数据失败,执行错误!"));
            return;
        }
    }
Example #9
0
        /// <summary>
        /// 识别出场
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void IPC_PlateExitEvent(object sender, PlateEventArgs args)
        {
            IPC ipc = (IPC)sender;


            Console.WriteLine(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "," + ipc.IP + ",开始处理【出场】车牌号:" + args.PlateNum + "的业务逻辑!");
            log.Debug("ip:" + ipc.IP + ",plate:" + args.PlateNum + "开始处理出场业务逻辑");
            try
            {
                Guard guard = null;
                guard = FindGuardByIP(ipc.IP);
                string guardName = (guard.IsExit ? "出口" : "入口") + "_" + guard.No;
                psBll.SaveOrder_count(2, args.PlateColor.GetDisplayName(), args.PlateNum, args.CaptureTime, guardName);
            }
            catch (Exception ex)
            {
                log.Error("出场识别发生异常:" + ex.Message + ",其他" + ex.StackTrace);
            }
        }
Example #10
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            bool active = IPC.Active;

            if (!active)
            {
                IPC.Connect();
            }

            label1.Text      = active ? "Online" : "Offline";
            label1.ForeColor = active ? Color.Green : Color.Red;
            cbTabs.Enabled   = active;
            инцидентыToolStripMenuItem.Enabled   = active;
            pawnHediffsToolStripMenuItem.Enabled = active;
            дампМатериаловИХарактеристикToolStripMenuItem.Enabled = active;
            дампОружияИОдеждыToolStripMenuItem.Enabled            = active;
            injectDllAndRunToolStripMenuItem.Enabled = active;
            gCCollectToolStripMenuItem.Enabled       = active;
        }
Example #11
0
    public DataTable dtgzt = new DataTable(); //我的工作台数据
    protected void Page_Load(object sender, EventArgs e)
    {
        //检查仪表盘显示权限
        qx_zysj = AuthComm.chekcAuth_fromsession("2", UserSession.最终权值_全局独立权限, false);


        ////调用执行方法获取数据
        object[] re_dsi = IPC.Call("获取我的工作台数据", new object[] { UserSession.唯一键, "" });
        if (re_dsi[0].ToString() == "ok")
        {
            //这个就是得到远程方法真正的返回值,不同类型的,自行进行强制转换即可。
            dtgzt = (DataTable)(re_dsi[1]);
            //
        }
        else
        {
            dtgzt = null;
        }
    }
Example #12
0
    void Start()
    {
        ipc = new IPC("unity_demo");

        cube0 = GameObject.Find("Cube 0");
        cube1 = GameObject.Find("Cube 1");
        cube2 = GameObject.Find("Cube 2");
        cube3 = GameObject.Find("Cube 3");
        cube4 = GameObject.Find("Cube 4");

        ipc.SetUDPCallback(delegate(string message)
        {
            print(message);

            string[] data = message.Split('!');

            float.TryParse(data[0], out x0);
            float.TryParse(data[1], out y0);
            float.TryParse(data[2], out z0);

            float.TryParse(data[3], out x1);
            float.TryParse(data[4], out y1);
            float.TryParse(data[5], out z1);

            float.TryParse(data[6], out x2);
            float.TryParse(data[7], out y2);
            float.TryParse(data[8], out z2);

            float.TryParse(data[9], out x3);
            float.TryParse(data[10], out y3);
            float.TryParse(data[11], out z3);

            float.TryParse(data[12], out xCenter);
            float.TryParse(data[13], out yCenter);
            float.TryParse(data[14], out zCenter);

            return(1);
        });
    }
Example #13
0
    // GameObject cube0, cube1, cube2, cube3, cube4;
    // float x0, y0, z0, x1, y1, z1, x2, y2, z2, x3, y3, z3, xCenter, yCenter, zCenter;
    void Start()
    {
        ipc = new IPC("unity_plus");

        // cube0 = GameObject.Find("Cube 0");
        // cube1 = GameObject.Find("Cube 1");
        // cube2 = GameObject.Find("Cube 2");
        // cube3 = GameObject.Find("Cube 3");
        // cube4 = GameObject.Find("Cube 4");

        // ipc.SetUDPCallback(delegate(string message)
          //       {
          //       	print(message);

            // string[] data = message.Split('!');

            // float.TryParse(data[0], out x0);
            // float.TryParse(data[1], out y0);
            // float.TryParse(data[2], out z0);

            // float.TryParse(data[3], out x1);
            // float.TryParse(data[4], out y1);
            // float.TryParse(data[5], out z1);

            // float.TryParse(data[6], out x2);
            // float.TryParse(data[7], out y2);
            // float.TryParse(data[8], out z2);

            // float.TryParse(data[9], out x3);
            // float.TryParse(data[10], out y3);
            // float.TryParse(data[11], out z3);

            // float.TryParse(data[12], out xCenter);
            // float.TryParse(data[13], out yCenter);
            // float.TryParse(data[14], out zCenter);

            // return 1;
        // });
    }
Example #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        masterpageleftmenu1.OnNeedLoadData += new masterpageleftmenu.OnNeedDataHandler(MyWebControl_OnNeedLoadData);
        this.Page.Title         = ConfigurationManager.AppSettings["SYSname"] + "";
        titleshowname.InnerHtml = ConfigurationManager.AppSettings["SYSname"] + "";
        mysmlogo.Src            = ConfigurationManager.AppSettings["mylogo_s"];
        showusername.InnerHtml  = UserSession.登录名;

        //重新显示右上角为员工姓名

        object[] re_dsi_uinf = IPC.Call("获取用户基础资料", new object[] { UserSession.唯一键 });
        if (re_dsi_uinf[0].ToString() == "ok")
        {
            //这个就是得到远程方法真正的返回值,不同类型的,自行进行强制转换即可。
            DataTable dt = (DataTable)re_dsi_uinf[1];
            if (dt != null && dt.Columns.Contains("xingming"))
            {
                showusername.InnerHtml = dt.Rows[0]["xingming"].ToString() + '[' + showusername.InnerHtml + ']';
            }
        }

        //获取用户头像
        if (System.IO.File.Exists(Server.MapPath("/uploadfiles/faceup/" + UserSession.唯一键 + ".jpg")))
        {
            mytouiang = "/uploadfiles/faceup/" + UserSession.唯一键 + ".jpg";
        }



        DataSet ds_znx = GetInfo_znxtop();

        if (ds_znx != null)
        {
            repeater_znx.DataSource = ds_znx.Tables["站内信提醒"];
            repeater_znx.DataBind();
            znxsl = ds_znx.Tables["站内信提醒"].Rows.Count.ToString();
        }
    }
Example #15
0
        private void button3_Click(object sender, EventArgs e)
        {
            string newFileName     = Guid.NewGuid().ToString();//Path.GetRandomFileName()
            string pathToDll       = Path.GetDirectoryName(textBox1.Text) + "\\" + newFileName;
            string pathToReportTxt = pathToDll + ".txt";

            var asm = AssemblyDefinition.ReadAssembly(textBox1.Text);

            asm.Name = new AssemblyNameDefinition(newFileName, Version.Parse("1.0.0.0"));
            asm.Write(pathToDll);
            asm.Dispose();

            string functionResult = IPC.StateCallback(State.InjectDll, () => IPC.StringBuf, new InjectParameters
            {
                dllPath     = pathToDll,
                dllClass    = "DebugLibrary.__Class",
                dllFunction = "__Func"
            });

            try { File.Delete(pathToDll); } catch {}

            if (functionResult == "null")
            {
                MessageBox.Show("Finished with 'null' result");
                return;
            }

            File.WriteAllText(pathToReportTxt, functionResult);

            if (String.IsNullOrEmpty(textBox2.Text))
            {
                Process.Start(pathToReportTxt);
            }
            else
            {
                Process.Start(textBox2.Text, pathToReportTxt);
            }
        }
Example #16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        /*
         * if(Request["hqbz"].ToString() == "pie")
         * {
         *  Response.Write("  { label: 'ddd', data: 10, shuliang: '233', color: '#68BC31' },{ label: '--', data: 20, shuliang: '233', color: '#2091CF' },{ label: '--', data: 30, shuliang: '233', color: '#AF4E96' },{ label: '--', data: 40, shuliang: '233', color: '#DA5430' }, { label: '--', data: 50, shuliang: '233', color: '#FEE074' }");
         * }
         */

        //调用执行方法获取数据
        object[] re_dsi = IPC.Call("获取仪表盘数据", new object[] { Request["hqbz"].ToString(), UserSession.唯一键, "" });
        if (re_dsi[0].ToString() == "ok")
        {
            //这个就是得到远程方法真正的返回值,不同类型的,自行进行强制转换即可。
            string restr = re_dsi[1].ToString();
            //
            Response.Write(restr);
        }
        else
        {
            Response.Write("");//向客户端输出错误字符串
        }
    }
Example #17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request["idforedit"] == null || Request["idforedit"].Trim() == "")
        {
            return;
        }

        //调用执行方法获取数据
        DataTable dt_request = RequestForUI.Get_parameter_forUI(Request);

        object[] re_dsi = IPC.Call("获取数据demo", new object[] { dt_request });
        if (re_dsi[0].ToString() == "ok")
        {
            //这个就是得到远程方法真正的返回值,不同类型的,自行进行强制转换即可。
            DataSet dsreturn = (DataSet)re_dsi[1];
            showinfor.DataSource = dsreturn.Tables["数据记录"].DefaultView;//数据绑定
            showinfor.DataBind();
            //Response.Write(dsreturn.Tables["返回值单条"].Rows[0]["提示文本"].ToString());
        }
        else
        {
            Response.Write(re_dsi[1].ToString());//向客户端输出错误字符串
        }
    }
Example #18
0
        static void Main(string[] args)
        {
            IPC    pc    = null;
            IPhone phone = null;

            //PC
            Console.WriteLine("-----------------------PC测试-----------------------------");
            IMediaFactory mediapc1 = new LenovoFactory();
            IMediaFactory mediapc2 = new XiaoMiFactory();

            pc = mediapc1.GetPC();
            pc.makePC();
            pc = mediapc2.GetPC();
            pc.makePC();
            Console.WriteLine("-----------------------Phone测试------------------------------------");
            IMediaFactory mediaphone1 = new LenovoFactory();
            IMediaFactory mediaphone2 = new XiaoMiFactory();

            phone = mediaphone1.GetPhone();
            phone.makehone();
            phone = mediaphone2.GetPhone();
            phone.makehone();
            Console.ReadKey();
        }
Example #19
0
        private static void Main()
        {
            string[] args = Environment.GetCommandLineArgs();

            if (args.Length > 1 && args[1] == "-setpermissions")
            {
                System.Security.Principal.SecurityIdentifier sid  = new System.Security.Principal.SecurityIdentifier(System.Security.Principal.WellKnownSidType.WorldSid, null);
                System.Security.Principal.NTAccount          acct = sid.Translate(typeof(System.Security.Principal.NTAccount)) as System.Security.Principal.NTAccount;
                string strEveryoneAccount = acct.ToString();
                GeneralHelper.AddDirectorySecurity(".\\", strEveryoneAccount, FileSystemRights.FullControl, InheritanceFlags.None, PropagationFlags.NoPropagateInherit, AccessControlType.Allow);
                GeneralHelper.AddDirectorySecurity(".\\", strEveryoneAccount, FileSystemRights.FullControl, InheritanceFlags.ObjectInherit | InheritanceFlags.ContainerInherit, PropagationFlags.InheritOnly, AccessControlType.Allow);

                GeneralHelper.RemoveReadOnlyRecursive(".\\");

                return;
            }

            string name = Path.GetFileNameWithoutExtension(Application.ExecutablePath);

            bool moved = false;

#if DEBUG
            bool firstInstance = true;
#else
            bool firstInstance = Process.GetProcessesByName(name).Length < 2;
#endif

            string file = "";

            if (args.Length > 1)
            {
                for (int i = 1; i < args.Length; i++)
                {
                    file += args[i] + " ";
                }
                file = file.Trim();

                moved = true;
            }

            if (!firstInstance)
            {
                Thread.Sleep(1500);
                firstInstance = Process.GetProcessesByName(name).Length < 2;
                if (!firstInstance && !moved)
                {
                    if (DialogResult.OK == MessageBox.Show("osu! is already running!\nWould you like to force-kill the other copy?", name,
                                                           MessageBoxButtons.OKCancel, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1))
                    {
                        KillStuckProcesses(name);
                        int count = 0;
                        while (count++ < 20 && !firstInstance)
                        {
                            Thread.Sleep(100);
                            firstInstance = Process.GetProcessesByName(name).Length < 2;
                        }
                        if (!firstInstance)
                        {
                            MessageBox.Show("Killing failed.  Please manually kill the process using Task Manager.", name,
                                            MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
                            return;
                        }
                    }
                    else
                    {
                        return;
                    }
                }
            }

            if (moved || firstInstance)
            {
                if (firstInstance)
                {
                    try
                    {
                        IPC.AcceptConnections();
                    }
                    catch (Exception)
                    {
                    }
                }
                else
                {
                    try
                    {
                        TcpClient    c = new TcpClient("localhost", 13373);
                        StreamWriter w = new StreamWriter(c.GetStream());
                        w.WriteLine(file);

                        w.Flush();

                        c.Close();
                    }
                    catch (Exception)
                    {
                    }
                    return;
                }
            }


            Environment.CurrentDirectory = Application.StartupPath;

            using (GameBase game = new GameBase(file))
            {
                if (File.Exists("_osume.exe"))
                {
                    File.Delete("osume.exe");
                    File.Move("_osume.exe", "osume.exe");
                    GeneralHelper.ProcessStart("osume.exe");
                }
                else
#if !DEBUG
                { try
                  {
#endif
                    game.Run(); }
                if (Restart)
                {
                    GeneralHelper.ProcessStart("osu!.exe");
                }
#if !DEBUG
            }
Example #20
0
        void InitializeGui(string langFileName)
        {
            if (!Localization.TryLoadFromFile(langFileName, out Exception ex))
            {
                MessageBox.Show($"Error: {ex.Message}", langFileName);
                Environment.Exit(1);
            }

            LanguageChangedMessage                    = "Message_LangChanged".Translate();
            инцидентыToolStripMenuItem.Text           = "Menu_Incidents".Translate();
            pawnHediffsToolStripMenuItem.Text         = "Menu_PawnHediffs".Translate();
            отображениеКолонокToolStripMenuItem.Text  = "Menu_VisibleColumns".Translate();
            скрытьПустыеСтолбцыToolStripMenuItem.Text = "Menu_HideNullColumns".Translate();
            корзинаToolStripMenuItem.Text             = toolStripMenuItem1.Text = "Menu_Cart".Translate();
            добавитьВКорзинуToolStripMenuItem.Text    = "Menu_AddInCart".Translate();
            удалитьИзКорзиныToolStripMenuItem.Text    = "Menu_RemoveFromCart".Translate();
            очиститьКорзинуToolStripMenuItem.Text     = "Menu_ClearCart".Translate();
            языкToolStripMenuItem.Text                = "Menu_Language".Translate();
            exportToolStripMenuItem.Text              = "Menu_Export".Translate();
            exportTabToolStripMenuItem.Text           = "Menu_ExportTab".Translate();
            exportAllTabsToolStripMenuItem.Text       = "Menu_ExportAllTabs".Translate();
            injectDllAndRunToolStripMenuItem.Text     = "Menu_InjectDllAndRun".Translate();

            new ToolTip().SetToolTip(btnResetCache, "Button_ClearTabsCache_Tooltip".Translate());

            ColumnFilter.btnAllText     = "Button_All".Translate();
            ColumnFilter.btnNothingText = "Button_Nothing".Translate();

            button2.Text = "Button_OpenFilterForm".Translate();

            var tabs = cbTabs.Items;

            // Materials
            tabs.Add(new RimHelper.TabControl <Material>("Tab_Materials".Translate(), () =>
                                                         IPC.StateCallback(State.GetMaterials, () => IPC.GetObjectBuf <List <Material> >()),
                                                         dgv, comboBox1, textBox4, pictureBox1));

            // WeaponsRanged
            tabs.Add(new RimHelper.TabControl <WeaponRanged>("Tab_WeaponsRanged".Translate(), () =>
                                                             IPC.StateCallback(State.GetWeaponsRanged, () => IPC.GetObjectBuf <List <WeaponRanged> >()),
                                                             dgv, comboBox1, textBox4, pictureBox1));

            // WeaponsMelee
            tabs.Add(new RimHelper.TabControl <WeaponMelee>("Tab_WeaponsMelee".Translate(), () =>
                                                            IPC.StateCallback(State.GetWeaponsMelee, () => IPC.GetObjectBuf <List <WeaponMelee> >()),
                                                            dgv, comboBox1, textBox4, pictureBox1));

            // Apparels
            tabs.Add(new RimHelper.TabApparel("Tab_Apparel".Translate(), () =>
                                              IPC.StateCallback(State.GetApparels, () => IPC.GetObjectBuf <List <Apparel> >()),
                                              dgv, comboBox1, textBox4, pictureBox1));

            // Buildings From Materials
            tabs.Add(new RimHelper.TabControl <BuildingsFromMaterial>("Tab_BuildingsFromMaterial".Translate(), () =>
                                                                      IPC.StateCallback(State.GetBuildingsFromMaterials,
                                                                                        () => IPC.GetObjectBuf <List <BuildingsFromMaterial> >()),
                                                                      dgv, comboBox1, textBox4, pictureBox1));

            // Animals
            tabs.Add(new RimHelper.TabControl <Animal>("Tab_Animals".Translate(), () =>
                                                       IPC.StateCallback(State.GetAnimals, () => IPC.GetObjectBuf <List <Animal> >()),
                                                       dgv, comboBox1, textBox4, pictureBox1));

            // Debuffs
            tabs.Add(new RimHelper.TabControl <Debuff>("Tab_Debuffs".Translate(), () =>
                                                       IPC.StateCallback(State.GetDebuffs, () => IPC.GetObjectBuf <List <Debuff> >()),
                                                       dgv, comboBox1, textBox4, pictureBox1));

            // Drugs
            tabs.Add(new RimHelper.TabControl <Drug>("Tab_Drugs".Translate(), () =>
                                                     IPC.StateCallback(State.GetDrugs, () => IPC.GetObjectBuf <List <Drug> >()),
                                                     dgv, comboBox1, textBox4, pictureBox1));

            // Foods
            tabs.Add(new RimHelper.TabControl <Food>("Tab_Foods".Translate(), () =>
                                                     IPC.StateCallback(State.GetFoods, () => IPC.GetObjectBuf <List <Food> >()),
                                                     dgv, comboBox1, textBox4, pictureBox1));

            // BodyParts
            tabs.Add(new RimHelper.TabControl <BodyPart>("Tab_BodyParts".Translate(), () =>
                                                         IPC.StateCallback(State.GetBodyParts, () => IPC.GetObjectBuf <List <BodyPart> >()),
                                                         dgv, comboBox1, textBox4, pictureBox1));

            // Facilities
            tabs.Add(new RimHelper.TabControl <Facility>("Tab_Facilities".Translate(), () =>
                                                         IPC.StateCallback(State.GetFacilities, () => IPC.GetObjectBuf <List <Facility> >()),
                                                         dgv, comboBox1, textBox4, pictureBox1));

            // Plants
            tabs.Add(new RimHelper.TabControl <Plant>("Tab_Plant".Translate(), () =>
                                                      IPC.StateCallback(State.GetPlants, () => IPC.GetObjectBuf <List <Plant> >()),
                                                      dgv, comboBox1, textBox4, pictureBox1));

            // Backstorys
            tabs.Add(new RimHelper.TabControl <Backstory>("Tab_Backstorys".Translate(), () =>
                                                          IPC.StateCallback(State.GetBackstorys, () => IPC.GetObjectBuf <List <Backstory> >()),
                                                          dgv, comboBox1, textBox4, pictureBox1));

            // Traits
            tabs.Add(new RimHelper.TabControl <Trait>("Tab_Traits".Translate(), () =>
                                                      IPC.StateCallback(State.GetTraits, () => IPC.GetObjectBuf <List <Trait> >()),
                                                      dgv, comboBox1, textBox4, pictureBox1));

            // CEAmmos
            tabs.Add(new RimHelper.TabControl <CEAmmo>("Tab_CEAmmos".Translate(), () =>
                                                       IPC.StateCallback(State.GetCEAmmos, () => IPC.GetObjectBuf <List <CEAmmo> >()),
                                                       dgv, comboBox1, textBox4, pictureBox1));

            // Tools
            tabs.Add(new RimHelper.TabControl <ST_Tool>("Tab_Tools".Translate(), () =>
                                                        IPC.StateCallback(State.GetTools, () => IPC.GetObjectBuf <List <ST_Tool> >()),
                                                        dgv, comboBox1, textBox4, pictureBox1));

            Localization.LoadColumns();
            Localization.Finalize();
        }
Example #21
0
 private void pawnHediffsToolStripMenuItem_Click_1(object sender, EventArgs e)
 {
     IPC.StateCallback(State.GetPawnsHeddifs, () => MessageBox.Show(IPC.StringBuf));
 }
Example #22
0
 private void дампОружияИОдеждыToolStripMenuItem_Click(object sender, EventArgs e)
 {
     IPC.StateCallback(State.WeaponApparelDump, () => MessageBox.Show(IPC.StringBuf));
 }
Example #23
0
 private void дампМатериаловИХарактеристикToolStripMenuItem_Click(object sender, EventArgs e)
 {
     IPC.StateCallback(State.BuildingStuffDump, () => MessageBox.Show("Finished"));
 }
Example #24
0
 void GetActiveIncidents()
 {
     IPC.StateCallback(State.GetActiveIncidents, () => MessageBox.Show(IPC.StringBuf));
 }
Example #25
0
        private static void startup(string[] args)
        {
            //we can use the argument as the full path if it contains folders.
            //this is faster but not always available.
            string path = args[0].Trim('"');

            if (path.IndexOf(Path.DirectorySeparatorChar) >= 0)
            {
                fullPath = path;
            }

            if (args.Length > 1)
            {
                if (handleArgs(ref args))
                {
                    return;
                }
            }

            bool hasTournamentConfig = File.Exists(Tournament.CONFIG_FILENAME);
            bool hasDrawingsConfig   = File.Exists(Drawings.CONFIG_FILENAME);

            string fileArgs = args.Length > 1 ? string.Join(@" ", args, 1, args.Length - 1) : null;

            bool allowMultipleInstances = fileArgs != null || AllowMultipleInstances || hasTournamentConfig;

            try
            {
                try
                {
                    if (!allowMultipleInstances)
                    {
                        //attempt a wake-up if an existing osu! client is running.
                        InterProcessOsu osu = IPC.GetRunningOsu();
                        if (osu != null && osu.WakeUp())
                        {
                            return;
                        }
                    }
                }
                catch { }

                using (SingleInstance instance = new SingleInstance(ClientGuid, allowMultipleInstances ? -1 : 5000))
                {
                    try
                    {
                        if (!instance.IsFirstInstance && fileArgs != null)
                        {
                            IPC.HandleArguments(fileArgs);
                            return;
                        }

                        runGame(fileArgs, hasTournamentConfig && !GameBase.Tournament, hasDrawingsConfig);
                    }
                    catch (BadImageFormatException e)
                    {
                        handleBadImageFormat(e);
                    }
#if !DEBUG
                    catch { }
#endif
                }
            }
            catch (TooManyInstancesException)
            {
            }

            exitOrRestart();
        }
Example #26
0
 private void Form1_FormClosed(object sender, FormClosedEventArgs e)
 {
     IPC.Close();
 }
Example #27
0
        public static void HandleMessagesTick()
        {
            if (IPC.Active)
            {
                try
                {
                    switch ((State)IPC.State)
                    {
                    case State.Idle:
                        return;

                    case State.GetMaterials:
                        IPC.SetObjectBuf(Materials.Get());
                        break;

                    case State.GetWeaponsRanged:
                        IPC.SetObjectBuf(WeaponsRanged.Get());
                        break;

                    case State.GetWeaponsMelee:
                        IPC.SetObjectBuf(WeaponsMelee.Get());
                        break;

                    case State.GetApparels:
                        IPC.SetObjectBuf(Apparels.Get());
                        break;

                    case State.GetBuildingsFromMaterials:
                        IPC.SetObjectBuf(BuildingsFromMaterials.Get());
                        break;

                    case State.GetAnimals:
                        IPC.SetObjectBuf(Animals.Get());
                        break;

                    case State.GetDebuffs:
                        IPC.SetObjectBuf(Debuffs.Get());
                        break;

                    case State.GetDrugs:
                        IPC.SetObjectBuf(Drugs.Get());
                        break;

                    case State.GetFoods:
                        IPC.SetObjectBuf(Foods.Get());
                        break;

                    case State.GetActiveIncidents:
                        IPC.StringBuf = ActiveIncidents.Get();
                        break;

                    case State.GetPawnsHeddifs:
                        IPC.StringBuf = PawnsHeddifs.Get();
                        break;

                    case State.GetBodyParts:
                        IPC.SetObjectBuf(BodyParts.Get());
                        break;

                    case State.GetFacilities:
                        IPC.SetObjectBuf(Facilities.Get());
                        break;

                    case State.GetPlants:
                        IPC.SetObjectBuf(Plants.Get());
                        break;

                    case State.GetBackstorys:
                        IPC.SetObjectBuf(Backstorys.Get());
                        break;

                    case State.GetTraits:
                        IPC.SetObjectBuf(Traits.Get());
                        break;

                    case State.GetCEAmmos:
                        IPC.SetObjectBuf(CEAmmos.Get());
                        break;

                    case State.GetTools:
                        IPC.SetObjectBuf(Tools.Get());
                        break;

                    case State.BuildingStuffDump:
                        new BuildingStuffDump();
                        break;

                    case State.WeaponApparelDump:
                        IPC.StringBuf = WeaponApparelDump.Get();
                        break;

                    case State.InjectDll:
                        IPC.StringBuf = InjectDll.GetResult(IPC.GetObjectBuf <InjectParameters>());
                        break;

                    case State.GcCollect:
                        GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced);
                        GC.WaitForPendingFinalizers();
                        Log.Warning($"[RimHelperProxy] GC.Collect() called!");
                        break;


                    default:
                        throw new Exception($"UnknownState: {IPC.State}");
                    }
                }
                catch (Exception e)
                {
                    Log.Error($"[HandleMessagesTick] Exception: {e.Message}");
                    Log.Error($"[HandleMessagesTick] StackTrace: {e.StackTrace}");
                }
                finally
                {
                    IPC.State = (int)State.Idle;
                }
            }
        }
Example #28
0
 ///<summary>
 ///Removes the given IPC
 ///</summary>
 public void RemoveIPC(IPC toRemove)
 {
     this.RemoveStructure("IPC", toRemove);
 }
Example #29
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //处理ajax请求
        string ajaxrun = "";

        if (Request["ajaxrun"] == null || Request["ajaxrun"].ToString().Trim() == "")
        {
            return;
        }
        if (Request["jkname"] == null || Request["jkname"].ToString().Trim() == "")
        {
            return;
        }
        if (Request["zhanghao"] == null || Request["zhanghao"].ToString().Trim() == "" || Request["mima"] == null || Request["mima"].ToString().Trim() == "")
        {
            return;
        }
        string jkname = Request["jkname"].ToString();

        ajaxrun = Request["ajaxrun"].ToString();
        string zhanghao = Request["zhanghao"].ToString().Trim();
        string mima     = Request["mima"].ToString().Trim();

        if (ajaxrun == "backlogin")
        {
            //处理验证码
            string     c   = "0";
            HttpCookie aaa = Request.Cookies["vccs"];
            if (aaa == null)
            {
                c = "0";
                Response.Cookies["vccs"].Value   = "0";
                Response.Cookies["vccs"].Expires = DateTime.Now.Add(new TimeSpan(6, 0, 0));
            }
            c = Request.Cookies["vccs"].Value;


            if (Convert.ToInt32(c) >= 5)//超过错误次数才对验证码进行校验
            {
                if (Request["yanzhengma"] == null || Request["yanzhengma"].ToString().Trim() == "" || Request["yanzhengma"].ToString().Trim().ToLower() != Session["ValidateCode"].ToString().ToLower())
                {
                    Response.Write("验证码错误!");
                    //搞乱验证码
                    Session["ValidateCode"] = Guid.NewGuid().ToString();
                    return;
                }
            }



            //调用执行方法获取数据

            object[] re_dsi = IPC.Call(jkname, new object[] { zhanghao, mima, AuthComm.IP });
            if (re_dsi[0].ToString() == "ok")
            {
                //这个就是得到远程方法真正的返回值,不同类型的,自行进行强制转换即可。
                DataSet dsreturn = (DataSet)re_dsi[1];
                if (dsreturn.Tables["返回值单条"].Rows[0]["执行结果"].ToString() == "ok")
                {
                    UserSession.唯一键         = dsreturn.Tables["用户信息"].Rows[0]["UAid"].ToString();
                    UserSession.登录名         = dsreturn.Tables["用户信息"].Rows[0]["Uloginname"].ToString();
                    UserSession.是否超管        = dsreturn.Tables["用户信息"].Rows[0]["SuperUser"].ToString();
                    UserSession.最终权值_后台菜单权限 = dsreturn.Tables["用户信息"].Rows[0]["UfinalUnumber1"].ToString();
                    UserSession.最终权值_前台导航权限 = dsreturn.Tables["用户信息"].Rows[0]["UfinalUnumber2"].ToString();
                    UserSession.最终权值_全局独立权限 = dsreturn.Tables["用户信息"].Rows[0]["UfinalUnumber3"].ToString();
                    UserSession.最终权值_特殊权限   = dsreturn.Tables["用户信息"].Rows[0]["UfinalUnumber4"].ToString();
                    UserSession.最终权值_备用权限   = dsreturn.Tables["用户信息"].Rows[0]["UfinalUnumber5"].ToString();
                    Response.Cookies["user_Uloginname_onlyforinput"].Value   = Server.UrlEncode(dsreturn.Tables["用户信息"].Rows[0]["Uloginname"].ToString());
                    Response.Cookies["user_Uloginname_onlyforinput"].Expires = DateTime.MaxValue;
                    Response.Write("ok");
                    return;
                }
                else
                {
                    if (dsreturn.Tables["返回值单条"].Rows[0]["执行结果"].ToString() == "err_olnypassworderr")
                    {
                        //密码错误次数

                        Response.Cookies["vccs"].Value   = (Convert.ToInt32(c) + 1).ToString();
                        Response.Cookies["vccs"].Expires = DateTime.Now.Add(new TimeSpan(6, 0, 0));
                    }
                    Response.Write(dsreturn.Tables["返回值单条"].Rows[0]["提示文本"].ToString());
                    return;
                }
            }
            else
            {
                Response.Write(re_dsi[1].ToString());//向客户端输出错误字符串
                return;
            }
        }
    }
Example #30
0
    /// <summary>
    /// 重新加载菜单
    /// </summary>
    private void ReLoadNode()
    {
        errmsg.Text = "";

        tbshowname    = "所有权限组";
        dbtbname.Text = "auth_group";


        if (Request["sortid"] == null || Request["sortid"].ToString().Trim() == "")
        {
            sh_SortID.Text = "0";
            ee_SortID.Text = "0";
        }
        else
        {
            sh_SortID.Text = Request["sortid"].ToString().Trim();
            ee_SortID.Text = Request["sortid"].ToString().Trim();
        }


        //加载原始数据等待修改
        if (sh_SortID.Text == "0" || sh_SortID.Text == "" || dbtbname.Text == "")
        {
        }
        else
        {
            //调用执行方法获取数据
            DataSet  dsD     = new DataSet();
            object[] re_dsiD = IPC.Call("获取单条菜单数据", new object[] { dbtbname.Text, sh_SortID.Text });
            if (re_dsiD[0].ToString() == "ok")
            {
                //这个就是得到远程方法真正的返回值,不同类型的,自行进行强制转换即可。
                dsD = (DataSet)re_dsiD[1];
                try
                {
                    ee_SortName.Text = dsD.Tables["数据记录"].Rows[0]["SortName"].ToString();
                    sh_SortName.Text = dsD.Tables["数据记录"].Rows[0]["SortName"].ToString();

                    //把已有的权限分解并展示
                    Dictionary <string, string> dic_Unumber1 = AuthComm.GetEnumFormUnumber(dsD.Tables["数据记录"].Rows[0]["Unumber1"].ToString());
                    foreach (KeyValuePair <string, string> kv in dic_Unumber1)
                    {
                        ListItem lt = Unumber1.Items.FindByValue(kv.Value);
                        if (lt != null)
                        {
                            lt.Selected = true;
                        }
                    }

                    Dictionary <string, string> dic_Unumber2 = AuthComm.GetEnumFormUnumber(dsD.Tables["数据记录"].Rows[0]["Unumber2"].ToString());
                    foreach (KeyValuePair <string, string> kv in dic_Unumber2)
                    {
                        ListItem lt = Unumber2.Items.FindByValue(kv.Value);
                        if (lt != null)
                        {
                            lt.Selected = true;
                        }
                    }

                    Dictionary <string, string> dic_Unumber3 = AuthComm.GetEnumFormUnumber(dsD.Tables["数据记录"].Rows[0]["Unumber3"].ToString());
                    foreach (KeyValuePair <string, string> kv in dic_Unumber3)
                    {
                        ListItem lt = Unumber3.Items.FindByValue(kv.Value);
                        if (lt != null)
                        {
                            lt.Selected = true;
                        }
                    }

                    Dictionary <string, string> dic_Unumber4 = AuthComm.GetEnumFormUnumber(dsD.Tables["数据记录"].Rows[0]["Unumber4"].ToString());
                    foreach (KeyValuePair <string, string> kv in dic_Unumber4)
                    {
                        ListItem lt = Unumber4.Items.FindByValue(kv.Value);
                        if (lt != null)
                        {
                            lt.Selected = true;
                        }
                    }

                    Dictionary <string, string> dic_Unumber5 = AuthComm.GetEnumFormUnumber(dsD.Tables["数据记录"].Rows[0]["Unumber5"].ToString());
                    foreach (KeyValuePair <string, string> kv in dic_Unumber5)
                    {
                        ListItem lt = Unumber5.Items.FindByValue(kv.Value);
                        if (lt != null)
                        {
                            lt.Selected = true;
                        }
                    }
                }
                catch (Exception ex)
                {
                    errmsg.Text = "获取数据出错";
                }
            }
            else
            {
                errmsg.Text = re_dsiD[1].ToString();//向客户端输出错误字符串
            }
        }

        TV.Nodes.Clear();
        //调用执行方法获取数据
        DataTable dt = new DataTable();

        object[] re_dsi = IPC.Call("获取菜单数据", new object[] { dbtbname.Text, 0, 1 });
        if (re_dsi[0].ToString() == "ok")
        {
            //这个就是得到远程方法真正的返回值,不同类型的,自行进行强制转换即可。
            dt = (DataTable)re_dsi[1];
        }
        else
        {
            errmsg.Text = re_dsi[1].ToString();//向客户端输出错误字符串
        }
        this.InitNode(dt);
        //TV.ExpandAll();
    }
Example #31
0
    protected void editjiedian_Click(object sender, EventArgs e)
    {
        errmsg.Text = "";
        Button b = (Button)sender;


        //调用执行方法获取数据
        Hashtable HTforParameter = new Hashtable();

        HTforParameter["buttonid"]          = b.ID;
        HTforParameter["dbtbname"]          = dbtbname.Text;
        HTforParameter["SortID"]            = sh_SortID.Text;
        HTforParameter["add_SortName"]      = addnewjiedian_name.Text;
        HTforParameter["move_SortParentID"] = movenewsid.Text;
        HTforParameter["ee_SortName"]       = ee_SortName.Text;


        BigInteger Unumber1_qx = 0;

        for (int i = 0; i < Unumber1.Items.Count; i++)
        {
            if (Unumber1.Items[i].Selected)
            {
                BigInteger numS = BigInteger.Parse(Unumber1.Items[i].Value);
                Unumber1_qx = Unumber1_qx | numS;
            }
        }
        HTforParameter["ee_Unumber1_qx"] = Unumber1_qx.ToString();


        BigInteger Unumber2_qx = 0;

        for (int i = 0; i < Unumber2.Items.Count; i++)
        {
            if (Unumber2.Items[i].Selected)
            {
                BigInteger numS = BigInteger.Parse(Unumber2.Items[i].Value);
                Unumber2_qx = Unumber2_qx | numS;
            }
        }
        HTforParameter["ee_Unumber2_qx"] = Unumber2_qx.ToString();

        BigInteger Unumber3_qx = 0;

        for (int i = 0; i < Unumber3.Items.Count; i++)
        {
            if (Unumber3.Items[i].Selected)
            {
                BigInteger numS = BigInteger.Parse(Unumber3.Items[i].Value);
                Unumber3_qx = Unumber3_qx | numS;
            }
        }
        HTforParameter["ee_Unumber3_qx"] = Unumber3_qx.ToString();

        BigInteger Unumber4_qx = 0;

        for (int i = 0; i < Unumber4.Items.Count; i++)
        {
            if (Unumber4.Items[i].Selected)
            {
                BigInteger numS = BigInteger.Parse(Unumber4.Items[i].Value);
                Unumber4_qx = Unumber4_qx | numS;
            }
        }
        HTforParameter["ee_Unumber4_qx"] = Unumber4_qx.ToString();

        BigInteger Unumber5_qx = 0;

        for (int i = 0; i < Unumber5.Items.Count; i++)
        {
            if (Unumber5.Items[i].Selected)
            {
                BigInteger numS = BigInteger.Parse(Unumber5.Items[i].Value);
                Unumber5_qx = Unumber5_qx | numS;
            }
        }
        HTforParameter["ee_Unumber5_qx"] = Unumber5_qx.ToString();


        DataTable dt_request = StringOP.GetDataTableFormHashtable(HTforParameter);

        object[] re_dsi = IPC.Call("菜单维护操作", new object[] { dt_request });
        if (re_dsi[0].ToString() == "ok")
        {
            //这个就是得到远程方法真正的返回值,不同类型的,自行进行强制转换即可。
            string dsreturn = re_dsi[1].ToString();
            if (b.ID == "shanchu")
            {
                Response.Redirect("/adminht/auth_group_edit.aspx");
            }
            else
            {
                Response.Redirect("/adminht/auth_group_edit.aspx?sortid=" + sh_SortID.Text);
            }
        }
        else
        {
            errmsg.Text = re_dsi[1].ToString();//向客户端输出错误字符串
        }
    }
Example #32
0
        /// <summary>
        /// Constructs an HL7 segment for the specified Segments enum object
        /// </summary>
        /// <param name="seg">The Segments enum object to construct for</param>
        public Segment(Segments seg)
        {
            switch (seg)
            {
            case Segments.ABS:
                ABS abs = new ABS();
                Name        = abs.Name;
                Description = abs.Description;
                Fields      = abs.Fields;
                break;

            case Segments.ACC:
                ACC acc = new ACC();
                Name        = acc.Name;
                Description = acc.Description;
                Fields      = acc.Fields;
                break;

            case Segments.ADD:
                ADD add = new ADD();
                Name        = add.Name;
                Description = add.Description;
                Fields      = add.Fields;
                break;

            case Segments.AFF:
                AFF aff = new AFF();
                Name        = aff.Name;
                Description = aff.Description;
                Fields      = aff.Fields;
                break;

            case Segments.AIG:
                AIG aig = new AIG();
                Name        = aig.Name;
                Description = aig.Description;
                Fields      = aig.Fields;
                break;

            case Segments.AIL:
                AIL ail = new AIL();
                Name        = ail.Name;
                Description = ail.Description;
                Fields      = ail.Fields;
                break;

            case Segments.AIP:
                AIP aip = new AIP();
                Name        = aip.Name;
                Description = aip.Description;
                Fields      = aip.Fields;
                break;

            case Segments.AIS:
                AIS ais = new AIS();
                Name        = ais.Name;
                Description = ais.Description;
                Fields      = ais.Fields;
                break;

            case Segments.AL1:
                AL1 al1 = new AL1();
                Name        = al1.Name;
                Description = al1.Description;
                Fields      = al1.Fields;
                break;

            case Segments.APR:
                APR apr = new APR();
                Name        = apr.Name;
                Description = apr.Description;
                Fields      = apr.Fields;
                break;

            case Segments.ARQ:
                ARQ arq = new ARQ();
                Name        = arq.Name;
                Description = arq.Description;
                Fields      = arq.Fields;
                break;

            case Segments.AUT:
                AUT aut = new AUT();
                Name        = aut.Name;
                Description = aut.Description;
                Fields      = aut.Fields;
                break;

            case Segments.BHS:
                BHS bhs = new BHS();
                Name        = bhs.Name;
                Description = bhs.Description;
                Fields      = bhs.Fields;
                break;

            case Segments.BLC:
                BLC blc = new BLC();
                Name        = blc.Name;
                Description = blc.Description;
                Fields      = blc.Fields;
                break;

            case Segments.BLG:
                BLG blg = new BLG();
                Name        = blg.Name;
                Description = blg.Description;
                Fields      = blg.Fields;
                break;

            case Segments.BPO:
                BPO bpo = new BPO();
                Name        = bpo.Name;
                Description = bpo.Description;
                Fields      = bpo.Fields;
                break;

            case Segments.BPX:
                BPX bpx = new BPX();
                Name        = bpx.Name;
                Description = bpx.Description;
                Fields      = bpx.Fields;
                break;

            case Segments.BTS:
                BTS bts = new BTS();
                Name        = bts.Name;
                Description = bts.Description;
                Fields      = bts.Fields;
                break;

            case Segments.BTX:
                BTX btx = new BTX();
                Name        = btx.Name;
                Description = btx.Description;
                Fields      = btx.Fields;
                break;

            case Segments.CDM:
                CDM cdm = new CDM();
                Name        = cdm.Name;
                Description = cdm.Description;
                Fields      = cdm.Fields;
                break;

            case Segments.CER:
                CER cer = new CER();
                Name        = cer.Name;
                Description = cer.Description;
                Fields      = cer.Fields;
                break;

            case Segments.CM0:
                CM0 cm0 = new CM0();
                Name        = cm0.Name;
                Description = cm0.Description;
                Fields      = cm0.Fields;
                break;

            case Segments.CM1:
                CM1 cm1 = new CM1();
                Name        = cm1.Name;
                Description = cm1.Description;
                Fields      = cm1.Fields;
                break;

            case Segments.CM2:
                CM2 cm2 = new CM2();
                Name        = cm2.Name;
                Description = cm2.Description;
                Fields      = cm2.Fields;
                break;

            case Segments.CNS:
                CNS cns = new CNS();
                Name        = cns.Name;
                Description = cns.Description;
                Fields      = cns.Fields;
                break;

            case Segments.CON:
                CON con = new CON();
                Name        = con.Name;
                Description = con.Description;
                Fields      = con.Fields;
                break;

            case Segments.CSP:
                CSP csp = new CSP();
                Name        = csp.Name;
                Description = csp.Description;
                Fields      = csp.Fields;
                break;

            case Segments.CSR:
                CSR csr = new CSR();
                Name        = csr.Name;
                Description = csr.Description;
                Fields      = csr.Fields;
                break;

            case Segments.CSS:
                CSS css = new CSS();
                Name        = css.Name;
                Description = css.Description;
                Fields      = css.Fields;
                break;

            case Segments.CTD:
                CTD ctd = new CTD();
                Name        = ctd.Name;
                Description = ctd.Description;
                Fields      = ctd.Fields;
                break;

            case Segments.CTI:
                CTI cti = new CTI();
                Name        = cti.Name;
                Description = cti.Description;
                Fields      = cti.Fields;
                break;

            case Segments.DB1:
                DB1 db1 = new DB1();
                Name        = db1.Name;
                Description = db1.Description;
                Fields      = db1.Fields;
                break;

            case Segments.DG1:
                DG1 dg1 = new DG1();
                Name        = dg1.Name;
                Description = dg1.Description;
                Fields      = dg1.Fields;
                break;

            case Segments.DRG:
                DRG drg = new DRG();
                Name        = drg.Name;
                Description = drg.Description;
                Fields      = drg.Fields;
                break;

            case Segments.DSC:
                DSC dsc = new DSC();
                Name        = dsc.Name;
                Description = dsc.Description;
                Fields      = dsc.Fields;
                break;

            case Segments.DSP:
                DSP dsp = new DSP();
                Name        = dsp.Name;
                Description = dsp.Description;
                Fields      = dsp.Fields;
                break;

            case Segments.ECD:
                ECD ecd = new ECD();
                Name        = ecd.Name;
                Description = ecd.Description;
                Fields      = ecd.Fields;
                break;

            case Segments.ECR:
                ECR ecr = new ECR();
                Name        = ecr.Name;
                Description = ecr.Description;
                Fields      = ecr.Fields;
                break;

            case Segments.EDU:
                EDU edu = new EDU();
                Name        = edu.Name;
                Description = edu.Description;
                Fields      = edu.Fields;
                break;

            case Segments.EQL:
                EQL eql = new EQL();
                Name        = eql.Name;
                Description = eql.Description;
                Fields      = eql.Fields;
                break;

            case Segments.EQP:
                EQP eqp = new EQP();
                Name        = eqp.Name;
                Description = eqp.Description;
                Fields      = eqp.Fields;
                break;

            case Segments.EQU:
                EQU equ = new EQU();
                Name        = equ.Name;
                Description = equ.Description;
                Fields      = equ.Fields;
                break;

            case Segments.ERQ:
                ERQ erq = new ERQ();
                Name        = erq.Name;
                Description = erq.Description;
                Fields      = erq.Fields;
                break;

            case Segments.ERR:
                ERR err = new ERR();
                Name        = err.Name;
                Description = err.Description;
                Fields      = err.Fields;
                break;

            case Segments.EVN:
                EVN evn = new EVN();
                Name        = evn.Name;
                Description = evn.Description;
                Fields      = evn.Fields;
                break;

            case Segments.FAC:
                FAC fac = new FAC();
                Name        = fac.Name;
                Description = fac.Description;
                Fields      = fac.Fields;
                break;

            case Segments.FHS:
                FHS fhs = new FHS();
                Name        = fhs.Name;
                Description = fhs.Description;
                Fields      = fhs.Fields;
                break;

            case Segments.FT1:
                FT1 ft1 = new FT1();
                Name        = ft1.Name;
                Description = ft1.Description;
                Fields      = ft1.Fields;
                break;

            case Segments.FTS:
                FTS fts = new FTS();
                Name        = fts.Name;
                Description = fts.Description;
                Fields      = fts.Fields;
                break;

            case Segments.GOL:
                GOL gol = new GOL();
                Name        = gol.Name;
                Description = gol.Description;
                Fields      = gol.Fields;
                break;

            case Segments.GP1:
                GP1 gp1 = new GP1();
                Name        = gp1.Name;
                Description = gp1.Description;
                Fields      = gp1.Fields;
                break;

            case Segments.GP2:
                GP2 gp2 = new GP2();
                Name        = gp2.Name;
                Description = gp2.Description;
                Fields      = gp2.Fields;
                break;

            case Segments.GT1:
                GT1 gt1 = new GT1();
                Name        = gt1.Name;
                Description = gt1.Description;
                Fields      = gt1.Fields;
                break;

            case Segments.IAM:
                IAM iam = new IAM();
                Name        = iam.Name;
                Description = iam.Description;
                Fields      = iam.Fields;
                break;

            case Segments.IIM:
                IIM iim = new IIM();
                Name        = iim.Name;
                Description = iim.Description;
                Fields      = iim.Fields;
                break;

            case Segments.IN1:
                IN1 in1 = new IN1();
                Name        = in1.Name;
                Description = in1.Description;
                Fields      = in1.Fields;
                break;

            case Segments.IN2:
                IN2 in2 = new IN2();
                Name        = in2.Name;
                Description = in2.Description;
                Fields      = in2.Fields;
                break;

            case Segments.IN3:
                IN3 in3 = new IN3();
                Name        = in3.Name;
                Description = in3.Description;
                Fields      = in3.Fields;
                break;

            case Segments.INV:
                INV inv = new INV();
                Name        = inv.Name;
                Description = inv.Description;
                Fields      = inv.Fields;
                break;

            case Segments.IPC:
                IPC ipc = new IPC();
                Name        = ipc.Name;
                Description = ipc.Description;
                Fields      = ipc.Fields;
                break;

            case Segments.ISD:
                ISD isd = new ISD();
                Name        = isd.Name;
                Description = isd.Description;
                Fields      = isd.Fields;
                break;

            case Segments.LAN:
                LAN lan = new LAN();
                Name        = lan.Name;
                Description = lan.Description;
                Fields      = lan.Fields;
                break;

            case Segments.LCC:
                LCC lcc = new LCC();
                Name        = lcc.Name;
                Description = lcc.Description;
                Fields      = lcc.Fields;
                break;

            case Segments.LCH:
                LCH lch = new LCH();
                Name        = lch.Name;
                Description = lch.Description;
                Fields      = lch.Fields;
                break;

            case Segments.LDP:
                LDP ldp = new LDP();
                Name        = ldp.Name;
                Description = ldp.Description;
                Fields      = ldp.Fields;
                break;

            case Segments.LOC:
                LOC loc = new LOC();
                Name        = loc.Name;
                Description = loc.Description;
                Fields      = loc.Fields;
                break;

            case Segments.LRL:
                LRL lrl = new LRL();
                Name        = lrl.Name;
                Description = lrl.Description;
                Fields      = lrl.Fields;
                break;

            case Segments.MFA:
                MFA mfa = new MFA();
                Name        = mfa.Name;
                Description = mfa.Description;
                Fields      = mfa.Fields;
                break;

            case Segments.MFE:
                MFE mfe = new MFE();
                Name        = mfe.Name;
                Description = mfe.Description;
                Fields      = mfe.Fields;
                break;

            case Segments.MFI:
                MFI mfi = new MFI();
                Name        = mfi.Name;
                Description = mfi.Description;
                Fields      = mfi.Fields;
                break;

            case Segments.MRG:
                MRG mrg = new MRG();
                Name        = mrg.Name;
                Description = mrg.Description;
                Fields      = mrg.Fields;
                break;

            case Segments.MSA:
                MSA msa = new MSA();
                Name        = msa.Name;
                Description = msa.Description;
                Fields      = msa.Fields;
                break;

            case Segments.MSH:
                MSH msh = new MSH();
                Name        = msh.Name;
                Description = msh.Description;
                Fields      = msh.Fields;
                break;

            case Segments.NCK:
                NCK nck = new NCK();
                Name        = nck.Name;
                Description = nck.Description;
                Fields      = nck.Fields;
                break;

            case Segments.NDS:
                NDS nds = new NDS();
                Name        = nds.Name;
                Description = nds.Description;
                Fields      = nds.Fields;
                break;

            case Segments.NK1:
                NK1 nk1 = new NK1();
                Name        = nk1.Name;
                Description = nk1.Description;
                Fields      = nk1.Fields;
                break;

            case Segments.NPU:
                NPU npu = new NPU();
                Name        = npu.Name;
                Description = npu.Description;
                Fields      = npu.Fields;
                break;

            case Segments.NSC:
                NSC nsc = new NSC();
                Name        = nsc.Name;
                Description = nsc.Description;
                Fields      = nsc.Fields;
                break;

            case Segments.NST:
                NST nst = new NST();
                Name        = nst.Name;
                Description = nst.Description;
                Fields      = nst.Fields;
                break;

            case Segments.NTE:
                NTE nte = new NTE();
                Name        = nte.Name;
                Description = nte.Description;
                Fields      = nte.Fields;
                break;

            case Segments.OBR:
                OBR obr = new OBR();
                Name        = obr.Name;
                Description = obr.Description;
                Fields      = obr.Fields;
                break;

            case Segments.OBX:
                OBX obx = new OBX();
                Name        = obx.Name;
                Description = obx.Description;
                Fields      = obx.Fields;
                break;

            case Segments.ODS:
                ODS ods = new ODS();
                Name        = ods.Name;
                Description = ods.Description;
                Fields      = ods.Fields;
                break;

            case Segments.ODT:
                ODT odt = new ODT();
                Name        = odt.Name;
                Description = odt.Description;
                Fields      = odt.Fields;
                break;

            case Segments.OM1:
                OM1 om1 = new OM1();
                Name        = om1.Name;
                Description = om1.Description;
                Fields      = om1.Fields;
                break;

            case Segments.OM2:
                OM2 om2 = new OM2();
                Name        = om2.Name;
                Description = om2.Description;
                Fields      = om2.Fields;
                break;

            case Segments.OM3:
                OM3 om3 = new OM3();
                Name        = om3.Name;
                Description = om3.Description;
                Fields      = om3.Fields;
                break;

            case Segments.OM4:
                OM4 om4 = new OM4();
                Name        = om4.Name;
                Description = om4.Description;
                Fields      = om4.Fields;
                break;

            case Segments.OM5:
                OM5 om5 = new OM5();
                Name        = om5.Name;
                Description = om5.Description;
                Fields      = om5.Fields;
                break;

            case Segments.OM6:
                OM6 om6 = new OM6();
                Name        = om6.Name;
                Description = om6.Description;
                Fields      = om6.Fields;
                break;

            case Segments.OM7:
                OM7 om7 = new OM7();
                Name        = om7.Name;
                Description = om7.Description;
                Fields      = om7.Fields;
                break;

            case Segments.ORC:
                ORC orc = new ORC();
                Name        = orc.Name;
                Description = orc.Description;
                Fields      = orc.Fields;
                break;

            case Segments.ORG:
                ORG org = new ORG();
                Name        = org.Name;
                Description = org.Description;
                Fields      = org.Fields;
                break;

            case Segments.OVR:
                OVR ovr = new OVR();
                Name        = ovr.Name;
                Description = ovr.Description;
                Fields      = ovr.Fields;
                break;

            case Segments.PCR:
                PCR pcr = new PCR();
                Name        = pcr.Name;
                Description = pcr.Description;
                Fields      = pcr.Fields;
                break;

            case Segments.PD1:
                PD1 pd1 = new PD1();
                Name        = pd1.Name;
                Description = pd1.Description;
                Fields      = pd1.Fields;
                break;

            case Segments.PDA:
                PDA pda = new PDA();
                Name        = pda.Name;
                Description = pda.Description;
                Fields      = pda.Fields;
                break;

            case Segments.PDC:
                PDC pdc = new PDC();
                Name        = pdc.Name;
                Description = pdc.Description;
                Fields      = pdc.Fields;
                break;

            case Segments.PEO:
                PEO peo = new PEO();
                Name        = peo.Name;
                Description = peo.Description;
                Fields      = peo.Fields;
                break;

            case Segments.PES:
                PES pes = new PES();
                Name        = pes.Name;
                Description = pes.Description;
                Fields      = pes.Fields;
                break;

            case Segments.PID:
                PID pid = new PID();
                Name        = pid.Name;
                Description = pid.Description;
                Fields      = pid.Fields;
                break;

            case Segments.PR1:
                PR1 pr1 = new PR1();
                Name        = pr1.Name;
                Description = pr1.Description;
                Fields      = pr1.Fields;
                break;

            case Segments.PRA:
                PRA pra = new PRA();
                Name        = pra.Name;
                Description = pra.Description;
                Fields      = pra.Fields;
                break;

            case Segments.PRB:
                PRB prb = new PRB();
                Name        = prb.Name;
                Description = prb.Description;
                Fields      = prb.Fields;
                break;

            case Segments.PRC:
                PRC prc = new PRC();
                Name        = prc.Name;
                Description = prc.Description;
                Fields      = prc.Fields;
                break;

            case Segments.PRD:
                PRD prd = new PRD();
                Name        = prd.Name;
                Description = prd.Description;
                Fields      = prd.Fields;
                break;

            case Segments.PSH:
                PSH psh = new PSH();
                Name        = psh.Name;
                Description = psh.Description;
                Fields      = psh.Fields;
                break;

            case Segments.PTH:
                PTH pth = new PTH();
                Name        = pth.Name;
                Description = pth.Description;
                Fields      = pth.Fields;
                break;

            case Segments.PV1:
                PV1 pv1 = new PV1();
                Name        = pv1.Name;
                Description = pv1.Description;
                Fields      = pv1.Fields;
                break;

            case Segments.PV2:
                PV2 pv2 = new PV2();
                Name        = pv2.Name;
                Description = pv2.Description;
                Fields      = pv2.Fields;
                break;

            case Segments.QAK:
                QAK qak = new QAK();
                Name        = qak.Name;
                Description = qak.Description;
                Fields      = qak.Fields;
                break;

            case Segments.QID:
                QID qid = new QID();
                Name        = qid.Name;
                Description = qid.Description;
                Fields      = qid.Fields;
                break;

            case Segments.QPD:
                QPD qpd = new QPD();
                Name        = qpd.Name;
                Description = qpd.Description;
                Fields      = qpd.Fields;
                break;

            case Segments.QRD:
                QRD qrd = new QRD();
                Name        = qrd.Name;
                Description = qrd.Description;
                Fields      = qrd.Fields;
                break;

            case Segments.QRF:
                QRF qrf = new QRF();
                Name        = qrf.Name;
                Description = qrf.Description;
                Fields      = qrf.Fields;
                break;

            case Segments.QRI:
                QRI qri = new QRI();
                Name        = qri.Name;
                Description = qri.Description;
                Fields      = qri.Fields;
                break;

            case Segments.RCP:
                RCP rcp = new RCP();
                Name        = rcp.Name;
                Description = rcp.Description;
                Fields      = rcp.Fields;
                break;

            case Segments.RDF:
                RDF rdf = new RDF();
                Name        = rdf.Name;
                Description = rdf.Description;
                Fields      = rdf.Fields;
                break;

            case Segments.RF1:
                RF1 rf1 = new RF1();
                Name        = rf1.Name;
                Description = rf1.Description;
                Fields      = rf1.Fields;
                break;

            case Segments.RGS:
                RGS rgs = new RGS();
                Name        = rgs.Name;
                Description = rgs.Description;
                Fields      = rgs.Fields;
                break;

            case Segments.RMI:
                RMI rmi = new RMI();
                Name        = rmi.Name;
                Description = rmi.Description;
                Fields      = rmi.Fields;
                break;

            case Segments.ROL:
                ROL rol = new ROL();
                Name        = rol.Name;
                Description = rol.Description;
                Fields      = rol.Fields;
                break;

            case Segments.RQ1:
                RQ1 rq1 = new RQ1();
                Name        = rq1.Name;
                Description = rq1.Description;
                Fields      = rq1.Fields;
                break;

            case Segments.RQD:
                RQD rqd = new RQD();
                Name        = rqd.Name;
                Description = rqd.Description;
                Fields      = rqd.Fields;
                break;

            case Segments.RXA:
                RXA rxa = new RXA();
                Name        = rxa.Name;
                Description = rxa.Description;
                Fields      = rxa.Fields;
                break;

            case Segments.RXC:
                RXC rxc = new RXC();
                Name        = rxc.Name;
                Description = rxc.Description;
                Fields      = rxc.Fields;
                break;

            case Segments.RXD:
                RXD rxd = new RXD();
                Name        = rxd.Name;
                Description = rxd.Description;
                Fields      = rxd.Fields;
                break;

            case Segments.RXE:
                RXE rxe = new RXE();
                Name        = rxe.Name;
                Description = rxe.Description;
                Fields      = rxe.Fields;
                break;

            case Segments.RXG:
                RXG rxg = new RXG();
                Name        = rxg.Name;
                Description = rxg.Description;
                Fields      = rxg.Fields;
                break;

            case Segments.RXO:
                RXO rxo = new RXO();
                Name        = rxo.Name;
                Description = rxo.Description;
                Fields      = rxo.Fields;
                break;

            case Segments.RXR:
                RXR rxr = new RXR();
                Name        = rxr.Name;
                Description = rxr.Description;
                Fields      = rxr.Fields;
                break;

            case Segments.SAC:
                SAC sac = new SAC();
                Name        = sac.Name;
                Description = sac.Description;
                Fields      = sac.Fields;
                break;

            case Segments.SCH:
                SCH sch = new SCH();
                Name        = sch.Name;
                Description = sch.Description;
                Fields      = sch.Fields;
                break;

            case Segments.SFT:
                SFT sft = new SFT();
                Name        = sft.Name;
                Description = sft.Description;
                Fields      = sft.Fields;
                break;

            case Segments.SID:
                SID sid = new SID();
                Name        = sid.Name;
                Description = sid.Description;
                Fields      = sid.Fields;
                break;

            case Segments.SPM:
                SPM spm = new SPM();
                Name        = spm.Name;
                Description = spm.Description;
                Fields      = spm.Fields;
                break;

            case Segments.SPR:
                SPR spr = new SPR();
                Name        = spr.Name;
                Description = spr.Description;
                Fields      = spr.Fields;
                break;

            case Segments.STF:
                STF stf = new STF();
                Name        = stf.Name;
                Description = stf.Description;
                Fields      = stf.Fields;
                break;

            case Segments.TCC:
                TCC tcc = new TCC();
                Name        = tcc.Name;
                Description = tcc.Description;
                Fields      = tcc.Fields;
                break;

            case Segments.TCD:
                TCD tcd = new TCD();
                Name        = tcd.Name;
                Description = tcd.Description;
                Fields      = tcd.Fields;
                break;

            case Segments.TQ1:
                TQ1 tq1 = new TQ1();
                Name        = tq1.Name;
                Description = tq1.Description;
                Fields      = tq1.Fields;
                break;

            case Segments.TQ2:
                TQ2 tq2 = new TQ2();
                Name        = tq2.Name;
                Description = tq2.Description;
                Fields      = tq2.Fields;
                break;

            case Segments.TXA:
                TXA txa = new TXA();
                Name        = txa.Name;
                Description = txa.Description;
                Fields      = txa.Fields;
                break;

            case Segments.UB1:
                UB1 ub1 = new UB1();
                Name        = ub1.Name;
                Description = ub1.Description;
                Fields      = ub1.Fields;
                break;

            case Segments.UB2:
                UB2 ub2 = new UB2();
                Name        = ub2.Name;
                Description = ub2.Description;
                Fields      = ub2.Fields;
                break;

            case Segments.URD:
                URD urd = new URD();
                Name        = urd.Name;
                Description = urd.Description;
                Fields      = urd.Fields;
                break;

            case Segments.URS:
                URS urs = new URS();
                Name        = urs.Name;
                Description = urs.Description;
                Fields      = urs.Fields;
                break;

            case Segments.VAR:
                VAR var = new VAR();
                Name        = var.Name;
                Description = var.Description;
                Fields      = var.Fields;
                break;

            case Segments.VTQ:
                VTQ vtq = new VTQ();
                Name        = vtq.Name;
                Description = vtq.Description;
                Fields      = vtq.Fields;
                break;
            }
        }
Example #33
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string rehtml = "";

        object[] re_dsi = IPC.Call("获取弹窗中列表配置", new object[] { Request["guid"].ToString() });
        if (re_dsi[0].ToString() == "ok")
        {
            //这个就是得到远程方法真正的返回值,不同类型的,自行进行强制转换即可。
            DataSet ds_DD = (DataSet)(re_dsi[1]);
            string  jsmod = File.ReadAllText(Server.MapPath("/pucu/jqgirdjs_for_dialog_mod.txt").ToString());

            //根据模板和配置数据,生成js代码
            rehtml = jsmod;

            //复合表头
            rehtml = rehtml.Replace("[*[FS_D_setGroupHeaders]*]", ds_DD.Tables["字段配置主表"].Rows[0]["FS_D_setGroupHeaders"].ToString());

            //自适应宽度
            if (ds_DD.Tables["字段配置主表"].Rows[0]["FS_D_shrinkToFit"].ToString() == "true")
            {
                rehtml = rehtml.Replace("[*[FS_D_shrinkToFit]*]", "true");
            }
            else
            {
                rehtml = rehtml.Replace("[*[FS_D_shrinkToFit]*]", "false");
            }

            //分页可选量
            if (ds_DD.Tables["字段配置主表"].Rows[0]["FD_D_pagesize"].ToString().Trim() == "")
            {
                rehtml = rehtml.Replace("[*[FD_D_pagesize]*]", "25,50,100");
                rehtml = rehtml.Replace("[*[Default_FD_D_pagesize]*]", "25");
            }
            else
            {
                rehtml = rehtml.Replace("[*[FD_D_pagesize]*]", ds_DD.Tables["字段配置主表"].Rows[0]["FD_D_pagesize"].ToString());
                rehtml = rehtml.Replace("[*[Default_FD_D_pagesize]*]", ds_DD.Tables["字段配置主表"].Rows[0]["FD_D_pagesize"].ToString().Split(',')[0]);
            }

            //列配置
            string c_str = "";
            //特殊处理第一列
            //因为第一列在自带查看里不显示,所以要显示编号需要额外弄一列(这一列在sql取数据时一定要有)
            c_str = c_str + " { name: '隐藏编号', xmlmap: 'jqgird_spid', hidden: true,frozen:false,hidedlg:true}, " + Environment.NewLine;
            for (int i = 0; i < ds_DD.Tables["弹窗配置子表"].Rows.Count; i++)
            {
                DataRow dr = ds_DD.Tables["弹窗配置子表"].Rows[i];

                switch (dr["DID_formatter"].ToString())
                {
                case "字符串":
                    c_str = c_str + " { name: '" + dr["DID_showname"].ToString() + "', xmlmap: '" + dr["DID_name"].ToString() + "', index: '" + dr["DID_name"].ToString() + "', width: " + dr["DID_width"].ToString() + ", fixed: " + dr["DID_fixed"].ToString() + ", sortable: " + dr["DID_sortable"].ToString() + ",hidden: " + dr["DID_hide"].ToString() + ",frozen:" + dr["DID_frozen"].ToString() + " }, " + Environment.NewLine;
                    break;

                case "链接":
                    c_str = c_str + " { name: '" + dr["DID_showname"].ToString() + "', xmlmap: '" + dr["DID_name"].ToString() + "', index: '" + dr["DID_name"].ToString() + "', width: " + dr["DID_width"].ToString() + ", fixed: " + dr["DID_fixed"].ToString() + ", sortable: " + dr["DID_sortable"].ToString() + ",hidden: " + dr["DID_hide"].ToString() + ",frozen:" + dr["DID_frozen"].ToString() + " , formatter: 'showlink', formatoptions: { baseLinkUrl: '" + dr["DID_formatter_CS"].ToString().Split('|')[0] + "', target: '_blank', showAction: '', addParam: '" + dr["DID_formatter_CS"].ToString().Split('|')[1] + "', idName: '" + dr["DID_formatter_CS"].ToString().Split('|')[2] + "' } }, " + Environment.NewLine;
                    break;

                case "整数":
                    c_str = c_str + " { name: '" + dr["DID_showname"].ToString() + "', xmlmap: '" + dr["DID_name"].ToString() + "', index: '" + dr["DID_name"].ToString() + "', width: " + dr["DID_width"].ToString() + ", fixed: " + dr["DID_fixed"].ToString() + ", sortable: " + dr["DID_sortable"].ToString() + ",hidden: " + dr["DID_hide"].ToString() + ",frozen:" + dr["DID_frozen"].ToString() + " , formatter: 'integer' }, " + Environment.NewLine;
                    break;

                case "小数":
                    c_str = c_str + " { name: '" + dr["DID_showname"].ToString() + "', xmlmap: '" + dr["DID_name"].ToString() + "', index: '" + dr["DID_name"].ToString() + "', width: " + dr["DID_width"].ToString() + ", fixed: " + dr["DID_fixed"].ToString() + ", sortable: " + dr["DID_sortable"].ToString() + ",hidden: " + dr["DID_hide"].ToString() + ",frozen:" + dr["DID_frozen"].ToString() + " , formatter: 'number' }, " + Environment.NewLine;
                    break;

                case "日期时间":
                    c_str = c_str + " { name: '" + dr["DID_showname"].ToString() + "', xmlmap: '" + dr["DID_name"].ToString() + "', index: '" + dr["DID_name"].ToString() + "', width: " + dr["DID_width"].ToString() + ", fixed: " + dr["DID_fixed"].ToString() + ", sortable: " + dr["DID_sortable"].ToString() + ",hidden: " + dr["DID_hide"].ToString() + ",frozen:" + dr["DID_frozen"].ToString() + " , formatter: 'date', formatoptions: { srcformat: 'Y-m-d H:i:s', newformat: 'Y-m-d H:i:s' } }, " + Environment.NewLine;
                    break;

                case "仅日期":
                    c_str = c_str + " { name: '" + dr["DID_showname"].ToString() + "', xmlmap: '" + dr["DID_name"].ToString() + "', index: '" + dr["DID_name"].ToString() + "', width: " + dr["DID_width"].ToString() + ", fixed: " + dr["DID_fixed"].ToString() + ", sortable: " + dr["DID_sortable"].ToString() + ",hidden: " + dr["DID_hide"].ToString() + ",frozen:" + dr["DID_frozen"].ToString() + " , formatter: 'date', formatoptions: { srcformat: 'Y-m-d H:i:s', newformat: 'Y-m-d' } }, " + Environment.NewLine;
                    break;

                case "自定义":
                    c_str = c_str + " { name: '" + dr["DID_showname"].ToString() + "', xmlmap: '" + dr["DID_name"].ToString() + "', index: '" + dr["DID_name"].ToString() + "', width: " + dr["DID_width"].ToString() + ", fixed: " + dr["DID_fixed"].ToString() + ", sortable: " + dr["DID_sortable"].ToString() + ",hidden: " + dr["DID_hide"].ToString() + ",frozen:" + dr["DID_frozen"].ToString() + "," + dr["DID_formatter_CS"].ToString() + "   }, " + Environment.NewLine;
                    break;

                default:
                    //正常走不到这里,走到了就是数据库配置错了
                    break;
                }
            }
            rehtml = rehtml.Replace("[*[SubDialog]*]", c_str.TrimEnd(','));
        }
        else
        {
            rehtml = "alert('获取弹窗配置失败:" + re_dsi[1].ToString() + "')";
        }


        Response.Write(rehtml);
    }
 protected void SendMessage(IPC.IConnectionMessage message)
 {
     if (first)
     {
         first = false;
     }
     connection.Send(message);
 }