コード例 #1
0
ファイル: TheDockpane.xaml.cs プロジェクト: GisSense/ShowJSON
        private async void btnDraw_Click(object sender, RoutedEventArgs e)
        {
            SolidColorBrush clr        = Brushes.Blue;
            JsonHelper      jsonHelper = null;
            string          message    = "";

            try
            {
                jsonHelper = new JsonHelper(this.txbJSON.Text, ShowPro.Current);
                bool success = await jsonHelper.ShowGraphics();

                message = jsonHelper.Message;
                if (!success)
                {
                    clr = Brushes.Red;
                }
            }
            catch
            {
                ShowPro.ClearGraphics();
                message = "Technical error; check your JSON!";
                clr     = Brushes.Red;
            }
            finally
            {
                ShowMessage(message, clr, 3);
            }
        }
コード例 #2
0
ファイル: TheDockpane.xaml.cs プロジェクト: GisSense/ShowJSON
 private void btnClearGeometries_Click(object sender, RoutedEventArgs e)
 {
     if (ShowPro.ClearGraphics())
     {
         this.txbJSON.Focus();
         ShowMessage("Geometries cleared", Brushes.Blue, 1);
     }
 }