// ======================================== // method // ======================================== public override void ConfigureDetailForm(DetailSettingsForm detailForm) { /// file detail page var memoFile = _owner.Model; var filePage = new FileDetailPage(_owner.Host); filePage.Title = memoFile.Name; filePage.Path = memoFile.IsEmbedded? "": memoFile.Path; filePage.IsModified = false; detailForm.RegisterPage("ファイル", filePage); }
public override void ConfigureDetailForm(DetailSettingsForm detailForm) { var fig = _owner.Figure; /// background detail page var bgPage = new NodeBackgroundDetailPage(new [] { _owner.Host }); bgPage.Background = fig.IsBackgroundEnabled? fig.Background: null; bgPage.IsModified = false; detailForm.RegisterPage("背景", bgPage); /// border detail page var borderPage = new NodeBorderDetailPage(new [] { _owner.Host }); borderPage.IsBorderEnabled = fig.IsForegroundEnabled; borderPage.LineColor = fig.Foreground; borderPage.LineWidth = fig.BorderWidth; borderPage.LineDashStyle = fig.BorderDashStyle; borderPage.IsModified = false; detailForm.RegisterPage("枠線", borderPage); }
public override void ConfigureDetailForm(DetailSettingsForm detailForm) { var fig = _owner.Figure; /// line detail page var borderPage = new EdgeLineDetailPage(new [] { _owner.Host }); borderPage.LineColor = fig.LineColor; borderPage.LineWidth = fig.LineWidth; borderPage.LineDashStyle = fig.LineDashStyle; borderPage.IsModified = false; detailForm.RegisterPage("線", borderPage); }
// ======================================== // property // ======================================== // ======================================== // method // ======================================== public override void ConfigureDetailForm(DetailSettingsForm detailForm) { /// property detail page var propObj = new PropObj() { Name = _operation.Name, Stereotype = _operation.Stereotype, Type = _operation.TypeName, Parameters = _operation.Parameters, IsAbstract = _operation.IsAbstract, IsStatic = _operation.IsStatic, Visibility = _operation.Visibility, }; Func <object, ICommand> updateCmdProvider = obj => { var old = new PropObj() { Name = _operation.Name, Stereotype = _operation.Stereotype, Type = _operation.TypeName, Parameters = _operation.Parameters, IsAbstract = _operation.IsAbstract, IsStatic = _operation.IsStatic, Visibility = _operation.Visibility, }; return(new DelegatingCommand( () => { _operation.Name = propObj.Name; _operation.Stereotype = propObj.Stereotype; _operation.TypeName = propObj.Type; _operation.Parameters = propObj.Parameters; _operation.IsAbstract = propObj.IsAbstract; _operation.IsStatic = propObj.IsStatic; _operation.Visibility = propObj.Visibility; }, () => { _operation.Name = old.Name; _operation.Stereotype = old.Stereotype; _operation.TypeName = old.Type; _operation.Parameters = old.Parameters; _operation.IsAbstract = old.IsAbstract; _operation.IsStatic = old.IsStatic; _operation.Visibility = old.Visibility; } )); }; var propPage = new PropertyDetailSettingsPage(propObj, updateCmdProvider); detailForm.RegisterPage("モデル", propPage); }
public override void ConfigureDetailForm(DetailSettingsForm detailForm) { /// background detail page var bgPage = new NodeBackgroundDetailPage(new[] { _owner.Host }); bgPage.Background = _node.IsBackgroundEnabled? _node.Background: null; bgPage.IsModified = false; detailForm.RegisterPage("背景", bgPage); /// border detail page var borderPage = new NodeBorderLineDetailPage( new [] { _owner.Host, _owner.Host.Children.ElementAt(0), _owner.Host.Children.ElementAt(1), } ); borderPage.LineColor = _node.Foreground; borderPage.LineWidth = _node.BorderWidth; borderPage.LineDashStyle = _node.BorderDashStyle; borderPage.IsModified = false; detailForm.RegisterPage("枠線", borderPage); }
private void _optionToolStripMenuItem_Click(object sender, EventArgs e) { var form = new DetailSettingsForm(); try { form.Text = "オプション"; form.Size = new Size(500, 400); form.Theme = _theme; var basic = new BasicSettingsDetailPage( _app.Settings, _app.WindowSettings, _app.MainForm.ToolRegistry ); form.RegisterPage("基本", basic); var background = new BackgroundSettingsDetailPage(_app.Settings, _app.WindowSettings); form.RegisterPage("背景", background); var confirm = new ConfirmSettingsDetailPage(_app.Settings); form.RegisterPage("確認", confirm); var folder = new FolderSettingsDetailPage(_app.BootstrapSettings, _app.WindowSettings); form.RegisterPage("フォルダ", folder); var hotkey = new HotKeySettingsDetailPage(_app.HotKey, _app.WindowSettings); form.RegisterPage("ホットキー", hotkey); var abbrev = new AbbrevSettingDetailPage(_app._AbbrevWordPersister); form.RegisterPage("単語補完", abbrev); var misc = new MiscSettingsDetailPage(_app.Settings, _app.WindowSettings); form.RegisterPage("その他", misc); if (form.ShowDialog(this) == DialogResult.OK) { var cmd = form.GetUpdateCommand(); if (cmd != null) { cmd.Execute(); MessageBox.Show(this, "一部の設定はアプリケーションを再起動するまで反映されません。", "設定の変更"); } } } finally { form.Dispose(); } }
public override void ConfigureDetailForm(DetailSettingsForm detailForm) { /// property detail page var propObj = new PropObj() { Name = _Classifier.Name, Stereotype = _Classifier.Stereotype, IsAbstract = _Classifier.IsAbstract, Visibility = _Classifier.Visibility, }; Func <object, ICommand> updateCmdProvider = obj => { var old = new PropObj() { Name = _Classifier.Name, Stereotype = _Classifier.Stereotype, IsAbstract = _Classifier.IsAbstract, Visibility = _Classifier.Visibility, }; return(new DelegatingCommand( () => { _Classifier.Name = propObj.Name; _Classifier.Stereotype = propObj.Stereotype; _Classifier.IsAbstract = propObj.IsAbstract; _Classifier.Visibility = propObj.Visibility; }, () => { _Classifier.Name = old.Name; _Classifier.Stereotype = old.Stereotype; _Classifier.IsAbstract = old.IsAbstract; _Classifier.Visibility = old.Visibility; } )); }; var propPage = new PropertyDetailSettingsPage(propObj, updateCmdProvider); detailForm.RegisterPage("モデル", propPage); base.ConfigureDetailForm(detailForm); }
// ======================================== // property // ======================================== // ======================================== // method // ======================================== public override void ConfigureDetailForm(DetailSettingsForm detailForm) { /// property detail page var propObj = new PropObj() { Name = _property.Name, Stereotype = _property.Stereotype, Type = _property.TypeName, IsStatic = _property.IsStatic, IsDerived = _property.IsDerived, IsReadOnly = _property.IsReadOnly, IsUnique = _property.IsUnique, IsOrdered = _property.IsOrdered, IsUpperUnlimited = _property.IsUpperUnlimited, Upper = _property.Upper, Lower = _property.Lower, Default = _property.Default, Visibility = _property.Visibility, }; Func <object, ICommand> updateCmdProvider = obj => { var old = new PropObj() { Name = _property.Name, Stereotype = _property.Stereotype, Type = _property.TypeName, IsStatic = _property.IsStatic, IsDerived = _property.IsDerived, IsReadOnly = _property.IsReadOnly, IsUnique = _property.IsUnique, IsOrdered = _property.IsOrdered, IsUpperUnlimited = _property.IsUpperUnlimited, Upper = _property.Upper, Lower = _property.Lower, Default = _property.Default, Visibility = _property.Visibility, }; return(new DelegatingCommand( () => { _property.Name = propObj.Name; _property.Stereotype = propObj.Stereotype; _property.TypeName = propObj.Type; _property.IsStatic = propObj.IsStatic; _property.IsDerived = propObj.IsDerived; _property.IsReadOnly = propObj.IsReadOnly; _property.IsUnique = propObj.IsUnique; _property.IsOrdered = propObj.IsOrdered; _property.IsUpperUnlimited = propObj.IsUpperUnlimited; _property.Upper = propObj.Upper; _property.Lower = propObj.Lower; _property.Default = propObj.Default; _property.Visibility = propObj.Visibility; }, () => { _property.Name = old.Name; _property.Stereotype = old.Stereotype; _property.TypeName = old.Type; _property.IsStatic = old.IsStatic; _property.IsDerived = old.IsDerived; _property.IsReadOnly = old.IsReadOnly; _property.IsUnique = old.IsUnique; _property.IsOrdered = old.IsOrdered; _property.IsUpperUnlimited = old.IsUpperUnlimited; _property.Upper = old.Upper; _property.Lower = old.Lower; _property.Default = old.Default; _property.Visibility = old.Visibility; } )); }; var propPage = new PropertyDetailSettingsPage(propObj, updateCmdProvider); detailForm.RegisterPage("モデル", propPage); }
public override void ConfigureDetailForm(DetailSettingsForm detailForm) { var fig = _owner.Figure; var assoc = _owner.Model; var source = assoc.SourceMemberEnd; var target = assoc.TargetMemberEnd; /// property detail page var propObj = new PropObj() { IsSourceNavigable = assoc.IsSourceNavigable, IsTargetNavigable = assoc.IsTargetNavigable, SourceMemberEnd = new MemberEnd() { Name = source.Name, Stereotype = source.Stereotype, Aggregation = source.Aggregation, IsUpperUnlimited = source.IsUpperUnlimited, Upper = source.Upper, Lower = source.Lower, Visibility = source.Visibility, }, TargetMemberEnd = new MemberEnd() { Name = target.Name, Stereotype = target.Stereotype, Aggregation = target.Aggregation, IsUpperUnlimited = target.IsUpperUnlimited, Upper = target.Upper, Lower = target.Lower, Visibility = target.Visibility, }, }; Func <object, ICommand> updateCmdProvider = obj => { var old = new PropObj() { IsSourceNavigable = assoc.IsSourceNavigable, IsTargetNavigable = assoc.IsTargetNavigable, SourceMemberEnd = new MemberEnd() { Name = source.Name, Stereotype = source.Stereotype, Aggregation = source.Aggregation, IsUpperUnlimited = source.IsUpperUnlimited, Upper = source.Upper, Lower = source.Lower, Visibility = source.Visibility, }, TargetMemberEnd = new MemberEnd() { Name = target.Name, Stereotype = target.Stereotype, Aggregation = target.Aggregation, IsUpperUnlimited = target.IsUpperUnlimited, Upper = target.Upper, Lower = target.Lower, Visibility = target.Visibility, }, }; return(new DelegatingCommand( () => { assoc.IsSourceNavigable = propObj.IsSourceNavigable; assoc.IsTargetNavigable = propObj.IsTargetNavigable; source.Name = propObj.SourceMemberEnd.Name; source.Stereotype = propObj.SourceMemberEnd.Stereotype; source.Aggregation = propObj.SourceMemberEnd.Aggregation; source.IsUpperUnlimited = propObj.SourceMemberEnd.IsUpperUnlimited; source.Upper = propObj.SourceMemberEnd.Upper; source.Lower = propObj.SourceMemberEnd.Lower; source.Visibility = propObj.SourceMemberEnd.Visibility; target.Name = propObj.TargetMemberEnd.Name; target.Stereotype = propObj.TargetMemberEnd.Stereotype; target.Aggregation = propObj.TargetMemberEnd.Aggregation; target.IsUpperUnlimited = propObj.TargetMemberEnd.IsUpperUnlimited; target.Upper = propObj.TargetMemberEnd.Upper; target.Lower = propObj.TargetMemberEnd.Lower; target.Visibility = propObj.TargetMemberEnd.Visibility; }, () => { assoc.IsSourceNavigable = old.IsSourceNavigable; assoc.IsTargetNavigable = old.IsTargetNavigable; source.Name = old.SourceMemberEnd.Name; source.Stereotype = old.SourceMemberEnd.Stereotype; source.Aggregation = old.SourceMemberEnd.Aggregation; source.IsUpperUnlimited = old.SourceMemberEnd.IsUpperUnlimited; source.Upper = old.SourceMemberEnd.Upper; source.Lower = old.SourceMemberEnd.Lower; source.Visibility = old.SourceMemberEnd.Visibility; target.Name = old.TargetMemberEnd.Name; target.Stereotype = old.TargetMemberEnd.Stereotype; target.Aggregation = old.TargetMemberEnd.Aggregation; target.IsUpperUnlimited = old.TargetMemberEnd.IsUpperUnlimited; target.Upper = old.TargetMemberEnd.Upper; target.Lower = old.TargetMemberEnd.Lower; target.Visibility = old.TargetMemberEnd.Visibility; } )); }; var propPage = new PropertyDetailSettingsPage(propObj, updateCmdProvider); detailForm.RegisterPage("モデル", propPage); /// line detail page var borderPage = new EdgeLineDetailPage(new[] { _owner.Host }); borderPage.LineColor = fig.LineColor; borderPage.LineWidth = fig.LineWidth; borderPage.LineDashStyle = fig.LineDashStyle; borderPage.IsModified = false; detailForm.RegisterPage("線", borderPage); }