コード例 #1
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == this)
            {
                return(true);
            }

            return(obj is CreatePaymentRequest other &&
                   ((SourceId == null && other.SourceId == null) || (SourceId?.Equals(other.SourceId) == true)) &&
                   ((IdempotencyKey == null && other.IdempotencyKey == null) || (IdempotencyKey?.Equals(other.IdempotencyKey) == true)) &&
                   ((AmountMoney == null && other.AmountMoney == null) || (AmountMoney?.Equals(other.AmountMoney) == true)) &&
                   ((TipMoney == null && other.TipMoney == null) || (TipMoney?.Equals(other.TipMoney) == true)) &&
                   ((AppFeeMoney == null && other.AppFeeMoney == null) || (AppFeeMoney?.Equals(other.AppFeeMoney) == true)) &&
                   ((DelayDuration == null && other.DelayDuration == null) || (DelayDuration?.Equals(other.DelayDuration) == true)) &&
                   ((Autocomplete == null && other.Autocomplete == null) || (Autocomplete?.Equals(other.Autocomplete) == true)) &&
                   ((OrderId == null && other.OrderId == null) || (OrderId?.Equals(other.OrderId) == true)) &&
                   ((CustomerId == null && other.CustomerId == null) || (CustomerId?.Equals(other.CustomerId) == true)) &&
                   ((LocationId == null && other.LocationId == null) || (LocationId?.Equals(other.LocationId) == true)) &&
                   ((ReferenceId == null && other.ReferenceId == null) || (ReferenceId?.Equals(other.ReferenceId) == true)) &&
                   ((VerificationToken == null && other.VerificationToken == null) || (VerificationToken?.Equals(other.VerificationToken) == true)) &&
                   ((AcceptPartialAuthorization == null && other.AcceptPartialAuthorization == null) || (AcceptPartialAuthorization?.Equals(other.AcceptPartialAuthorization) == true)) &&
                   ((BuyerEmailAddress == null && other.BuyerEmailAddress == null) || (BuyerEmailAddress?.Equals(other.BuyerEmailAddress) == true)) &&
                   ((BillingAddress == null && other.BillingAddress == null) || (BillingAddress?.Equals(other.BillingAddress) == true)) &&
                   ((ShippingAddress == null && other.ShippingAddress == null) || (ShippingAddress?.Equals(other.ShippingAddress) == true)) &&
                   ((Note == null && other.Note == null) || (Note?.Equals(other.Note) == true)) &&
                   ((StatementDescriptionIdentifier == null && other.StatementDescriptionIdentifier == null) || (StatementDescriptionIdentifier?.Equals(other.StatementDescriptionIdentifier) == true)));
        }
コード例 #2
0
        void Start()
        {
            if (this.consoleFont == null)
            {
                this.consoleFont = Font.CreateDynamicFontFromOSFont("Courier New", 16);
            }

            this.commandText       = "";
            this.cachedCommandText = commandText;
            Assert.AreNotEqual(this.toggleKey, KeyCode.Return, "Return is not a valid console toggle hotkey.");

            SetupWindow();
            SetupInput();
            SetupLabels();

            Shell.RegisterCommands();

            if (IssuedError)
            {
                Log(TerminalLogType.ERROR, "Error: {0}", Shell.IssuedErrorMessage);
            }

            foreach (var cmd in Shell.Commands)
            {
                Autocomplete.Register(cmd.Key);
            }
        }
コード例 #3
0
        private bool EsTodoCorrecto()
        {
            bool    resultado = true;
            DataSet ds        = Autocomplete.ObtenerVisitantes(txtCedula.Text);

            if (ds.Tables[0].Rows.Count > 0 && hdnCedula.Value == "0")
            {
                resultado = false;
                messageBox.ShowMessage("La cédula ya esta registrada, debe seleccionar de la lista en el recuadro (CEDULA) el nombre de la persona.");
            }

            if (hdnPersonalID.Value == "0")
            {
                resultado = false;
                resultado = false;
                messageBox.ShowMessage("Debe buscar y seleccionar al personal a visitar, si no existe por favor consulte al area de recursos humanos.");
            }
            if (Convert.ToInt32(ddlAsunto.SelectedValue) == 0)
            {
                resultado = false;
                messageBox.ShowMessage("Debe seleccionar el motivo de la visita");
            }

            return(resultado);
        }
コード例 #4
0
        private List <Autocomplete> _GetStatus(string query)
        {
            List <Autocomplete> status = new List <Autocomplete>();

            try
            {
                var rs = db.complaint_history.Where(p => p.STATUS.Contains(query)).Select(p => new { p.STATUS }).Distinct().ToList();
                //var results = (from p in db.complaint_history
                //               where (p.STATUS).Contains(query)
                //               orderby p.STATUS
                //               select p.STATUS ).ToList().Distinct();
                //Select(w => new { name = w.STATUS, Id = w.ID }).Distinct();
                foreach (var r in rs)
                {
                    // create objects
                    Autocomplete statuss = new Autocomplete();

                    statuss.Name = r.STATUS;
                    // statuss.Id = r.Id;
                    status.Add(statuss);
                }
            }
            catch (Exception ex)
            {
            }

            return(status);
        }
コード例 #5
0
        //Place search auto complete
        public override void OnActivityResult(int requestCode, int resultCode, Intent data)
        {
            base.OnActivityResult(requestCode, resultCode, data);

            if (requestCode == 1)
            {
                takeAddressFromSearch = true;
                startRadio.Checked    = false;
                endRadio.Checked      = false;

                var place = Autocomplete.GetPlaceFromIntent(data);
                startDestinationText.Text = place.Address.ToString();
                startLocationLatlng       = place.LatLng;
                mainMap.AnimateCamera(CameraUpdateFactory.NewLatLngZoom(place.LatLng, 18));
                centreMarker.SetColorFilter(Color.DarkGreen);
            }
            if (requestCode == 2)
            {
                takeAddressFromSearch = true;
                startRadio.Checked    = false;
                endRadio.Checked      = false;

                var place = Autocomplete.GetPlaceFromIntent(data);
                endDestinationText.Text = place.Address.ToString();
                endLocationLatlng       = place.LatLng;
                mainMap.AnimateCamera(CameraUpdateFactory.NewLatLngZoom(place.LatLng, 18));
                centreMarker.SetColorFilter(Color.Red);
                //mapButtonStartSet();
            }
        }
コード例 #6
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="synthesizerManager"></param>
 /// <param name="mailSender"></param>
 public MainWindowViewModel(SpeechSynthesizerManager synthesizerManager, MailSender mailSender)
 {
     this.synthesizerManager = synthesizerManager;
     this.mailSender         = mailSender;
     CommonPhrasesViewModel  = new CommonPhrasesViewModel(this.synthesizerManager);
     autocomplete            = new Autocomplete("proverbs.txt");
 }
コード例 #7
0
        void Start()
        {
            DontDestroyOnLoad(gameObject);

            if (ConsoleFont == null)
            {
                ConsoleFont = Font.CreateDynamicFontFromOSFont("Consolas", 16);
            }

            command_text        = "";
            cached_command_text = command_text;
            Assert.AreNotEqual(ToggleHotkey.ToLower(), "return", "Return is not a valid ToggleHotkey");

            SetupWindow();
            SetupInput();
            SetupLabels();

            Shell.RegisterCommands();

            if (IssuedError)
            {
                Print(TerminalLogType.Error, "Error: {0}", Shell.IssuedErrorMessage);
            }

            foreach (var command in Shell.Commands)
            {
                Autocomplete.Register(command.Key);
            }
        }
コード例 #8
0
        public async override void OnActivityResult(int requestCode, int resultCode, Intent data)
        {
            base.OnActivityResult(requestCode, resultCode, data);

            try
            {
                var place = Autocomplete.GetPlaceFromIntent(data);
                //getting location of the searched place
                var loc = place.LatLng;
                //creating camera update options to move camera to the searched location
                CameraUpdate cam = CameraUpdateFactory.NewLatLngZoom(loc, 15);
                googleMap.AnimateCamera(cam);
                if (radioStart.Checked == true)
                {
                    startCoardinates = googleMap.CameraPosition.Target;
                    string startLoc = await mapFuncHelper.FindCordinateAddress(startCoardinates);

                    char[] startLocArray = startLoc.ToCharArray();
                    startLocation.SetText(startLocArray, 0, startLocArray.Length);
                }
                else if (radioEnd.Checked == true)
                {
                    endCoardinates = googleMap.CameraPosition.Target;
                    string endLoc = await mapFuncHelper.FindCordinateAddress(endCoardinates);

                    char[] endLocArray = endLoc.ToCharArray();
                    endLocation.SetText(endLocArray, 0, endLocArray.Length);
                }
            }
            catch (Exception e)
            {
            }
        }
コード例 #9
0
ファイル: AutocompleteTests.cs プロジェクト: Llianen/AC
        public void BackSpace()
        {
            IAutocomplete ac = new Autocomplete(Data.EstacoesMetro.Select(s => s.ToCharArray()).ToArray());

            //"~Qu..."

            var results = ac.Filter('\b', out char[] options);

            results = ac.Filter('Q', out options);
            results = ac.Filter('A', out options);
            results = ac.Filter('\b', out options);

            Assert.AreEqual('u', options[0]);

            results = ac.Filter('u', out options);

            Assert.AreEqual('i', options[0]);
            Assert.AreEqual("Quinta das Conchas", new string(results[0]));

            results = ac.Filter('\b', out options);
            results = ac.Filter('\b', out options);
            results = ac.Filter('\b', out options);

            Assert.AreEqual(50, options.Length);
            Assert.AreEqual(50, results.Length);
        }
コード例 #10
0
        void CompleteCommand()
        {
            string head        = this.commandText;
            int    formatWidth = 0;

            string[] completionBuffer = Autocomplete.Complete(ref head, ref formatWidth);
            int      completionLength = completionBuffer.Length;

            if (completionLength != 0)
            {
                this.commandText = head;
            }

            if (completionLength > 1)
            {
                var logBuffer = new StringBuilder();

                foreach (string completion in completionBuffer)
                {
                    logBuffer.Append(completion.PadRight(formatWidth + 4));
                }

                Log("{0}", logBuffer);
                this.scrollPosition.y = int.MaxValue;
            }
        }
コード例 #11
0
ファイル: Terminal.cs プロジェクト: Wokarol/Asteroids
        void CompleteCommand()
        {
            string head_text    = command_text;
            int    format_width = 0;

            string[] completion_buffer = Autocomplete.Complete(ref head_text, ref format_width);
            int      completion_length = completion_buffer.Length;

            if (completion_length != 0)
            {
                command_text = head_text;
            }

            if (completion_length > 1)
            {
                // Print possible completions
                var log_buffer = new StringBuilder();

                foreach (string completion in completion_buffer)
                {
                    log_buffer.Append(completion.PadRight(format_width + 4));
                }

                Log("{0}", log_buffer);
                scroll_position.y = int.MaxValue;
            }
        }
コード例 #12
0
ファイル: AutocompleteTests.cs プロジェクト: Llianen/AC
        public void Performance_SearchFor_AllCharacters_InAllWords()
        {
            char[]   options;
            char[][] results;

            // Start the test

            IAutocomplete ac = new Autocomplete(Data.Cities.Select(s => s.ToCharArray()).ToArray());

            Stopwatch sw = Stopwatch.StartNew();

            foreach (string s in Data.Cities)
            {
                //Get initial full results
                results = ac.Search(null, out options);

                //filter Char by Char
                foreach (char c in s)
                {
                    results = ac.Filter(c, out options);
                }
            }

            sw.Stop();

            var av = (double)sw.ElapsedMilliseconds / Data.Cities.Length;

            var acceptedTime = (double)1.700; //milliseconds

            Assert.AreEqual(true, av < acceptedTime, av.ToString() + " > " + acceptedTime);
        }
コード例 #13
0
        private void Dispatcher_AcceleratorKeyActivated(CoreDispatcher sender, AcceleratorKeyEventArgs args)
        {
            if ((args.VirtualKey == VirtualKey.Enter || args.VirtualKey == VirtualKey.Tab) && args.EventType == CoreAcceleratorKeyEventType.KeyDown && FocusState != FocusState.Unfocused)
            {
                // Check if CTRL or Shift is also pressed in addition to Enter key.
                var ctrl  = Window.Current.CoreWindow.GetKeyState(VirtualKey.Control);
                var shift = Window.Current.CoreWindow.GetKeyState(VirtualKey.Shift);
                var key   = Window.Current.CoreWindow.GetKeyState(VirtualKey.Enter);

                if (Autocomplete != null && View.Autocomplete != null)
                {
                    var send = key.HasFlag(CoreVirtualKeyStates.Down) && !ctrl.HasFlag(CoreVirtualKeyStates.Down) && !shift.HasFlag(CoreVirtualKeyStates.Down);
                    if (send || args.VirtualKey == VirtualKey.Tab)
                    {
                        AcceptsReturn = false;
                        var container = Autocomplete.ContainerFromIndex(Math.Max(0, Autocomplete.SelectedIndex)) as ListViewItem;
                        if (container != null)
                        {
                            var peer       = new ListViewItemAutomationPeer(container);
                            var invokeProv = peer.GetPattern(PatternInterface.Invoke) as IInvokeProvider;
                            invokeProv.Invoke();
                        }
                    }
                    else
                    {
                        AcceptsReturn = true;
                    }

                    return;
                }

                // If there is text and CTRL/Shift is not pressed, send message. Else allow new row.
                if (ViewModel.Settings.IsSendByEnterEnabled)
                {
                    var send = key.HasFlag(CoreVirtualKeyStates.Down) && !ctrl.HasFlag(CoreVirtualKeyStates.Down) && !shift.HasFlag(CoreVirtualKeyStates.Down);
                    if (send)
                    {
                        View?.Accept();
                        AcceptsReturn = false;
                    }
                    else
                    {
                        AcceptsReturn = true;
                    }
                }
                else
                {
                    var send = key.HasFlag(CoreVirtualKeyStates.Down) && ctrl.HasFlag(CoreVirtualKeyStates.Down) && !shift.HasFlag(CoreVirtualKeyStates.Down);
                    if (send)
                    {
                        View?.Accept();
                        AcceptsReturn = false;
                    }
                    else
                    {
                        AcceptsReturn = true;
                    }
                }
            }
        }
コード例 #14
0
        private List <Autocomplete> _GetPeople(string query)
        {
            List <Autocomplete> people = new List <Autocomplete>();

            try
            {
                var results = (from p in db.People
                               where (p.FirstName + " " + p.LastName).Contains(query)
                               orderby p.FirstName, p.LastName
                               select p).Take(10).ToList();
                foreach (var r in results)
                {
                    // create objects
                    Autocomplete person = new Autocomplete();

                    person.Name = string.Format("{0} {1}", r.FirstName, r.LastName);
                    person.Id   = r.PersonId;

                    people.Add(person);
                }
            }
            catch (EntityCommandExecutionException eceex)
            {
                if (eceex.InnerException != null)
                {
                    throw eceex.InnerException;
                }
                throw;
            }
            catch
            {
                throw;
            }
            return(people);
        }
コード例 #15
0
 protected override void OnActivityResult(int requestCode, [GeneratedEnum] Android.App.Result resultCode, Intent data)
 {
     if (requestCode == 1)
     {
         if (resultCode == Android.App.Result.Ok)
         {
             takeAddressFromSearch    = true;
             pickupRadio.Checked      = false;
             destinationRadio.Checked = false;
             var place = Autocomplete.GetPlaceFromIntent(data);
             pickupLocationText.Text = place.Name.ToString();
             pickupLocationLatLng    = place.LatLng;
             pickupAddress           = place.Name.ToString();
             mainMap.AnimateCamera(CameraUpdateFactory.NewLatLngZoom(place.LatLng, 15));
             centerMaker.SetColorFilter(Color.DarkGreen);
         }
     }
     if (requestCode == 2)
     {
         if (resultCode == Android.App.Result.Ok)
         {
             takeAddressFromSearch    = true;
             pickupRadio.Checked      = false;
             destinationRadio.Checked = false;
             var place = Autocomplete.GetPlaceFromIntent(data);
             destiantionLocationText.Text = place.Name.ToString();
             destinationLocationLatLng    = place.LatLng;
             destinationAddress           = place.Name.ToString();
             mainMap.AnimateCamera(CameraUpdateFactory.NewLatLngZoom(place.LatLng, 15));
             centerMaker.SetColorFilter(Color.Red);
             TriplocationsSet();
         }
     }
 }
コード例 #16
0
        public override void OnActivityResult(int requestCode, [GeneratedEnum] Result resultCode, Intent data)
        {
            try
            {
                base.OnActivityResult(requestCode, resultCode, data);
                var place = Autocomplete.GetPlaceFromIntent(data);


                if (myCity == "true")
                {
                    StaticOrder.Destination_address = place.Address;
                    StaticOrder.Destination_lat     = place.LatLng.Latitude.ToString();
                    StaticOrder.Destination_lng     = place.LatLng.Longitude.ToString();
                }
                else
                {
                    StaticOrder.Inception_address = place.Address;
                    StaticOrder.Inception_lat     = place.LatLng.Latitude.ToString();
                    StaticOrder.Inception_lng     = place.LatLng.Longitude.ToString();
                }

                s_geo.Text = place.Address;
            }
            catch (Exception ex)
            {
                Toast.MakeText(Activity, ex.Message, ToastLength.Long).Show();
            }
        }
コード例 #17
0
ファイル: Terminal.cs プロジェクト: U3DC/ProjectLonestar
        protected virtual void Initialize()
        {
            name = "TERMINAL";

            if (ConsoleFont == null)
            {
                ConsoleFont = Font.CreateDynamicFontFromOSFont("Courier New", 14);
                //Debug.LogWarning("Command Console Warning: Please assign a font.");
            }

            command_text        = "";
            cached_command_text = command_text;
            Assert.AreNotEqual(ToggleHotkey.ToLower(), "return", "Return is not a valid ToggleHotkey");

            SetupWindow();
            SetupInput();
            SetupLabels();

            Shell.RegisterCommands();

            if (IssuedError)
            {
                Log(TerminalLogType.Error, "Error: {0}", Shell.IssuedErrorMessage);
            }

            foreach (var command in Shell.Commands)
            {
                Autocomplete.Register(command.Key);
            }

            Log("Press 'shift + ~' for bigger console");
            Log("Type 'help commandName' for command description");
            Log("Type 'help' for a list of commands");
        }
コード例 #18
0
        private List <Autocomplete> _GetItemType(string query)
        {
            List <Autocomplete> item = new List <Autocomplete>();

            try
            {
                var results = (from p in db.itemtype
                               where (p.Item_Type).Contains(query)
                               orderby p.Item_Type
                               select p).Take(10).ToList();
                foreach (var r in results)
                {
                    // create objects
                    Autocomplete itemtypes = new Autocomplete();

                    itemtypes.Name = r.Item_Type;
                    itemtypes.Id   = r.ID;
                    item.Add(itemtypes);
                }
            }
            catch (EntityCommandExecutionException eceex)
            {
                if (eceex.InnerException != null)
                {
                    throw eceex.InnerException;
                }
                throw;
            }

            return(item);
        }
コード例 #19
0
        public JsonResult GetUsuarios(string Prefix)
        {  //Note : you can bind same list from database
            var usuarios = db.Historial.Where(a => a.Usuario.Contains(Prefix)).ToList();
            List <Autocomplete> ObjList = new List <Autocomplete>();

            for (int i = 0; i < usuarios.Count; i++)
            {
                bool f = false;
                for (int j = 0; j < ObjList.Count; j++)
                {
                    if (usuarios[i].Usuario.ToLower() == ObjList[j].Name.ToLower())
                    {
                        f = true;
                        break;
                    }
                }
                if (!f)
                {
                    Autocomplete temp = new Autocomplete();
                    temp.Id   = usuarios[i].Id;
                    temp.Name = usuarios[i].Usuario;
                    ObjList.Add(temp);
                }
            }


            //Searching records from list using LINQ query

            return(Json(ObjList, JsonRequestBehavior.AllowGet));
        }
コード例 #20
0
        public async Task <IActionResult> PutAutocomplete([FromRoute] int id, [FromBody] Autocomplete autocomplete)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != autocomplete.Id)
            {
                return(BadRequest());
            }

            _context.Entry(autocomplete).State = EntityState.Modified;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!AutocompleteExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(NoContent());
        }
コード例 #21
0
        // Autocomplete for Location Add page to fill the textbox as a list with the type from database.

        #region Autocomplate textbox for room type
        private List <Autocomplete> _GetRoomType(string query)
        {
            List <Autocomplete> room = new List <Autocomplete>();

            try
            {
                var rs = db.location.Where(p => p.TYPE.Contains(query)).Select(p => new { p.TYPE }).Distinct().ToList();

                /**** In here we can use eatier linq or EF to bring data. You can implement it both of them for
                 *  ****/
                //var results = (from p in db.location
                //               where (p.TYPE).Contains(query)
                //               orderby p.TYPE
                //               select p).ToList();
                foreach (var r in rs)
                {
                    // create objects
                    Autocomplete roomtype = new Autocomplete();

                    roomtype.Name = r.TYPE;
                    //roomtype.Id = r.ID;
                    room.Add(roomtype);
                }
            }
            catch (EntityCommandExecutionException eceex)
            {
                if (eceex.InnerException != null)
                {
                    throw eceex.InnerException;
                }
                throw;
            }

            return(room);
        }
コード例 #22
0
    protected override void OnKeyUp(KeyEventArgs e)
    {
        if (!AutocompletionEnabled)
        {
            return;
        }

        if (e.EqualsChar(')'))
        {
            Autocomplete.Hide();
        }

        else if (MustRefresh || e.EqualsChar('('))
        {
            var mis = GetCurrentMethod();

            if (mis != null)
            {
                RefreshSuggestions(mis);
            }

            else if (!InStrOrDeclaring)
            {
                RefreshSuggestions();
            }

            MustRefresh = false;
        }

        base.OnKeyUp(e);
    }
コード例 #23
0
ファイル: AutocompleteTests.cs プロジェクト: Llianen/AC
        public void Performance_SearchBy_FullString()
        {
            //int quantity = 4000;
            char[]   options;
            char[][] results;

            // Start the test

            IAutocomplete ac = new Autocomplete(Data.Cities.Select(s => s.ToCharArray()).ToArray());

            Stopwatch sw = Stopwatch.StartNew();

            foreach (var c in ac.AllItems)
            {
                results = ac.Search(c, out options);
            }

            sw.Stop();

            var av = (double)sw.ElapsedMilliseconds / Data.Cities.Length;

            var acceptedTime = (double)0.300;  //milliseconds

            Assert.AreEqual(true, av < acceptedTime, av.ToString() + " > " + acceptedTime);
        }
コード例 #24
0
ファイル: Terminal.cs プロジェクト: Wokarol/Asteroids
        void Start()
        {
            if (ConsoleFont == null)
            {
                ConsoleFont = Font.CreateDynamicFontFromOSFont("Courier New", 16);
                Debug.LogWarning("Command Console Warning: Please assign a font.");
            }

            command_text        = "";
            cached_command_text = command_text;
            Assert.AreNotEqual(ToggleHotkey.ToLower(), "return", "Return is not a valid ToggleHotkey");

            SetupWindow();
            SetupInput();
            SetupLabels();

            Shell.RegisterCommands();

            if (IssuedError)
            {
                Log(TerminalLogType.Error, "Error: {0}", Shell.IssuedErrorMessage);
            }

            foreach (var command in Shell.Commands)
            {
                Autocomplete.Register(command.Key);
            }
        }
コード例 #25
0
ファイル: JSCodeEditor.cs プロジェクト: mineprogramming/NIDE
 public override void Focus()
 {
     Highlighter.Instance.RefreshStyles(TextBox);
     Autocomplete.SetAutoompleteMenu(TextBox);
     Autocomplete.Enabled = true;
     Update(TextBox.Range);
 }
        protected override void OnActivityResult(int requestCode, [GeneratedEnum] Result resultCode, Intent data)
        {
            base.OnActivityResult(requestCode, resultCode, data);
            try
            {
                var place = Autocomplete.GetPlaceFromIntent(data);
                //getting location of the searched place
                var loc = place.LatLng;

                //creating camera update options to move camera to the searched location
                CameraUpdate cam = CameraUpdateFactory.NewLatLngZoom(loc, 17);

                //create marker options
                MarkerOptions markerOption = new MarkerOptions();
                markerOption.SetPosition(loc);
                markerOption.Draggable(true);
                int id0 = (int)typeof(Resource.Drawable).GetField("locationpoint").GetValue(null);
                BitmapDescriptor bmd0 = BitmapDescriptorFactory.FromResource(id0);
                markerOption.SetIcon(bmd0);
                //googleMap.Clear();
                googleMap.AddMarker(markerOption);
                googleMap.MoveCamera(cam);
                googleMap.MarkerDragEnd += GoogleMap_MarkerDragEnd1;
            }
            catch (Exception e)
            {
            }
        }
コード例 #27
0
 private void Awake()
 {
     instance       = this;
     cg             = GetComponent <CanvasGroup>();
     Time.timeScale = 1f;
     stock          = FindObjectOfType <Stock>();
     SetupGameRestartBtns();
     ChangeVisibility(false);
 }
コード例 #28
0
ファイル: Editor.cs プロジェクト: vorov2/slot
 protected override void OnResize(EventArgs eventargs)
 {
     Scroll.InvalidateLines(InvalidateFlags.Force);
     //Styles.Restyle();
     Invalidate();
     Autocomplete.HideAutocomplete();
     Search.UpdateSearchPanel();
     base.OnResize(eventargs);
 }
コード例 #29
0
        public void SuggestsFetch()
        {
            // If this throws an exception due to a circular reference while building the schema from the
            // classes in fetch.cs, the file has probably been regenerated from the schema file and needs
            // the AnonymousType = true settings removing from the attributes on each class.
            var text        = "<";
            var suggestions = new Autocomplete <FetchType>().GetSuggestions(text, out _);

            CollectionAssert.AreEqual(new[] { "fetch" }, suggestions.Cast <AutocompleteElementSuggestion>().Select(s => s.Name).ToArray());
        }
コード例 #30
0
    protected override void OnClick(EventArgs e)
    {
        if (!AutocompletionEnabled)
        {
            return;
        }

        Autocomplete.Hide();
        base.OnClick(e);
    }