Exemplo n.º 1
0
 /// <param name="Iid">编号</param>
 public static string getInfo(int Iid)
 {
     Model.Info m = new Model.Info();
     m.s_Iid = Iid;
     m       = Bll.Info.Select_Detail(m);
     return(m.Iinfo);
 }
Exemplo n.º 2
0
        private IEnumerator Import(Model.Importer importer, Model.Option.Import options)
        {
            ProgressBar progress = new ProgressBar("Import", "Please wait during models import.");

            foreach (string file in fileSelector.Filenames)
            {
                GameObject root = null;

                IEnumerator it = importer.Import(file, go => root = go, percentage => progress.Update(percentage));

                while (it.MoveNext())
                {
                    yield return(it.Current);
                }

                if (root != null)
                {
                    rootObjects.Add(root);

                    Model.Info info = root.GetComponent <Model.Info>();

                    info.options = options;

                    vertices += info.vertices;
                    faces    += info.faces;
                    duration += info.duration;
                }
                else
                {
                    EditorUtility.DisplayDialog("Error", string.Format("Import of '{0}' failed.", file), "OK");
                }
            }

            progress.Stop();
        }
Exemplo n.º 3
0
        public InfoViewModel()
        {
            Title = "Info";

            Task <Model.Info> task = Task.Run <Model.Info>(async() => await DataStore.GetInfo());

            privateInfo = task.Result;
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            var factory = new ConnectionFactory();

            factory.HostName = "192.168.31.121";


            using (var connection = factory.CreateConnection())
            {
                using (var channel = connection.CreateModel())
                {
                    channel.QueueDeclare("hello", false, false, false, null);
                    string     message = "Hello World";
                    Model.Info info    = new Model.Info();
                    info.ID   = 1;
                    info.Name = "xiao";
                    var body = Serialize(info);//Encoding.UTF8.GetBytes(message);
                    channel.BasicPublish("", "hello", null, body);
                    Console.WriteLine(" set {0}", message);
                    Console.ReadKey();
                }
            }
        }
Exemplo n.º 5
0
        public static Model.Info Select_Detail(Model.Info model)
        {
            int i;

            string[,] arr = Common.Para.Info;
            if (arr.GetLength(1) == 0)
            {
                DataTable dt = Dal.Info.Select_Detail();
                arr = new string[dt.Rows.Count + 1, 3];
                for (i = 0; i < dt.Rows.Count; i++)
                {
                    arr[i + 1, 0] = dt.Rows[i]["Ititle"].ToString();
                    arr[i + 1, 1] = dt.Rows[i]["Iinfo"].ToString();
                    arr[i + 1, 2] = dt.Rows[i]["Type"].ToString();
                }
                dt.Dispose();

                Common.Para.Info = arr;
            }

            i = Common.Functions.ConvertInt16(model.s_Iid, -1);
            try
            {
                model.Ititle = arr[i, 0];
                model.Iinfo  = arr[i, 1];
                model.Type   = Common.Functions.ConvertInt16(arr[i, 2], 0);
            }
            catch
            {
                model.Ititle = "";
                model.Iinfo  = "";
                model.Type   = 0;
            }

            return(model);
        }
Exemplo n.º 6
0
 public InfoView(Camera camera, Info _trooperInfo)
     : base(camera)
 {
     this._trooperInfo = _trooperInfo;
 }
Exemplo n.º 7
0
 public static void Update(Model.Info model)
 {
     Dal.Info.Update(model.s_Iid, model.Iinfo);
 }
Exemplo n.º 8
0
        /// <param name="model">Model.Info</param>
        public static DataSet Select_List(Model.Info model)
        {
            DataSet ds = Dal.Info.Select_List(model.s_Iid);

            return(ds);
        }
Exemplo n.º 9
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            if (CheckInput())
            {
                int extendID = 0;
                if (ExtendTypeID != 0)
                {
                    Model.Extend modelExtend = new Model.Extend();
                    #region Extend表赋值
                    modelExtend.ExtendTypeID = ExtendTypeID;
                    modelExtend.F1 = txtF1.Text;
                    modelExtend.F2 = txtF2.Text;
                    modelExtend.F3 = txtF3.Text;
                    modelExtend.F4 = txtF4.Text;
                    modelExtend.F5 = txtF5.Text;
                    modelExtend.F6 = txtF6.Text;
                    modelExtend.F7 = txtF7.Text;
                    modelExtend.F8 = txtF8.Text;
                    modelExtend.F9 = txtF9.Text;
                    modelExtend.FA = txtFA.Text;
                    modelExtend.FB = txtFB.Text;
                    modelExtend.FC = txtFC.Text;
                    modelExtend.FD = txtFD.Text;
                    modelExtend.FE = txtFE.Text;
                    modelExtend.FF = txtFF.Text;
                    modelExtend.FG = txtFG.Text;
                    modelExtend.FH = txtFH.Text;
                    modelExtend.FI = txtFI.Text;
                    modelExtend.FJ = txtFJ.Text;
                    modelExtend.FK = txtFK.Text;
                    modelExtend.FL = txtFL.Text;
                    modelExtend.FM = txtFM.Text;
                    modelExtend.FN = txtFN.Text;
                    modelExtend.FO = txtFO.Text;
                    modelExtend.FP = txtFP.Text;
                    modelExtend.FQ = txtFQ.Text;
                    modelExtend.FR = txtFR.Text;
                    modelExtend.FS = txtFS.Text;
                    modelExtend.FT = txtFT.Text;
                    modelExtend.FU = txtFU.Text;
                    modelExtend.FV = txtFV.Text;
                    modelExtend.FW = txtFW.Text;
                    modelExtend.FX = txtFX.Text;
                    modelExtend.FY = txtFY.Text;
                    modelExtend.FZ = txtFZ.Text;
                    #endregion
                    bllExtend.Add(modelExtend);
                    extendID = modelExtend.ExtendID;
                }

                Model.Info modelInfo = new Model.Info();
                #region Info表赋值
                modelInfo.CategoryID = int.Parse(ddlCategory.SelectedValue);
                modelInfo.Title = txtTitle.Text;    //标题
                modelInfo.Title_en = txtTitle_en.Text;//英文标题
                modelInfo.InfoType = int.Parse(ddlInfoType.SelectedValue);//信息类型
                List<string> infoProperty = new List<string>();
                for (int i = 0; i < chkInfoProperty.Items.Count; i++)
                {
                    bool isSelected = chkInfoProperty.Items[i].Selected;
                    string strIsSelected = BLL.TypeEnum.BoolAction.GetBool(isSelected, "1", "0");
                    infoProperty.Add(strIsSelected);
                }
                modelInfo.InfoProperty = lv_Common.StringPlus.ConvertListToString(infoProperty);//信息属性
                modelInfo.ApprovedState = Convert.ToInt32(ddlApprovedState.SelectedValue); //审核状态
                //modelInfo.ApprovedTimeList = ApprovedTimeList;
                modelInfo.Images = UpLoadControls1.UcImageUrl; //图片
                //modelInfo.AlbumID = Convert.ToInt32(ddlAlbum.SelectedValue); //关联相册ID
                modelInfo.Summary = txtSummary.Text; //简介
                modelInfo.Detail = txtDetail.Value;  //详细内容
                if (txtAuthor.Text != "")
                {
                    modelInfo.Author = txtAuthor.Text;   //作者
                }
                else
                {
                    modelInfo.Author = ddlAuthor.SelectedItem.Text;
                }
                modelInfo.InfoFrom = txtInfoFrom.Text; //信息来源
                modelInfo.CreateDate = Convert.ToDateTime(txtCreateDate.Text); //发布时间
                //modelInfo.CreateBy = bp_curUser;
                modelInfo.ModifyDate = DateTime.Now; //修改时间
                modelInfo.ModifyBy = bp_curUser;  //修改者
                modelInfo.Hits = Convert.ToInt32((txtHits.Text == "") ? "0" : txtHits.Text); //点击次数
                modelInfo.Link = txtLink.Text; //外部链接
                //modelInfo.SiteID = SiteID;
                //modelInfo.IsShow = IsShow;
                //modelInfo.IsDel = IsDel;
                //modelInfo.Types = Types;
                modelInfo.Sort = Convert.ToInt32((txtSort.Text == "") ? "0" : txtSort.Text); //排序
                //modelInfo.Tag = Tag;
                //modelInfo.JasonVlaue = JasonVlaue;
                //modelInfo.StringArrayValue = StringArrayValue;
                modelInfo.ExtendID = extendID; //扩展ID
                #endregion
                bllInfo.Add(modelInfo);
                lv_Common.MessageBox.ShowAndRedirect(this.Page, "新增成功", "List.aspx");

            }
        }