public override string ToString()
        {
            g = (FILTER)base.Tag;

            Binding myBinding = new Binding("resultvarname");
            myBinding.Mode = BindingMode.TwoWay;
            myBinding.Source = g;
            txtvarn.SetBinding(TextBox.TextProperty, myBinding);

            Binding myBinding2 = new Binding("allowedchars");
            myBinding2.Mode = BindingMode.TwoWay;
            myBinding2.Source = g;
            txtallow.SetBinding(TextBox.TextProperty, myBinding2);

            Binding myBinding3 = new Binding("variable");
            myBinding3.Mode = BindingMode.TwoWay;
            myBinding3.Source = g;
            txtvar.SetBinding(TextBox.TextProperty, myBinding3);

            Binding descbinding = new Binding("Description");
            descbinding.Mode = BindingMode.TwoWay;
            descbinding.Source = g;
            txtdesc.SetBinding(TextBox.TextProperty, descbinding);

            return base.ToString();
        }
        public override string ToString()
        {
            g = (FILTER)base.Tag;

            Binding myBinding = new Binding("resultvarname");

            myBinding.Mode   = BindingMode.TwoWay;
            myBinding.Source = g;
            txtvarn.SetBinding(TextBox.TextProperty, myBinding);

            Binding myBinding2 = new Binding("allowedchars");

            myBinding2.Mode   = BindingMode.TwoWay;
            myBinding2.Source = g;
            txtallow.SetBinding(TextBox.TextProperty, myBinding2);

            Binding myBinding3 = new Binding("variable");

            myBinding3.Mode   = BindingMode.TwoWay;
            myBinding3.Source = g;
            txtvar.SetBinding(TextBox.TextProperty, myBinding3);

            Binding descbinding = new Binding("Description");

            descbinding.Mode   = BindingMode.TwoWay;
            descbinding.Source = g;
            txtdesc.SetBinding(TextBox.TextProperty, descbinding);

            return(base.ToString());
        }
예제 #3
0
 private void OnAllClick()
 {
     currFilter = FILTER.All;
     foreach (Spell s in allSpells)
     {
         AddItem(s);
     }
 }
예제 #4
0
 private void OnBonusSpellsClick()
 {
     currFilter = FILTER.Bonus;
     foreach (Spell s in bonusSpells)
     {
         AddItem(s);
     }
 }
예제 #5
0
 private void OnRaySpellsClick()
 {
     currFilter = FILTER.Ray;
     foreach (Spell s in raySpells)
     {
         AddItem(s);
     }
 }
예제 #6
0
        public IModLoader()
        {
            filtersettings = new FILTER[SharpMikCommon.UF_MAXFILTER];

            for (int i = 0; i < filtersettings.Length; i++)
            {
                filtersettings[i] = new FILTER();
            }
        }
예제 #7
0
 public ArchiveModel(
     IPublishedContent content,
     string headline,
     string subheader,
     string body,
     string image,
     string crop,
     string publishedDate,
     FILTER filter) : base(content)
 {
     this.Id          = content.Id;
     this.Headline    = content.GetPropertyValue <string>(headline);
     this.SubHeader   = content.GetPropertyValue <string>(subheader);
     this.Body        = content.GetPropertyValue <string>(body);
     this.Image       = content.GetCropUrl(image, crop);
     this.PublishDate = publishedDate == "" ? content.CreateDate :  content.GetPropertyValue <DateTime>(publishedDate);
     this.Filter      = filter;
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        m_health                              = CurrentRequest.Resolver.Resolve <IHealth>();
        m_ActivityLogService                  = CurrentRequest.Resolver.Resolve <IActivityLogService>();
        ucServerHealthTabs.LanguageID         = LanguageID;
        ucServerHealthTabs.Title              = PhraseLib.Lookup("term.health", LanguageID) + " " + PhraseLib.Lookup("term.for", LanguageID).ToLower();
        ((UE_MasterPage)this.Master).Tab_Name = "8_10";
        gvNodes.PageSize                      = PAGESIZE = 30;
        btnSearch.Text                        = PhraseLib.Lookup("term.search", LanguageID);
        string tempsearch = PhraseLib.Lookup("term.nodes", LanguageID);

        txtSearch.Attributes["placeholder"] = tempsearch;
        if (!IsPostBack)
        {
            ucServerHealthTabs.EnginesInstalled = m_health.GetInstalledEngines(LanguageID);
            hdnURL.Value = m_health.HealthServiceURL;
            ucServerHealthTabs.SetInfoMessage("", false);
            InitializePage();

            PAGEINDEX = 1;
            if (string.IsNullOrEmpty(Request.QueryString["SORTBY"]))
            {
                SORTBY = "node";
            }
            else
            {
                SORTBY = Request.QueryString["SORTBY"];
            }

            if (string.IsNullOrEmpty(Request.QueryString["SORTDIR"]))
            {
                SORTDIR = "ASC";
            }
            else
            {
                SORTDIR = Request.QueryString["SORTDIR"];
            }

            SetSortOrderImage(div_node, SORTDIR);

            switch (SORTBY)
            {
            case "report":
                SetSortOrderImage(div_report, SORTDIR);
                break;

            case "alert":
                SetSortOrderImage(div_alert, SORTDIR);
                break;

            default:
                SetSortOrderImage(div_node, SORTDIR);
                break;
            }

            if (!string.IsNullOrEmpty(Request.QueryString["SEARCH"]))
            {
                txtSearch.Text = SEARCH = Request.QueryString["SEARCH"];
            }

            if (string.IsNullOrEmpty(Request.QueryString["FILTER"]))
            {
                FILTER = "0";
            }
            else
            {
                FILTER = Request.QueryString["FILTER"];
                filterNodeHealth.SelectedIndex = FILTER.ConvertToInt16();
            }

            PopulateNodesPage();
        }
    }
    private void PopulateNodesPage()
    {
        hdnPageCount.Value = "0";
        List <KeyValuePair <string, string> > headers   = new List <KeyValuePair <string, string> >();
        IRestServiceHelper RESTServiceHelper            = CurrentRequest.Resolver.Resolve <IRestServiceHelper>();
        KeyValuePair <NodeHealthSummary, string> result = RESTServiceHelper.CallService <NodeHealthSummary>(RESTServiceList.ServerHealthService, (hdnURL.Value != string.Empty?  hdnURL.Value + "/nodes?offset=0&pagesize=" + PAGESIZE.ToString() + "&sort=" + SORTBY + "&sortdir=" + SORTDIR + "&search=" + Server.UrlEncode(SEARCH) + "&filter=" + GetFilter(FILTER.ConvertToInt16()) + (FILTER.ConvertToInt16() == 0 || FILTER.ConvertToInt16() == 2 ? "&report=true" : "&report=all"):""), LanguageID, HttpMethod.Get, String.Empty, false, headers);
        string error = result.Value;

        nodeSummary = result.Key;

        if (error == string.Empty)
        {
            if (nodeSummary != null && nodeSummary.RowCount > 0 && nodeSummary.Machines != null)
            {
                //Nodes
                DataTable dtNodes = FormatNodes(nodeSummary);
                gvNodes.DataSource = dtNodes;
                gvNodes.DataBind();

                if (nodeSummary.RowCount <= PAGESIZE)
                {
                    hdnPageCount.Value = "1";
                }
                else
                {
                    decimal value = (nodeSummary.RowCount.ConvertToDecimal() / PAGESIZE.ConvertToDecimal());
                    hdnPageCount.Value = Math.Ceiling(value).ToString();
                }
            }
        }
        else
        {
            ucServerHealthTabs.SetInfoMessage(error, true);
        }

        if (hdnPageCount.Value == "0")
        {
            loadmoreajaxloader.InnerHtml = "<center>" + PhraseLibExtension.PhraseLib.Lookup("term.norecords", LanguageID) + "</center>";
        }
        else if (hdnPageCount.Value == "1")
        {
            loadmoreajaxloader.InnerHtml = "<center>" + PhraseLibExtension.PhraseLib.Lookup("term.nomorerecords", LanguageID) + "</center>";
        }
    }
예제 #10
0
 private void ShowUsables()
 {
     currFilter = FILTER.Usables;
     CleanItemsButtons();
     CreateItemButtons(ItemData.TYPE.POTION);
 }
예제 #11
0
 private void ShowClothes()
 {
     currFilter = FILTER.Clothes;
     CleanItemsButtons();
     CreateItemButtons(ItemData.TYPE.ARMOR);
 }
예제 #12
0
 private void ShowWeapons()
 {
     currFilter = FILTER.Weapons;
     CleanItemsButtons();
     CreateItemButtons(ItemData.TYPE.WEAPON);
 }
예제 #13
0
 public void OnGearBtnClick(bool isChecked)
 {
     if (isChecked) {
     //			MusicManager.playEffectMusic("SFX_UI_button_tap_simple_1b");
         MusicManager.playEffectMusic("SFX_UI_button_tap_2a");
         TeamDlg.instance.currentTag = TeamDlg.Tag.TAG_GEAR;
     //			CheckBox_Gear.spriteName = "GEAR_Checked";
     //			CheckBox_Gear.depth = 3;
     //			CheckBox_Page.SetActive(true);
         OnPage2BtnClick(false);
         OnPage3BtnClick(false);
         OnPage4BtnClick(false);
         OnPage1BtnClick(true);
         clearHighLight();
         currentFilter = FILTER.OWN_GEAR;
         this.updateStorageCollection(0);
         setPageToZero();
     }
     //		} else {
     //			CheckBox_Gear.spriteName = "GEAR_Unchecked";
     //			CheckBox_Gear.depth = 2;
     //		}
 }
예제 #14
0
        //Method that takes the tuples from the inqueue and processes them.
        public void process_inQueue()
        {
            FILTER filter = new FILTER();
            CUSTOM custom = new CUSTOM();
            UNIQ   uniq   = new UNIQ();
            DUP    dup    = new DUP();
            COUNT  count  = new COUNT();

            while (true)
            {
                Monitor.Enter(tLock);
                try
                {
                    if (in_queue.Count > 0)
                    {
                        string[] words = op_spec.Split(',');

                        remoting_interfaces.Tuple outTuple;

                        if (in_queue[0].getID() != 0)
                        {
                            Console.WriteLine("   ");
                            Console.WriteLine("ID: " + in_queue[0].getID());
                            Console.WriteLine("User: "******"URL: " + in_queue[0].getURL());
                        }

                        if (words[0] == "FILTER")
                        {
                            //get the tuple after computation of Filter
                            outTuple = filter.doTweeters(in_queue[0], Int32.Parse(words[1]), words[2], words[3]);
                            out_queue.Add(outTuple);
                            in_queue.Remove(in_queue[0]);
                            Console.WriteLine("Output from Operator:");
                            Console.WriteLine(outTuple.getID());
                            Console.WriteLine(outTuple.getUser());
                            Console.WriteLine(outTuple.getURL());
                        }
                        if (words[0] == "CUSTOM")
                        {
                            List <string> Followers = new List <string>();

                            //get the list of followers
                            Followers = custom.getoutput(words[1], words[3], in_queue[0]);
                            foreach (string follower in Followers)
                            {
                                Console.WriteLine("follower: " + follower);
                                remoting_interfaces.Tuple Tuple = new remoting_interfaces.Tuple(0, follower, "");
                                out_queue.Add(Tuple);
                            }

                            in_queue.Remove(in_queue[0]);
                        }
                        if (words[0] == "UNIQ")
                        {
                            outTuple = uniq.uniqTuple(in_queue[0], Int32.Parse(words[1]));
                            //only put the tuple in the out_queue if don't exists another equal to that tuple
                            if (outTuple.getUser() != "")
                            {
                                out_queue.Add(outTuple);
                                Console.WriteLine("Output from Operator:");
                                Console.WriteLine(outTuple.getUser());
                            }
                            in_queue.Remove(in_queue[0]);
                        }
                        if (words[0] == "DUP")
                        {
                            List <remoting_interfaces.Tuple> duplicatedTuple = dup.duplicate(in_queue[0]);

                            foreach (remoting_interfaces.Tuple tuplo in duplicatedTuple)
                            {
                                out_queue.Add(tuplo);
                                Console.WriteLine("Output from Operator:");
                                Console.WriteLine(tuplo.getID());
                                Console.WriteLine(tuplo.getUser());
                                Console.WriteLine(tuplo.getURL());
                            }
                            duplicatedTuple.Remove(in_queue[0]);
                            duplicatedTuple.Remove(in_queue[0]);

                            in_queue.Remove(in_queue[0]);
                        }
                        if (words[0] == "COUNT")
                        {
                            outTuple = count.countMethod(in_queue[0]);
                            out_queue.Add(outTuple);

                            Console.WriteLine("Output from Operator:");
                            Console.WriteLine(outTuple.getUser());
                            Console.WriteLine("Tuples count until now: " + count.getCount());
                            Console.WriteLine("      ");

                            in_queue.Remove(in_queue[0]);
                        }
                    }
                }
                finally
                {
                    Monitor.Exit(tLock);
                }
            }
        }
예제 #15
0
 static extern _LTRNative.LTRERROR LTR212_ReadFilter(string fname, out FILTER filter);
예제 #16
0
 public static _LTRNative.LTRERROR ReadFilter(string fname, out FILTER filter)
 {
     return(LTR212_ReadFilter(fname, out filter));
 }
예제 #17
0
 public void updateISO()
 {
     //		CheckBox_Page.SetActive(false);
     clearHighLight();
     currentFilter = FILTER.OWN_ISO;
     this.updateStorageCollection(0);
 }
예제 #18
0
        internal void clickSaunaFilter()
        {
            //verify if Sauna is present
            bool containsSauna = false;
            //Collect "Fun things to do" filters
            IReadOnlyCollection <IWebElement> FUN_THINGS_FILTERS = _driver.FindElements(By.CssSelector("[data-name=\"popular_activities\"]"));

            //Check sauna
            foreach (IWebElement FILTER in FUN_THINGS_FILTERS)
            {
                string filterName = FILTER.FindElement(By.CssSelector("label > div > span.filter_label")).Text;
                if (filterName == "Sauna")
                {
                    IWebElement FILTER_CHECKBOX = FILTER.FindElement(By.CssSelector("label > div"));
                    FILTER_CHECKBOX.Click();
                    containsSauna = true;
                    break;
                }
            }

            //To use the "Sauna" filter, we must: Enable "Spa" filter, then Check "Sauna", then uncheck "SPA" filter. Sometimes SPA doesn't come automaticaly
            if (!containsSauna)
            {
                //Collect "Facility" filtrs
                IReadOnlyCollection <IWebElement> FACILITY_FILTERS = _driver.FindElements(By.CssSelector("[data-name=\"hotelfacility\"]"));

                //Click in show more
                IWebElement MORE_FACILITIES = _driver.FindElement(By.CssSelector("#filter_facilities > div.filteroptions > button.collapsed_partly_link.collapsed_partly_more"));
                MORE_FACILITIES.Click();

                //Check "SPA" or "SPA and Wellness Centre"

                foreach (IWebElement FILTER in FACILITY_FILTERS)
                {
                    string filterName = FILTER.FindElement(By.CssSelector("label > div > span.filter_label")).Text;
                    if (filterName == "Spa" || filterName == "Spa and Wellness Centre")
                    {
                        IWebElement FILTER_CHECKBOX = FILTER.FindElement(By.CssSelector("label > div"));
                        FILTER_CHECKBOX.Click();
                        Thread.Sleep(3000);
                        break;
                    }
                }

                //Collect "Fun things to do" filters
                FUN_THINGS_FILTERS = _driver.FindElements(By.CssSelector("[data-name=\"popular_activities\"]"));

                //Check sauna
                foreach (IWebElement FILTER in FUN_THINGS_FILTERS)
                {
                    string filterName = FILTER.FindElement(By.CssSelector("label > div > span.filter_label")).Text;
                    if (filterName == "Sauna")
                    {
                        IWebElement FILTER_CHECKBOX = FILTER.FindElement(By.CssSelector("label > div"));
                        FILTER_CHECKBOX.Click();
                        Thread.Sleep(3000);
                        break;
                    }
                }

                //Uncheck spa from "Fun things to do" area
                FUN_THINGS_FILTERS = _driver.FindElements(By.CssSelector("[data-name=\"popular_activities\"]"));
                foreach (IWebElement FILTER in FUN_THINGS_FILTERS)
                {
                    string filterName = FILTER.FindElement(By.CssSelector("label > div > span.filter_label")).Text;
                    if (filterName == "Spa" || filterName == "Spa and Wellness Centre")
                    {
                        IWebElement FILTER_CHECKBOX = FILTER.FindElement(By.CssSelector("label > div"));
                        if (FILTER_CHECKBOX.Selected)
                        {
                            FILTER_CHECKBOX.Click();
                            Thread.Sleep(3000);
                            break;
                        }
                    }
                }
                //Uncheck spa from facility ares
                FACILITY_FILTERS = _driver.FindElements(By.CssSelector("[data-name=\"hotelfacility\"]"));
                foreach (IWebElement FILTER in FACILITY_FILTERS)
                {
                    string filterName = FILTER.FindElement(By.CssSelector("label > div > span.filter_label")).Text;
                    if (filterName == "Spa" || filterName == "Spa and Wellness Centre")
                    {
                        IWebElement FILTER_CHECKBOX = FILTER.FindElement(By.CssSelector("label > div"));
                        FILTER_CHECKBOX.Click();
                        Thread.Sleep(3000);
                        break;
                    }
                }
            }
        }
예제 #19
0
 private void ShowAll()
 {
     currFilter = FILTER.All;
     CleanItemsButtons();
     CreateItemButtons();
 }
예제 #20
0
        /// <summary>
        /// 获取对象的解释文本
        /// </summary>
        /// <param name="obj">对象</param>
        /// <param name="filter">过滤</param>
        /// <param name="value">值</param>
        /// <returns>对象的解释文本</returns>
        private static Expression GetExpression(String obj, FILTER filter, object value)
        {
            Expression e = null;

            switch (filter)
            {
            case FILTER.DAYU:
                e = Expression.Gt(obj, value);

                break;

            case FILTER.DAYUDENGYU:
                e = Expression.Ge(obj, value);

                break;

            case FILTER.DENGYU:
                e = Expression.Eq(obj, value);

                break;

            case FILTER.XIAOYU:
                e = Expression.Lt(obj, value);

                break;

            case FILTER.XIAOYUDENGYU:
                e = Expression.Le(obj, value);

                break;

            case FILTER.LIKE:
                e = Expression.Like(obj, value);

                break;

            case FILTER.BAOHANS:
                e = Expression.Like(obj, "%" + (String)value + "%");
                break;

            case FILTER.IN:
                if (value is String[])
                {
                    var res = value as String[];
                    if (res.Length > 0)
                    {
                        e = Expression.In(obj, (object[])value);
                    }
                }
                else
                {
                    var res1 = value.ToString().Split(new String[] { ";" }, StringSplitOptions.RemoveEmptyEntries);
                    if (res1.Length > 0)
                    {
                        e = Expression.In(obj, res1);
                    }
                }
                break;

            default:
                break;
            }
            return(e);
        }