예제 #1
0
        private void reset(int characterId, bool isAnonymous,
                           string lines, Sugarism.ELinesEffect linesEffect)
        {
            if (Common.Instance.IsValidCharacter(characterId))
            {
                SelectedItem = CharacterList[characterId];
            }
            else
            {
                if (null == CharacterList)
                {
                    SelectedItem = null;
                }
                else if (CharacterList.Length > 0)
                {
                    SelectedItem = CharacterList[0];
                }
                else
                {
                    SelectedItem = null;
                }
            }

            IsAnonymous = isAnonymous;
            Lines       = lines;
            LinesEffect = linesEffect;
        }
예제 #2
0
 // default handler
 private void onCmdLines(int characterId, bool isAnonymous,
                             string lines, Sugarism.ELinesEffect linesEffect)
 {
     Log.Debug(string.Format(
         "onCmdLines; characterId({0}), isAnonymous({1}), linesEffect({2}), lines: \"{3}\"",
         characterId, isAnonymous, linesEffect, lines));
 }
예제 #3
0
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if ((null == value) || (false == (value is Sugarism.ELinesEffect)))
            {
                return(string.Empty);
            }

            Sugarism.ELinesEffect eff = (Sugarism.ELinesEffect)value;
            return(eff.ToString());
        }
예제 #4
0
    // EventHandler
    private void onCmdLines(int characterId, bool isAnonymous, string lines, Sugarism.ELinesEffect linesEffect)
    {
        string name = getName(characterId, isAnonymous);

        setName(name);
        setActiveNamePanel(true);

        setLines(lines);

        set(linesEffect);

        Show();
    }
예제 #5
0
        private EditLines()
        {
            _lines = string.Empty;

            _linesEffectList = new List <Sugarism.ELinesEffect>();
            Array arr = Enum.GetValues(typeof(Sugarism.ELinesEffect));

            foreach (var v in arr)
            {
                Sugarism.ELinesEffect item = (Sugarism.ELinesEffect)v;
                _linesEffectList.Add(item);
            }
        }
예제 #6
0
    private void set(Sugarism.ELinesEffect linesEffect)
    {
        switch (linesEffect)
        {
        case Sugarism.ELinesEffect.Shake:
            _shake = InitShakeAmount;
            break;

        case Sugarism.ELinesEffect.None:
        default:
            resetShake();
            break;
        }
    }
예제 #7
0
        /// <summary>
        /// Show View.Popup.EditLines.
        /// </summary>
        /// <param name="characterId">Character Id before editing.</param>
        /// <param name="lines">Lines before editing.</param>
        /// <returns>Whether edit or not.</returns>
        public bool Show(int characterId, bool isAnonymous,
                         string lines, Sugarism.ELinesEffect linesEffect)
        {
            reset(characterId, isAnonymous, lines, linesEffect);

            View.Popup.EditLines view = new View.Popup.EditLines(this);

            bool?result = view.ShowDialog();

            switch (result)
            {
            case true:
                return(true);

            default:
                return(false);
            }
        }
예제 #8
0
 public void Invoke(int characterId, bool isAnonymous,
                     string lines, Sugarism.ELinesEffect linesEffect)
 {
     _event.Invoke(characterId, isAnonymous, lines, linesEffect);
 }