段伦娜吧 关注:2贴子:173
  • 4回复贴,共1
sdsafafadfadfadfsdf发的鬼地方个地方官


IP属地:辽宁1楼2016-06-27 17:23回复
    using System;
    using System.Windows;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    namespace Test
    {
    class Test2:Application
    {
    [STAThread()]
    static void Main() {
    Test2 t2 = new Test2();
    t2.MainWindow = new Class1();
    t2.MainWindow.ShowDialog();
    }
    }
    }


    IP属地:辽宁2楼2017-11-08 00:28
    回复
      2025-12-01 22:41:34
      广告
      不感兴趣
      开通SVIP免广告
      using System.Windows;
      using System.Windows.Controls;
      using System.Windows.Markup;
      using System.Collections.Generic;
      using System.Linq;
      using System.Text;
      namespace Test
      {
      class Class1:Window
      {
      private static int a = 0;
      private Button bt;
      public Class1()
      {
      t();
      }
      private void t(){
      this.Width = 200;
      this.Height=200;
      this.Top = this.Left = 100;
      this.Title = "kaitou";
      DockPanel dp = new DockPanel();
      bt = new Button();
      bt.Content = "click me";
      bt.Margin = new Thickness(30);
      bt.Click+=doclick;
      IAddChild con = dp;
      con.AddChild(bt);
      con = this;
      con.AddChild(dp);
      }
      private void doclick(object sender,RoutedEventArgs e){
      bt.Content = "thanks";
      a += 1;
      if(a%2==0){
      bt.Content = "click me";
      }
      }
      }
      }


      IP属地:辽宁3楼2017-11-08 00:28
      回复
        String a = "qwe{1,2,3}weqwe";
        int z= a.indexOf("{");
        int x= a.indexOf("}");
        String b =a.substring(z+1,x);
        System.out.println("z"+z);
        System.out.println("x"+x);
        System.out.println(b);


        IP属地:辽宁4楼2017-11-29 20:14
        回复
          String regEx = ".+/(.+)$";String str = "c:/dir1/dir2/name.txt";Pattern p = Pattern.compile(regEx);Matcher m = p.matcher(str);if (!m.find()){ System.out.println("文件路径格式错误!"); return;}System.out.println(m.group(1));


          IP属地:辽宁5楼2018-01-02 00:35
          回复