コード例 #1
0
 //增加股票以及其委托
 public bool StockRefreshAdd(string stockid, ref sync s)
 {
     try
     {
         if (!stockdict.ContainsKey(stockid))
         {
             sync[] sn = new sync[2];
             sn[0] = s;
             stockdict.Add(stockid, sn);
         }
         else
         {
             if (stockdict[stockid][0] != null)
             {
                 return(false);
             }
             stockdict[stockid][0] = s;
         }
     }
     catch (Exception)
     {
         return(false);
     }
     return(true);
 }
コード例 #2
0
ファイル: NetDataController.cs プロジェクト: zjxbetter/gupiao
 public bool StockRefreshAddNow(string stockid, ref sync s)
 {
     if (!StockRefreshAdd(stockid, ref s))
         return false;
     GetStockInfoNow();
     return true;
 }
コード例 #3
0
 public bool StockRefreshAddNow(string stockid, ref sync s)
 {
     if (!StockRefreshAdd(stockid, ref s))
     {
         return(false);
     }
     GetStockInfoNow();
     return(true);
 }
コード例 #4
0
 //增加temp股票以及其委托
 public bool StockTempRefreshAdd(string stockid, ref sync s)
 {
     try
     {
         if (stockdict.ContainsKey(stockid))
         {
             stockdict[stockid][1] = s;
         }
         else
         {
             sync[] sn = new sync[2];
             sn[1] = s;
             stockdict.Add(stockid, sn);
         }
     }
     catch (Exception)
     {
         return(false);
     }
     GetStockInfoNow();
     return(true);
 }
コード例 #5
0
ファイル: NetDataController.cs プロジェクト: zjxbetter/gupiao
 //增加temp股票以及其委托
 public bool StockTempRefreshAdd(string stockid, ref sync s)
 {
     try
     {
         if (stockdict.ContainsKey(stockid))
         {
             stockdict[stockid][1] = s;
         }
         else
         {
             sync[] sn = new sync[2];
             sn[1] = s;
             stockdict.Add(stockid, sn);
         }
     }
     catch (Exception)
     {
         return false;
     }
     GetStockInfoNow();
     return true;
 }
コード例 #6
0
ファイル: NetDataController.cs プロジェクト: zjxbetter/gupiao
 //增加股票以及其委托
 public bool StockRefreshAdd(string stockid,ref sync s)
 {
     try
     {
         if (!stockdict.ContainsKey(stockid))
         {
             sync[] sn = new sync[2];
             sn[0] = s;
             stockdict.Add(stockid, sn);
         }
         else
         {
             if (stockdict[stockid][0] != null)
                 return false;
             stockdict[stockid][0] = s;
         }
     }
     catch(Exception)
     {
         return false;
     }
     return true;
 }
コード例 #7
0
        private void syncEditor(sync syncType)
        {
            // Here we setup the editor for the chosen style, this is an inital setup and will configure the editor
              // for the default options for that style. This is call after the inital load of the menu setting and the defaults set
              // will be overridden by the options that are read next.
              // If called because a user has clicked a style button the editor will reset to that style overiding any custom settings set by the user
              // for the previous selected style
              summaryWeatherCheckBox.Checked = true;
              menuPosLabel.Text = "Menu Y Position:";
              enableRssfeed.Checked = true;

              if (animatedIconsInstalled())
              {
            WeatherIconsAnimated.Enabled = true;
            WeatherIconsAnimated.Text = "Animated";
            installAnimatedIcons.Visible = false;
              }
              else
              {
            WeatherIconsAnimated.Enabled = false;
            weatherIconsStatic.Checked = true;
            WeatherIconsAnimated.Text = "Animated (Not Installed)";
            installAnimatedIcons.Visible = true;
              }

              if (weatherBackgoundsInstalled())
              {
            weatherBGlink.Enabled = true;
            weatherBGlink.Text = "Link Background to Current Weather";
            installWeatherBackgrounds.Visible = false;
              }
              else
              {
            weatherBGlink.Checked = false;
            weatherBGlink.Enabled = false;
            weatherBGlink.Text = "Link Background to Current Weather (Not Installed)";
            installWeatherBackgrounds.Visible = true;
              }

              switch (menuStyle)
              {
            case chosenMenuStyle.verticalStyle:
              enableFiveDayWeather.Checked = true;
              horizontalContextLabels.Enabled = false;
              weatherSummaryGroup.Visible = false;
              verticalStyle.Checked = true;

              if (!WeatherIconsAnimated.Checked)
            weatherIconsStatic.Checked = true;

              useAeonGraphics.Visible = false;
              txtMenuPos.Text = "350";
              menuPosLabel.Text = "Menu X Position:";
              cboLabelFont.Enabled = false;
              cboSelectedFont.Enabled = false;
              cboSelectedFont.Text = "mediastream28tc";
              cboLabelFont.Text = "mediastream16tc";
              cbExitStyleNew.Visible = true;
              btMenuIcon.Visible = false;
              pbMenuIconInfo.Visible = false;
              cbContextLabelBelow.Enabled = true;

              break;
            case chosenMenuStyle.horizontalStandardStyle:
              weatherStyle = chosenWeatherStyle.bottom;
              horizontalContextLabels.Checked = false;
              enableFiveDayWeather.Checked = true;
              fullWeatherSummaryBottom.Enabled = true;
              fullWeatherSummaryBottom.Checked = true;
              horizontalContextLabels.Enabled = true;
              horizontalStyle.Checked = true;

              if (!WeatherIconsAnimated.Checked)
            weatherIconsStatic.Checked = true;

              weatherSummaryGroup.Visible = true;
              useAeonGraphics.Visible = false;
              txtMenuPos.Text = "430";
              cboLabelFont.Enabled = true;
              cboSelectedFont.Enabled = true;
              cboSelectedFont.Text = "mediastream28tc";
              cboLabelFont.Text = "mediastream28tc";
              cbExitStyleNew.Visible = false;
              btMenuIcon.Visible = false;
              pbMenuIconInfo.Visible = false;
              cbContextLabelBelow.Enabled = false;
              break;
            case chosenMenuStyle.horizontalContextStyle:
              weatherStyle = chosenWeatherStyle.middle;
              horizontalContextLabels.Checked = true;
              enableFiveDayWeather.Checked = true;
              fullWeatherSummaryMiddle.Checked = true;
              fullWeatherSummaryBottom.Enabled = false;
              horizontalContextLabels.Enabled = true;
              horizontalStyle2.Checked = true;
              if (!WeatherIconsAnimated.Checked)
            weatherIconsStatic.Checked = true;
              weatherSummaryGroup.Visible = true;
              useAeonGraphics.Visible = false;
              txtMenuPos.Text = "620";
              cboSelectedFont.Text = "mediastream28tc";
              cboLabelFont.Text = "mediastream28tc";
              cboLabelFont.Enabled = false;
              cboSelectedFont.Enabled = false;
              cbExitStyleNew.Visible = false;
              btMenuIcon.Visible = false;
              pbMenuIconInfo.Visible = false;
              cbContextLabelBelow.Enabled = false;
              break;
            case chosenMenuStyle.graphicMenuStyle:
              //First check if there is an icon, if not set a default
              foreach (menuItem mnuItem in menuItems)
              {
            if (string.IsNullOrEmpty(mnuItem.buttonTexture) || mnuItem.buttonTexture.ToLower() == "false")
            {
              mnuItem.buttonTexture = setDefaultIcons(int.Parse(mnuItem.hyperlink),"Black");
            }
              }
              weatherStyle = chosenWeatherStyle.bottom;
              horizontalContextLabels.Checked = false;
              enableFiveDayWeather.Checked = true;
              fullWeatherSummaryBottom.Enabled = false;
              fullWeatherSummaryBottom.Checked = true;
              horizontalContextLabels.Enabled = false;
              graphicalStyle.Checked = true;

              if (!WeatherIconsAnimated.Checked)
            weatherIconsStatic.Checked = true;

              weatherSummaryGroup.Visible = true;
              useAeonGraphics.Visible = false;
              txtMenuPos.Text = "430";
              cboLabelFont.Enabled = true;
              cboSelectedFont.Enabled = true;
              cboSelectedFont.Text = "mediastream28tc";
              cboLabelFont.Text = "mediastream28tc";
              cbExitStyleNew.Visible = false;
              btMenuIcon.Visible = true;
              pbMenuIconInfo.Visible = true;
              cbContextLabelBelow.Enabled = false;
              break;
              }
        }
コード例 #8
0
 void Start()
 {
     syncComponent = gameObject.GetComponent <sync>();
 }
コード例 #9
0
ファイル: Upload.cs プロジェクト: olekongithub/synctoday2015
 protected override void RepositoryUpload(sync.today.Models.ServiceAccountDTO myServiceAccount)
 {
     Repository.Upload(myServiceAccount);
 }
コード例 #10
0
    public void activateInfoSpeak()
    {
        // Add button informations for previously clicked animal

        info1.transform.GetChild(0).GetComponent <Image>().sprite = Resources.Load <Sprite>("Sprite/AnimalInfoButton/" + animal.name + "/1");
        info2.transform.GetChild(0).GetComponent <Image>().sprite = Resources.Load <Sprite>("Sprite/AnimalInfoButton/" + animal.name + "/2");
        info3.transform.GetChild(0).GetComponent <Image>().sprite = Resources.Load <Sprite>("Sprite/AnimalInfoButton/" + animal.name + "/3");

        Debug.Log("ANIMAL NAME " + animal.name);

        info1.GetComponent <Button>().onClick.AddListener(() => {
            // Enables Back to AR button
            ARButton.SetActive(true);
            // Sets Ani to speek info 1
            _scene.valueSpeak = animal.info1;
            _scene.Speak();
            GameObject.Find("ARCamera").GetComponent <Camera>().depth = 0;
            sync Synch = GameObject.Find("Synch").GetComponent <sync>();
            if (!Synch.isDuplicated())
            {
                Synch.duplicateModel();
                Synch.offSync();
            }
            // Zooms to Part 1
            GameObject.Find("Synch").GetComponent <ZoomParts>().showPart1(part1_vector, part1_rotation);

            if (!qualityMeterHidden)
            {
                GameObject.Find("QualityMeter").SetActive(false);
                qualityMeterHidden = true;
            }

            infoPanel.gameObject.SetActive(true);
            infoPanel.transform.GetChild(0).GetChild(0).GetChild(0).GetChild(0).GetComponent <Text>().text = animal.info1;

            imagePanel.SetActive(true);
            imagePanel.transform.GetChild(0).GetChild(0).GetComponent <Image>().sprite = Resources.Load <Sprite>("Sprite/AnimalInfoImage/" + animal.name + "/1");
        });

        info2.GetComponent <Button>().onClick.AddListener(() => {
            // Enables Back to AR button
            ARButton.SetActive(true);
            // Sets Ani to speek info 1
            _scene.valueSpeak = animal.info2;
            _scene.Speak();
            GameObject.Find("ARCamera").GetComponent <Camera>().depth = 0;
            sync Synch = GameObject.Find("Synch").GetComponent <sync>();
            if (!Synch.isDuplicated())
            {
                Synch.duplicateModel();
                Synch.offSync();
            }
            // Zooms to Part 2
            GameObject.Find("Synch").GetComponent <ZoomParts>().showPart2(part2_vector, part2_rotation);
            GameObject.Find("TargetBuilderCanvas").transform.GetChild(6).gameObject.SetActive(true);

            if (!qualityMeterHidden)
            {
                GameObject.Find("QualityMeter").SetActive(false);
                qualityMeterHidden = true;
            }

            infoPanel.gameObject.SetActive(true);
            infoPanel.transform.GetChild(0).GetChild(0).GetChild(0).GetChild(0).GetComponent <Text>().text = animal.info2;

            imagePanel.SetActive(true);
            imagePanel.transform.GetChild(0).GetChild(0).GetComponent <Image>().sprite = Resources.Load <Sprite>("Sprite/AnimalInfoImage/" + animal.name + "/2");
        });

        info3.GetComponent <Button>().onClick.AddListener(() => {
            // Enables Back to AR button
            ARButton.SetActive(true);
            // Sets Ani to speek info 1
            _scene.valueSpeak = animal.info3;
            _scene.Speak();
            GameObject.Find("ARCamera").GetComponent <Camera>().depth = 0;
            sync Synch = GameObject.Find("Synch").GetComponent <sync>();
            if (!Synch.isDuplicated())
            {
                Synch.duplicateModel();
                Synch.offSync();
            }
            // Zooms to Part 3
            GameObject.Find("Synch").GetComponent <ZoomParts>().showPart3(part3_vector, part3_rotation);
            GameObject.Find("TargetBuilderCanvas").transform.GetChild(6).gameObject.SetActive(true);

            if (!qualityMeterHidden)
            {
                GameObject.Find("QualityMeter").SetActive(false);
                qualityMeterHidden = true;
            }

            infoPanel.gameObject.SetActive(true);
            infoPanel.transform.GetChild(0).GetChild(0).GetChild(0).GetChild(0).GetComponent <Text>().text = animal.info3;

            imagePanel.SetActive(true);
            imagePanel.transform.GetChild(0).GetChild(0).GetComponent <Image>().sprite = Resources.Load <Sprite>("Sprite/AnimalInfoImage/" + animal.name + "/3");
        });
    }