Beispiel #1
0
 public override void Start(NamedId who)
 {
     // MouseDownトークン
     if (who.Equals(_tokens[0]))
     {
         Finalizers.Add(new FinalizeManager.Finalize(finalMouseDownPart4Size));  // SezeSelected・・・も継承しているので、ID不指定
     }
     // MouseMoveトークン
     if (who.Equals(_tokens[1]))
     {
         OnMouseMove(null);
     }
 }
Beispiel #2
0
 public override void Start(NamedId who)
 {
     if (TokenAutoScrollOFF.Equals(who))
     {
         Enabled = false;
     }
 }
Beispiel #3
0
 public override void Start(NamedId who)
 {
     base.Start(who);
     if (_token.Equals(who))
     {
         if (textBox1 != null && _tarParts != null)
         {
             textBox1.Font = _tarParts.LastFont;
         }
     }
 }
Beispiel #4
0
        /// <summary>
        /// 切り替え
        /// </summary>
        public override void Start(NamedId who)
        {
            if (_tokenSwitch.Equals(who))
            {
                var sw = (FeatureSwitch.TagFeatureSwitch)Share.Get("TokenChangeFeatureSwitches", typeof(FeatureSwitch.TagFeatureSwitch));
                if (ID == sw.switchingFeatureID)
                {
                    _isOn = sw.sw;
                    if (_checkBox != null)
                    {
                        ThreadSafe.SetChecked(_checkBox, _isOn);
                    }
                }
                else
                {
                    return;
                }
            }
            else
            if (_tokenReadCompleted.Equals(who) == false)
            {
                if (string.IsNullOrEmpty(_interlockGroup))
                {
                    // UNDO/REDOしながら、スイッチ切り替え
                    Persister[UNDO].StartChunk(GetType().Name + ".Start");
                    Persister[REDO].StartChunk(GetType().Name + ".Start");

                    Persister[UNDO].Save(new TagFeatureSwitch(this, _isOn), _featureDataID);
                    _isOn = (_isOn ? false : true);
                    Persister[REDO].Save(new TagFeatureSwitch(this, _isOn), _featureDataID);

                    Persister[UNDO].EndChunk();
                    Persister[REDO].EndChunk();
                }
                else
                {
                    if (_isOn == false)
                    {
                        // UNDO/REDOしながら、グループの相手をOFFにする。
                        Persister[UNDO].StartChunk(GetType().Name + ".Start");
                        Persister[REDO].StartChunk(GetType().Name + ".Start");

                        var ig = (IList)_interlockGroups[_interlockGroup];
                        foreach (FeatureSwitch swf in ig)
                        {
                            if (object.ReferenceEquals(this, swf))
                            {
                                continue;
                            }
                            if (swf._isOn != false)
                            {
                                Persister[UNDO].Save(new TagFeatureSwitch(swf, swf._isOn), _featureDataID);
                                swf._isOn = false;
                                Persister[REDO].Save(new TagFeatureSwitch(swf, swf._isOn), _featureDataID);
                                if (swf._checkBox != null)
                                {
                                    ThreadSafe.SetChecked(swf._checkBox, swf._isOn);
                                }
                                swf.resetSwitch();
                            }
                        }
                        Persister[UNDO].Save(new TagFeatureSwitch(this, _isOn), _featureDataID);
                        _isOn = true;
                        Persister[REDO].Save(new TagFeatureSwitch(this, _isOn), _featureDataID);

                        Persister[UNDO].EndChunk();
                        Persister[REDO].EndChunk();
                    }
                }
            }
            if (_checkBox != null)
            {
                ThreadSafe.SetChecked(_checkBox, _isOn);
            }

            resetSwitch();
        }