예제 #1
0
        /// <summary>
        /// 填充
        /// </summary>
        /// <returns></returns>
        protected override GoodsEntity FillEntity()
        {
            var info = base.FillEntity();

            if (info != null)
            {
                var values = Edit1.TagCheckBoxList.GetSelectedValues();
                if (values.Length > 0)
                {
                    info.Tag = values;
                }
                info.Category = new CategoryEntity {
                    Id = Edit1.CategoryId
                };
                info.Account = new AccountEntity {
                    Id = 0
                };
                info.Products        = Edit1.GetProducts(info);
                info.GoodsImages     = Edit1.GetGoodsImages(info);
                info.GoodsProperties = Edit1.GetGoodsProperties(info);
                info.GoodsDetails    = Edit1.GetGoodsDetails(info);
                info.PublishTime     = DateTime.Now;
                info.IsSales         = false;
            }
            return(info);
        }
예제 #2
0
        public void MsgBoxLogin(String login, String psw, View.IOnClickListener btn2lst)
        {
            invisible();
            Dialog.SetTitle("Login/Password");
            Edit1.SetText(login, TextView.BufferType.Normal);
            Edit2.SetText(psw, TextView.BufferType.Normal);
            Button1.SetText("CANCEL", TextView.BufferType.Normal);
            Button2.SetText("OK", TextView.BufferType.Normal);
            Text1.Visibility = ViewStates.Visible;
            Text1.SetText("Login", TextView.BufferType.Normal);
            Text2.Visibility = ViewStates.Visible;
            Text2.SetText("Password", TextView.BufferType.Normal);
            Button1.Visibility = ViewStates.Visible;
            Button2.Visibility = ViewStates.Visible;
            Edit1.Visibility   = ViewStates.Visible;
            Edit2.Visibility   = ViewStates.Visible;
//			btn1.SetOnClickListener (new View.IOnClickListener ());//{public void onClick(View v){dialog.cancel();}});
//			btn2.SetOnClickListener(btn2lst);
            try
            {
                Dialog.Show();
            }
            catch (Exception err)
            {
                Log.Debug("xxx", err.Message);
            }
        }
예제 #3
0
        /// <summary>
        /// Invoked when color changed
        /// </summary>
        /// <param name="d">DependencyObject</param>
        /// <param name="e">Dependency Property Changed Event Args</param>
        private void colorpicker_ColorChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            BrushConverter  conv  = new BrushConverter();
            SolidColorBrush brush = conv.ConvertFromString(colorpicker.SelectedItem.Color.ToString()) as SolidColorBrush;

            Edit1.SetLineBackground(Edit1.LineNumber, true, brush);
            colorpicker.IsExpanded = false;
        }
예제 #4
0
        /// <summary>
        /// 填充
        /// </summary>
        /// <returns></returns>
        protected override FreightEntity FillEntity()
        {
            var info = base.FillEntity();

            if (info != null)
            {
                info.Carries = Edit1.GetSaveCarries();
            }
            return(info);
        }
예제 #5
0
        /// <summary>
        /// 填充
        /// </summary>
        /// <returns></returns>
        protected override FreightEntity FillEntity()
        {
            var info = base.FillEntity();

            if (info != null)
            {
                info.Account = new AccountEntity {
                    Id = 0
                };
                info.Regions = Edit1.GetSaveRegions();
            }
            return(info);
        }
예제 #6
0
        /// <summary>
        /// 填充
        /// </summary>
        /// <returns></returns>
        protected override GoodsEntity FillEntity()
        {
            var info = base.FillEntity();

            if (info != null)
            {
                info.IsSales         = false;
                info.Products        = Edit1.GetProducts(info);
                info.GoodsImages     = Edit1.GetGoodsImages(info);
                info.GoodsProperties = Edit1.GetGoodsProperties(info);
                info.GoodsDetails    = Edit1.GetGoodsDetails(info);
                info.PublishTime     = DateTime.Now;
                info.Category        = new CategoryEntity {
                    Id = Edit1.CategoryId
                };
            }
            return(info);
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            //Getting the string to find the text
            Edit1.FindOptions.FindText = "BusinessObject";

            for (int i = 0; i < Edit1.Lines.Count; i++)
            {
                //Check whether Lines collection contains the required string
                if (Edit1.Lines[i].Text.Contains(Edit1.FindOptions.FindText))
                {
                    string pat = @"" + Edit1.FindOptions.FindText;
                    Regex  r   = new Regex(pat, RegexOptions.IgnoreCase);
                    Match  m   = r.Match(Edit1.Lines[i].Text);
                    //Get the string index and length
                    Edit1.SelectLines(i, i, m.Index, m.Index + m.Length);
                    MessageBox.Show("Current position:\n" + "Linenumber=" + Edit1.LineNumber + "\nCursorindex=" + m.Index);
                }
            }
        }