예제 #1
0
 protected void tags_RetrieveAutoCompleterItems(object sender, AutoCompleter.RetrieveAutoCompleterItemsEventArgs e)
 {
     if (e.Query.Trim().Length != 0)
     {
         string[] ents = e.Query.Split(' ');
         if (ents != null && ents.Length > 0 && ents[ents.Length - 1].Trim().Length > 0)
         {
             timerUpdatePreview.Enabled = false;
             preview.Visible = false;
             foreach (Tag idx in Tag.FindAll(Expression.Like("Name", "%" + ents[ents.Length - 1] + "%")))
             {
                 if (idx.Name == ents[ents.Length - 1])
                     continue;
                 AutoCompleterItem i = new AutoCompleterItem();
                 i.CssClass = tags.CssClass + "-item";
                 i.Text = idx.Name;
                 i.ID = "id" + idx.Id;
                 e.Controls.Add(i);
             }
         }
     }
     if (e.Controls.Count > 0)
     {
         preview.Visible = false;
         timerUpdatePreview.Enabled = false;
     }
     else
     {
         preview.Visible = true;
         timerUpdatePreview.Enabled = true;
     }
 }
        /// <summary>
        ///
        /// </summary>
        public NewFindMerchandise(DesktopSession desktopSession)
        {
            this.DesktopSession = desktopSession;
            InitializeComponent();

            if (desktopSession != null)
            {
                this.searchButton.BackgroundImage      = this.DesktopSession.ResourceProperties.vistabutton_blue;
                this.cancelButton.BackgroundImage      = this.DesktopSession.ResourceProperties.vistabutton_blue;
                this.manualEntryButton.BackgroundImage = this.DesktopSession.ResourceProperties.vistabutton_blue;
                this.BackgroundImage = this.DesktopSession.ResourceProperties.newDialog_400_BlueScale;
            }

            Action = ACTION_OK;

            _autoCompleter = new AutoCompleter(
                manufacturerTextBox,
                suggestedManufacturerListBox,
                _manufacturers);

            suggestedManufacturerListBox.VisibleChanged +=
                (sender, args) =>
            {
                if (suggestedManufacturerListBox.Visible)
                {
                    suggestedManufacturerLabel.Visible = true;
                }
            };
        }
예제 #3
0
 private void txt1Nombre_Click(object sender, EventArgs e)
 {
     if (txt1Nombre.Text != "")
     {
         AutoCompleter.FillDataGrid(dataGridView1, "SELECT [ProdID] ,[Producto] ,[Precio] ,[Moneda] ,[Existencia] ,[Responsiva] ,[ControlaExist] ,[UReg] ,[FReg] ,[Estatus] FROM tblProductos where Producto like '%" + txt1Nombre.Text + "%'", "Producto");
     }
 }
예제 #4
0
        public override void Init()
        {
            Instance = this;

            try
            {
                m_codeEditor = new CodeEditor();

                AutoCompleter.Init();

                ResetConsole();

                // Make sure compiler is supported on this platform
                m_evaluator.Compile("");

                foreach (string use in DefaultUsing)
                {
                    AddUsing(use);
                }
            }
            catch (Exception e)
            {
                // TODO remove page button from menu?
                ExplorerCore.LogWarning($"Error setting up console!\r\nMessage: {e.Message}");
            }
        }
예제 #5
0
        private void bunifuMaterialTextbox1_OnValueChanged(object sender, EventArgs e)
        {
            newName = btn1Nombre.Text;

            string query = "SELECT * FROM tblClientes where NombreComercial like '%" + btn1Nombre.Text + "%'";

            AutoCompleter.FillDataGrid(dataGridView1, query, "NombreComercial");
        }
예제 #6
0
        public void RegisterAutoCompleter(AutoCompleter autoCompleter)
        {
            if (autoCompleterDict.ContainsKey(autoCompleter.Identifier))
            {
                throw new ArgumentException("already registered identifier.", "autoCompleter");
            }

            autoCompleterDict.Add(autoCompleter.Identifier, autoCompleter);
            autoCompleterList.Add(autoCompleter.Priority, autoCompleter);
        }
예제 #7
0
        public Venta()
        {
            InitializeComponent();
            conn.ConnectionString = ConnectionString.connectionString;
            DateTimePicker metroDateTime1 = new DateTimePicker
            {
                Value = DateTime.Now
            };

            AutoCompleter.SetTextboxAutoComplete(txtProductos, "SELECT * FROM tblProductos", "Producto");
            settingsHelper = SettingsHelper.getInstance();
            exchangePrice  = new ExchangePrice();
        }
예제 #8
0
        public MyConsole()
        {
            myForm1 = new Form1(this);
            myAutoCompleter = new AutoCompleter(this);
            myPluginHanddler = new PluginHanddler(this);
            myInterpreter = new Interpreter(this);
            myBenchObjectHandler = new BenchObjectHandler(this);
            myPluginHanddler.addPlugin(new GeneralPlugin(),"mainPlugin");
            myBenchObjectHandler.addObject(this,"MConsole");
            myBenchObjectHandler.addObject(true,"true");
            myBenchObjectHandler.addObject(false, "false");
            myBenchObjectHandler.addObject(new IntParser(),"intParser");

            myBenchObjectHandler.addObject(new TestClass(), "testObject");
        }
예제 #9
0
 protected void auto_RetrieveAutoCompleterItems(object sender, AutoCompleter.RetrieveAutoCompleterItemsEventArgs e)
 {
     if (e.Query.Trim() == string.Empty)
         return;
     foreach (QuizItem idx in QuizItem.Search(e.Query))
     {
         AutoCompleterItem a = new AutoCompleterItem();
         System.Web.UI.WebControls.Literal lit = new System.Web.UI.WebControls.Literal();
         string tmpHeader = idx.Header;
         foreach (string idxStr in e.Query.Split(' '))
         {
             int index = tmpHeader.IndexOf(idxStr, StringComparison.InvariantCultureIgnoreCase);
             if (index != -1)
             {
                 tmpHeader = tmpHeader.Insert(index + idxStr.Length, "</span>");
                 tmpHeader = tmpHeader.Insert(index, "<span class=\"found\">");
             }
         }
         lit.Text = string.Format("<a href=\"{0}\">{1}</a>", idx.Url, tmpHeader);
         a.Controls.Add(lit);
         e.Controls.Add(a);
     }
 }
예제 #10
0
 private void FillDataGrid()
 {
     AutoCompleter.FillDataGrid(dataGridView1, "SELECT [ProdID] ,[Producto] ,[Precio] ,[Moneda] ,[Existencia] ,[Responsiva] ,[ControlaExist] ,[UReg] ,[FReg] ,[Estatus] FROM tblProductos", "Producto");
 }
예제 #11
0
        public override void Update()
        {
            m_codeEditor?.Update();

            AutoCompleter.Update();
        }