Exemple #1
0
        protected string PopUpForm(string placeholder)
        {
            string formValue = "";

            using (TextBoxWindow textBoxWindow = new TextBoxWindow(placeholder))
            {
                if (textBoxWindow.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    textBoxWindow.ShowDialog();
                }
                formValue = textBoxWindow.value;
            }
            return(formValue);
        }
Exemple #2
0
        private void ExportXraySettings(object sender, RoutedEventArgs e)
        {
            StringBuilder sb = new StringBuilder();

            foreach (var record in Records.Where(x => x.IsChecked))
            {
                record.Settings.Types.ForEach(type =>
                {
                    var link = ShareLink.Build(type, record.Settings);
                    sb.AppendLine(link);
                });
            }
            var tbx = new TextBoxWindow("分享链接", sb.ToString());

            tbx.ShowDialog();
        }
Exemple #3
0
    void HandleImportWorldList(string button)
    {
        switch (button)
        {
        case "sdcard":
            WorldPacker.ImportFromSdcard();
            break;

        case "external_link":
            TextBoxWindow.ShowTextBox("enter_world_link", (url) =>
            {
                if (!url.Contains("://"))
                {
                    url = "file://" + url.Replace('\\', '/');
                }
                StartCoroutine(GetFromURL(url));
            });
            break;
        }
    }
Exemple #4
0
 public override void ToolMouseUp(object sender, MouseEventArgs e)
 {
     if (classDiagram != null)
     {
         if (e.Button == MouseButtons.Left)
         {
             DrawingObject obj         = canvas.GetObjectAt(e.X, e.Y);
             string        passingText = "class name";
             using (TextBoxWindow textBoxWindow = new TextBoxWindow(passingText))
             {
                 if (textBoxWindow.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                 {
                     textBoxWindow.ShowDialog();
                 }
                 string formValue = textBoxWindow.value;
                 this.classDiagram.AddClassText(formValue);
             }
             this.classDiagram.Select();
         }
     }
 }
        private void AddLanguageFile_OnClick(object sender, RoutedEventArgs e)
        {
            // Configure open file dialog box.
            OpenFileDialog dlg = new OpenFileDialog {
                DefaultExt = ".txt", Filter = "Language Files (.txt)|*.txt"
            };

            // Show open file dialog box.
            bool?result = dlg.ShowDialog();

            // Process open file dialog box results
            if (result != true)
            {
                return;
            }

            // Show language name dialog box.
            TextBoxWindow textboxDlg = new TextBoxWindow();

            result = textboxDlg.ShowDialog("Add Language", "Please enter the name of the language!");

            if (result != true)
            {
                return;
            }

            // Add language file to project.
            ProjectSettings projectSettings = (ProjectSettings)this.DataContext;
            LanguageFile    languageFile    = new LanguageFile {
                LanguageTag = textboxDlg.Text, Path = dlg.FileName
            };

            projectSettings.AddLanguageFile(languageFile);

            // Refresh list.
            this.LanguageFileList.Items.Refresh();
        }