コード例 #1
0
ファイル: Dialogs.cs プロジェクト: DarkApocalypse/HQMEditor
        private static void SelectString(SelectStringMessage message)
        {
            Window sender = message.Target as Window;

            SelectStringViewModel viewModel = new SelectStringViewModel(message.Title, message.MaxLength, message.StringValue);
            SelectStringWindow dlg = new SelectStringWindow(viewModel) { Owner = sender };
            if (dlg.ShowDialog() != true)
            {
                return;
            }

            message.Accepted = true;
            message.StringValue = viewModel.Value;
        }
コード例 #2
0
 public SelectStringWindow(SelectStringViewModel viewModel)
 {
     this.ViewModel = viewModel.ValidateNotNull(nameof(viewModel));
     this.InitializeComponent();
 }