コード例 #1
0
 /// <summary>
 /// Changed イベントを発生させます。
 /// </summary>
 /// <param name="sender">設定の変更に使用したコントロールなどを指定します。</param>
 /// <param name="value">変更後の設定値を提供します。</param>
 private static void OnChanged(object sender, object value)
 {
     if (SettingTreePanel.Changed == null)
     {
         return;
     }
     SettingTreePanel.Changed(sender, value);
 }
コード例 #2
0
        /// <summary>
        /// this.ctrl が SettingContainerAttribute を設定されている時、
        /// this.ctrl の初期化を行います。
        /// </summary>
        private void initialize_ctrl()
        {
            object[] attrs = this.ctrl.GetType().GetCustomAttributes(typeof(SettingContainerAttribute), false);
            if (attrs.Length == 0)
            {
                return;
            }
            SettingContainerAttribute container = (SettingContainerAttribute)attrs[0];

            if (container.k == null)
            {
                if (container.keypath == null)
                {
                    System.Type t = this.ctrl.GetType();
                    container.k = SettingTreePanel.Key[t.FullName + "+" + t.GUID.ToString("N")];
                }
                else
                {
                    container.k = SettingTreePanel.Key.GetKey(container.keypath);
                }
            }
            container.Initialize(this.ctrl);
            SettingTreePanel.AddSettingTemporary(container);
        }