Example #1
0
 public TicketingFilters(string filterstring)
 {
     FilterString = filterstring ?? "all-all";
     string[] filters = FilterString.Split('-');
     pointValueId = filters[0];
     StatusId     = filters[1];
 }
Example #2
0
 public Filters(string filterstring)
 {
     FilterString = filterstring ?? "all-all";
     string[] filters = FilterString.Split('-');
     SprintId = filters[0];
     StatusId = filters[1];
 }
Example #3
0
 public Filters(string filterString)
 {
     FilterString = filterString ?? "all-all-all"; // this will make it so if its empty will show everything
     string[] filters = FilterString.Split('-');
     CategoryId = filters[0];                      // 0 is category id
     Due        = filters[1];                      // 1 is when its is due
     StatusId   = filters[2];                      // status id is whether to do is done or not.
 }
Example #4
0
 public Filters(string filterstring)
 {
     FilterString = filterstring ?? "all-all-all";
     string[] filters = FilterString.Split('-');
     CategoryId = filters[0];
     Due        = filters[1];
     StatusId   = filters[2];
 }
Example #5
0
 public Filters(string filterstring) // create Filters object containing drug classes, dosage forms, and routes for filtering
 {
     FilterString = filterstring ?? "all-all-all";
     string[] filters = FilterString.Split('-');
     DrugClassId  = filters[0];
     DosageFormId = filters[1];
     RouteId      = filters[2];
 }
Example #6
0
 public Filters(string filterstring)
 {
     FilterString = filterstring ?? "all-all-all";
     string[] filters = FilterString.Split('-');
     AgileSprintID = filters[0];
     Due           = filters[1];
     AgileStatusID = filters[2];
 }
Example #7
0
 public Filters(string filterstring)
 {
     // setting default filters and the break out of the two filters
     FilterString = filterstring ?? "all-all";
     string[] filters = FilterString.Split('-');
     SeverityId = filters[0];
     StatusId   = filters[1];
 }
Example #8
0
 public Filters(string filterstring)
 {
     FilterString = filterstring ?? "all-all-all-all";
     string[] filters = FilterString.Split('-');
     Name         = filters[0];
     StatusId     = filters[1];
     SprintNumber = filters[2];
     PointValue   = filters[3];
 }
Example #9
0
 public Filters(string filterstring)
 {
     FilterString = filterstring ?? "all-all-all";
     string[] filters = FilterString.Split('-');
     Sex  = filters[0];
     Area = filters[1];
     //Length = filters[2];
     //Depth = filters[3];
 }
Example #10
0
 public Filters(string filterstring)
 {
     FilterString = filterstring ?? "all-all-all-all-all";
     string[] filters = FilterString.Split('-');
     HairKey          = filters[0];
     GenderKey        = filters[1];
     LocationKey      = filters[2];
     HeadDirectionKey = filters[3];
     PreservationKey  = filters[4];
 }
Example #11
0
 //Stores all the filters for the Burials
 public Filters(string filterString)
 {
     FilterString = filterString ?? "all-all-all-all-all-all-all";
     string[] filters = FilterString.Split('-');
     BurialSubplot = filters[0];
     Sex           = filters[1];
     HairColor     = filters[2];
     SampleTaken   = filters[3];
     AgeCode       = filters[4];
     HeadDirection = filters[5];
     YearFound     = filters[6];
 }
Example #12
0
 public Filters(string filterstring)
 {
     FilterString = filterstring ?? "all-all'all";
     string[] filters = FilterString.Split('-');
     BurialIdString   = BurialId.ToString();
     BurialIdString   = filters[0];
     BurialLocationNs = filters[1];
     BurialLocationEw = filters[2];
     BurialDepth      = filters[3];
     YearFound        = filters[4];
     HeadDirection    = filters[5];
 }
Example #13
0
 public Filters(string filterstring)
 {
     FilterString = filterstring ?? "all-all-all-all-0-10-all-null-all";
     string[] filters = FilterString.Split('-');
     HairColor       = filters[6];
     BurialDirection = filters[1];
     Gender          = filters[2];
     Age             = filters[3];
     DepthMin        = Convert.ToDouble(filters[4]);
     DepthMax        = Convert.ToDouble(filters[5]);
     Location        = filters[0];
     if (filters[7] == "True" || filters[7] == "False")
     {
         Sample = Convert.ToBoolean(filters[7]);
     }
     Wrap = filters[8];
 }
Example #14
0
 public Filters(string filterstring)
 {
     FilterString = filterstring ?? "------------";
     string[] filters = FilterString.Split('-');
     Square        = filters[0];
     Area          = filters[1];
     PhotoTaken    = filters[2];
     BurialGoods   = filters[3];
     Sex           = filters[4];
     HairColor     = filters[5];
     FaceBundle    = filters[6];
     HeadDirection = filters[7];
     EstimatedAge  = filters[8];
     MinLength     = filters[9];
     MaxLength     = filters[10];
     MinDepth      = filters[11];
     MaxDepth      = filters[12];
 }
Example #15
0
        public FilterLocation(string filterstring)
        {
            FilterString = filterstring ?? "all-all-all-all-all-all-all-all-all-all";
            string[] filters = FilterString.Split("-");
            LocationNs    = filters[0];
            LowPairNs     = filters[1];
            HighPairNs    = filters[2];
            LocationEw    = filters[3];
            LowPairEw     = filters[4];
            HighPairEw    = filters[5];
            SubPlotFilter = filters[6];

            //Other filters (I'd prefer to add them to a different class, but for time issues, let's not overcomplicate things)
            Gender = filters[7];

            //Mummy Characteristics
            HeadDirection = filters[8];
            AdultChild    = filters[9];
        }
Example #16
0
 //Constructor for filter class setting all necessary inputs to all
 public Filters(string filterstring)
 {
     FilterString = filterstring ?? "all-all-all-all-all-all----";
     string[] filters = FilterString.Split('-');
     HairColorId       = filters[0];
     BurialWrapping    = filters[1];
     AgeBracketAtDeath = filters[2];
     Sex            = filters[3];
     BonesCollected = filters[4];
     HeadDirection  = filters[5];
     YearFound      = filters[6];
     //LocationNS = filters[6];
     //LocationEW = filters[7];
     //LocationNSLowerValue = filters[8];
     //LocationNSUpperValue = filters[9];
     //LocationEWLowerValue = filters[10];
     //LocationEWUpperValue = filters[11];
     //LocationSubplot = filters[12];
     Length = filters[7];
     Depth  = filters[8];
     ArtifactDescription = filters[9];
 }
        public Filters(string filterstring)
        {
            //declaring the FilterString which is passed in by the Burial Controller, if it is null, then it is automatically sent to "all-"
            FilterString = filterstring ?? "all-all-all-all-all";

            //spliting the FilterString into an array, split by the "-" character
            string[] filters = FilterString.Split('-');


            //sets a specific attribute equal to each position of the array
            PreservationIndex = filters[0];
            string oldChar = "%2F";
            string newChar = "/";

            PreservationIndex = PreservationIndex.Replace(oldChar, newChar);
            HeadDirection     = filters[1];
            HeadDirection     = HeadDirection.Replace(oldChar, newChar);
            Gender            = filters[2];
            HairColor         = filters[3];
            HairColor         = HairColor.Replace(oldChar, newChar);
            YearFound         = filters[4];
        }
Example #18
0
        private void OpenFile(object sender, EventArgs e)
        {
            if (opening)
            {
                return;
            }
            opening = true;
            String        Filter  = "";
            List <String> Filters = new List <string>();

            Filters.Add("all files (*.*)|*.*");
            List <String> Extenstions        = new List <string>();
            String        AllSupportedFilesA = "All Supported Files (";
            String        AllSupportedFilesB = "|";

            foreach (Plugin p in Program.PluginManager.Plugins)
            {
                foreach (Type t in p.FileFormatTypes)
                {
                    if (t.GetInterfaces().Contains(typeof(IViewable)))
                    {
                        dynamic d = new StaticDynamic(t);
                        String  FilterString;
                        try
                        {
                            FilterString = d.Identifier.GetFileFilter();
                        }
                        catch (NotImplementedException)
                        {
                            continue;
                        }
                        if (FilterString == null || FilterString.Length == 0)
                        {
                            continue;
                        }
                        if (!Filters.Contains(FilterString.ToLower()))
                        {
                            string[] strArray = FilterString.Split(new char[] { '|' });
                            if ((strArray == null) || ((strArray.Length % 2) != 0))
                            {
                                continue;
                            }
                            string[] q = FilterString.Split('|');
                            for (int i = 1; i < q.Length; i += 2)
                            {
                                foreach (string f in q[i].Split(';'))
                                {
                                    if (!Extenstions.Contains(f.ToLower()))
                                    {
                                        Extenstions.Add(f.ToLower());
                                        if (!AllSupportedFilesA.EndsWith("("))
                                        {
                                            AllSupportedFilesA += ", ";
                                        }
                                        AllSupportedFilesA += f.ToLower();
                                        if (!AllSupportedFilesB.EndsWith("|"))
                                        {
                                            AllSupportedFilesB += ";";
                                        }
                                        AllSupportedFilesB += f.ToLower();
                                    }
                                }
                            }
                            Filters.Add(FilterString.ToLower());
                            if (Filter != "")
                            {
                                Filter += "|";
                            }
                            Filter += FilterString;
                        }
                    }
                }
            }
            if (Filter != "")
            {
                Filter  = AllSupportedFilesA + ")" + AllSupportedFilesB + "|" + Filter;
                Filter += "|";
            }
            Filter += "All Files (*.*)|*.*";
            openFileDialog1.Filter = Filter;
            if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK &&
                openFileDialog1.FileName.Length > 0)
            {
                foreach (String s in openFileDialog1.FileNames)
                {
                    Program.FileManager.OpenFile(new EFEDiskFile(s));
                }
            }
            opening = false;
        }
Example #19
0
        public bool IsMatch()
        {
            if (!string.IsNullOrEmpty(FilterString))
            {
                string deviceId = DataItem.DeviceId;

                var paths = FilterString.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
                if (paths != null)
                {
                    string componentId = DataItem.ParentId;
                    if (!string.IsNullOrEmpty(FilterString))
                    {
                        bool match = false;

                        for (var i = paths.Length - 1; i >= 0; i--)
                        {
                            match = false;
                            var path = paths[i];

                            // If Last Node in Path
                            if (i == paths.Length - 1)
                            {
                                if (HasWildcard(FilterString))
                                {
                                    match = true;
                                }
                                else
                                {
                                    match = NormalizeType(DataItem.Type) == NormalizeType(path);
                                    if (!match)
                                    {
                                        match = DataItem.Id == path;
                                    }
                                }
                            }
                            else
                            {
                                var component = Components.Find(o => o.Id == componentId);

                                // Find if Direct Parent or if Descendant of path
                                while (component != null)
                                {
                                    match = component.Type == path;
                                    if (match)
                                    {
                                        break;
                                    }

                                    componentId = component.ParentId;
                                    component   = Components.Find(o => o.Id == componentId);
                                }
                            }

                            if (!match)
                            {
                                break;
                            }
                        }

                        return(match);
                    }
                }
            }

            return(false);
        }