public void StartBlack() { if (!IsClearNow) { return; } DOTween.To(() => _loadAlpha, num => _loadAlpha = num, 1, _fadeSpeed); _loadState = LOADSTATE.TOBLACK; }
public void StartClear() { if (!IsBlackNow) { return; } DOTween.To(() => _loadAlpha, num => _loadAlpha = num, 0, _fadeSpeed); _loadState = LOADSTATE.TOCLEAR; }
public void NavigateLocations(string interest, string origin) { loadState = LOADSTATE.LocationUnfinished; googleHtmlString = ""; interestPointer = 0; //webBrowser1.Stop(); webBrowser1.Navigate("https://www.google.com/maps/search/?api=1&query=" + interest + "+at+" + origin); webBrowser1.Refresh(); }
public void NavigateDestination(string destination, string origin, string time)// string travelstr, TravelItem travelItem) { //webBrowser1.Stop(); //webBrowser2.Stop(); loadState = LOADSTATE.DestinationUnfinished; webBrowser1.Navigate("https://rrp.vasttrafik.se/#!P|TP!S|" + origin + "!Z|" + destination + "!date|!time|" + time + "!timeSel|depart!start|1"); webBrowser2.Navigate("https://rrp.vasttrafik.se/#!P|TP!S|" + origin + "!Z|" + destination + "!date|!time|" + time + "!timeSel|depart!start|1"); webBrowser2.Refresh(); webBrowser1.Refresh(); interestPointer = 0; }
public void StartClear() { if (!IsBlackNow) { return; } var sec = DOTween.To(() => _loadAlpha, num => _loadAlpha = num, 0, _fadeSpeed); sec.onComplete = () => { _loadState = LOADSTATE.CLEAR; _callback_clearend?.Invoke(); _callback_clearend = null; }; _loadState = LOADSTATE.TOCLEAR; }
void LoadStateUpdate() { if (!IsBlackNow && !IsClearNow) { var cl = _fadePanel.color; cl.a = _loadAlpha; _fadePanel.color = cl; if (_loadState == LOADSTATE.TOBLACK && cl.a == 1.0f) { _loadState = LOADSTATE.BLACK; } else if (_loadState == LOADSTATE.TOCLEAR && cl.a == 0.0f) { _loadState = LOADSTATE.CLEAR; } } }
public void StartBlack(bool auto = true) { if (!IsClearNow) { return; } var sec = DOTween.To(() => _loadAlpha, num => _loadAlpha = num, 1, _fadeSpeed); sec.onComplete = () => { _loadState = LOADSTATE.BLACK; _callback_blackend?.Invoke(); _callback_blackend = null; if (auto) { StartClear(); } }; _loadState = LOADSTATE.TOBLACK; }
private void htmlParseLocationContent() { locationsOfInterest = getWordListAfter(googleHtmlString, "<h3 class=\"section-result-title\"> <span jstcache=", @"[^A-Za-z0-9åäöÅÄÖ:;'.,> ]+", 50, new[] { '<', '>' }); addressesOfInterest = getWordListAfter(googleHtmlString, "section-result-location\">", @"[^A-Za-z0-9åäöÅÄÖ:;'.,-]", 100, new[] { '>' }); if (locationsOfInterest != null && addressesOfInterest != null) { locationsOfInterest.RemoveAt(0); addressesOfInterest.RemoveAt(0); } else { departureStationLabel.Text = ""; arrivalStationLabel.Text = ""; departureListBox.Items.Clear(); arrivalListBox.Items.Clear(); } //All items has been set loadState = LOADSTATE.LocationComplete; }
private void htmlParseDestinationContent() { List <string> times = getWordListAfter(webBrowser1.Document.Body.OuterHtml, "\"hfs_timeRow\">", @"[^0-9:]", 5, new[] { '<' }); if (times != null) { departureListBox.Items.Clear(); arrivalListBox.Items.Clear(); string departure, arrival; getStations(out departure, out arrival); departureStationLabel.Text = departure; arrivalStationLabel.Text = arrival; for (int i = 0; i < times.Count; i++) { if (i % 2 == 0) { departureListBox.Items.Add(times[i]); } else { arrivalListBox.Items.Add(times[i]); } } } else { departureStationLabel.Text = ""; arrivalStationLabel.Text = ""; departureListBox.Items.Clear(); arrivalListBox.Items.Clear(); } //All items has been set loadState = LOADSTATE.DestinationComplete; }
private void Start() { _loadState = LOADSTATE.CLEAR; _waitAction = WaitAction.Instance; }