Ejemplo n.º 1
0
    public void SpaceDropLogic(int num)
    {
        Click.Play();

        if (num == 0) // start game
        {
            SceneManager.LoadScene("_Scene_0");
        }

        if (num == 3) // show space shooter history
        {
            SpaceHistoryDropdown.ClearOptions();
            LoadSpaceHistoryDropdown();
            SpaceHistoryPan.SetActive(true);
            Border.SetActive(true);
            CopyText.SetActive(false);
            CreatedByText.SetActive(false);
            MainText.SetActive(false);
            LogoutButton.SetActive(false);
            CopyBG.SetActive(false);
        }

        else // open configurations or game levels
        {
            OpenPannel2 = SpaceFileItems[num];
            OpenPannel2.SetActive(true);
            Border.SetActive(true);
            CopyText.SetActive(false);
            CreatedByText.SetActive(false);
            MainText.SetActive(false);
            LogoutButton.SetActive(false);
            CopyBG.SetActive(false);
        }
    }
 public AtmButtonControl(AtmButton atmButton)
 {
     InitializeComponent();
     ButtonText0   = atmButton.Text0;
     ButtonText1   = atmButton.Text1;
     ButtonText2   = atmButton.Text2;
     ButtonText3   = atmButton.Text3;
     Text0Color    = atmButton.Text0Color.ToString() != "#00000000" ? atmButton.Text0Color : Colors.White;
     Text1Color    = atmButton.Text1Color.ToString() != "#00000000" ? atmButton.Text1Color : Colors.White;
     Text2Color    = atmButton.Text2Color.ToString() != "#00000000" ? atmButton.Text2Color : Colors.White;
     Text3Color    = atmButton.Text3Color.ToString() != "#00000000" ? atmButton.Text3Color : Colors.White;
     MainText.Text = atmButton.MainText;
     ImagePath     = atmButton.ImagePath;
     Name          = atmButton.Name + DateTime.Now.Ticks;
     ButtonImage.SetValue(NameProperty, Name);
     MainText.SetValue(NameProperty, Name);
     Text0.SetValue(NameProperty, Name);
     Text1.SetValue(NameProperty, Name);
     Text2.SetValue(NameProperty, Name);
     Text3.SetValue(NameProperty, Name);
     IsRightButton = atmButton.IsRightButton;
     if (IsRightButton)
     {
         ButtonGrid.HorizontalAlignment = HorizontalAlignment.Right;
     }
 }
Ejemplo n.º 3
0
        private FormData GetFormData(JsonSet json)
        {
            var formData = new FormData();

            formData.DirectorateName   = json.NAZIV_DIR;
            formData.Number            = json.ARHIVSKI_BR_NAS;
            formData.Date              = json.DATUM;
            formData.EmployeeEmail     = json.EMAIL_RADNIKA;
            formData.ManagerEmail      = json.EMAIL_RUKOVODIOCA;
            formData.SignatoryPosition = json.NAZIV_POTPISNIKA;
            formData.SignatoryFullName = json.POTPISNIK_PREZIME_IME;
            formData.PreambleText      = Preamble.GeneratePreamble(json.ID_ODSUSTVA);
            formData.MainText          = MainText.GenerateMainText(json);
            formData.RationaleText     = Rationale.GenerateRationaleText(json.ID_ODSUSTVA);
            if (json.POL == "Z")
            {
                formData.Deliver = "Zaposlenoj";
            }
            else if (json.POL == "M")
            {
                formData.Deliver = "Zaposlenom";
            }

            return(formData);
        }
Ejemplo n.º 4
0
    /// <summary>
    /// 本体
    /// 入力が確定されたとき
    /// </summary>
    /// <param name="s"></param>
    public void onEndEdit(string s)
    {
        // 空白のみなら入力を差し戻す
        if (Regex.IsMatch(s, @"^\s*$"))
        {
            mainInputField.GetComponent <InputField>().text = "";
            mainInputField.GetComponent <InputField>().ActivateInputField();
            return;
        }

        // 入力内容を画面に映す
        MainText mt = mainText.GetComponent <MainText>();

        mt.AddMessage(s + "\n");
        // InputFieldクリア
        mainInputField.GetComponent <InputField>().text = "";


        switch (progress)
        {
        case Progress.NAME:
            ParseInputName(s);
            break;

        case Progress.NUMBER:
            ParseInputNumber(s);
            break;
        }
    }
Ejemplo n.º 5
0
 private void MainText_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Control && e.KeyCode.ToString() == "A")
     {
         MainText.SelectAll();
     }
 }
Ejemplo n.º 6
0
        void find()
        {
            reset_values();
            keyword = searchbox.Text;
            if (keyword.Length == 0)
            {
                return;
            }
            bool loop        = true;
            int  start_index = 0;

            while (loop)
            {
                loop = false;
                int match_spot = MainText.Text.IndexOf(keyword, start_index, StringComparison.CurrentCultureIgnoreCase);
                if (match_spot >= 0)
                {
                    match_spots.Add(match_spot);
                    if ((match_spot + keyword.Length) < MainText.Text.Length)
                    {
                        start_index = match_spot + 1;
                        loop        = true;
                    }
                }
            }
            matches.Text = match_spots.Count.ToString();
            if (match_spots.Count > 0)
            {
                MainText.Select(match_spots[0], keyword.Length);
                MainText.ScrollToCaret();
            }
        }
Ejemplo n.º 7
0
 void FindPrev()
 {
     if (MatchSpots.Count == 0)
     {
         return;
     }
     if (CurrentSpot == 0)
     {
         CurrentSpot = MatchSpots.Count - 1;
     }
     else
     {
         CurrentSpot--;
     }
     if (IsInBinaryMode)
     {
         MainRichText.Select(MatchSpots[CurrentSpot], Keyword.Length);
         MainRichText.ScrollToCaret();
     }
     else
     {
         MainText.Select(MatchSpots[CurrentSpot], Keyword.Length);
         MainText.ScrollToCaret();
     }
 }
Ejemplo n.º 8
0
    public override void StartAnimation(IAnimationManager animationManager)
    {
        base.StartAnimation(animationManager);
        int round = game.round + 1;

        MainText.Show("Round " + round, game.GetPlayerForRound(round).playerName, 2f);
        Invoke("EndAnimation", 2f);
    }
Ejemplo n.º 9
0
        public void UpdateTextFromFile()
        {
            var text = string.Join(Environment.NewLine, File.ReadLines(Conf.timespentFile).Reverse());

            Doc.Blocks.Clear();
            Doc.Blocks.Add(new Paragraph(new Run(text)));

            MainText.Focus();
            MainText.ScrollToHome();
        }
Ejemplo n.º 10
0
        public MainWindow(int v)
        {
            c = v + 1;
            InitializeComponent();
            Uri iconUri = new Uri("pack://application:,,,/Resources/BI.ico");

            this.Icon = BitmapFrame.Create(iconUri);
            MainText.AddHandler(RichTextBox.DragOverEvent, new DragEventHandler(DragItem), true);
            MainText.AddHandler(RichTextBox.DropEvent, new DragEventHandler(DropItem), true);
        }
Ejemplo n.º 11
0
 private void AppendMainText(string UpdText)
 {
     //Dispatcher for MainWindow for updating UI
     Dispatcher.BeginInvoke(DispatcherPriority.Normal, (ThreadStart) delegate()
     {
         MainText.AppendText(UpdText);
         MainText.ScrollToEnd();
     }
                            );
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Добавить элемент в документацию
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void AddElement_Click(object sender, RoutedEventArgs e)
 {
     MainText.AppendText(String.Format("Тип Элемента : {0} \r\n", TypeElementComboBox.SelectedValue));
     MainText.AppendText(String.Format("Элемент : {0} \r\n", ShablonComboBox.SelectedValue));
     MainText.AppendText(String.Format("Имя : {0} \r\n", NameElement.Text));
     MainText.AppendText(String.Format("Описание : {0} \r\n", Note.Text));
     MainText.AppendText(String.Format("Событие : {0} \r\n", EventText.Text));
     MainText.AppendText(String.Format("Сцена : {0} \r\n", SceneNameText.Text));
     etypes.Add(new ElementTypes(NameElement.Text, TypeElementComboBox.SelectedValue.ToString(), ShablonComboBox.SelectedValue.ToString(), Note.Text, EventText.Text, SceneNameText.Text));
 }
Ejemplo n.º 13
0
 protected bool Equals(PowerPraiseSongFormatting other)
 {
     return(MainText.Equals(other.MainText) && TranslationText.Equals(other.TranslationText) &&
            CopyrightText.Equals(other.CopyrightText) && SourceText.Equals(other.SourceText) &&
            Outline.Equals(other.Outline) && Shadow.Equals(other.Shadow) &&
            MainLineSpacing == other.MainLineSpacing && TranslationLineSpacing == other.TranslationLineSpacing &&
            Equals(TextOrientation, other.TextOrientation) && TranslationPosition == other.TranslationPosition &&
            CopyrightTextPosition == other.CopyrightTextPosition &&
            SourceTextPosition == other.SourceTextPosition && Borders.Equals(other.Borders));
 }
Ejemplo n.º 14
0
 public void ExitSpacePannel()
 {
     Click.Play();
     Border.SetActive(false);
     OpenPannel2.SetActive(false);
     CopyText.SetActive(true);
     CreatedByText.SetActive(true);
     MainText.SetActive(true);
     LogoutButton.SetActive(true);
     CopyBG.SetActive(true);
 }
Ejemplo n.º 15
0
 public void ExitSpaceHistory()
 {
     Click.Play();
     Border.SetActive(false);
     SpaceHistoryPan.SetActive(false);
     CopyText.SetActive(true);
     CreatedByText.SetActive(true);
     MainText.SetActive(true);
     LogoutButton.SetActive(true);
     CopyBG.SetActive(true);
 }
Ejemplo n.º 16
0
 void reset_values()
 {
     if (matches.Text != "0")
     {
         keyword = "";
         match_spots.RemoveRange(0, match_spots.Count);
         current_spot = 0;
         matches.Text = "0";
         MainText.DeselectAll();
     }
 }
Ejemplo n.º 17
0
        private void GetDescription(int c)
        {
            if (c > MainText.Length - 1)
            {
                c = MainText.Length - 1;
            }
            string texts = MainText.Substring(0, c);

            rb.Clear();
            rb.Text = texts;
            SetAsBold(package.GetFullName());
        }
Ejemplo n.º 18
0
        public AlertForm(string mainText, int size = 10)
        {
            InitializeComponent();

            buttonOk.BringToFront();

            MainText.SelectionFont = new Font("Tahoma", size, FontStyle.Regular);
            MainText.AppendText(mainText + "\r\n");
            MainText.ScrollToCaret();
            MainText.SelectAll();
            MainText.SelectionAlignment = HorizontalAlignment.Center;
        }
Ejemplo n.º 19
0
 void ResetValues()
 {
     if (MatchCountLabel.Text != "0")
     {
         Keyword = "";
         MatchSpots.RemoveRange(0, MatchSpots.Count);
         CurrentSpot          = 0;
         MatchCountLabel.Text = "0";
         MainText.DeselectAll();
         MainRichText.DeselectAll();
     }
 }
Ejemplo n.º 20
0
        public override void RotateTextToBeReadable()
        {
            float distanceFromDestination = (transform.position - PositionMarker.transform.position).magnitude;

            if (distanceFromDestination < PromptSettings.CloseDistance)
            {
                MainText.eulerAngles = new Vector3(0, Hmd.eulerAngles.y, 0);
            }
            else
            {
                MainText.LookAt(Hmd);
                MainText.eulerAngles = new Vector3(0, 180 + MainText.eulerAngles.y, 0);
            }
        }
Ejemplo n.º 21
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = TopText != null?TopText.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (MainText != null ? MainText.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (BottomText != null ? BottomText.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (TranslateText != null ? TranslateText.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ TranslateTextColor.GetHashCode();
                hashCode = (hashCode * 397) ^ Scale.GetHashCode();
                return(hashCode);
            }
        }
Ejemplo n.º 22
0
        void Find()
        {
            ResetValues();
            Keyword = SearchBox.Text;
            if (IsInBinaryMode)
            {
                TextToSearch = MainRichText.Text;
            }
            else
            {
                TextToSearch = MainText.Text;
            }
            if (Keyword.Length == 0)
            {
                return;
            }
            bool loop       = true;
            int  StartIndex = 0;

            while (loop)
            {
                loop = false;
                int match_spot = TextToSearch.IndexOf(Keyword, StartIndex, ComparisonType);
                if (match_spot >= 0)
                {
                    MatchSpots.Add(match_spot);
                    if ((match_spot + Keyword.Length) < TextToSearch.Length)
                    {
                        StartIndex = match_spot + 1;
                        loop       = true;
                    }
                }
            }
            MatchCountLabel.Text = MatchSpots.Count.ToString();
            if (MatchSpots.Count > 0)
            {
                if (IsInBinaryMode)
                {
                    MainRichText.Select(MatchSpots[0], Keyword.Length);
                    MainRichText.ScrollToCaret();
                }
                else
                {
                    MainText.Select(MatchSpots[0], Keyword.Length);
                    MainText.ScrollToCaret();
                }
            }
        }
Ejemplo n.º 23
0
    IEnumerator Prelude()
    {
        PlayerControl.Constrain();
        yield return(new WaitForSeconds(1f));

        MainText.AddToDisplayQueue("In Darkness, I search for a path . . .");
        MainText.DisplayText();
        PlayerControl.PlaySound(preludeSound);
        yield return(new WaitWhile(() => MainText.active));

        yield return(new WaitForSeconds(1f));

        Fader.FadeIn();
        lightGroup1.SetActive(true);
        PlayerControl.Release();
    }
Ejemplo n.º 24
0
    private void ModifyChoice(int choiceNum, GameObject choiceGO, MainText currentNode)
    {
        Choice currChoice = currentNode.GetChoiceList()[choiceNum];

        choiceGO.transform.GetChild(0).GetComponent <Text>().text = currChoice.GetChoiceText();
        choiceGO.GetComponent <ChoiceButton>().SetOnPressedEvent(currChoice.GetOnChosenEvent());
        choiceGO.GetComponent <ChoiceButton>().SetMyChoice(currChoice);

        if (currChoice.CheckSeen())
        {
            choiceGO.GetComponent <Image>().color = Color.cyan;
        }
        else
        {
            choiceGO.GetComponent <Image>().color = Color.white;
        }
    }
Ejemplo n.º 25
0
 void find_next()
 {
     if (match_spots.Count == 0)
     {
         return;
     }
     if (current_spot == (match_spots.Count - 1))
     {
         current_spot = 0;
     }
     else
     {
         current_spot++;
     }
     MainText.Select(match_spots[current_spot], keyword.Length);
     MainText.ScrollToCaret();
 }
Ejemplo n.º 26
0
 void find_prev()
 {
     if (match_spots.Count == 0)
     {
         return;
     }
     if (current_spot == 0)
     {
         current_spot = match_spots.Count - 1;
     }
     else
     {
         current_spot--;
     }
     MainText.Select(match_spots[current_spot], keyword.Length);
     MainText.ScrollToCaret();
 }
Ejemplo n.º 27
0
 public void SetText(string Text, string EncodingType)
 {
     if (MainText.InvokeRequired)
     {
         SetText_d UiDelegate = new SetText_d(SetText);
         MainText.Invoke(UiDelegate, new object[] { Text, EncodingType });
     }
     else
     {
         SetTextValue(Text, Tools.IsBinary(Text));
         Encoding EncToUse = Encoding.GetEncoding(EncodingType);
         SetHex(EncToUse.GetBytes(Text));
         this.EncodingType = EncodingType;
         this.ResetChangedStatus();
         Find();
     }
 }
Ejemplo n.º 28
0
        public override void Copy(ITextDisplayStyle source)
        {
            Name = source.Name;
            BackgroundTransparent = source.BackgroundTransparent;
            BackgroundColour      = source.BackgroundColour;
            BackgroundImage       = source.BackgroundImage;
            TransitionTime        = source.TransitionTime;
            BibleDisplayStyle bibleSource = source as BibleDisplayStyle;

            if (bibleSource != null)
            {
                PassageTitle.Copy(bibleSource.PassageTitle);
                CopyRight.Copy(bibleSource.CopyRight);
                MainText.Copy(bibleSource.MainText);
            }
            OnChanged();
        }
Ejemplo n.º 29
0
        public MainWindow()
        {
            InitializeComponent();

            List <string> styles = new List <string> {
                "Day", "night"
            };

            Theme.SelectionChanged += Theme_SelectionChanged;
            Theme.ItemsSource       = styles;
            Theme.SelectedItem      = "night";

            Uri iconUri = new Uri("pack://application:,,,/Resources/BI.ico");

            this.Icon = BitmapFrame.Create(iconUri);
            MainText.AddHandler(RichTextBox.DragOverEvent, new DragEventHandler(DragItem), true);
            MainText.AddHandler(RichTextBox.DropEvent, new DragEventHandler(DropItem), true);
        }
Ejemplo n.º 30
0
    IEnumerator S3KeyEvent()
    {
        yield return(new WaitWhile(() => MainText.active));

        yield return(new WaitForSeconds(3f));

        int randomInt = Random.Range(1, 4);
        int randomPillar;

        for (int i = 0; i <= randomInt; i++)
        {
            do
            {
                randomPillar = Random.Range(0, pillars.transform.childCount);
            } while (pillars.transform.GetChild(randomPillar).GetComponent <Pillar>().active);
            pillars.transform.GetChild(randomPillar).GetComponent <Pillar>().SwitchState(false);
        }
        MainText.AddToDisplayQueue("Life is full of challenges.");
        MainText.AddToDisplayQueue("Make all pillars <b>glow</b>.");
        MainText.DisplayText();
        PlayerControl.PlaySound(keyEvent3Sound);
        yield return(new WaitWhile(() => MainText.active));

        S3PuzzleStart = true;
        yield return(new WaitUntil(() => S3PuzzleSuccess));

        PlayerControl.PlaySound(keyEvent3FinishSound);
        yield return(new WaitForSeconds(5f));

        MainText.AddToDisplayQueue("I wander in this world of darkness, lost.", 4f);
        MainText.AddToDisplayQueue("But through these lights, I come to realize God's great plan for me.", 4f);
        MainText.AddToDisplayQueue("A light for innocence.");
        MainText.AddToDisplayQueue("A light for spirituality.");
        MainText.AddToDisplayQueue("A light for knowledge.");
        MainText.AddToDisplayQueue("What light awaits me?");
        MainText.DisplayText();
        yield return(new WaitWhile(() => MainText.active));

        yield return(new WaitForSeconds(3f));

        lightGroup4.SetActive(true);
        PlayerControl.PlaySound(aVoiceFromAbove);
        StartCoroutine(Finale());
    }